diff --git a/src/world/CWorld.cpp b/src/world/CWorld.cpp index e2c1096..6863847 100644 --- a/src/world/CWorld.cpp +++ b/src/world/CWorld.cpp @@ -3,9 +3,12 @@ #include "gx/Shader.hpp" #include "model/Model2.hpp" #include "world/Map.hpp" +#include "world/Weather.hpp" +#include uint32_t CWorld::s_enables; uint32_t CWorld::s_enables2; +Weather* CWorld::s_weather; void CWorld::Initialize() { CWorld::s_enables |= @@ -42,6 +45,10 @@ void CWorld::Initialize() { ); // TODO + + CWorld::s_weather = STORM_NEW(Weather); + + // TODO } void CWorld::LoadMap(const char* mapName, const C3Vector& position, int32_t zoneID) { diff --git a/src/world/CWorld.hpp b/src/world/CWorld.hpp index 0ca2b96..a79831e 100644 --- a/src/world/CWorld.hpp +++ b/src/world/CWorld.hpp @@ -2,9 +2,10 @@ #define WORLD_C_WORLD_HPP #include - #include +class Weather; + class CWorld { public: enum Enables { @@ -46,6 +47,7 @@ class CWorld { // Static variables static uint32_t s_enables; static uint32_t s_enables2; + static Weather* s_weather; // Static functions static void Initialize(void); diff --git a/src/world/Weather.cpp b/src/world/Weather.cpp new file mode 100644 index 0000000..1ebd96f --- /dev/null +++ b/src/world/Weather.cpp @@ -0,0 +1,31 @@ +#include "world/Weather.hpp" +#include "console/CVar.hpp" + +static CVar* s_useShadersCvar; + +bool WeatherDensityCallback(CVar* var, const char* oldValue, const char* value, void* arg) { + // TODO + return true; +} + +Weather::Weather() { + // TODO + + CVar::Register( + "weatherDensity", + nullptr, + 0x0, + "2", + &WeatherDensityCallback, + DEFAULT + ); + + s_useShadersCvar = CVar::Register( + "useWeatherShaders", + nullptr, + 0x0, + "1", + nullptr, + DEFAULT + ); +} diff --git a/src/world/Weather.hpp b/src/world/Weather.hpp new file mode 100644 index 0000000..6554e81 --- /dev/null +++ b/src/world/Weather.hpp @@ -0,0 +1,10 @@ +#ifndef WORLD_WEATHER_HPP +#define WORLD_WEATHER_HPP + +class Weather { + public: + // Member functions + Weather(); +}; + +#endif