Workaround for Microsoft bugs such as #defining random words such as min and max.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9562 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
f5ded29098
commit
8f034fe834
|
@ -89,4 +89,12 @@ typedef int32_t SDWORD;
|
|||
typedef int BOOL;
|
||||
#endif // WZ_OS_WIN
|
||||
|
||||
// Work around ridiculous major bug in Microsoft headers.
|
||||
#ifdef min
|
||||
#undef min
|
||||
#endif
|
||||
#ifdef max
|
||||
#undef max
|
||||
#endif
|
||||
|
||||
#endif // __INCLUDED_LIB_FRAMEWORK_TYPES_H__
|
||||
|
|
|
@ -73,7 +73,7 @@ static std::vector<WavecastTile> generateWavecastTable(unsigned radius)
|
|||
{
|
||||
continue;
|
||||
}
|
||||
tile.invRadius = 92681 / sqrt(tileRadiusSq) + 0.5; // +0.5 = round to nearest. Result is at most 92681 / sqrt(2), approximately 65536.
|
||||
tile.invRadius = 92681 / sqrt((double)tileRadiusSq) + 0.5; // +0.5 = round to nearest. Result is at most 92681 / sqrt(2), approximately 65536.
|
||||
|
||||
const int minCorner[4][2] = {{1, 0}, {1, 1}, {0, 1}, {0, 0}};
|
||||
const int mcdx = minCorner[quadrant][0], mcdy = minCorner[quadrant][1]; // Corner of the tile which the minimum angle.
|
||||
|
|
Loading…
Reference in New Issue