diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-12-07 19:50:18 +0100 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-12-07 19:50:18 +0100 |
commit | 87bca997a45c3364b3994fddb40230ef20a56d90 (patch) | |
tree | 1a4c6997451d097141386bf246dfeef97dd2794c /src/rw/Lights.cpp | |
parent | ps2 hud, restore original code (diff) | |
parent | Fixing the Ghost vehicle name. (diff) | |
download | re3-87bca997a45c3364b3994fddb40230ef20a56d90.tar re3-87bca997a45c3364b3994fddb40230ef20a56d90.tar.gz re3-87bca997a45c3364b3994fddb40230ef20a56d90.tar.bz2 re3-87bca997a45c3364b3994fddb40230ef20a56d90.tar.lz re3-87bca997a45c3364b3994fddb40230ef20a56d90.tar.xz re3-87bca997a45c3364b3994fddb40230ef20a56d90.tar.zst re3-87bca997a45c3364b3994fddb40230ef20a56d90.zip |
Diffstat (limited to '')
-rw-r--r-- | src/rw/Lights.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/rw/Lights.cpp b/src/rw/Lights.cpp index 5a253854..b3cef6d4 100644 --- a/src/rw/Lights.cpp +++ b/src/rw/Lights.cpp @@ -3,6 +3,7 @@ #include <rpworld.h> #include "Lights.h" +#include "Timer.h" #include "Timecycle.h" #include "Coronas.h" #include "Weather.h" @@ -248,6 +249,46 @@ SetAmbientAndDirectionalColours(float f) RpLightSetColor(pDirect, &DirectionalLightColour); } +// unused +void +SetFlashyColours(float f) +{ + if(CTimer::GetTimeInMilliseconds() & 0x100){ + AmbientLightColour.red = 1.0f; + AmbientLightColour.green = 1.0f; + AmbientLightColour.blue = 1.0f; + + DirectionalLightColour.red = DirectionalLightColourForFrame.red; + DirectionalLightColour.green = DirectionalLightColourForFrame.green; + DirectionalLightColour.blue = DirectionalLightColourForFrame.blue; + + RpLightSetColor(pAmbient, &AmbientLightColour); + RpLightSetColor(pDirect, &DirectionalLightColour); + }else{ + SetAmbientAndDirectionalColours(f * 0.75f); + } +} + +// unused +void +SetFlashyColours_Mild(float f) +{ + if(CTimer::GetTimeInMilliseconds() & 0x100){ + AmbientLightColour.red = 0.65f; + AmbientLightColour.green = 0.65f; + AmbientLightColour.blue = 0.65f; + + DirectionalLightColour.red = DirectionalLightColourForFrame.red; + DirectionalLightColour.green = DirectionalLightColourForFrame.green; + DirectionalLightColour.blue = DirectionalLightColourForFrame.blue; + + RpLightSetColor(pAmbient, &AmbientLightColour); + RpLightSetColor(pDirect, &DirectionalLightColour); + }else{ + SetAmbientAndDirectionalColours(f * 0.9f); + } +} + void SetBrightMarkerColours(float f) { |