summaryrefslogtreecommitdiffstats
path: root/src/rw/Lights.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2020-08-27 19:35:14 +0200
committerGitHub <noreply@github.com>2020-08-27 19:35:14 +0200
commita8999bbf38cae233e39b5995118fa03bca7894ef (patch)
treeada9bd1935512f4b46fe6b4f42d9160eb2281262 /src/rw/Lights.cpp
parentbike shooting fix + trace temp fix (diff)
parentupdate librw (diff)
downloadre3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.gz
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.bz2
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.lz
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.xz
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.zst
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.zip
Diffstat (limited to 'src/rw/Lights.cpp')
-rw-r--r--src/rw/Lights.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/rw/Lights.cpp b/src/rw/Lights.cpp
index cd45b81f..3657e2c7 100644
--- a/src/rw/Lights.cpp
+++ b/src/rw/Lights.cpp
@@ -10,6 +10,8 @@
#include "Frontend.h"
#include "MBlur.h"
+//--MIAMI: done
+
RpLight *pAmbient;
RpLight *pDirect;
RpLight *pExtraDirectionals[4] = { nil };
@@ -23,7 +25,13 @@ RwRGBAReal DirectionalLightColourForFrame;
RwRGBAReal AmbientLightColour;
RwRGBAReal DirectionalLightColour;
-//--MIAMI: done
+#ifdef EXTENDED_COLOURFILTER
+#include "postfx.h"
+#define USEBLURCOLORS CPostFX::UseBlurColours()
+#else
+#define USEBLURCOLORS CMBlur::BlurOn
+#endif
+
void
SetLightsWithTimeOfDayColour(RpWorld *)
{
@@ -31,7 +39,7 @@ SetLightsWithTimeOfDayColour(RpWorld *)
RwMatrix mat;
if(pAmbient){
- if(CMBlur::BlurOn){
+ if(USEBLURCOLORS){
AmbientLightColourForFrame.red = CTimeCycle::GetAmbientRed_Bl() * CCoronas::LightsMult;
AmbientLightColourForFrame.green = CTimeCycle::GetAmbientGreen_Bl() * CCoronas::LightsMult;
AmbientLightColourForFrame.blue = CTimeCycle::GetAmbientBlue_Bl() * CCoronas::LightsMult;
@@ -41,7 +49,7 @@ SetLightsWithTimeOfDayColour(RpWorld *)
AmbientLightColourForFrame.blue = CTimeCycle::GetAmbientBlue() * CCoronas::LightsMult;
}
- if(CMBlur::BlurOn){
+ if(USEBLURCOLORS){
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;
@@ -302,6 +310,14 @@ ActivateDirectional(void)
RpLightSetFlags(pDirect, rpLIGHTLIGHTATOMICS);
}
+RwRGBAReal FullLight = { 1.0f, 1.0f, 1.0f, 1.0f };
+
+void
+SetFullAmbient(void)
+{
+ RpLightSetColor(pAmbient, &FullLight);
+}
+
void
SetAmbientColours(void)
{