TombEngine/TR5Main/Scripting/GameFlowScript.h

59 lines
1.8 KiB
C
Raw Normal View History

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