X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGame.h;h=c4f033eb4c8e4cb7e81e6d74c5f563c7c1ef5960;hb=1bbb44900613dcf8d7ec2d24c5ec3f04467b4281;hp=96feef0de2d4d474d553cd3d424f72a173530f57;hpb=d25691130ad708d13552bb4c055c0fc5e4ed32cb;p=lugaru.git diff --git a/Source/Game.h b/Source/Game.h index 96feef0..c4f033e 100644 --- a/Source/Game.h +++ b/Source/Game.h @@ -38,15 +38,6 @@ extern GLuint rabbittexture; -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - - class Game { public: @@ -279,4 +270,36 @@ 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 + +extern "C" { void UndefinedSymbolToExposeStubbedCode(void); } +//#define STUBBED(x) UndefinedSymbolToExposeStubbedCode(); +#define STUBBED(x) { static bool seen = false; if (!seen) { seen = true; fprintf(stderr, "STUBBED: %s at %s:%d\n", x, __FILE__, __LINE__); } } +//#define STUBBED(x) + +#endif