mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(world): stub Weather
This commit is contained in:
parent
03c5ad860b
commit
0df9908ce8
@ -3,9 +3,12 @@
|
|||||||
#include "gx/Shader.hpp"
|
#include "gx/Shader.hpp"
|
||||||
#include "model/Model2.hpp"
|
#include "model/Model2.hpp"
|
||||||
#include "world/Map.hpp"
|
#include "world/Map.hpp"
|
||||||
|
#include "world/Weather.hpp"
|
||||||
|
#include <storm/Memory.hpp>
|
||||||
|
|
||||||
uint32_t CWorld::s_enables;
|
uint32_t CWorld::s_enables;
|
||||||
uint32_t CWorld::s_enables2;
|
uint32_t CWorld::s_enables2;
|
||||||
|
Weather* CWorld::s_weather;
|
||||||
|
|
||||||
void CWorld::Initialize() {
|
void CWorld::Initialize() {
|
||||||
CWorld::s_enables |=
|
CWorld::s_enables |=
|
||||||
@ -42,6 +45,10 @@ void CWorld::Initialize() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
CWorld::s_weather = STORM_NEW(Weather);
|
||||||
|
|
||||||
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWorld::LoadMap(const char* mapName, const C3Vector& position, int32_t zoneID) {
|
void CWorld::LoadMap(const char* mapName, const C3Vector& position, int32_t zoneID) {
|
||||||
|
|||||||
@ -2,9 +2,10 @@
|
|||||||
#define WORLD_C_WORLD_HPP
|
#define WORLD_C_WORLD_HPP
|
||||||
|
|
||||||
#include <tempest/Vector.hpp>
|
#include <tempest/Vector.hpp>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
class Weather;
|
||||||
|
|
||||||
class CWorld {
|
class CWorld {
|
||||||
public:
|
public:
|
||||||
enum Enables {
|
enum Enables {
|
||||||
@ -46,6 +47,7 @@ class CWorld {
|
|||||||
// Static variables
|
// Static variables
|
||||||
static uint32_t s_enables;
|
static uint32_t s_enables;
|
||||||
static uint32_t s_enables2;
|
static uint32_t s_enables2;
|
||||||
|
static Weather* s_weather;
|
||||||
|
|
||||||
// Static functions
|
// Static functions
|
||||||
static void Initialize(void);
|
static void Initialize(void);
|
||||||
|
|||||||
31
src/world/Weather.cpp
Normal file
31
src/world/Weather.cpp
Normal file
@ -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
|
||||||
|
);
|
||||||
|
}
|
||||||
10
src/world/Weather.hpp
Normal file
10
src/world/Weather.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef WORLD_WEATHER_HPP
|
||||||
|
#define WORLD_WEATHER_HPP
|
||||||
|
|
||||||
|
class Weather {
|
||||||
|
public:
|
||||||
|
// Member functions
|
||||||
|
Weather();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user