tron@2186: /* $Id$ */ tron@2186: belugas@6916: /** @file sdl.h */ belugas@6916: 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: rubidium@6574: struct SDLProcs { tron@2171: int (SDLCALL *SDL_Init)(Uint32); tron@2171: int (SDLCALL *SDL_InitSubSystem)(Uint32); rubidium@6573: char *(SDLCALL *SDL_GetError)(); 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); rubidium@6573: uint32 (SDLCALL *SDL_GetTicks)(); tron@2171: int (SDLCALL *SDL_OpenAudio)(SDL_AudioSpec *, SDL_AudioSpec*); tron@2171: void (SDLCALL *SDL_PauseAudio)(int); rubidium@6573: void (SDLCALL *SDL_CloseAudio)(); tron@2171: int (SDLCALL *SDL_LockSurface)(SDL_Surface*); tron@2171: void (SDLCALL *SDL_UnlockSurface)(SDL_Surface*); rubidium@6573: SDLMod (SDLCALL *SDL_GetModState)(); tron@2171: void (SDLCALL *SDL_Delay)(Uint32); rubidium@6573: void (SDLCALL *SDL_Quit)(); 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); rubidium@6574: }; 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 */