diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2020-07-29 11:20:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-29 11:20:02 +0200 |
commit | 52e77c66345399f7f1064b80676a2495e299bb46 (patch) | |
tree | 358b7762beb8809084c65358087d5899e4546f18 /src/render/WaterLevel.cpp | |
parent | miami shadows (diff) | |
parent | some fakerw additions for shadows; update librw (diff) | |
download | re3-52e77c66345399f7f1064b80676a2495e299bb46.tar re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.gz re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.bz2 re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.lz re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.xz re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.zst re3-52e77c66345399f7f1064b80676a2495e299bb46.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/WaterLevel.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp index 0fd1e076..13f52334 100644 --- a/src/render/WaterLevel.cpp +++ b/src/render/WaterLevel.cpp @@ -1167,8 +1167,8 @@ CWaterLevel::RenderTransparentWater(void) { if (m_nRenderWaterLayers != 1 && m_nRenderWaterLayers != 6) { - float fMaskX = floorf(fCamX / 2.0f) * 2.0f; - float fMaskY = floorf(fCamY / 2.0f) * 2.0f; + float fMaskX = Floor(fCamX / 2.0f) * 2.0f; + float fMaskY = Floor(fCamY / 2.0f) * 2.0f; float fWaterZ = CWaterLevel::ms_aWaterZs[nBlock]; float fSectorX = WATER_FROM_SMALL_SECTOR_X(BlockX) - 400.0f; float fSectorY = WATER_FROM_SMALL_SECTOR_Y(BlockY); @@ -1519,8 +1519,8 @@ CWaterLevel::RenderWavyMask(float fX, float fY, float fZ, return; #ifndef PC_WATER - float fUOffset = fX - (MAX_LARGE_SECTORS * (int32)floorf(fX / MAX_LARGE_SECTORS)); - float fVOffset = fY - (MAX_LARGE_SECTORS * (int32)floorf(fY / MAX_LARGE_SECTORS)); + float fUOffset = fX - (MAX_LARGE_SECTORS * (int32)Floor(fX / MAX_LARGE_SECTORS)); + float fVOffset = fY - (MAX_LARGE_SECTORS * (int32)Floor(fY / MAX_LARGE_SECTORS)); int32 nSecsX = (int32)((fX - fSectorX) / 2.0f); int32 nSecsY = (int32)((fY - fSectorY) / 2.0f); @@ -1870,8 +1870,8 @@ CWaterLevel::PreCalcWaterGeometry(void) if ( _IsColideWithBlock(BlockX, BlockY, nBlock) ) { - float fMaskX = floorf(fCamX / 2.0f) * 2.0f; - float fMaskY = floorf(fCamY / 2.0f) * 2.0f; + float fMaskX = Floor(fCamX / 2.0f) * 2.0f; + float fMaskY = Floor(fCamY / 2.0f) * 2.0f; float fSectorX = WATER_FROM_SMALL_SECTOR_X(BlockX) - WATER_X_OFFSET; float fSectorY = WATER_FROM_SMALL_SECTOR_Y(BlockY); @@ -1994,8 +1994,8 @@ CWaterLevel::PreCalcWavyMask(float fX, float fY, float fZ, if ( COcclusion::IsAABoxOccluded(vecSectorPos, MAX_LARGE_SECTORS, MAX_LARGE_SECTORS, 4.0f) ) return false; - floorf(fX / MAX_LARGE_SECTORS); - floorf(fY / MAX_LARGE_SECTORS); + Floor(fX / MAX_LARGE_SECTORS); + Floor(fY / MAX_LARGE_SECTORS); RpGeometry *wavyGeometry = RpAtomicGetGeometry(ms_pWavyAtomic); RpMorphTarget *wavyMorph = RpGeometryGetMorphTarget(wavyGeometry, 0); @@ -2335,7 +2335,7 @@ _GetWindedWave(float fX, float fY) float y = WATER_HUGE_Y(fY); float fWindFactor (CWeather::WindClipped * 0.4f + 0.2f); - float fWave = Sin(( (x - floorf(x)) + (y - floorf(y)) ) * TWOPI + fAngle); + float fWave = Sin(( (x - Floor(x)) + (y - Floor(y)) ) * TWOPI + fAngle); return fWindFactor * fWave; } @@ -2380,8 +2380,8 @@ CWaterLevel::RenderWakeSegment(CVector2D &vecA, CVector2D &vecB, CVector2D &vecC float fVD = (PosD.y / 4) + _TEXTURE_WAKE_ADDV; #define MIN4(a, b, c, d) (Min((a), Min((b), Min((c), (d))))) - float fMinU = floorf(MIN4(fUA, fUB, fUC, fUD)); - float fMinV = floorf(MIN4(fVA, fVB, fVC, fVD)); + float fMinU = Floor(MIN4(fUA, fUB, fUC, fUD)); + float fMinV = Floor(MIN4(fVA, fVB, fVC, fVD)); #undef MIN4 float fZA = _GetWindedWave(PosA.x, PosA.y) + fWakeZ; |