Use script for setting weather

This commit is contained in:
Lwmte 2021-11-11 01:16:27 +03:00
parent 16bbeb48a9
commit c4090b7c9a
14 changed files with 91 additions and 115 deletions

View file

@ -5,36 +5,38 @@
#include "GameScriptColor.h"
#include "GameScriptInventoryObject.h"
enum class WEATHER_TYPE
enum class WeatherType
{
NORMAL,
RAIN,
SNOW
None,
Rain,
Snow
};
static const std::unordered_map<std::string, WEATHER_TYPE> kWeatherTypes{
{"NORMAL", WEATHER_TYPE::NORMAL},
{"RAIN", WEATHER_TYPE::RAIN},
{"SNOW", WEATHER_TYPE::SNOW}
};
enum LARA_TYPE
static const std::unordered_map<std::string, WeatherType> kWeatherTypes
{
NORMAL = 1,
YOUNG = 2,
BUNHEAD = 3,
CATSUIT = 4,
DIVESUIT = 5,
INVISIBLE = 7
{"None", WeatherType::None},
{"Rain", WeatherType::Rain},
{"Snow", WeatherType::Snow}
};
static const std::unordered_map<std::string, LARA_TYPE> kLaraTypes{
{"NORMAL", LARA_TYPE::NORMAL},
{"YOUNG", LARA_TYPE::YOUNG},
{"BUNHEAD", LARA_TYPE::BUNHEAD},
{"CATSUIT", LARA_TYPE::CATSUIT},
{"DIVESUIT", LARA_TYPE::DIVESUIT},
{"INVISIBLE", LARA_TYPE::INVISIBLE}
enum LaraType
{
Normal = 1,
Young = 2,
Bunhead = 3,
Catsuit = 4,
Divesuit = 5,
Invisible = 7
};
static const std::unordered_map<std::string, LaraType> kLaraTypes
{
{"Normal", LaraType::Normal},
{"Young", LaraType::Young},
{"Bunhead", LaraType::Bunhead},
{"Catsuit", LaraType::Catsuit},
{"Divesuit", LaraType::Divesuit},
{"Invisible", LaraType::Invisible}
};
struct GameScriptLevel
@ -50,16 +52,16 @@ struct GameScriptLevel
bool ColAddHorizon{ false };
GameScriptColor Fog{ 0, 0, 0 };
bool Storm{ false };
WEATHER_TYPE Weather{ WEATHER_TYPE::NORMAL };
WeatherType Weather{ WeatherType::None };
float WeatherStrength{ 1.0f };
bool Rumble{ false };
LARA_TYPE LaraType{ LARA_TYPE::NORMAL };
LaraType LaraType{ LaraType::Normal };
GameScriptMirror Mirror;
byte UVRotate{ 0 };
int LevelFarView{ 0 };
bool UnlimitedAir{ false };
std::vector<GameScriptInventoryObject> InventoryObjects;
void SetUVRotate(byte val);
void SetWeatherStrength(float val);
void SetLevelFarView(byte val);
static void Register(sol::state* state);
};