Nothing really changed

This commit is contained in:
2025-08-16 14:52:52 -05:00
parent 69acbd017c
commit c3310a036f
16 changed files with 188 additions and 51 deletions

View File

@@ -0,0 +1,44 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "renderscene.h"
renderscenecallback_t RENDER_SCENE_CALLBACKS[SCENE_COUNT] = {
[SCENE_INITIAL] = {
.init = NULL,
.draw = NULL,
.dispose = NULL
},
[SCENE_OVERWORLD] = {
.init = NULL,
.draw = NULL,
.dispose = NULL
},
};
void renderSceneInit(void) {
for (int i = 0; i < SCENE_COUNT; i++) {
if (RENDER_SCENE_CALLBACKS[i].init) {
RENDER_SCENE_CALLBACKS[i].init();
}
}
}
void renderSceneDraw(void) {
if(RENDER_SCENE_CALLBACKS[SCENE_CURRENT].draw) {
RENDER_SCENE_CALLBACKS[SCENE_CURRENT].draw();
}
}
void renderSceneDispose(void) {
for (int i = 0; i < SCENE_COUNT; i++) {
if (RENDER_SCENE_CALLBACKS[i].dispose) {
RENDER_SCENE_CALLBACKS[i].dispose();
}
}
}