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-08-07 19:13:36 +01:00
|
|
|
enum class TITLE_TYPE
|
2021-07-26 18:23:29 +01:00
|
|
|
{
|
2021-08-07 19:13:36 +01:00
|
|
|
FLYBY,
|
|
|
|
BACKGROUND
|
2021-07-26 18:23:29 +01:00
|
|
|
};
|
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
|
|
|
int FogInDistance{ 0 };
|
|
|
|
int FogOutDistance{ 0 };
|
|
|
|
int SelectedLevelForNewGame{ 0 };
|
|
|
|
int SelectedSaveGame{ 0 };
|
|
|
|
bool EnableLoadSave{ true };
|
|
|
|
bool PlayAnyLevel{ true };
|
|
|
|
bool FlyCheat{ true };
|
|
|
|
bool DebugMode{ false };
|
2021-08-17 13:36:34 +01:00
|
|
|
byte GameFarView{ 0 };
|
2021-08-07 19:13:36 +01:00
|
|
|
TITLE_TYPE TitleType{ TITLE_TYPE::FLYBY };
|
2021-07-28 19:06:15 +01:00
|
|
|
std::string IntroImagePath{};
|
2021-08-07 19:13:36 +01:00
|
|
|
std::string TitleScreenImagePath{};
|
2020-12-21 13:16:29 -03:00
|
|
|
|
|
|
|
// Selected language set
|
|
|
|
std::vector<GameScriptLevel*> Levels;
|
|
|
|
|
|
|
|
GameFlow(sol::state* lua);
|
|
|
|
~GameFlow();
|
|
|
|
|
2021-08-15 23:04:56 +01:00
|
|
|
void AddLevel(GameScriptLevel const& level);
|
|
|
|
void SetAudioTracks(sol::as_table_t<std::vector<GameScriptAudioTrack>>&& src);
|
|
|
|
void LoadGameFlowScript();
|
|
|
|
char const * GetString(const char* id);
|
|
|
|
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);
|
|
|
|
void SetSettings(GameScriptSettings const & src);
|
|
|
|
GameScriptSettings* GetSettings();
|
|
|
|
GameScriptLevel* GetLevel(int id);
|
|
|
|
int GetNumLevels();
|
|
|
|
bool DoGameflow();
|
|
|
|
void SetIntroImagePath(std::string const& path);
|
|
|
|
void SetTitleScreenImagePath(std::string const& path);
|
2021-08-17 13:36:34 +01:00
|
|
|
void SetGameFarView(byte val);
|
2018-09-02 09:29:36 +02:00
|
|
|
};
|