extern float screenwidth,screenheight;
#ifdef WIN32
extern HDC hDC;
-#else
+#elif PLATFORM_MACOSX
extern AGLContext gaglContext;
+#elif USE_SDL
+extern SDL_Surface *sdlscreen;
+#else
+#error please define your platform.
#endif
extern int kTextureSize;
extern FRUSTUM frustum;
extern int channels[100];
extern "C" void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused);
+#ifdef __GNUC__
+#define LONGLONGCONST(x) (x##ll)
+#else
+#define LONGLONGCONST(x) (x)
+#endif
+
/*********************> DrawGLScene() <*****/
long long Game::MD5_string (char *string){
char temp[256]="";
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;
}
color2.red=0;
color2.green=0;
color2.blue=0;
-#ifndef WIN32
+#if PLATFORM_MACOSX
DSpContext_FadeGamma(NULL,200,&color2);
#endif
}
if(drawmode!=motionblurmode||mainmenu){
#ifdef WIN32
if(drawmode!=motionblurmode) SwapBuffers( hDC);
-#else
+#elif PLATFORM_MACOSX
if(drawmode!=motionblurmode)aglSwapBuffers(gaglContext); // send swap command
+#elif USE_SDL
+ if(drawmode!=motionblurmode)SDL_GL_SwapBuffers();
+#else
+ #error define your platform.
#endif // send swap command
}