Broken runtime

This commit is contained in:
Jan Racek
2026-03-27 13:46:42 +01:00
parent eacbf4de46
commit 090402f71a
25 changed files with 1111 additions and 877 deletions

View File

@@ -18,7 +18,7 @@
#include "audiomanager.hh"
#include "interactable.hh"
#include "luaapi.hh"
#include "sceneloader.hh"
#include "fileloader.hh"
#include "cutscene.hh"
#include "uisystem.hh"
@@ -81,10 +81,19 @@ class SceneManager {
Lua& getLua() { return L; }
AudioManager& getAudio() { return m_audio; }
// Scene loading (for multi-scene support via PCdrv)
// Scene loading (for multi-scene support)
void requestSceneLoad(int sceneIndex);
int getCurrentSceneIndex() const { return m_currentSceneIndex; }
/// Load a scene by index. This is the ONE canonical load path used by
/// both the initial boot (main.cpp) and runtime scene transitions.
/// Blanks the screen, shows a loading screen, tears down the old scene,
/// loads the new splashpack, and initialises.
/// @param gpu GPU reference.
/// @param sceneIndex Scene to load.
/// @param isFirstScene True when called from boot (skips clearScene / free).
void loadScene(psyqo::GPU& gpu, int sceneIndex, bool isFirstScene = false);
// Check and process pending scene load (called from GameTick)
void processPendingSceneLoad();
@@ -160,11 +169,13 @@ class SceneManager {
int m_currentSceneIndex = 0;
int m_pendingSceneIndex = -1; // -1 = no pending load
uint8_t* m_currentSceneData = nullptr; // Owned pointer to loaded data
uint32_t m_liveDataSize = 0; // Bytes of m_currentSceneData still needed at runtime
// System update methods (called from GameTick)
void updateInteractionSystem();
void processEnableDisableEvents();
void clearScene(); // Deallocate current scene objects
void shrinkBuffer(); // Free pixel/audio bulk data after VRAM/SPU uploads
};
}; // namespace psxsplash
// namespace psxsplash