1 #include <proto/exec.h>
2 #include <proto/hostlib.h>
8 int (*SDL_Init
) (ULONG flags
);
9 void * (*SDL_SetVideoMode
) (int width
, int height
, int bpp
, ULONG flags
);
10 void (*SDL_Quit
) (void);
12 int main(int argc
, char **argv
) {
16 if ((HostLibBase
= OpenResource("hostlib.resource")) == NULL
) {
17 fprintf(stderr
, "can't open hostlib.resource\n");
21 if ((handle
= HostLib_Open("libSDL.so", &err
)) == NULL
) {
22 fprintf(stderr
, "can't open sdl: %s\n", err
);
26 SDL_Init
= HostLib_GetPointer(handle
, "SDL_Init", NULL
);
27 SDL_SetVideoMode
= HostLib_GetPointer(handle
, "SDL_SetVideoMode", NULL
);
28 SDL_Quit
= HostLib_GetPointer(handle
, "SDL_Quit", NULL
);
31 SDL_SetVideoMode(640, 480, 16, 0);
37 HostLib_Close(handle
, NULL
);