Add inventory.
All checks were successful
Build Dusk / run-tests (push) Successful in 2m12s
Build Dusk / build-linux (push) Successful in 1m49s
Build Dusk / build-psp (push) Successful in 1m52s

This commit is contained in:
2026-01-06 07:47:16 -06:00
parent 024ace1078
commit af5bf987c8
91 changed files with 1108 additions and 139 deletions

View File

@@ -0,0 +1,63 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "scene.h"
#include "scenedata.h"
#define SCENE_MANAGER_SCENE_COUNT_MAX 16
typedef struct {
scene_t *current;
scene_t *scenes[SCENE_MANAGER_SCENE_COUNT_MAX];
uint8_t sceneCount;
} scenemanager_t;
extern scenemanager_t SCENE_MANAGER;
/**
* Initializes the scene manager and the initial scene.
*/
errorret_t sceneManagerInit(void);
/**
* Retrieves a registered scene by its name.
*
* @param name The name of the scene to retrieve.
* @return The scene with the specified name, or NULL if not found.
*/
scene_t * sceneManagerGetSceneByName(const char_t *name);
/**
* Registers a scene with the scene manager.
*
* @param scene The scene to register.
*/
void sceneManagerRegisterScene(scene_t *scene);
/**
* Sets the current active scene.
*
* @param scene The scene to set as current.
* @return An error code indicating success or failure.
*/
errorret_t sceneManagerSetScene(scene_t *scene);
/**
* Updates all active scenes.
*/
void sceneManagerUpdate(void);
/**
* Renders all visible scenes.
*/
void sceneManagerRender(void);
/**
* Disposes of all scenes.
*/
void sceneManagerDispose(void);