2020-12-21 13:16:29 -03:00
|
|
|
#pragma once
|
|
|
|
#include "LanguageScript.h"
|
2021-06-16 14:51:58 +01:00
|
|
|
#include "LuaHandler.h"
|
2021-07-26 18:28:13 +01:00
|
|
|
#include "GameScriptColor.h"
|
2021-07-28 19:06:15 +01:00
|
|
|
#include "GameScriptLevel.h"
|
|
|
|
#include "GameScriptSettings.h"
|
|
|
|
#include "GameScriptAudioTrack.h"
|
2020-12-21 13:16:29 -03:00
|
|
|
|
2021-07-26 18:23:29 +01:00
|
|
|
enum TITLE_TYPE
|
|
|
|
{
|
|
|
|
TITLE_FLYBY,
|
|
|
|
TITLE_BACKGROUND
|
|
|
|
};
|
2020-12-21 13:16:29 -03:00
|
|
|
|
2021-06-16 14:51:58 +01:00
|
|
|
class GameFlow : public LuaHandler
|
2020-12-21 13:16:29 -03:00
|
|
|
{
|
|
|
|
private:
|
2021-07-28 19:06:15 +01:00
|
|
|
GameScriptSettings m_settings;
|
2021-06-16 14:51:58 +01:00
|
|
|
|
|
|
|
std::unordered_map < std::string, std::vector<std::string > > m_translationsMap;
|
|
|
|
std::vector<std::string> m_languageNames;
|
|
|
|
|
2021-07-28 19:06:15 +01:00
|
|
|
std::map<short, short> m_itemsMap;
|
2020-12-21 13:16:29 -03:00
|
|
|
|
|
|
|
public:
|
2021-07-26 18:23:29 +01:00
|
|
|
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 };
|
|
|
|
bool PlayAnyLevel{ true };
|
|
|
|
bool FlyCheat{ true };
|
|
|
|
bool DebugMode{ false };
|
|
|
|
int LevelFarView{ 0 };
|
2021-07-31 12:50:52 +01:00
|
|
|
TITLE_TYPE TitleType{ TITLE_FLYBY };
|
2021-07-28 19:06:15 +01:00
|
|
|
std::string IntroImagePath{};
|
2020-12-21 13:16:29 -03:00
|
|
|
|
|
|
|
// Selected language set
|
|
|
|
std::vector<GameScriptLevel*> Levels;
|
|
|
|
|
|
|
|
GameFlow(sol::state* lua);
|
|
|
|
~GameFlow();
|
|
|
|
|
2021-06-16 14:51:58 +01:00
|
|
|
void AddLevel(GameScriptLevel const& level);
|
2021-06-26 07:36:54 +02:00
|
|
|
void SetAudioTracks(sol::as_table_t<std::vector<GameScriptAudioTrack>>&& src);
|
2021-08-03 15:12:24 +01:00
|
|
|
void LoadGameFlowScript();
|
2021-07-23 21:48:49 +01:00
|
|
|
char const * GetString(const char* id);
|
2021-06-16 14:51:58 +01:00
|
|
|
void SetStrings(sol::nested<std::unordered_map<std::string, std::vector<std::string>>> && src);
|
|
|
|
void SetLanguageNames(sol::as_table_t<std::vector<std::string>> && src);
|
2021-08-03 15:12:24 +01:00
|
|
|
void SetSettings(GameScriptSettings const & src);
|
2020-12-21 13:16:29 -03:00
|
|
|
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);
|
2021-06-16 14:51:58 +01:00
|
|
|
int GetNumLevels();
|
2020-12-21 13:16:29 -03:00
|
|
|
bool DoGameflow();
|
2021-07-28 19:06:15 +01:00
|
|
|
void SetIntroImagePath(std::string const& path);
|
2018-09-02 09:29:36 +02:00
|
|
|
};
|