src/sdl.h
branchgamebalance
changeset 9895 7bd07f43b0e3
parent 5726 8f399788f6c9
child 6307 f40e88cff863
equal deleted inserted replaced
9894:70d78ac95d6c 9895:7bd07f43b0e3
    11 #endif
    11 #endif
    12 
    12 
    13 #ifdef DYNAMICALLY_LOADED_SDL
    13 #ifdef DYNAMICALLY_LOADED_SDL
    14 	#include <SDL.h>
    14 	#include <SDL.h>
    15 
    15 
    16 	typedef struct SDLProcs {
    16 	struct SDLProcs {
    17 		int (SDLCALL *SDL_Init)(Uint32);
    17 		int (SDLCALL *SDL_Init)(Uint32);
    18 		int (SDLCALL *SDL_InitSubSystem)(Uint32);
    18 		int (SDLCALL *SDL_InitSubSystem)(Uint32);
    19 		char *(SDLCALL *SDL_GetError)(void);
    19 		char *(SDLCALL *SDL_GetError)();
    20 		void (SDLCALL *SDL_QuitSubSystem)(Uint32);
    20 		void (SDLCALL *SDL_QuitSubSystem)(Uint32);
    21 		void (SDLCALL *SDL_UpdateRect)(SDL_Surface *, Sint32, Sint32, Uint32, Uint32);
    21 		void (SDLCALL *SDL_UpdateRect)(SDL_Surface *, Sint32, Sint32, Uint32, Uint32);
    22 		void (SDLCALL *SDL_UpdateRects)(SDL_Surface *, int, SDL_Rect *);
    22 		void (SDLCALL *SDL_UpdateRects)(SDL_Surface *, int, SDL_Rect *);
    23 		int (SDLCALL *SDL_SetColors)(SDL_Surface *, SDL_Color *, int, int);
    23 		int (SDLCALL *SDL_SetColors)(SDL_Surface *, SDL_Color *, int, int);
    24 		void (SDLCALL *SDL_WM_SetCaption)(const char *, const char *);
    24 		void (SDLCALL *SDL_WM_SetCaption)(const char *, const char *);
    25 		int (SDLCALL *SDL_ShowCursor)(int);
    25 		int (SDLCALL *SDL_ShowCursor)(int);
    26 		void (SDLCALL *SDL_FreeSurface)(SDL_Surface *);
    26 		void (SDLCALL *SDL_FreeSurface)(SDL_Surface *);
    27 		int (SDLCALL *SDL_PollEvent)(SDL_Event *);
    27 		int (SDLCALL *SDL_PollEvent)(SDL_Event *);
    28 		void (SDLCALL *SDL_WarpMouse)(Uint16, Uint16);
    28 		void (SDLCALL *SDL_WarpMouse)(Uint16, Uint16);
    29 		uint32 (SDLCALL *SDL_GetTicks)(void);
    29 		uint32 (SDLCALL *SDL_GetTicks)();
    30 		int (SDLCALL *SDL_OpenAudio)(SDL_AudioSpec *, SDL_AudioSpec*);
    30 		int (SDLCALL *SDL_OpenAudio)(SDL_AudioSpec *, SDL_AudioSpec*);
    31 		void (SDLCALL *SDL_PauseAudio)(int);
    31 		void (SDLCALL *SDL_PauseAudio)(int);
    32 		void (SDLCALL *SDL_CloseAudio)(void);
    32 		void (SDLCALL *SDL_CloseAudio)();
    33 		int (SDLCALL *SDL_LockSurface)(SDL_Surface*);
    33 		int (SDLCALL *SDL_LockSurface)(SDL_Surface*);
    34 		void (SDLCALL *SDL_UnlockSurface)(SDL_Surface*);
    34 		void (SDLCALL *SDL_UnlockSurface)(SDL_Surface*);
    35 		SDLMod (SDLCALL *SDL_GetModState)(void);
    35 		SDLMod (SDLCALL *SDL_GetModState)();
    36 		void (SDLCALL *SDL_Delay)(Uint32);
    36 		void (SDLCALL *SDL_Delay)(Uint32);
    37 		void (SDLCALL *SDL_Quit)(void);
    37 		void (SDLCALL *SDL_Quit)();
    38 		SDL_Surface *(SDLCALL *SDL_SetVideoMode)(int, int, int, Uint32);
    38 		SDL_Surface *(SDLCALL *SDL_SetVideoMode)(int, int, int, Uint32);
    39 		int (SDLCALL *SDL_EnableKeyRepeat)(int, int);
    39 		int (SDLCALL *SDL_EnableKeyRepeat)(int, int);
    40 		void (SDLCALL *SDL_EnableUNICODE)(int);
    40 		void (SDLCALL *SDL_EnableUNICODE)(int);
    41 		void (SDLCALL *SDL_VideoDriverName)(char *, int);
    41 		void (SDLCALL *SDL_VideoDriverName)(char *, int);
    42 		SDL_Rect **(SDLCALL *SDL_ListModes)(void *, int);
    42 		SDL_Rect **(SDLCALL *SDL_ListModes)(void *, int);
    44 		SDL_Surface *(SDLCALL *SDL_LoadBMP_RW)(SDL_RWops *, int);
    44 		SDL_Surface *(SDLCALL *SDL_LoadBMP_RW)(SDL_RWops *, int);
    45 		SDL_RWops *(SDLCALL *SDL_RWFromFile)(const char *, const char *);
    45 		SDL_RWops *(SDLCALL *SDL_RWFromFile)(const char *, const char *);
    46 		int (SDLCALL *SDL_SetColorKey)(SDL_Surface *, Uint32, Uint32);
    46 		int (SDLCALL *SDL_SetColorKey)(SDL_Surface *, Uint32, Uint32);
    47 		void (SDLCALL *SDL_WM_SetIcon)(SDL_Surface *, Uint8 *);
    47 		void (SDLCALL *SDL_WM_SetIcon)(SDL_Surface *, Uint8 *);
    48 		Uint32 (SDLCALL *SDL_MapRGB)(SDL_PixelFormat *, Uint8, Uint8, Uint8);
    48 		Uint32 (SDLCALL *SDL_MapRGB)(SDL_PixelFormat *, Uint8, Uint8, Uint8);
    49 	} SDLProcs;
    49 	};
    50 
    50 
    51 	extern SDLProcs sdl_proc;
    51 	extern SDLProcs sdl_proc;
    52 
    52 
    53 	#define SDL_CALL sdl_proc.
    53 	#define SDL_CALL sdl_proc.
    54 #else
    54 #else