cutscene system

This commit is contained in:
Jan Racek
2026-03-24 15:51:04 +01:00
parent e51c06b012
commit 60a7063a17
12 changed files with 651 additions and 11 deletions

View File

@@ -7,6 +7,7 @@
namespace psxsplash {
class SceneManager; // Forward declaration
class CutscenePlayer; // Forward declaration
/**
* Lua API - Provides game scripting functionality
@@ -23,7 +24,7 @@ class SceneManager; // Forward declaration
class LuaAPI {
public:
// Initialize all API modules
static void RegisterAll(psyqo::Lua& L, SceneManager* scene);
static void RegisterAll(psyqo::Lua& L, SceneManager* scene, CutscenePlayer* cutscenePlayer = nullptr);
// Called once per frame to advance the Lua frame counter
static void IncrementFrameCount();
@@ -35,6 +36,9 @@ private:
// Store scene manager for API access
static SceneManager* s_sceneManager;
// Cutscene player pointer (set during RegisterAll)
static CutscenePlayer* s_cutscenePlayer;
// ========================================================================
// ENTITY API
// ========================================================================
@@ -250,6 +254,19 @@ private:
// Reset all persistent data
static void PersistClear();
// ========================================================================
// CUTSCENE API - Cutscene playback control
// ========================================================================
// Cutscene.Play(name) -> nil
static int Cutscene_Play(lua_State* L);
// Cutscene.Stop() -> nil
static int Cutscene_Stop(lua_State* L);
// Cutscene.IsPlaying() -> boolean
static int Cutscene_IsPlaying(lua_State* L);
// ========================================================================
// HELPERS
// ========================================================================