X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGame.h;h=5be8ce45fb26a5663b03c44d424be357a839a2c9;hb=43f08119f2408a487dbefcf670bb6c8f47d4c49b;hp=d39b739014624add83b61819f922e4b782c44376;hpb=2380b6fea047f5a8cafc64d11291798cd30e0515;p=lugaru.git diff --git a/Source/Game.h b/Source/Game.h index d39b739..5be8ce4 100644 --- a/Source/Game.h +++ b/Source/Game.h @@ -38,6 +38,14 @@ extern GLuint rabbittexture; +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + class Game { @@ -271,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