summaryrefslogtreecommitdiffstats
path: root/src/render/WaterLevel.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-07-22 17:21:39 +0200
committerGitHub <noreply@github.com>2020-07-22 17:21:39 +0200
commitb182fa4bb89a770d2e34da162eb46cdbaceb153b (patch)
treeb641e2e0a9dc0edddae8e09d04660c13936798c2 /src/render/WaterLevel.cpp
parentREADME 64-bit preparation (diff)
parentPeds, Hud, CFO 1/2, fixes - including zone names (diff)
downloadre3-b182fa4bb89a770d2e34da162eb46cdbaceb153b.tar
re3-b182fa4bb89a770d2e34da162eb46cdbaceb153b.tar.gz
re3-b182fa4bb89a770d2e34da162eb46cdbaceb153b.tar.bz2
re3-b182fa4bb89a770d2e34da162eb46cdbaceb153b.tar.lz
re3-b182fa4bb89a770d2e34da162eb46cdbaceb153b.tar.xz
re3-b182fa4bb89a770d2e34da162eb46cdbaceb153b.tar.zst
re3-b182fa4bb89a770d2e34da162eb46cdbaceb153b.zip
Diffstat (limited to 'src/render/WaterLevel.cpp')
-rw-r--r--src/render/WaterLevel.cpp22
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;