X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameDraw.cpp;h=5ea481a29d4cb09722da3bf52826873569769162;hb=8562aa5bebc97ea8a61d056aec3847030c6985b7;hp=e3cd41b028fcc9783ed9f9618a260fad5bcd3e38;hpb=0cca0c495c7dc29d134a10d7eed5de1f377c99bf;p=lugaru.git diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index e3cd41b..5ea481a 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -15,8 +15,12 @@ extern float fadestart; 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; @@ -162,6 +166,12 @@ extern FSOUND_SAMPLE *samp[100]; 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]=""; @@ -181,11 +191,11 @@ long long Game::MD5_string (char *string){ num=abs(num); if(num==0)num+=1452; - while(num<5000000000000000){ + while(num9900000000000000){ + while(num>LONGLONGCONST(9900000000000000)){ num/=1.235421521; } @@ -282,7 +292,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 }