SDL Parameters

SDL subroutines use parameters of types that you are unlikely to have used yet. We have already discussed pointers. An example of a subroutine with a pointer as parameter has the declaration

function SDL_Flip(screen : PSDL_Surface): Integer;

Here you need to pass a pointer (of type PSDL_Surface) to the screen surface (of type TSDL_Surface). We will demonstrate later how to declare a surface pointer then assign to it the value returned by an SDL function such as SDL_SetVideoMode.

Follow these links to learn how to pass arguments such as flags, PChar strings and integers to other SDL subroutines.

Programming - a skill for life!

Topics you need to understand before programming with SDL