summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/control/Script.cpp4
-rw-r--r--src/core/re3.cpp24
-rw-r--r--src/render/Timecycle.cpp325
-rw-r--r--src/render/Timecycle.h238
-rw-r--r--src/render/Weather.h4
5 files changed, 378 insertions, 217 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index eb950464..9508677b 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -12709,13 +12709,13 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
case COMMAND_SET_EXTRA_COLOURS:
{
CollectParameters(&m_nIp, 2);
- debug("SET_EXTRA_COLOURS not implemented, skipping\n");
+ CTimeCycle::StartExtraColour(ScriptParams[0]-1, ScriptParams[1] != 0);
return 0;
}
case COMMAND_CLEAR_EXTRA_COLOURS:
{
CollectParameters(&m_nIp, 1);
- debug("CLEAR_EXTRA_COLOURS not implemented, skipping\n");
+ CTimeCycle::StopExtraColour(ScriptParams[0]);
return 0;
}
//case COMMAND_CLOSE_CAR_BOOT:
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 10f0e032..e9c643ac 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -7,6 +7,7 @@
#include "Credits.h"
#include "Camera.h"
#include "Weather.h"
+#include "Timecycle.h"
#include "Clock.h"
#include "World.h"
#include "Vehicle.h"
@@ -406,6 +407,26 @@ DebugMenuPopulate(void)
static const char *weathers[] = {
"Sunny", "Cloudy", "Rainy", "Foggy", "Extrasunny", "Stormy"
};
+ static const char *extracols[] = {
+ "1 - Malibu club",
+ "2 - Strib club",
+ "3 - Hotel",
+ "4 - Bank",
+ "5 - Police HQ",
+ "6 - Mall",
+ "7 - Rifle Range",
+ "8 - Mansion",
+ "9 - Dirt ring",
+ "10 - Blood ring",
+ "11 - Hot ring",
+ "12 - Concert hall",
+ "13 - Auntie Poulets",
+ "14 - Intro at docks",
+ "15 - Biker bar",
+ "16 - Intro cafe",
+ "17 - Studio",
+ "18", "19", "20", "21", "22", "23", "24"
+ };
DebugMenuEntry *e;
e = DebugMenuAddVar("Time & Weather", "Current Hour", &CClock::GetHoursRef(), nil, 1, 0, 23, nil);
DebugMenuEntrySetWrap(e, true);
@@ -416,7 +437,8 @@ DebugMenuPopulate(void)
DebugMenuEntrySetWrap(e, true);
e = DebugMenuAddVar("Time & Weather", "New Weather", (int16*)&CWeather::NewWeatherType, nil, 1, 0, 5, weathers);
DebugMenuEntrySetWrap(e, true);
- DebugMenuAddVar("Time & Weather", "Wind", (float*)&CWeather::Wind, nil, 0.1f, 0.0f, 1.0f);
+ DebugMenuAddVarBool8("Time & Weather", "Extracolours On", &CTimeCycle::m_bExtraColourOn, nil);
+ DebugMenuAddVar("Time & Weather", "Extracolour", &CTimeCycle::m_ExtraColour, nil, 1, 0, 23, extracols);
DebugMenuAddVar("Time & Weather", "Time scale", (float*)&CTimer::GetTimeScale(), nil, 0.1f, 0.0f, 10.0f);
DebugMenuAddCmd("Cheats", "Weapon set 1", WeaponCheat1);
diff --git a/src/render/Timecycle.cpp b/src/render/Timecycle.cpp
index fe898412..7e8ad5e5 100644
--- a/src/render/Timecycle.cpp
+++ b/src/render/Timecycle.cpp
@@ -10,60 +10,60 @@
#include "FileMgr.h"
#include "Timecycle.h"
-// TODO(MIAMI): change some of the types here
-
-int CTimeCycle::m_nAmbientRed[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientGreen[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientBlue[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientRed_Obj[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientGreen_Obj[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientBlue_Obj[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientRed_Bl[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientGreen_Bl[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientBlue_Bl[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientRed_Obj_Bl[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientGreen_Obj_Bl[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nAmbientBlue_Obj_Bl[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nDirectionalRed[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nDirectionalGreen[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nDirectionalBlue[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSkyTopRed[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSkyTopGreen[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSkyTopBlue[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSkyBottomRed[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSkyBottomGreen[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSkyBottomBlue[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSunCoreRed[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSunCoreGreen[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSunCoreBlue[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSunCoronaRed[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSunCoronaGreen[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nSunCoronaBlue[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fSunSize[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fSpriteSize[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fSpriteBrightness[NUMHOURS][NUMWEATHERS];
-short CTimeCycle::m_nShadowStrength[NUMHOURS][NUMWEATHERS];
-short CTimeCycle::m_nLightShadowStrength[NUMHOURS][NUMWEATHERS];
-short CTimeCycle::m_nPoleShadowStrength[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fFogStart[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fFarClip[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fLightsOnGroundBrightness[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nLowCloudsRed[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nLowCloudsGreen[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nLowCloudsBlue[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nFluffyCloudsTopRed[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nFluffyCloudsTopGreen[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nFluffyCloudsTopBlue[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nFluffyCloudsBottomRed[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nFluffyCloudsBottomGreen[NUMHOURS][NUMWEATHERS];
-int CTimeCycle::m_nFluffyCloudsBottomBlue[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fBlurRed[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fBlurGreen[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fBlurBlue[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fWaterRed[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fWaterGreen[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fWaterBlue[NUMHOURS][NUMWEATHERS];
-float CTimeCycle::m_fWaterAlpha[NUMHOURS][NUMWEATHERS];
+//--MIAMI: done
+
+uint8 CTimeCycle::m_nAmbientRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientRed_Obj[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientGreen_Obj[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientBlue_Obj[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientRed_Bl[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientGreen_Bl[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientBlue_Bl[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientRed_Obj_Bl[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientGreen_Obj_Bl[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nAmbientBlue_Obj_Bl[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nDirectionalRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nDirectionalGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nDirectionalBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSkyTopRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSkyTopGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSkyTopBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSkyBottomRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSkyBottomGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSkyBottomBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSunCoreRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSunCoreGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSunCoreBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSunCoronaRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSunCoronaGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nSunCoronaBlue[NUMHOURS][NUMWEATHERS];
+int8 CTimeCycle::m_fSunSize[NUMHOURS][NUMWEATHERS];
+int8 CTimeCycle::m_fSpriteSize[NUMHOURS][NUMWEATHERS];
+int8 CTimeCycle::m_fSpriteBrightness[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nShadowStrength[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nLightShadowStrength[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nPoleShadowStrength[NUMHOURS][NUMWEATHERS];
+int16 CTimeCycle::m_fFogStart[NUMHOURS][NUMWEATHERS];
+int16 CTimeCycle::m_fFarClip[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_fLightsOnGroundBrightness[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nLowCloudsRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nLowCloudsGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nLowCloudsBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nFluffyCloudsTopRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nFluffyCloudsTopGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nFluffyCloudsTopBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nFluffyCloudsBottomRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nFluffyCloudsBottomGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_nFluffyCloudsBottomBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_fBlurRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_fBlurGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_fBlurBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_fWaterRed[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_fWaterGreen[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_fWaterBlue[NUMHOURS][NUMWEATHERS];
+uint8 CTimeCycle::m_fWaterAlpha[NUMHOURS][NUMWEATHERS];
float CTimeCycle::m_fCurrentAmbientRed;
@@ -81,36 +81,36 @@ float CTimeCycle::m_fCurrentAmbientBlue_Obj_Bl;
float CTimeCycle::m_fCurrentDirectionalRed;
float CTimeCycle::m_fCurrentDirectionalGreen;
float CTimeCycle::m_fCurrentDirectionalBlue;
-int CTimeCycle::m_nCurrentSkyTopRed;
-int CTimeCycle::m_nCurrentSkyTopGreen;
-int CTimeCycle::m_nCurrentSkyTopBlue;
-int CTimeCycle::m_nCurrentSkyBottomRed;
-int CTimeCycle::m_nCurrentSkyBottomGreen;
-int CTimeCycle::m_nCurrentSkyBottomBlue;
-int CTimeCycle::m_nCurrentSunCoreRed;
-int CTimeCycle::m_nCurrentSunCoreGreen;
-int CTimeCycle::m_nCurrentSunCoreBlue;
-int CTimeCycle::m_nCurrentSunCoronaRed;
-int CTimeCycle::m_nCurrentSunCoronaGreen;
-int CTimeCycle::m_nCurrentSunCoronaBlue;
+int32 CTimeCycle::m_nCurrentSkyTopRed;
+int32 CTimeCycle::m_nCurrentSkyTopGreen;
+int32 CTimeCycle::m_nCurrentSkyTopBlue;
+int32 CTimeCycle::m_nCurrentSkyBottomRed;
+int32 CTimeCycle::m_nCurrentSkyBottomGreen;
+int32 CTimeCycle::m_nCurrentSkyBottomBlue;
+int32 CTimeCycle::m_nCurrentSunCoreRed;
+int32 CTimeCycle::m_nCurrentSunCoreGreen;
+int32 CTimeCycle::m_nCurrentSunCoreBlue;
+int32 CTimeCycle::m_nCurrentSunCoronaRed;
+int32 CTimeCycle::m_nCurrentSunCoronaGreen;
+int32 CTimeCycle::m_nCurrentSunCoronaBlue;
float CTimeCycle::m_fCurrentSunSize;
float CTimeCycle::m_fCurrentSpriteSize;
float CTimeCycle::m_fCurrentSpriteBrightness;
-int CTimeCycle::m_nCurrentShadowStrength;
-int CTimeCycle::m_nCurrentLightShadowStrength;
-int CTimeCycle::m_nCurrentPoleShadowStrength;
+int32 CTimeCycle::m_nCurrentShadowStrength;
+int32 CTimeCycle::m_nCurrentLightShadowStrength;
+int32 CTimeCycle::m_nCurrentPoleShadowStrength;
float CTimeCycle::m_fCurrentFogStart;
float CTimeCycle::m_fCurrentFarClip;
float CTimeCycle::m_fCurrentLightsOnGroundBrightness;
-int CTimeCycle::m_nCurrentLowCloudsRed;
-int CTimeCycle::m_nCurrentLowCloudsGreen;
-int CTimeCycle::m_nCurrentLowCloudsBlue;
-int CTimeCycle::m_nCurrentFluffyCloudsTopRed;
-int CTimeCycle::m_nCurrentFluffyCloudsTopGreen;
-int CTimeCycle::m_nCurrentFluffyCloudsTopBlue;
-int CTimeCycle::m_nCurrentFluffyCloudsBottomRed;
-int CTimeCycle::m_nCurrentFluffyCloudsBottomGreen;
-int CTimeCycle::m_nCurrentFluffyCloudsBottomBlue;
+int32 CTimeCycle::m_nCurrentLowCloudsRed;
+int32 CTimeCycle::m_nCurrentLowCloudsGreen;
+int32 CTimeCycle::m_nCurrentLowCloudsBlue;
+int32 CTimeCycle::m_nCurrentFluffyCloudsTopRed;
+int32 CTimeCycle::m_nCurrentFluffyCloudsTopGreen;
+int32 CTimeCycle::m_nCurrentFluffyCloudsTopBlue;
+int32 CTimeCycle::m_nCurrentFluffyCloudsBottomRed;
+int32 CTimeCycle::m_nCurrentFluffyCloudsBottomGreen;
+int32 CTimeCycle::m_nCurrentFluffyCloudsBottomBlue;
float CTimeCycle::m_fCurrentBlurRed;
float CTimeCycle::m_fCurrentBlurGreen;
float CTimeCycle::m_fCurrentBlurBlue;
@@ -118,13 +118,16 @@ float CTimeCycle::m_fCurrentWaterRed;
float CTimeCycle::m_fCurrentWaterGreen;
float CTimeCycle::m_fCurrentWaterBlue;
float CTimeCycle::m_fCurrentWaterAlpha;
-int CTimeCycle::m_nCurrentFogColourRed;
-int CTimeCycle::m_nCurrentFogColourGreen;
-int CTimeCycle::m_nCurrentFogColourBlue;
+int32 CTimeCycle::m_nCurrentFogColourRed;
+int32 CTimeCycle::m_nCurrentFogColourGreen;
+int32 CTimeCycle::m_nCurrentFogColourBlue;
-int CTimeCycle::m_FogReduction;
+int32 CTimeCycle::m_FogReduction;
+bool CTimeCycle::m_bExtraColourOn;
+int32 CTimeCycle::m_ExtraColour;
+float CTimeCycle::m_ExtraColourInter;
-int CTimeCycle::m_CurrentStoredValue;
+int32 CTimeCycle::m_CurrentStoredValue;
CVector CTimeCycle::m_VectorToSun[16];
float CTimeCycle::m_fShadowFrontX[16];
float CTimeCycle::m_fShadowFrontY[16];
@@ -133,7 +136,6 @@ float CTimeCycle::m_fShadowSideY[16];
float CTimeCycle::m_fShadowDisplacementX[16];
float CTimeCycle::m_fShadowDisplacementY[16];
-
void
CTimeCycle::Initialise(void)
{
@@ -233,15 +235,15 @@ CTimeCycle::Initialise(void)
m_nSunCoronaRed[h][w] = sunCoronaR;
m_nSunCoronaGreen[h][w] = sunCoronaG;
m_nSunCoronaBlue[h][w] = sunCoronaB;
- m_fSunSize[h][w] = sunSz;
- m_fSpriteSize[h][w] = sprSz;
- m_fSpriteBrightness[h][w] = sprBght;
+ m_fSunSize[h][w] = sunSz * 10.0f;
+ m_fSpriteSize[h][w] = sprSz * 10.0f;
+ m_fSpriteBrightness[h][w] = sprBght * 10.0f;
m_nShadowStrength[h][w] = shad;
m_nLightShadowStrength[h][w] = lightShad;
m_nPoleShadowStrength[h][w] = poleShad;
m_fFarClip[h][w] = farClp;
m_fFogStart[h][w] = fogSt;
- m_fLightsOnGroundBrightness[h][w] = lightGnd;
+ m_fLightsOnGroundBrightness[h][w] = lightGnd * 10.0f;
m_nLowCloudsRed[h][w] = cloudR;
m_nLowCloudsGreen[h][w] = cloudG;
m_nLowCloudsBlue[h][w] = cloudB;
@@ -265,6 +267,51 @@ CTimeCycle::Initialise(void)
debug("CTimeCycle ready\n");
}
+static float interp_c0, interp_c1, interp_c2, interp_c3;
+
+float CTimeCycle::Interpolate(int8 *a, int8 *b)
+{
+ return a[CWeather::OldWeatherType] * interp_c0 +
+ b[CWeather::OldWeatherType] * interp_c1 +
+ a[CWeather::NewWeatherType] * interp_c2 +
+ b[CWeather::NewWeatherType] * interp_c3;
+}
+
+float CTimeCycle::Interpolate(uint8 *a, uint8 *b)
+{
+ return a[CWeather::OldWeatherType] * interp_c0 +
+ b[CWeather::OldWeatherType] * interp_c1 +
+ a[CWeather::NewWeatherType] * interp_c2 +
+ b[CWeather::NewWeatherType] * interp_c3;
+}
+
+float CTimeCycle::Interpolate(int16 *a, int16 *b)
+{
+ return a[CWeather::OldWeatherType] * interp_c0 +
+ b[CWeather::OldWeatherType] * interp_c1 +
+ a[CWeather::NewWeatherType] * interp_c2 +
+ b[CWeather::NewWeatherType] * interp_c3;
+}
+
+void
+CTimeCycle::StartExtraColour(int32 c, bool fade)
+{
+ m_bExtraColourOn = true;
+ m_ExtraColour = c;
+ if(fade)
+ m_ExtraColourInter = 0.0f;
+ else
+ m_ExtraColourInter = 1.0f;
+}
+
+void
+CTimeCycle::StopExtraColour(bool fade)
+{
+ m_bExtraColourOn = false;
+ if(!fade)
+ m_ExtraColourInter = 0.0f;
+}
+
void
CTimeCycle::Update(void)
{
@@ -274,12 +321,12 @@ CTimeCycle::Update(void)
int w2 = CWeather::NewWeatherType;
float timeInterp = (CClock::GetMinutes() + CClock::GetSeconds()/60.0f)/60.0f;
// coefficients for a bilinear interpolation
- float c0 = (1.0f-timeInterp) * (1.0f-CWeather::InterpolationValue);
- float c1 = timeInterp * (1.0f-CWeather::InterpolationValue);
- float c2 = (1.0f-timeInterp) * CWeather::InterpolationValue;
- float c3 = timeInterp * CWeather::InterpolationValue;
+ interp_c0 = (1.0f-timeInterp) * (1.0f-CWeather::InterpolationValue);
+ interp_c1 = timeInterp * (1.0f-CWeather::InterpolationValue);
+ interp_c2 = (1.0f-timeInterp) * CWeather::InterpolationValue;
+ interp_c3 = timeInterp * CWeather::InterpolationValue;
-#define INTERP(v) v[h1][w1]*c0 + v[h2][w1]*c1 + v[h1][w2]*c2 + v[h2][w2]*c3;
+#define INTERP(v) Interpolate(v[h1], v[h2])
m_nCurrentSkyTopRed = INTERP(m_nSkyTopRed);
m_nCurrentSkyTopGreen = INTERP(m_nSkyTopGreen);
@@ -317,15 +364,15 @@ CTimeCycle::Update(void)
m_nCurrentSunCoronaGreen = INTERP(m_nSunCoronaGreen);
m_nCurrentSunCoronaBlue = INTERP(m_nSunCoronaBlue);
- m_fCurrentSunSize = INTERP(m_fSunSize);
- m_fCurrentSpriteSize = INTERP(m_fSpriteSize);
- m_fCurrentSpriteBrightness = INTERP(m_fSpriteBrightness);
+ m_fCurrentSunSize = INTERP(m_fSunSize)/10.0f;
+ m_fCurrentSpriteSize = INTERP(m_fSpriteSize)/10.0f;
+ m_fCurrentSpriteBrightness = INTERP(m_fSpriteBrightness)/10.0f;
m_nCurrentShadowStrength = INTERP(m_nShadowStrength);
m_nCurrentLightShadowStrength = INTERP(m_nLightShadowStrength);
m_nCurrentPoleShadowStrength = INTERP(m_nPoleShadowStrength);
m_fCurrentFarClip = INTERP(m_fFarClip);
m_fCurrentFogStart = INTERP(m_fFogStart);
- m_fCurrentLightsOnGroundBrightness = INTERP(m_fLightsOnGroundBrightness);
+ m_fCurrentLightsOnGroundBrightness = INTERP(m_fLightsOnGroundBrightness)/10.0f;
m_nCurrentLowCloudsRed = INTERP(m_nLowCloudsRed);
m_nCurrentLowCloudsGreen = INTERP(m_nLowCloudsGreen);
@@ -347,6 +394,7 @@ CTimeCycle::Update(void)
m_fCurrentWaterGreen = INTERP(m_fWaterGreen);
m_fCurrentWaterBlue = INTERP(m_fWaterBlue);
m_fCurrentWaterAlpha = INTERP(m_fWaterAlpha);
+#undef INTERP
if(m_FogReduction != 0)
m_fCurrentFarClip = Max(m_fCurrentFarClip, m_FogReduction/64.0f * 650.0f);
@@ -360,7 +408,88 @@ CTimeCycle::Update(void)
sunPos.z = 0.2f - Cos(sunAngle);
sunPos.Normalise();
- // TODO(MIAMI): extra colours
+ if(m_bExtraColourOn)
+ m_ExtraColourInter = Min(1.0f, m_ExtraColourInter + CTimer::GetTimeStep()/120.0f);
+ else
+ m_ExtraColourInter = Max(-.0f, m_ExtraColourInter - CTimer::GetTimeStep()/120.0f);
+ if(m_ExtraColourInter > 0.0f){
+#define INTERP(extra,cur) (m_ExtraColourInter*extra[m_ExtraColour][WEATHER_EXTRACOLOURS] + (1.0f-m_ExtraColourInter)*cur)
+#define INTERPscl(extra,scl,cur) (m_ExtraColourInter*extra[m_ExtraColour][WEATHER_EXTRACOLOURS]/scl + (1.0f-m_ExtraColourInter)*cur)
+ if(m_nSkyTopRed[m_ExtraColour][WEATHER_EXTRACOLOURS] != 0 ||
+ m_nSkyTopGreen[m_ExtraColour][WEATHER_EXTRACOLOURS] != 0 ||
+ m_nSkyTopBlue[m_ExtraColour][WEATHER_EXTRACOLOURS] != 0){
+ m_nCurrentSkyTopRed = INTERP(m_nSkyTopRed,m_nCurrentSkyTopRed);
+ m_nCurrentSkyTopGreen = INTERP(m_nSkyTopGreen,m_nCurrentSkyTopGreen);
+ m_nCurrentSkyTopBlue = INTERP(m_nSkyTopBlue,m_nCurrentSkyTopBlue);
+
+ m_nCurrentSkyBottomRed = INTERP(m_nSkyBottomRed,m_nCurrentSkyBottomRed);
+ m_nCurrentSkyBottomGreen = INTERP(m_nSkyBottomGreen,m_nCurrentSkyBottomGreen);
+ m_nCurrentSkyBottomBlue = INTERP(m_nSkyBottomBlue,m_nCurrentSkyBottomBlue);
+
+ m_nCurrentSunCoreRed = INTERP(m_nSunCoreRed,m_nCurrentSunCoreRed);
+ m_nCurrentSunCoreGreen = INTERP(m_nSunCoreGreen,m_nCurrentSunCoreGreen);
+ m_nCurrentSunCoreBlue = INTERP(m_nSunCoreBlue,m_nCurrentSunCoreBlue);
+
+ m_nCurrentSunCoronaRed = INTERP(m_nSunCoronaRed,m_nCurrentSunCoronaRed);
+ m_nCurrentSunCoronaGreen = INTERP(m_nSunCoronaGreen,m_nCurrentSunCoronaGreen);
+ m_nCurrentSunCoronaBlue = INTERP(m_nSunCoronaBlue,m_nCurrentSunCoronaBlue);
+
+ m_fCurrentSunSize = INTERPscl(m_fSunSize,10.0f,m_fCurrentSunSize);
+
+ m_nCurrentLowCloudsRed = INTERP(m_nLowCloudsRed,m_nCurrentLowCloudsRed);
+ m_nCurrentLowCloudsGreen = INTERP(m_nLowCloudsGreen,m_nCurrentLowCloudsGreen);
+ m_nCurrentLowCloudsBlue = INTERP(m_nLowCloudsBlue,m_nCurrentLowCloudsBlue);
+
+ m_nCurrentFluffyCloudsTopRed = INTERP(m_nFluffyCloudsTopRed,m_nCurrentFluffyCloudsTopRed);
+ m_nCurrentFluffyCloudsTopGreen = INTERP(m_nFluffyCloudsTopGreen,m_nCurrentFluffyCloudsTopGreen);
+ m_nCurrentFluffyCloudsTopBlue = INTERP(m_nFluffyCloudsTopBlue,m_nCurrentFluffyCloudsTopBlue);
+
+ m_nCurrentFluffyCloudsBottomRed = INTERP(m_nFluffyCloudsBottomRed,m_nCurrentFluffyCloudsBottomRed);
+ m_nCurrentFluffyCloudsBottomGreen = INTERP(m_nFluffyCloudsBottomGreen,m_nCurrentFluffyCloudsBottomGreen);
+ m_nCurrentFluffyCloudsBottomBlue = INTERP(m_nFluffyCloudsBottomBlue,m_nCurrentFluffyCloudsBottomBlue);
+
+ m_fCurrentWaterRed = INTERP(m_fWaterRed,m_fCurrentWaterRed);
+ m_fCurrentWaterGreen = INTERP(m_fWaterGreen,m_fCurrentWaterGreen);
+ m_fCurrentWaterBlue = INTERP(m_fWaterBlue,m_fCurrentWaterBlue);
+ m_fCurrentWaterAlpha = INTERP(m_fWaterAlpha,m_fCurrentWaterAlpha);
+ }
+
+ m_fCurrentAmbientRed = INTERP(m_nAmbientRed,m_fCurrentAmbientRed);
+ m_fCurrentAmbientGreen = INTERP(m_nAmbientGreen,m_fCurrentAmbientGreen);
+ m_fCurrentAmbientBlue = INTERP(m_nAmbientBlue,m_fCurrentAmbientBlue);
+
+ m_fCurrentAmbientRed_Obj = INTERP(m_nAmbientRed_Obj,m_fCurrentAmbientRed_Obj);
+ m_fCurrentAmbientGreen_Obj = INTERP(m_nAmbientGreen_Obj,m_fCurrentAmbientGreen_Obj);
+ m_fCurrentAmbientBlue_Obj = INTERP(m_nAmbientBlue_Obj,m_fCurrentAmbientBlue_Obj);
+
+ m_fCurrentAmbientRed_Bl = INTERP(m_nAmbientRed_Bl,m_fCurrentAmbientRed_Bl);
+ m_fCurrentAmbientGreen_Bl = INTERP(m_nAmbientGreen_Bl,m_fCurrentAmbientGreen_Bl);
+ m_fCurrentAmbientBlue_Bl = INTERP(m_nAmbientBlue_Bl,m_fCurrentAmbientBlue_Bl);
+
+ m_fCurrentAmbientRed_Obj_Bl = INTERP(m_nAmbientRed_Obj_Bl,m_fCurrentAmbientRed_Obj_Bl);
+ m_fCurrentAmbientGreen_Obj_Bl = INTERP(m_nAmbientGreen_Obj_Bl,m_fCurrentAmbientGreen_Obj_Bl);
+ m_fCurrentAmbientBlue_Obj_Bl = INTERP(m_nAmbientBlue_Obj_Bl,m_fCurrentAmbientBlue_Obj_Bl);
+
+ m_fCurrentDirectionalRed = INTERP(m_nDirectionalRed,m_fCurrentDirectionalRed);
+ m_fCurrentDirectionalGreen = INTERP(m_nDirectionalGreen,m_fCurrentDirectionalGreen);
+ m_fCurrentDirectionalBlue = INTERP(m_nDirectionalBlue,m_fCurrentDirectionalBlue);
+
+ m_fCurrentSpriteSize = INTERPscl(m_fSpriteSize,10.0f,m_fCurrentSpriteSize);
+ m_fCurrentSpriteBrightness = INTERPscl(m_fSpriteBrightness,10.0f,m_fCurrentSpriteBrightness);
+ m_nCurrentShadowStrength = INTERP(m_nShadowStrength,m_nCurrentShadowStrength);
+ m_nCurrentLightShadowStrength = INTERP(m_nLightShadowStrength,m_nCurrentLightShadowStrength);
+ m_nCurrentPoleShadowStrength = INTERP(m_nPoleShadowStrength,m_nCurrentPoleShadowStrength);
+ m_fCurrentFarClip = INTERP(m_fFarClip,m_fCurrentFarClip);
+ m_fCurrentFogStart = INTERP(m_fFogStart,m_fCurrentFogStart);
+ m_fCurrentLightsOnGroundBrightness = INTERPscl(m_fLightsOnGroundBrightness,10.0f,m_fCurrentLightsOnGroundBrightness);
+
+ m_fCurrentBlurRed = INTERP(m_fBlurRed,m_fCurrentBlurRed);
+ m_fCurrentBlurGreen = INTERP(m_fBlurGreen,m_fCurrentBlurGreen);
+ m_fCurrentBlurBlue = INTERP(m_fBlurBlue,m_fCurrentBlurBlue);
+
+#undef INTERP
+#undef INTERPscl
+ }
if(TheCamera.m_BlurType == MOTION_BLUR_NONE || TheCamera.m_BlurType == MOTION_BLUR_LIGHT_SCENE)
TheCamera.SetMotionBlur(m_fCurrentBlurRed, m_fCurrentBlurGreen, m_fCurrentBlurBlue, 5, MOTION_BLUR_LIGHT_SCENE);
diff --git a/src/render/Timecycle.h b/src/render/Timecycle.h
index 832b36e2..ad079a95 100644
--- a/src/render/Timecycle.h
+++ b/src/render/Timecycle.h
@@ -2,58 +2,58 @@
class CTimeCycle
{
- static int m_nAmbientRed[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientGreen[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientBlue[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientRed_Obj[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientGreen_Obj[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientBlue_Obj[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientRed_Bl[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientGreen_Bl[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientBlue_Bl[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientRed_Obj_Bl[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientGreen_Obj_Bl[NUMHOURS][NUMWEATHERS];
- static int m_nAmbientBlue_Obj_Bl[NUMHOURS][NUMWEATHERS];
- static int m_nDirectionalRed[NUMHOURS][NUMWEATHERS];
- static int m_nDirectionalGreen[NUMHOURS][NUMWEATHERS];
- static int m_nDirectionalBlue[NUMHOURS][NUMWEATHERS];
- static int m_nSkyTopRed[NUMHOURS][NUMWEATHERS];
- static int m_nSkyTopGreen[NUMHOURS][NUMWEATHERS];
- static int m_nSkyTopBlue[NUMHOURS][NUMWEATHERS];
- static int m_nSkyBottomRed[NUMHOURS][NUMWEATHERS];
- static int m_nSkyBottomGreen[NUMHOURS][NUMWEATHERS];
- static int m_nSkyBottomBlue[NUMHOURS][NUMWEATHERS];
- static int m_nSunCoreRed[NUMHOURS][NUMWEATHERS];
- static int m_nSunCoreGreen[NUMHOURS][NUMWEATHERS];
- static int m_nSunCoreBlue[NUMHOURS][NUMWEATHERS];
- static int m_nSunCoronaRed[NUMHOURS][NUMWEATHERS];
- static int m_nSunCoronaGreen[NUMHOURS][NUMWEATHERS];
- static int m_nSunCoronaBlue[NUMHOURS][NUMWEATHERS];
- static float m_fSunSize[NUMHOURS][NUMWEATHERS];
- static float m_fSpriteSize[NUMHOURS][NUMWEATHERS];
- static float m_fSpriteBrightness[NUMHOURS][NUMWEATHERS];
- static short m_nShadowStrength[NUMHOURS][NUMWEATHERS];
- static short m_nLightShadowStrength[NUMHOURS][NUMWEATHERS];
- static short m_nPoleShadowStrength[NUMHOURS][NUMWEATHERS];
- static float m_fFogStart[NUMHOURS][NUMWEATHERS];
- static float m_fFarClip[NUMHOURS][NUMWEATHERS];
- static float m_fLightsOnGroundBrightness[NUMHOURS][NUMWEATHERS];
- static int m_nLowCloudsRed[NUMHOURS][NUMWEATHERS];
- static int m_nLowCloudsGreen[NUMHOURS][NUMWEATHERS];
- static int m_nLowCloudsBlue[NUMHOURS][NUMWEATHERS];
- static int m_nFluffyCloudsTopRed[NUMHOURS][NUMWEATHERS];
- static int m_nFluffyCloudsTopGreen[NUMHOURS][NUMWEATHERS];
- static int m_nFluffyCloudsTopBlue[NUMHOURS][NUMWEATHERS];
- static int m_nFluffyCloudsBottomRed[NUMHOURS][NUMWEATHERS];
- static int m_nFluffyCloudsBottomGreen[NUMHOURS][NUMWEATHERS];
- static int m_nFluffyCloudsBottomBlue[NUMHOURS][NUMWEATHERS];
- static float m_fBlurRed[NUMHOURS][NUMWEATHERS];
- static float m_fBlurGreen[NUMHOURS][NUMWEATHERS];
- static float m_fBlurBlue[NUMHOURS][NUMWEATHERS];
- static float m_fWaterRed[NUMHOURS][NUMWEATHERS];
- static float m_fWaterGreen[NUMHOURS][NUMWEATHERS];
- static float m_fWaterBlue[NUMHOURS][NUMWEATHERS];
- static float m_fWaterAlpha[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientRed_Obj[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientGreen_Obj[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientBlue_Obj[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientRed_Bl[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientGreen_Bl[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientBlue_Bl[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientRed_Obj_Bl[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientGreen_Obj_Bl[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nAmbientBlue_Obj_Bl[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nDirectionalRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nDirectionalGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nDirectionalBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSkyTopRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSkyTopGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSkyTopBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSkyBottomRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSkyBottomGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSkyBottomBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSunCoreRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSunCoreGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSunCoreBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSunCoronaRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSunCoronaGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nSunCoronaBlue[NUMHOURS][NUMWEATHERS];
+ static int8 m_fSunSize[NUMHOURS][NUMWEATHERS];
+ static int8 m_fSpriteSize[NUMHOURS][NUMWEATHERS];
+ static int8 m_fSpriteBrightness[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nShadowStrength[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nLightShadowStrength[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nPoleShadowStrength[NUMHOURS][NUMWEATHERS];
+ static int16 m_fFogStart[NUMHOURS][NUMWEATHERS];
+ static int16 m_fFarClip[NUMHOURS][NUMWEATHERS];
+ static uint8 m_fLightsOnGroundBrightness[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nLowCloudsRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nLowCloudsGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nLowCloudsBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nFluffyCloudsTopRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nFluffyCloudsTopGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nFluffyCloudsTopBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nFluffyCloudsBottomRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nFluffyCloudsBottomGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_nFluffyCloudsBottomBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_fBlurRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_fBlurGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_fBlurBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_fWaterRed[NUMHOURS][NUMWEATHERS];
+ static uint8 m_fWaterGreen[NUMHOURS][NUMWEATHERS];
+ static uint8 m_fWaterBlue[NUMHOURS][NUMWEATHERS];
+ static uint8 m_fWaterAlpha[NUMHOURS][NUMWEATHERS];
static float m_fCurrentAmbientRed;
static float m_fCurrentAmbientGreen;
@@ -70,36 +70,36 @@ class CTimeCycle
static float m_fCurrentDirectionalRed;
static float m_fCurrentDirectionalGreen;
static float m_fCurrentDirectionalBlue;
- static int m_nCurrentSkyTopRed;
- static int m_nCurrentSkyTopGreen;
- static int m_nCurrentSkyTopBlue;
- static int m_nCurrentSkyBottomRed;
- static int m_nCurrentSkyBottomGreen;
- static int m_nCurrentSkyBottomBlue;
- static int m_nCurrentSunCoreRed;
- static int m_nCurrentSunCoreGreen;
- static int m_nCurrentSunCoreBlue;
- static int m_nCurrentSunCoronaRed;
- static int m_nCurrentSunCoronaGreen;
- static int m_nCurrentSunCoronaBlue;
+ static int32 m_nCurrentSkyTopRed;
+ static int32 m_nCurrentSkyTopGreen;
+ static int32 m_nCurrentSkyTopBlue;
+ static int32 m_nCurrentSkyBottomRed;
+ static int32 m_nCurrentSkyBottomGreen;
+ static int32 m_nCurrentSkyBottomBlue;
+ static int32 m_nCurrentSunCoreRed;
+ static int32 m_nCurrentSunCoreGreen;
+ static int32 m_nCurrentSunCoreBlue;
+ static int32 m_nCurrentSunCoronaRed;
+ static int32 m_nCurrentSunCoronaGreen;
+ static int32 m_nCurrentSunCoronaBlue;
static float m_fCurrentSunSize;
static float m_fCurrentSpriteSize;
static float m_fCurrentSpriteBrightness;
- static int m_nCurrentShadowStrength;
- static int m_nCurrentLightShadowStrength;
- static int m_nCurrentPoleShadowStrength;
+ static int32 m_nCurrentShadowStrength;
+ static int32 m_nCurrentLightShadowStrength;
+ static int32 m_nCurrentPoleShadowStrength;
static float m_fCurrentFogStart;
static float m_fCurrentFarClip;
static float m_fCurrentLightsOnGroundBrightness;
- static int m_nCurrentLowCloudsRed;
- static int m_nCurrentLowCloudsGreen;
- static int m_nCurrentLowCloudsBlue;
- static int m_nCurrentFluffyCloudsTopRed;
- static int m_nCurrentFluffyCloudsTopGreen;
- static int m_nCurrentFluffyCloudsTopBlue;
- static int m_nCurrentFluffyCloudsBottomRed;
- static int m_nCurrentFluffyCloudsBottomGreen;
- static int m_nCurrentFluffyCloudsBottomBlue;
+ static int32 m_nCurrentLowCloudsRed;
+ static int32 m_nCurrentLowCloudsGreen;
+ static int32 m_nCurrentLowCloudsBlue;
+ static int32 m_nCurrentFluffyCloudsTopRed;
+ static int32 m_nCurrentFluffyCloudsTopGreen;
+ static int32 m_nCurrentFluffyCloudsTopBlue;
+ static int32 m_nCurrentFluffyCloudsBottomRed;
+ static int32 m_nCurrentFluffyCloudsBottomGreen;
+ static int32 m_nCurrentFluffyCloudsBottomBlue;
static float m_fCurrentBlurRed;
static float m_fCurrentBlurGreen;
static float m_fCurrentBlurBlue;
@@ -107,14 +107,17 @@ class CTimeCycle
static float m_fCurrentWaterGreen;
static float m_fCurrentWaterBlue;
static float m_fCurrentWaterAlpha;
- static int m_nCurrentFogColourRed;
- static int m_nCurrentFogColourGreen;
- static int m_nCurrentFogColourBlue;
+ static int32 m_nCurrentFogColourRed;
+ static int32 m_nCurrentFogColourGreen;
+ static int32 m_nCurrentFogColourBlue;
- static int m_FogReduction;
+ static int32 m_FogReduction;
public:
- static int m_CurrentStoredValue;
+ static bool m_bExtraColourOn;
+ static int32 m_ExtraColour;
+ static float m_ExtraColourInter;
+ static int32 m_CurrentStoredValue;
static CVector m_VectorToSun[16];
static float m_fShadowFrontX[16];
static float m_fShadowFrontY[16];
@@ -138,51 +141,56 @@ public:
static float GetDirectionalRed(void) { return m_fCurrentDirectionalRed; }
static float GetDirectionalGreen(void) { return m_fCurrentDirectionalGreen; }
static float GetDirectionalBlue(void) { return m_fCurrentDirectionalBlue; }
- static int GetSkyTopRed(void) { return m_nCurrentSkyTopRed; }
- static int GetSkyTopGreen(void) { return m_nCurrentSkyTopGreen; }
- static int GetSkyTopBlue(void) { return m_nCurrentSkyTopBlue; }
- static int GetSkyBottomRed(void) { return m_nCurrentSkyBottomRed; }
- static int GetSkyBottomGreen(void) { return m_nCurrentSkyBottomGreen; }
- static int GetSkyBottomBlue(void) { return m_nCurrentSkyBottomBlue; }
- static int GetSunCoreRed(void) { return m_nCurrentSunCoreRed; }
- static int GetSunCoreGreen(void) { return m_nCurrentSunCoreGreen; }
- static int GetSunCoreBlue(void) { return m_nCurrentSunCoreBlue; }
- static int GetSunCoronaRed(void) { return m_nCurrentSunCoronaRed; }
- static int GetSunCoronaGreen(void) { return m_nCurrentSunCoronaGreen; }
- static int GetSunCoronaBlue(void) { return m_nCurrentSunCoronaBlue; }
+ static int32 GetSkyTopRed(void) { return m_nCurrentSkyTopRed; }
+ static int32 GetSkyTopGreen(void) { return m_nCurrentSkyTopGreen; }
+ static int32 GetSkyTopBlue(void) { return m_nCurrentSkyTopBlue; }
+ static int32 GetSkyBottomRed(void) { return m_nCurrentSkyBottomRed; }
+ static int32 GetSkyBottomGreen(void) { return m_nCurrentSkyBottomGreen; }
+ static int32 GetSkyBottomBlue(void) { return m_nCurrentSkyBottomBlue; }
+ static int32 GetSunCoreRed(void) { return m_nCurrentSunCoreRed; }
+ static int32 GetSunCoreGreen(void) { return m_nCurrentSunCoreGreen; }
+ static int32 GetSunCoreBlue(void) { return m_nCurrentSunCoreBlue; }
+ static int32 GetSunCoronaRed(void) { return m_nCurrentSunCoronaRed; }
+ static int32 GetSunCoronaGreen(void) { return m_nCurrentSunCoronaGreen; }
+ static int32 GetSunCoronaBlue(void) { return m_nCurrentSunCoronaBlue; }
static float GetSunSize(void) { return m_fCurrentSunSize; }
static float GetSpriteBrightness(void) { return m_fCurrentSpriteBrightness; }
static float GetSpriteSize(void) { return m_fCurrentSpriteSize; }
- static int GetShadowStrength(void) { return m_nCurrentShadowStrength; }
- static int GetLightShadowStrength(void) { return m_nCurrentLightShadowStrength; }
+ static int32 GetShadowStrength(void) { return m_nCurrentShadowStrength; }
+ static int32 GetLightShadowStrength(void) { return m_nCurrentLightShadowStrength; }
static float GetLightOnGroundBrightness(void) { return m_fCurrentLightsOnGroundBrightness; }
static float GetFarClip(void) { return m_fCurrentFarClip; }
static float GetFogStart(void) { return m_fCurrentFogStart; }
- static int GetLowCloudsRed(void) { return m_nCurrentLowCloudsRed; }
- static int GetLowCloudsGreen(void) { return m_nCurrentLowCloudsGreen; }
- static int GetLowCloudsBlue(void) { return m_nCurrentLowCloudsBlue; }
- static int GetFluffyCloudsTopRed(void) { return m_nCurrentFluffyCloudsTopRed; }
- static int GetFluffyCloudsTopGreen(void) { return m_nCurrentFluffyCloudsTopGreen; }
- static int GetFluffyCloudsTopBlue(void) { return m_nCurrentFluffyCloudsTopBlue; }
- static int GetFluffyCloudsBottomRed(void) { return m_nCurrentFluffyCloudsBottomRed; }
- static int GetFluffyCloudsBottomGreen(void) { return m_nCurrentFluffyCloudsBottomGreen; }
- static int GetFluffyCloudsBottomBlue(void) { return m_nCurrentFluffyCloudsBottomBlue; }
- static int GetFogRed(void) { return m_nCurrentFogColourRed; }
- static int GetFogGreen(void) { return m_nCurrentFogColourGreen; }
- static int GetFogBlue(void) { return m_nCurrentFogColourBlue; }
- static int GetFogReduction(void) { return m_FogReduction; }
+ static int32 GetLowCloudsRed(void) { return m_nCurrentLowCloudsRed; }
+ static int32 GetLowCloudsGreen(void) { return m_nCurrentLowCloudsGreen; }
+ static int32 GetLowCloudsBlue(void) { return m_nCurrentLowCloudsBlue; }
+ static int32 GetFluffyCloudsTopRed(void) { return m_nCurrentFluffyCloudsTopRed; }
+ static int32 GetFluffyCloudsTopGreen(void) { return m_nCurrentFluffyCloudsTopGreen; }
+ static int32 GetFluffyCloudsTopBlue(void) { return m_nCurrentFluffyCloudsTopBlue; }
+ static int32 GetFluffyCloudsBottomRed(void) { return m_nCurrentFluffyCloudsBottomRed; }
+ static int32 GetFluffyCloudsBottomGreen(void) { return m_nCurrentFluffyCloudsBottomGreen; }
+ static int32 GetFluffyCloudsBottomBlue(void) { return m_nCurrentFluffyCloudsBottomBlue; }
+ static int32 GetFogRed(void) { return m_nCurrentFogColourRed; }
+ static int32 GetFogGreen(void) { return m_nCurrentFogColourGreen; }
+ static int32 GetFogBlue(void) { return m_nCurrentFogColourBlue; }
+ static int32 GetFogReduction(void) { return m_FogReduction; }
- static int GetBlurRed(void) { return m_fCurrentBlurRed; }
- static int GetBlurGreen(void) { return m_fCurrentBlurGreen; }
- static int GetBlurBlue(void) { return m_fCurrentBlurBlue; }
- static int GetWaterRed(void) { return m_fCurrentWaterRed; }
- static int GetWaterGreen(void) { return m_fCurrentWaterGreen; }
- static int GetWaterBlue(void) { return m_fCurrentWaterBlue; }
- static int GetWaterAlpha(void) { return m_fCurrentWaterAlpha; }
+ static int32 GetBlurRed(void) { return m_fCurrentBlurRed; }
+ static int32 GetBlurGreen(void) { return m_fCurrentBlurGreen; }
+ static int32 GetBlurBlue(void) { return m_fCurrentBlurBlue; }
+ static int32 GetWaterRed(void) { return m_fCurrentWaterRed; }
+ static int32 GetWaterGreen(void) { return m_fCurrentWaterGreen; }
+ static int32 GetWaterBlue(void) { return m_fCurrentWaterBlue; }
+ static int32 GetWaterAlpha(void) { return m_fCurrentWaterAlpha; }
static void Initialise(void);
static void Update(void);
+ static float Interpolate(int8 *a, int8 *b);
+ static float Interpolate(uint8 *a, uint8 *b);
+ static float Interpolate(int16 *a, int16 *b);
+ static void StartExtraColour(int32 c, bool fade);
+ static void StopExtraColour(bool fade);
static CVector &GetSunDirection(void) { return m_VectorToSun[m_CurrentStoredValue]; }
static float GetShadowFrontX(void) { return m_fShadowFrontX[m_CurrentStoredValue]; }
static float GetShadowFrontY(void) { return m_fShadowFrontY[m_CurrentStoredValue]; }
diff --git a/src/render/Weather.h b/src/render/Weather.h
index ae09e5d1..809bb787 100644
--- a/src/render/Weather.h
+++ b/src/render/Weather.h
@@ -6,7 +6,9 @@ enum {
WEATHER_FOGGY,
WEATHER_EXTRA_SUNNY,
WEATHER_HURRICANE,
- WEATHER_TOTAL
+ WEATHER_TOTAL,
+
+ WEATHER_EXTRACOLOURS = 6
};
class CWeather