Clean up GameFlowScript.

Remove a lot of members which were unused and which represented level properties already accounted for in GameScriptLevel.

Make TITLE_TYPE an enum class and relabel its values.

Add TitleScreenImagePath and SetTitleScreenImagePath, which replaces GameScriptLevel's Background member.

Register GameScriptColor in GameFlowScript since we will be using it for the fog and sky layer properties of levels.
This commit is contained in:
hispidence 2021-08-07 19:13:36 +01:00
parent 10111e2df2
commit e409222739
2 changed files with 21 additions and 57 deletions

View file

@ -6,10 +6,10 @@
#include "GameScriptSettings.h"
#include "GameScriptAudioTrack.h"
enum TITLE_TYPE
enum class TITLE_TYPE
{
TITLE_FLYBY,
TITLE_BACKGROUND
FLYBY,
BACKGROUND
};
class GameFlow : public LuaHandler
@ -23,15 +23,8 @@ private:
std::map<short, short> m_itemsMap;
public:
Vector3 SkyColorLayer1{};
Vector3 SkyColorLayer2{};
Vector3 FogColor{};
int SkySpeedLayer1{ 0 };
int SkySpeedLayer2{ 0 };
int FogInDistance{ 0 };
int FogOutDistance{ 0 };
bool DrawHorizon{ false };
bool ColAddHorizon{ false };
int SelectedLevelForNewGame{ 0 };
int SelectedSaveGame{ 0 };
bool EnableLoadSave{ true };
@ -39,8 +32,9 @@ public:
bool FlyCheat{ true };
bool DebugMode{ false };
int LevelFarView{ 0 };
TITLE_TYPE TitleType{ TITLE_FLYBY };
TITLE_TYPE TitleType{ TITLE_TYPE::FLYBY };
std::string IntroImagePath{};
std::string TitleScreenImagePath{};
// Selected language set
std::vector<GameScriptLevel*> Levels;
@ -57,11 +51,8 @@ public:
void SetSettings(GameScriptSettings const & src);
GameScriptSettings* GetSettings();
GameScriptLevel* GetLevel(int id);
void SetHorizon(bool horizon, bool colAddHorizon);
void SetLayer1(byte r, byte g, byte b, short speed);
void SetLayer2(byte r, byte g, byte b, short speed);
void SetFog(byte r, byte g, byte b, short startDistance, short endDistance);
int GetNumLevels();
bool DoGameflow();
void SetIntroImagePath(std::string const& path);
void SetTitleScreenImagePath(std::string const& path);
};