summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/render/Clouds.cpp8
-rw-r--r--src/render/Coronas.cpp20
-rw-r--r--src/render/Fluff.cpp2
-rw-r--r--src/render/Fluff.h2
-rw-r--r--src/render/Hud.cpp20
-rw-r--r--src/render/Lights.cpp28
-rw-r--r--src/render/ParticleMgr.cpp2
-rw-r--r--src/render/PointLights.cpp2
-rw-r--r--src/render/Shadows.cpp26
-rw-r--r--src/render/Timecycle.cpp6
-rw-r--r--src/render/VisibilityPlugins.cpp16
-rw-r--r--src/render/WaterLevel.cpp10
12 files changed, 71 insertions, 71 deletions
diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp
index 2884894c..a461301c 100644
--- a/src/render/Clouds.cpp
+++ b/src/render/Clouds.cpp
@@ -388,7 +388,7 @@ CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue,
ms_colourBottom.b = topblue;
ms_colourBottom.a = alpha;
- botpos = min(SCREEN_HEIGHT, topedge);
+ botpos = Min(SCREEN_HEIGHT, topedge);
CSprite2d::DrawRect(CRect(0, 0, SCREEN_WIDTH, botpos),
ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop);
}
@@ -415,18 +415,18 @@ CClouds::RenderHorizon(void)
if(ms_horizonZ > SCREEN_HEIGHT)
return;
- float z1 = min(ms_horizonZ + SMALLSTRIPHEIGHT, SCREEN_HEIGHT);
+ float z1 = Min(ms_horizonZ + SMALLSTRIPHEIGHT, SCREEN_HEIGHT);
CSprite2d::DrawRectXLU(CRect(0, ms_horizonZ, SCREEN_WIDTH, z1),
ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop);
// This is just weird
float a = SCREEN_HEIGHT/400.0f * HORIZSTRIPHEIGHT +
- SCREEN_HEIGHT/300.0f * max(TheCamera.GetPosition().z, 0.0f);
+ SCREEN_HEIGHT/300.0f * Max(TheCamera.GetPosition().z, 0.0f);
float b = TheCamera.GetUp().z < 0.0f ?
SCREEN_HEIGHT :
SCREEN_HEIGHT * Abs(TheCamera.GetRight().z);
float z2 = z1 + (a + b)*TheCamera.LODDistMultiplier;
- z2 = min(z2, SCREEN_HEIGHT);
+ z2 = Min(z2, SCREEN_HEIGHT);
CSprite2d::DrawRect(CRect(0, z1, SCREEN_WIDTH, z2),
ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop);
}
diff --git a/src/render/Coronas.cpp b/src/render/Coronas.cpp
index 1a6cfea3..9881e764 100644
--- a/src/render/Coronas.cpp
+++ b/src/render/Coronas.cpp
@@ -109,7 +109,7 @@ CCoronas::Update(void)
int i;
static int LastCamLook = 0;
- LightsMult = min(LightsMult + 0.03f * CTimer::GetTimeStep(), 1.0f);
+ LightsMult = Min(LightsMult + 0.03f * CTimer::GetTimeStep(), 1.0f);
int CamLook = 0;
if(TheCamera.Cams[TheCamera.ActiveCam].LookingLeft) CamLook |= 1;
@@ -121,7 +121,7 @@ CCoronas::Update(void)
if(LastCamLook != CamLook)
bChangeBrightnessImmediately = 3;
else
- bChangeBrightnessImmediately = max(bChangeBrightnessImmediately-1, 0);
+ bChangeBrightnessImmediately = Max(bChangeBrightnessImmediately-1, 0);
LastCamLook = CamLook;
for(i = 0; i < NUMCORONAS; i++)
@@ -309,7 +309,7 @@ CCoronas::Render(void)
// render corona itself
if(aCoronas[i].texture){
- float fogscale = CWeather::Foggyness*min(spriteCoors.z, 40.0f)/40.0f + 1.0f;
+ float fogscale = CWeather::Foggyness*Min(spriteCoors.z, 40.0f)/40.0f + 1.0f;
if(CCoronas::aCoronas[i].id == SUN_CORE)
spriteCoors.z = 0.95f * RwCameraGetFarClipPlane(Scene.camera);
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(aCoronas[i].texture));
@@ -320,7 +320,7 @@ CCoronas::Render(void)
float f = 1.0f - aCoronas[i].someAngle*2.0f/PI;
float wscale = 6.0f*sq(sq(sq(f))) + 0.5f;
float hscale = 0.35f - (wscale - 0.5f) * 0.06f;
- hscale = max(hscale, 0.15f);
+ hscale = Max(hscale, 0.15f);
CSprite::RenderOneXLUSprite(spriteCoors.x, spriteCoors.y, spriteCoors.z,
spritew * aCoronas[i].size * wscale,
@@ -467,7 +467,7 @@ CCoronas::RenderReflections(void)
float spritew, spriteh;
if(CSprite::CalcScreenCoors(coors, spriteCoors, &spritew, &spriteh, true)){
float drawDist = 0.75f * aCoronas[i].drawDist;
- drawDist = min(drawDist, 50.0f);
+ drawDist = Min(drawDist, 50.0f);
if(spriteCoors.z < drawDist){
float fadeDistance = drawDist / 2.0f;
float distanceFade = spriteCoors.z < fadeDistance ? 1.0f : 1.0f - (spriteCoors.z - fadeDistance)/fadeDistance;
@@ -546,25 +546,25 @@ CRegisteredCorona::Update(void)
(CCoronas::SunBlockedByClouds && id == CCoronas::SUN_CORONA ||
!CWorld::GetIsLineOfSightClear(coors, TheCamera.GetPosition(), true, false, false, false, false, false))){
// Corona is blocked, fade out
- fadeAlpha = max(fadeAlpha - 15.0f*CTimer::GetTimeStep(), 0.0f);
+ fadeAlpha = Max(fadeAlpha - 15.0f*CTimer::GetTimeStep(), 0.0f);
}else if(offScreen){
// Same when off screen
- fadeAlpha = max(fadeAlpha - 15.0f*CTimer::GetTimeStep(), 0.0f);
+ fadeAlpha = Max(fadeAlpha - 15.0f*CTimer::GetTimeStep(), 0.0f);
}else{
// Visible
if(alpha > fadeAlpha){
// fade in
- fadeAlpha = min(fadeAlpha + 15.0f*CTimer::GetTimeStep(), alpha);
+ fadeAlpha = Min(fadeAlpha + 15.0f*CTimer::GetTimeStep(), alpha);
if(CCoronas::bChangeBrightnessImmediately)
fadeAlpha = alpha;
}else if(alpha < fadeAlpha){
// too visible, decrease alpha but not below alpha
- fadeAlpha = max(fadeAlpha - 15.0f*CTimer::GetTimeStep(), alpha);
+ fadeAlpha = Max(fadeAlpha - 15.0f*CTimer::GetTimeStep(), alpha);
}
// darken scene when the sun is visible
if(id == CCoronas::SUN_CORONA)
- CCoronas::LightsMult = max(CCoronas::LightsMult - CTimer::GetTimeStep()*0.06f, 0.6f);
+ CCoronas::LightsMult = Max(CCoronas::LightsMult - CTimer::GetTimeStep()*0.06f, 0.6f);
}
// remove if invisible
diff --git a/src/render/Fluff.cpp b/src/render/Fluff.cpp
index 7c35319f..fc68d315 100644
--- a/src/render/Fluff.cpp
+++ b/src/render/Fluff.cpp
@@ -10,7 +10,7 @@
#include "Clock.h"
#include "Weather.h"
#include "Stats.h"
-#include "math/maths.h"
+#include "maths.h"
#include "Frontend.h"
uint8 ScrollCharSet[59][5] = {
diff --git a/src/render/Fluff.h b/src/render/Fluff.h
index f33b016e..b189b9a2 100644
--- a/src/render/Fluff.h
+++ b/src/render/Fluff.h
@@ -1,6 +1,6 @@
#pragma once
#include "common.h"
-#include "math/Vector.h"
+#include "Vector.h"
class CMovingThings
{
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index 1db7b07c..2dae7551 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -1128,7 +1128,7 @@ void CHud::DrawAfterFade()
switch (OddJob2On) {
case 0:
OddJob2On = 1;
- OddJob2XOffset = 380.0;
+ OddJob2XOffset = 380.0f;
break;
case 1:
if (OddJob2XOffset <= 2.0f) {
@@ -1136,27 +1136,27 @@ void CHud::DrawAfterFade()
OddJob2On = 2;
}
else {
- fStep = 40.0;
- if ((OddJob2XOffset * 0.16667) <= 40.0)
- fStep = OddJob2XOffset * 0.16667;
+ fStep = 40.0f;
+ if ((OddJob2XOffset * 0.16667f) <= 40.0f)
+ fStep = OddJob2XOffset * 0.16667f;
OddJob2XOffset = OddJob2XOffset - fStep;
}
break;
case 2:
- OddJob2Timer += (20.0 * CTimer::GetTimeStep());
+ OddJob2Timer += (20.0f * CTimer::GetTimeStep());
if (OddJob2Timer > 1500) {
OddJob2On = 3;
}
break;
case 3:
- fStep = 30.0;
- if ((OddJob2XOffset * 0.2) >= 30.0)
- fStep = OddJob2XOffset * 0.2;
+ fStep = 30.0f;
+ if ((OddJob2XOffset * 0.2f) >= 30.0f)
+ fStep = OddJob2XOffset * 0.2f;
OddJob2XOffset = OddJob2XOffset - fStep;
- if (OddJob2XOffset < -380.0) {
- OddJob2OffTimer = 5000.0;
+ if (OddJob2XOffset < -380.0f) {
+ OddJob2OffTimer = 5000.0f;
OddJob2On = 0;
}
break;
diff --git a/src/render/Lights.cpp b/src/render/Lights.cpp
index cd83a898..85d7ba13 100644
--- a/src/render/Lights.cpp
+++ b/src/render/Lights.cpp
@@ -37,9 +37,9 @@ SetLightsWithTimeOfDayColour(RpWorld *)
AmbientLightColourForFrame.green = 1.0f;
AmbientLightColourForFrame.blue = 1.0f;
}
- AmbientLightColourForFrame_PedsCarsAndObjects.red = min(1.0f, AmbientLightColourForFrame.red*1.3f);
- AmbientLightColourForFrame_PedsCarsAndObjects.green = min(1.0f, AmbientLightColourForFrame.green*1.3f);
- AmbientLightColourForFrame_PedsCarsAndObjects.blue = min(1.0f, AmbientLightColourForFrame.blue*1.3f);
+ AmbientLightColourForFrame_PedsCarsAndObjects.red = Min(1.0f, AmbientLightColourForFrame.red*1.3f);
+ AmbientLightColourForFrame_PedsCarsAndObjects.green = Min(1.0f, AmbientLightColourForFrame.green*1.3f);
+ AmbientLightColourForFrame_PedsCarsAndObjects.blue = Min(1.0f, AmbientLightColourForFrame.blue*1.3f);
RpLightSetColor(pAmbient, &AmbientLightColourForFrame);
}
@@ -70,16 +70,16 @@ SetLightsWithTimeOfDayColour(RpWorld *)
float f1 = 2.0f * (CMenuManager::m_PrefsBrightness/256.0f - 1.0f) * 0.6f + 1.0f;
float f2 = 3.0f * (CMenuManager::m_PrefsBrightness/256.0f - 1.0f) * 0.6f + 1.0f;
- AmbientLightColourForFrame.red = min(1.0f, AmbientLightColourForFrame.red * f2);
- AmbientLightColourForFrame.green = min(1.0f, AmbientLightColourForFrame.green * f2);
- AmbientLightColourForFrame.blue = min(1.0f, AmbientLightColourForFrame.blue * f2);
- AmbientLightColourForFrame_PedsCarsAndObjects.red = min(1.0f, AmbientLightColourForFrame_PedsCarsAndObjects.red * f1);
- AmbientLightColourForFrame_PedsCarsAndObjects.green = min(1.0f, AmbientLightColourForFrame_PedsCarsAndObjects.green * f1);
- AmbientLightColourForFrame_PedsCarsAndObjects.blue = min(1.0f, AmbientLightColourForFrame_PedsCarsAndObjects.blue * f1);
+ AmbientLightColourForFrame.red = Min(1.0f, AmbientLightColourForFrame.red * f2);
+ AmbientLightColourForFrame.green = Min(1.0f, AmbientLightColourForFrame.green * f2);
+ AmbientLightColourForFrame.blue = Min(1.0f, AmbientLightColourForFrame.blue * f2);
+ AmbientLightColourForFrame_PedsCarsAndObjects.red = Min(1.0f, AmbientLightColourForFrame_PedsCarsAndObjects.red * f1);
+ AmbientLightColourForFrame_PedsCarsAndObjects.green = Min(1.0f, AmbientLightColourForFrame_PedsCarsAndObjects.green * f1);
+ AmbientLightColourForFrame_PedsCarsAndObjects.blue = Min(1.0f, AmbientLightColourForFrame_PedsCarsAndObjects.blue * f1);
#ifdef FIX_BUGS
- DirectionalLightColourForFrame.red = min(1.0f, DirectionalLightColourForFrame.red * f1);
- DirectionalLightColourForFrame.green = min(1.0f, DirectionalLightColourForFrame.green * f1);
- DirectionalLightColourForFrame.blue = min(1.0f, DirectionalLightColourForFrame.blue * f1);
+ DirectionalLightColourForFrame.red = Min(1.0f, DirectionalLightColourForFrame.red * f1);
+ DirectionalLightColourForFrame.green = Min(1.0f, DirectionalLightColourForFrame.green * f1);
+ DirectionalLightColourForFrame.blue = Min(1.0f, DirectionalLightColourForFrame.blue * f1);
#else
DirectionalLightColourForFrame.red = min(1.0f, AmbientLightColourForFrame.red * f1);
DirectionalLightColourForFrame.green = min(1.0f, AmbientLightColourForFrame.green * f1);
@@ -193,7 +193,7 @@ AddAnExtraDirectionalLight(RpWorld *world, float dirx, float diry, float dirz, f
RwRGBAReal color;
RwV3d *dir;
- strength = max(max(red, green), blue);
+ strength = Max(Max(red, green), blue);
n = -1;
if(NumExtraDirLightsInWorld < NUMEXTRADIRECTIONALS)
n = NumExtraDirLightsInWorld;
@@ -221,7 +221,7 @@ AddAnExtraDirectionalLight(RpWorld *world, float dirx, float diry, float dirz, f
RwFrameUpdateObjects(RpLightGetFrame(pExtraDirectionals[n]));
RpLightSetFlags(pExtraDirectionals[n], rpLIGHTLIGHTATOMICS);
LightStrengths[n] = strength;
- NumExtraDirLightsInWorld = min(NumExtraDirLightsInWorld+1, NUMEXTRADIRECTIONALS);
+ NumExtraDirLightsInWorld = Min(NumExtraDirLightsInWorld+1, NUMEXTRADIRECTIONALS);
}
void
diff --git a/src/render/ParticleMgr.cpp b/src/render/ParticleMgr.cpp
index 7a1804de..9381787c 100644
--- a/src/render/ParticleMgr.cpp
+++ b/src/render/ParticleMgr.cpp
@@ -91,7 +91,7 @@ void cParticleSystemMgr::LoadParticleData()
break;
case CFG_PARAM_INITIAL_COLOR_VARIATION:
- entry->m_InitialColorVariation = min(atoi(value), 100);
+ entry->m_InitialColorVariation = Min(atoi(value), 100);
break;
case CFG_PARAM_FADE_DESTINATION_COLOR_R:
diff --git a/src/render/PointLights.cpp b/src/render/PointLights.cpp
index a015ec54..8e942ce6 100644
--- a/src/render/PointLights.cpp
+++ b/src/render/PointLights.cpp
@@ -98,7 +98,7 @@ CPointLights::GenerateLightsAffectingObject(CVector *objCoors)
if(aLights[i].type == LIGHT_DIRECTIONAL){
float dot = -DotProduct(dir, aLights[i].dir);
- intensity *= max((dot-0.5f)*2.0f, 0.0f);
+ intensity *= Max((dot-0.5f)*2.0f, 0.0f);
}
if(intensity > 0.0f)
diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp
index 4d2e4605..b5147f02 100644
--- a/src/render/Shadows.cpp
+++ b/src/render/Shadows.cpp
@@ -727,10 +727,10 @@ CShadows::RenderStoredShadows(void)
float fStartY = shadowPos.y - fHeight;
float fEndY = shadowPos.y + fHeight;
- int32 nStartX = max(CWorld::GetSectorIndexX(fStartX), 0);
- int32 nStartY = max(CWorld::GetSectorIndexY(fStartY), 0);
- int32 nEndX = min(CWorld::GetSectorIndexX(fEndX), NUMSECTORS_X-1);
- int32 nEndY = min(CWorld::GetSectorIndexY(fEndY), NUMSECTORS_Y-1);
+ int32 nStartX = Max(CWorld::GetSectorIndexX(fStartX), 0);
+ int32 nStartY = Max(CWorld::GetSectorIndexY(fStartY), 0);
+ int32 nEndX = Min(CWorld::GetSectorIndexX(fEndX), NUMSECTORS_X-1);
+ int32 nEndY = Min(CWorld::GetSectorIndexY(fEndY), NUMSECTORS_Y-1);
CWorld::AdvanceCurrentScanCode();
@@ -873,10 +873,10 @@ CShadows::GeneratePolysForStaticShadow(int16 nStaticShadowID)
float fStartY = shadowPos.y - fHeight;
float fEndY = shadowPos.y + fHeight;
- int32 nStartX = max(CWorld::GetSectorIndexX(fStartX), 0);
- int32 nStartY = max(CWorld::GetSectorIndexY(fStartY), 0);
- int32 nEndX = min(CWorld::GetSectorIndexX(fEndX), NUMSECTORS_X-1);
- int32 nEndY = min(CWorld::GetSectorIndexY(fEndY), NUMSECTORS_Y-1);
+ int32 nStartX = Max(CWorld::GetSectorIndexX(fStartX), 0);
+ int32 nStartY = Max(CWorld::GetSectorIndexY(fStartY), 0);
+ int32 nEndX = Min(CWorld::GetSectorIndexX(fEndX), NUMSECTORS_X-1);
+ int32 nEndY = Min(CWorld::GetSectorIndexY(fEndY), NUMSECTORS_Y-1);
CWorld::AdvanceCurrentScanCode();
@@ -1016,11 +1016,11 @@ CShadows::CastShadowEntity(CEntity *pEntity, float fStartX, float fStartY, floa
Points[3].x = (fLengthRight - fFrontRight) - fSideRight;
Points[3].y = (fLengthForward - fFrontForward) - fSideForward;
- float MinX = min(min(Points[0].x, Points[1].x), min(Points[2].x, Points[3].x));
- float MaxX = max(max(Points[0].x, Points[1].x), max(Points[2].x, Points[3].x));
+ float MinX = Min(Min(Points[0].x, Points[1].x), Min(Points[2].x, Points[3].x));
+ float MaxX = Max(Max(Points[0].x, Points[1].x), Max(Points[2].x, Points[3].x));
- float MinY = min(min(Points[0].y, Points[1].y), min(Points[2].y, Points[3].y));
- float MaxY = max(max(Points[0].y, Points[1].y), max(Points[2].y, Points[3].y));
+ float MinY = Min(Min(Points[0].y, Points[1].y), Min(Points[2].y, Points[3].y));
+ float MaxY = Max(Max(Points[0].y, Points[1].y), Max(Points[2].y, Points[3].y));
float MaxZ = pPosn->z - pEntity->GetPosition().z;
float MinZ = MaxZ - fZDistance;
@@ -1767,7 +1767,7 @@ CShadows::RenderIndicatorShadow(uint32 nID, uint8 ShadowType, RwTexture *pTextur
{
ASSERT(pPosn != NULL);
- C3dMarkers::PlaceMarkerSet(nID, _TODOCONST(4), *pPosn, max(fFrontX, -fSideY),
+ C3dMarkers::PlaceMarkerSet(nID, _TODOCONST(4), *pPosn, Max(fFrontX, -fSideY),
0, 128, 255, 128,
2048, 0.2f, 0);
}
diff --git a/src/render/Timecycle.cpp b/src/render/Timecycle.cpp
index 7ab3e91e..0113c001 100644
--- a/src/render/Timecycle.cpp
+++ b/src/render/Timecycle.cpp
@@ -290,7 +290,7 @@ CTimeCycle::Update(void)
TheCamera.SetMotionBlur(m_fCurrentBlurRed, m_fCurrentBlurGreen, m_fCurrentBlurBlue, m_fCurrentBlurAlpha, MBLUR_NORMAL);
if(m_FogReduction != 0)
- m_fCurrentFarClip = max(m_fCurrentFarClip, m_FogReduction/64.0f * 650.0f);
+ m_fCurrentFarClip = Max(m_fCurrentFarClip, m_FogReduction/64.0f * 650.0f);
m_nCurrentFogColourRed = (m_nCurrentSkyTopRed + 2*m_nCurrentSkyBottomRed) / 3;
m_nCurrentFogColourGreen = (m_nCurrentSkyTopGreen + 2*m_nCurrentSkyBottomGreen) / 3;
m_nCurrentFogColourBlue = (m_nCurrentSkyTopBlue + 2*m_nCurrentSkyBottomBlue) / 3;
@@ -311,9 +311,9 @@ CTimeCycle::Update(void)
if(TheCamera.GetForward().z < -0.9f ||
!CWeather::bScriptsForceRain && (CCullZones::PlayerNoRain() || CCullZones::CamNoRain() || CCutsceneMgr::IsRunning()))
- m_FogReduction = min(m_FogReduction+1, 64);
+ m_FogReduction = Min(m_FogReduction+1, 64);
else
- m_FogReduction = max(m_FogReduction-1, 0);
+ m_FogReduction = Max(m_FogReduction-1, 0);
}
STARTPATCHES
diff --git a/src/render/VisibilityPlugins.cpp b/src/render/VisibilityPlugins.cpp
index ca3a0195..2107813b 100644
--- a/src/render/VisibilityPlugins.cpp
+++ b/src/render/VisibilityPlugins.cpp
@@ -103,14 +103,14 @@ CVisibilityPlugins::SetRenderWareCamera(RwCamera *camera)
else
ms_cullCompsDist = sq(TheCamera.LODDistMultiplier * 20.0f);
- ms_vehicleLod0Dist = sq(70.0 * TheCamera.GenerationDistMultiplier);
- ms_vehicleLod1Dist = sq(90.0 * TheCamera.GenerationDistMultiplier);
- ms_vehicleFadeDist = sq(100.0 * TheCamera.GenerationDistMultiplier);
- ms_bigVehicleLod0Dist = sq(60.0 * TheCamera.GenerationDistMultiplier);
- ms_bigVehicleLod1Dist = sq(150.0 * TheCamera.GenerationDistMultiplier);
- ms_pedLod0Dist = sq(25.0 * TheCamera.LODDistMultiplier);
- ms_pedLod1Dist = sq(60.0 * TheCamera.LODDistMultiplier);
- ms_pedFadeDist = sq(70.0 * TheCamera.LODDistMultiplier);
+ ms_vehicleLod0Dist = sq(70.0f * TheCamera.GenerationDistMultiplier);
+ ms_vehicleLod1Dist = sq(90.0f * TheCamera.GenerationDistMultiplier);
+ ms_vehicleFadeDist = sq(100.0f * TheCamera.GenerationDistMultiplier);
+ ms_bigVehicleLod0Dist = sq(60.0f * TheCamera.GenerationDistMultiplier);
+ ms_bigVehicleLod1Dist = sq(150.0f * TheCamera.GenerationDistMultiplier);
+ ms_pedLod0Dist = sq(25.0f * TheCamera.LODDistMultiplier);
+ ms_pedLod1Dist = sq(60.0f * TheCamera.LODDistMultiplier);
+ ms_pedFadeDist = sq(70.0f * TheCamera.LODDistMultiplier);
}
RpMaterial*
diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp
index a1c2af93..c711c8c8 100644
--- a/src/render/WaterLevel.cpp
+++ b/src/render/WaterLevel.cpp
@@ -979,7 +979,7 @@ CWaterLevel::RenderOneWavySector(float fX, float fY, float fZ, RwRGBA const &col
SMALL_SECTOR_SIZE / 2,
apBoatList) )
{
- float fWakeColor = fAdd1 - max(255.0f - float(color.blue + color.red + color.green) / 3, fAdd2);
+ float fWakeColor = fAdd1 - Max(255.0f - float(color.blue + color.red + color.green) / 3, fAdd2);
RpGeometry *wavyGeometry = RpAtomicGetGeometry(ms_pWavyAtomic);
RpGeometry *geom = apGeomArray[nGeomUsed++];
@@ -1035,9 +1035,9 @@ CWaterLevel::RenderOneWavySector(float fX, float fY, float fZ, RwRGBA const &col
RwRGBAAssign(&wakeColor, &color);
- wakeColor.red = min(color.red + int32(fWakeColor * fRedMult * fDistMult), 255);
- wakeColor.green = min(color.green + int32(fWakeColor * fGreenMult * fDistMult), 255);
- wakeColor.blue = min(color.blue + int32(fWakeColor * fBlueMult * fDistMult), 255);
+ wakeColor.red = Min(color.red + int32(fWakeColor * fRedMult * fDistMult), 255);
+ wakeColor.green = Min(color.green + int32(fWakeColor * fGreenMult * fDistMult), 255);
+ wakeColor.blue = Min(color.blue + int32(fWakeColor * fBlueMult * fDistMult), 255);
RwRGBAAssign(&geomPreLights[9*i+j], &wakeColor);
@@ -1114,7 +1114,7 @@ CWaterLevel::CalcDistanceToWater(float fX, float fY)
fSectorY + SMALL_SECTOR_SIZE - fY
);
- fDistSqr = min(vecDist.MagnitudeSqr(), fDistSqr);
+ fDistSqr = Min(vecDist.MagnitudeSqr(), fDistSqr);
}
}
}