X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameDraw.cpp;h=d35125e267f2816cc037eb4067dbc480d89a07a8;hb=bcb5c54b2b6170c185583c18f5ec97b0bb813f0a;hp=e3cd41b028fcc9783ed9f9618a260fad5bcd3e38;hpb=0cca0c495c7dc29d134a10d7eed5de1f377c99bf;p=lugaru.git diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index e3cd41b..d35125e 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -13,11 +13,6 @@ extern float sps; extern float viewdistance; extern float fadestart; extern float screenwidth,screenheight; -#ifdef WIN32 -extern HDC hDC; -#else -extern AGLContext gaglContext; -#endif extern int kTextureSize; extern FRUSTUM frustum; extern Light light; @@ -178,14 +173,14 @@ long long Game::MD5_string (char *string){ i++; } - num=abs(num); + num=longlongabs(num); if(num==0)num+=1452; - while(num<5000000000000000){ + while(num9900000000000000){ + while(num>LONGLONGCONST(9900000000000000)){ num/=1.235421521; } @@ -282,7 +277,7 @@ int Game::DrawGLScene(GLvoid) color2.red=0; color2.green=0; color2.blue=0; -#ifndef WIN32 +#if PLATFORM_MACOSX DSpContext_FadeGamma(NULL,200,&color2); #endif } @@ -3946,11 +3941,8 @@ int Game::DrawGLScene(GLvoid) //glFlush(); if(drawmode!=motionblurmode||mainmenu){ -#ifdef WIN32 - if(drawmode!=motionblurmode) SwapBuffers( hDC); -#else - if(drawmode!=motionblurmode)aglSwapBuffers(gaglContext); // send swap command -#endif // send swap command + if(drawmode!=motionblurmode) + swap_gl_buffers(); } //myassert(glGetError() == GL_NO_ERROR); @@ -3968,3 +3960,4 @@ int Game::DrawGLScene(GLvoid) //Jordan fixed your warning! return 0; } +