mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-08 11:38:08 +03:00
Partially integrate ScriptInterfaceFlow and replace instances of direct access to Animations members.
This commit is contained in:
parent
4429bd8aa2
commit
2a9175f5fb
9 changed files with 37 additions and 22 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "GameScriptAudioTrack.h"
|
||||
#include "GameScriptAnimations.h"
|
||||
#include "ScriptInterfaceGame.h"
|
||||
#include "ScriptInterfaceFlow.h"
|
||||
|
||||
enum class TITLE_TYPE
|
||||
{
|
||||
|
@ -15,7 +16,7 @@ enum class TITLE_TYPE
|
|||
BACKGROUND
|
||||
};
|
||||
|
||||
class GameFlow : public LuaHandler
|
||||
class GameFlow : public LuaHandler, public ScriptInterfaceFlow
|
||||
{
|
||||
private:
|
||||
GameScriptSettings m_settings;
|
||||
|
@ -63,7 +64,16 @@ public:
|
|||
void SetIntroImagePath(std::string const& path);
|
||||
void SetTitleScreenImagePath(std::string const& path);
|
||||
void SetGameFarView(byte val);
|
||||
bool IsFlyCheatEnabled() const;
|
||||
|
||||
bool HasCrawlExtended() const { return Animations.CrawlExtended; }
|
||||
bool HasCrouchRoll() const { return Animations.CrouchRoll; }
|
||||
bool HasCrawlspaceSwandive() const { return Animations.CrawlspaceSwandive; }
|
||||
bool HasMonkeyTurn180() const { return Animations.MonkeyTurn180; }
|
||||
bool HasMonkeyAutoJump() const { return Animations.MonkeyAutoJump; }
|
||||
bool HasOscillateHang() const { return Animations.OscillateHang; }
|
||||
bool HasAFKPose() const { return Animations.Pose; }
|
||||
};
|
||||
|
||||
extern GameFlow* g_GameFlow;
|
||||
extern ScriptInterfaceGame * g_GameScript;
|
||||
extern ScriptInterfaceFlow* g_GameFlow;
|
||||
extern ScriptInterfaceGame* g_GameScript;
|
||||
|
|
|
@ -16,7 +16,7 @@ using std::string;
|
|||
using std::vector;
|
||||
using std::unordered_map;
|
||||
|
||||
GameFlow* g_GameFlow;
|
||||
ScriptInterfaceFlow* g_GameFlow;
|
||||
ScriptInterfaceGame* g_GameScript;
|
||||
|
||||
GameFlow::GameFlow(sol::state* lua) : LuaHandler{ lua }
|
||||
|
@ -231,6 +231,11 @@ int GameFlow::GetNumLevels() const
|
|||
return Levels.size();
|
||||
}
|
||||
|
||||
bool GameFlow::IsFlyCheatEnabled() const
|
||||
{
|
||||
return FlyCheat;
|
||||
}
|
||||
|
||||
bool GameFlow::DoGameflow()
|
||||
{
|
||||
// We start with the title level
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue