Modules
Some checks failed
Build Dusk / build-linux (push) Successful in 1m13s
Build Dusk / build-psp (push) Failing after 1m27s

This commit is contained in:
2025-12-25 08:02:11 +10:00
parent f39b2060a8
commit b16dbaceec
23 changed files with 370 additions and 158 deletions

View File

@@ -47,14 +47,11 @@ void sceneManagerRegisterScene(scene_t *scene) {
SCENE_MANAGER.scenes[SCENE_MANAGER.sceneCount++] = scene;
}
void sceneManagerSetScene(scene_t *scene) {
if(SCENE_MANAGER.current) {
// TODO: Should dispose?
assertTrue(
SCENE_MANAGER.current->flags & SCENE_FLAG_INITIALIZED,
"Current scene not initialized"
);
errorret_t sceneManagerSetScene(scene_t *scene) {
if(
SCENE_MANAGER.current &&
(SCENE_MANAGER.current->flags & SCENE_FLAG_INITIALIZED) != 0
) {
SCENE_MANAGER.current->flags &= ~SCENE_FLAG_INITIALIZED;
if(SCENE_MANAGER.current->dispose) {
SCENE_MANAGER.current->dispose(&SCENE_MANAGER.sceneData);
@@ -63,12 +60,12 @@ void sceneManagerSetScene(scene_t *scene) {
SCENE_MANAGER.current = scene;
if(scene) {
assertTrue(
(scene->flags & SCENE_FLAG_INITIALIZED) == 0,
"Scene should not yet be initialized"
);
if(scene && scene->init) {
scene->flags |= SCENE_FLAG_INITIALIZED;
errorChain(scene->init(&SCENE_MANAGER.sceneData));
}
errorOk();
}
void sceneManagerUpdate(void) {