summaryrefslogtreecommitdiffstats
path: root/src/render/Lights.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-08-02 17:43:40 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-08-27 21:14:28 +0200
commit458fc63f0196dc92362b44d5cf7ebf67bbc903e1 (patch)
treeaa190341ec4d5ee449c80c20fea3c09e4f655532 /src/render/Lights.cpp
parentMore audio ped (diff)
downloadre3-458fc63f0196dc92362b44d5cf7ebf67bbc903e1.tar
re3-458fc63f0196dc92362b44d5cf7ebf67bbc903e1.tar.gz
re3-458fc63f0196dc92362b44d5cf7ebf67bbc903e1.tar.bz2
re3-458fc63f0196dc92362b44d5cf7ebf67bbc903e1.tar.lz
re3-458fc63f0196dc92362b44d5cf7ebf67bbc903e1.tar.xz
re3-458fc63f0196dc92362b44d5cf7ebf67bbc903e1.tar.zst
re3-458fc63f0196dc92362b44d5cf7ebf67bbc903e1.zip
Diffstat (limited to '')
-rw-r--r--src/render/Lights.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/render/Lights.cpp b/src/render/Lights.cpp
index 85d7ba13..cd83a898 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