tron@2186: /* $Id$ */ tron@2186: tron@2171: #ifndef SDL_H tron@2171: #define SDL_H tron@2171: tron@2171: const char* SdlOpen(uint32 x); tron@2171: void SdlClose(uint32 x); tron@2171: tron@2171: #ifdef WIN32 tron@2171: #define DYNAMICALLY_LOADED_SDL tron@2171: #endif tron@2171: tron@2171: #ifdef DYNAMICALLY_LOADED_SDL tron@2171: #include tron@2171: tron@2171: typedef struct SDLProcs { tron@2171: int (SDLCALL *SDL_Init)(Uint32); tron@2171: int (SDLCALL *SDL_InitSubSystem)(Uint32); tron@2171: char *(SDLCALL *SDL_GetError)(void); tron@2171: void (SDLCALL *SDL_QuitSubSystem)(Uint32); tron@2171: void (SDLCALL *SDL_UpdateRect)(SDL_Surface *, Sint32, Sint32, Uint32, Uint32); tron@2171: void (SDLCALL *SDL_UpdateRects)(SDL_Surface *, int, SDL_Rect *); tron@2171: int (SDLCALL *SDL_SetColors)(SDL_Surface *, SDL_Color *, int, int); tron@2171: void (SDLCALL *SDL_WM_SetCaption)(const char *, const char *); tron@2171: int (SDLCALL *SDL_ShowCursor)(int); tron@2171: void (SDLCALL *SDL_FreeSurface)(SDL_Surface *); tron@2171: int (SDLCALL *SDL_PollEvent)(SDL_Event *); tron@2171: void (SDLCALL *SDL_WarpMouse)(Uint16, Uint16); tron@2171: uint32 (SDLCALL *SDL_GetTicks)(void); tron@2171: int (SDLCALL *SDL_OpenAudio)(SDL_AudioSpec *, SDL_AudioSpec*); tron@2171: void (SDLCALL *SDL_PauseAudio)(int); tron@2171: void (SDLCALL *SDL_CloseAudio)(void); tron@2171: int (SDLCALL *SDL_LockSurface)(SDL_Surface*); tron@2171: void (SDLCALL *SDL_UnlockSurface)(SDL_Surface*); tron@2171: SDLMod (SDLCALL *SDL_GetModState)(void); tron@2171: void (SDLCALL *SDL_Delay)(Uint32); tron@2171: void (SDLCALL *SDL_Quit)(void); tron@2171: SDL_Surface *(SDLCALL *SDL_SetVideoMode)(int, int, int, Uint32); tron@2171: int (SDLCALL *SDL_EnableKeyRepeat)(int, int); tron@2171: void (SDLCALL *SDL_EnableUNICODE)(int); tron@2171: void (SDLCALL *SDL_VideoDriverName)(char *, int); tron@2171: SDL_Rect **(SDLCALL *SDL_ListModes)(void *, int); tron@2171: Uint8 *(SDLCALL *SDL_GetKeyState)(int *); Darkvater@4256: SDL_Surface *(SDLCALL *SDL_LoadBMP_RW)(SDL_RWops *, int); Darkvater@4256: SDL_RWops *(SDLCALL *SDL_RWFromFile)(const char *, const char *); Darkvater@4256: int (SDLCALL *SDL_SetColorKey)(SDL_Surface *, Uint32, Uint32); Darkvater@4256: void (SDLCALL *SDL_WM_SetIcon)(SDL_Surface *, Uint8 *); Darkvater@4256: Uint32 (SDLCALL *SDL_MapRGB)(SDL_PixelFormat *, Uint8, Uint8, Uint8); tron@2171: } SDLProcs; tron@2171: tron@2171: extern SDLProcs sdl_proc; tron@2171: tron@2171: #define SDL_CALL sdl_proc. tron@2171: #else tron@2171: #define SDL_CALL tron@2171: #endif tron@2171: Darkvater@2436: #endif /* SDL_H */