diff options
author | aap <aap@papnet.eu> | 2020-05-06 00:53:26 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-06 00:53:26 +0200 |
commit | 31f9bb566b1c4538ea1e4abba0a9d1b8d2cee429 (patch) | |
tree | 446195b8043f42456db74f920c71d2198ad97969 /src/rw/Lights.cpp | |
parent | getting the vice city map to work (diff) | |
download | re3-31f9bb566b1c4538ea1e4abba0a9d1b8d2cee429.tar re3-31f9bb566b1c4538ea1e4abba0a9d1b8d2cee429.tar.gz re3-31f9bb566b1c4538ea1e4abba0a9d1b8d2cee429.tar.bz2 re3-31f9bb566b1c4538ea1e4abba0a9d1b8d2cee429.tar.lz re3-31f9bb566b1c4538ea1e4abba0a9d1b8d2cee429.tar.xz re3-31f9bb566b1c4538ea1e4abba0a9d1b8d2cee429.tar.zst re3-31f9bb566b1c4538ea1e4abba0a9d1b8d2cee429.zip |
Diffstat (limited to 'src/rw/Lights.cpp')
-rw-r--r-- | src/rw/Lights.cpp | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/src/rw/Lights.cpp b/src/rw/Lights.cpp index 5a253854..8f7f92b6 100644 --- a/src/rw/Lights.cpp +++ b/src/rw/Lights.cpp @@ -8,6 +8,7 @@ #include "Weather.h" #include "ZoneCull.h" #include "Frontend.h" +#include "MBlur.h" RpLight *pAmbient; RpLight *pDirect; @@ -22,6 +23,7 @@ RwRGBAReal DirectionalLightColourForFrame; RwRGBAReal AmbientLightColour; RwRGBAReal DirectionalLightColour; +//--MIAMI: done void SetLightsWithTimeOfDayColour(RpWorld *) { @@ -29,17 +31,35 @@ SetLightsWithTimeOfDayColour(RpWorld *) RwMatrix mat; if(pAmbient){ - AmbientLightColourForFrame.red = CTimeCycle::GetAmbientRed() * CCoronas::LightsMult; - AmbientLightColourForFrame.green = CTimeCycle::GetAmbientGreen() * CCoronas::LightsMult; - AmbientLightColourForFrame.blue = CTimeCycle::GetAmbientBlue() * CCoronas::LightsMult; + if(CMBlur::BlurOn){ + AmbientLightColourForFrame.red = CTimeCycle::GetAmbientRed_Bl() * CCoronas::LightsMult; + AmbientLightColourForFrame.green = CTimeCycle::GetAmbientGreen_Bl() * CCoronas::LightsMult; + AmbientLightColourForFrame.blue = CTimeCycle::GetAmbientBlue_Bl() * CCoronas::LightsMult; + }else{ + AmbientLightColourForFrame.red = CTimeCycle::GetAmbientRed() * CCoronas::LightsMult; + AmbientLightColourForFrame.green = CTimeCycle::GetAmbientGreen() * CCoronas::LightsMult; + AmbientLightColourForFrame.blue = CTimeCycle::GetAmbientBlue() * CCoronas::LightsMult; + } + + if(CMBlur::BlurOn){ + AmbientLightColourForFrame_PedsCarsAndObjects.red = CTimeCycle::GetAmbientRed_Obj_Bl() * CCoronas::LightsMult; + AmbientLightColourForFrame_PedsCarsAndObjects.green = CTimeCycle::GetAmbientGreen_Obj_Bl() * CCoronas::LightsMult; + AmbientLightColourForFrame_PedsCarsAndObjects.blue = CTimeCycle::GetAmbientBlue_Obj_Bl() * CCoronas::LightsMult; + }else{ + AmbientLightColourForFrame_PedsCarsAndObjects.red = CTimeCycle::GetAmbientRed_Obj() * CCoronas::LightsMult; + AmbientLightColourForFrame_PedsCarsAndObjects.green = CTimeCycle::GetAmbientGreen_Obj() * CCoronas::LightsMult; + AmbientLightColourForFrame_PedsCarsAndObjects.blue = CTimeCycle::GetAmbientBlue_Obj() * CCoronas::LightsMult; + } + if(CWeather::LightningFlash && !CCullZones::CamNoRain()){ AmbientLightColourForFrame.red = 1.0f; AmbientLightColourForFrame.green = 1.0f; AmbientLightColourForFrame.blue = 1.0f; + + AmbientLightColourForFrame_PedsCarsAndObjects.red = 1.0f; + AmbientLightColourForFrame_PedsCarsAndObjects.green = 1.0f; + AmbientLightColourForFrame_PedsCarsAndObjects.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); RpLightSetColor(pAmbient, &AmbientLightColourForFrame); } |