Windows build fix from web interface...

This commit is contained in:
NeoBrainX 2013-03-25 21:43:32 +00:00
parent 51290fd482
commit beb083721a

View file

@ -25,7 +25,7 @@
#include "SWVideoConfig.h" #include "SWVideoConfig.h"
#include "DebugUtil.h" #include "DebugUtil.h"
#include <math.h> #include <cmath>
#ifdef _DEBUG #ifdef _DEBUG
#define ALLOW_TEV_DUMPS 1 #define ALLOW_TEV_DUMPS 1
@ -752,7 +752,7 @@ void Tev::Draw()
{ {
// TODO: Check if this is correct (especially the magic values) // TODO: Check if this is correct (especially the magic values)
float offset = Position[0] - bpmem.fogRange.Base.Center + 324.f; float offset = Position[0] - bpmem.fogRange.Base.Center + 324.f;
int index = 9 - abs(Position[0] - bpmem.fogRange.Base.Center + 324) / (162/5); int index = 9 - std::abs(Position[0] - bpmem.fogRange.Base.Center + 324) / (162/5);
float k = bpmem.fogRange.K[index/2].GetValue(index%2); float k = bpmem.fogRange.K[index/2].GetValue(index%2);
float x_adjust = sqrt(offset*offset/162.f/162.f + k*k)/k; float x_adjust = sqrt(offset*offset/162.f/162.f + k*k)/k;
ze *= x_adjust; ze *= x_adjust;