Browse Source

MinGW fix for plGLight isnan usage.

Darryl Pogue 10 years ago
parent
commit
8010f5d051
  1. 12
      Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp
  2. 8
      Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp

12
Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp

@ -50,10 +50,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <cfloat>
#include <cmath>
#ifdef HS_BUILD_FOR_WIN32
#define isnan _isnan
#endif
void plPerspDirSlave::Init()
{
plShadowSlave::Init();
@ -188,9 +184,9 @@ bool plPerspDirSlave::SetupViewTransform(plPipeline* pipe)
// is probably data-side. I take full responsibility for this
// hack-around breaking the entire system, loosing data, causing
// unauthorized credit card transactions, etc.
if (isnan(bnd.GetMins().fX) || isnan(bnd.GetMins().fY))
if (std::isnan(bnd.GetMins().fX) || std::isnan(bnd.GetMins().fY))
return false;
if (isnan(bnd.GetMaxs().fX) || isnan(bnd.GetMaxs().fY))
if (std::isnan(bnd.GetMaxs().fX) || std::isnan(bnd.GetMaxs().fY))
return false;
// THIS IS EVEN MORE WRONG
@ -249,9 +245,9 @@ bool plPerspDirSlave::SetupViewTransform(plPipeline* pipe)
// is probably data-side. I take full responsibility for this
// hack-around breaking the entire system, loosing data, causing
// unauthorized credit card transactions, etc.
if (isnan(bnd.GetMins().fX) || isnan(bnd.GetMins().fY))
if (std::isnan(bnd.GetMins().fX) || std::isnan(bnd.GetMins().fY))
return false;
if (isnan(bnd.GetMaxs().fX) || isnan(bnd.GetMaxs().fY))
if (std::isnan(bnd.GetMaxs().fX) || std::isnan(bnd.GetMaxs().fY))
return false;
plConst(float) kMinMinZ(1.f);

8
Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.cpp

@ -48,10 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <cfloat>
#include <cmath>
#ifdef HS_BUILD_FOR_WIN32
#define isnan _isnan
#endif
static const float kMinMinZ = 1.f; // totally random arbitrary number (has to be > 0).
bool plShadowSlave::ISetupOrthoViewTransform()
@ -137,9 +133,9 @@ bool plShadowSlave::ISetupPerspViewTransform()
// is probably data-side. I take full responsibility for this
// hack-around breaking the entire system, loosing data, causing
// unauthorized credit card transactions, etc.
if (isnan(bnd.GetMins().fX) || isnan(bnd.GetMins().fY))
if (std::isnan(bnd.GetMins().fX) || std::isnan(bnd.GetMins().fY))
return false;
if (isnan(bnd.GetMaxs().fX) || isnan(bnd.GetMaxs().fY))
if (std::isnan(bnd.GetMaxs().fX) || std::isnan(bnd.GetMaxs().fY))
return false;
float cotX, cotY;

Loading…
Cancel
Save