Index: rts/System/Sound.cpp =================================================================== --- rts/System/Sound.cpp (révision 3427) +++ rts/System/Sound.cpp (copie de travail) @@ -42,9 +42,11 @@ sound = SAFE_NEW CNullSound; } +#ifdef STREFLOP_H // Something in DirectSoundCreate (sound drivers?) messes with the FPU control word. // Set single precision floating point math. streflop_init(); +#endif return sound; } Index: rts/System/myMath.cpp =================================================================== --- rts/System/myMath.cpp (révision 3427) +++ rts/System/myMath.cpp (copie de travail) @@ -16,9 +16,11 @@ public: CMyMath() { +#ifdef STREFLOP_H // This must be put here too because it's executed before the streflop_init in main(). // Set single precision floating point math. streflop_init(); +#endif for(int a=0;a<1024;++a){ float ang=(a-512)*2*PI/1024; @@ -33,12 +35,14 @@ checksum *= 33; checksum = 33 * checksum + *(unsigned*)&headingToVectorTable[a].y; } +#ifdef STREFLOP_H // fprintf(stderr, "headingToVectorTable checksum: %08x\n", checksum); assert(checksum == 0x617a9968); // release mode check if (checksum != 0x617a9968) handleerror(0, "invalid headingToVectorTable checksum", "Sync Error", 0); +#endif } }; Index: rts/System/Main.cpp =================================================================== --- rts/System/Main.cpp (révision 3427) +++ rts/System/Main.cpp (copie de travail) @@ -439,9 +439,11 @@ return false; } +#ifdef STREFLOP_H // Something in SDL_SetVideoMode (OpenGL drivers?) messes with the FPU control word. // Set single precision floating point math. streflop_init(); +#endif if (FSAA) { FSAA = MultisampleVerify(); @@ -1036,8 +1038,10 @@ } #endif +#ifdef STREFLOP_H // Set single precision floating point math. streflop_init(); +#endif good_fpu_control_registers("::Run"); // It's nice to be able to disable catching when you're debugging Index: rts/Sim/Units/UnitHandler.cpp =================================================================== --- rts/Sim/Units/UnitHandler.cpp (révision 3427) +++ rts/Sim/Units/UnitHandler.cpp (copie de travail) @@ -260,7 +260,7 @@ if(!(gs->frameNum&15)){ if(diminishingMetalMakers) - metalMakerEfficiency=8.0f/(8.0f+max(0.0f,sqrt(metalMakerIncome/gs->activeTeams)-4)); + metalMakerEfficiency=8.0f/(8.0f+max(0.0f,sqrtf(metalMakerIncome/gs->activeTeams)-4)); metalMakerIncome=0; } Index: rts/Game/GameServer.cpp =================================================================== --- rts/Game/GameServer.cpp (révision 3427) +++ rts/Game/GameServer.cpp (copie de travail) @@ -66,10 +66,12 @@ fakeDesync = false; #endif +#ifdef STREFLOP_H // Something in CGameServer::CGameServer borks the FPU control word // maybe the threading, or something in CNet::InitServer() ?? // Set single precision floating point math. streflop_init(); +#endif } CGameServer::~CGameServer() Index: rts/Rendering/UnitModels/UnitDrawer.cpp =================================================================== --- rts/Rendering/UnitModels/UnitDrawer.cpp (révision 3427) +++ rts/Rendering/UnitModels/UnitDrawer.cpp (copie de travail) @@ -947,7 +947,7 @@ float dot=vec.dot(sundir); if(dot<0) dot=0; - float exp=min(1.f,pow(dot,exponent)+pow(dot,3)*0.25f); + float exp=min(1.f,powf(dot,exponent)+powf(dot,3)*0.25f); buf[(y*size+x)*4+0]=(unsigned char)(suncolor.x*exp*255); buf[(y*size+x)*4+1]=(unsigned char)(suncolor.y*exp*255); buf[(y*size+x)*4+2]=(unsigned char)(suncolor.z*exp*255);