X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGame.h;h=5be8ce45fb26a5663b03c44d424be357a839a2c9;hb=43f08119f2408a487dbefcf670bb6c8f47d4c49b;hp=6a7644cab4a57327377436ea30874c863b5b7b87;hpb=8562aa5bebc97ea8a61d056aec3847030c6985b7;p=lugaru.git diff --git a/Source/Game.h b/Source/Game.h index 6a7644c..5be8ce4 100644 --- a/Source/Game.h +++ b/Source/Game.h @@ -1,12 +1,10 @@ #ifndef _GAME_H_ #define _GAME_H_ -#ifndef WIN32 #ifdef PLATFORM_MACOSX #include #include "Quicktime.h" #endif -#endif //Jordan included glut.h //#include @@ -16,7 +14,7 @@ #include "WinInput.h" #elif USE_SDL #include "SDL.h" -//#include "SDLInput.h" +#include "SDLInput.h" #else #include "Macinput.h" #endif @@ -40,6 +38,14 @@ extern GLuint rabbittexture; +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + class Game { @@ -273,4 +279,31 @@ public: }; -#endif \ No newline at end of file +#ifndef __forceinline +# ifdef __GNUC__ +# define __forceinline inline __attribute__((always_inline)) +# endif +#endif + +static __forceinline void swap_gl_buffers(void) +{ +#ifdef WIN32 + extern HDC hDC; + SwapBuffers( hDC); +#elif USE_SDL + SDL_GL_SwapBuffers(); +#elif PLATFORM_MACOSX + extern AGLContext gaglContext; + aglSwapBuffers(gaglContext); +#else + #error define your platform. +#endif +} + +#ifdef __GNUC__ +#define LONGLONGCONST(x) (x##ll) +#else +#define LONGLONGCONST(x) (x) +#endif + +#endif