File diff r2162:7c64e21f12f9 → r2163:ae001e2aa5b0
sdl.c
Show inline comments
 
#include "stdafx.h"
 

	
 
#if defined(WITH_SDL)
 
#include "openttd.h"
 
#include "debug.h"
 
#include "functions.h"
 
#include "gfx.h"
 
#include "mixer.h"
 
#include "window.h"
 
#include <SDL.h>
 
#include "player.h"
 
#include "hal.h"
 
#include "network.h"
 
#include "variables.h"
 

	
 
#ifdef UNIX
 
#include <signal.h>
 

	
 
#ifdef __MORPHOS__
 
	// The system supplied definition of SIG_DFL is wrong on MorphOS
 
	#undef SIG_DFL
 
	#define SIG_DFL (void (*)(int))0
 
#endif
 
#endif
 

	
 
#define DYNAMICALLY_LOADED_SDL
 

	
 
static SDL_Surface *_sdl_screen;
 
static int _sdl_usage;
 
static bool _all_modes;
 

	
 
#define MAX_DIRTY_RECTS 100
 
static SDL_Rect _dirty_rects[MAX_DIRTY_RECTS];
 
static int _num_dirty_rects;
 

	
 
#define SDL_CALL
 

	
 
#if defined(DYNAMICALLY_LOADED_SDL) && defined(WIN32)
 

	
 
bool LoadLibraryList(void **proc, const char *dll);
 

	
 
typedef struct {
 
	int (SDLCALL *SDL_Init)(Uint32);
 
	int (SDLCALL *SDL_InitSubSystem)(Uint32);
 
	char *(SDLCALL *SDL_GetError)();
 
	void (SDLCALL *SDL_QuitSubSystem)(Uint32);
 
	void (SDLCALL *SDL_UpdateRect)(SDL_Surface *, Sint32, Sint32, Uint32, Uint32);
 
	void (SDLCALL *SDL_UpdateRects)(SDL_Surface *, int, SDL_Rect *);
 
	int (SDLCALL *SDL_SetColors)(SDL_Surface *, SDL_Color *, int, int);
 
	void (SDLCALL *SDL_WM_SetCaption)(const char *, const char *);
 
	int (SDLCALL *SDL_ShowCursor)(int);
 
	void (SDLCALL *SDL_FreeSurface)(SDL_Surface *);
 
	int (SDLCALL *SDL_PollEvent)(SDL_Event *);
 
	void (SDLCALL *SDL_WarpMouse)(Uint16, Uint16);