]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameDraw.cpp
Lots of input work...demo is now fully playable.
[lugaru.git] / Source / GameDraw.cpp
index e3cd41b028fcc9783ed9f9618a260fad5bcd3e38..d35125e267f2816cc037eb4067dbc480d89a07a8 100644 (file)
@@ -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(num<LONGLONGCONST(5000000000000000)){
                num*=1.85421521;
        }
 
-       while(num>9900000000000000){
+       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;
 }
+