archivemuh

This commit is contained in:
2025-08-20 19:18:38 -05:00
parent 1411c2e96b
commit fbfcbe9578
173 changed files with 2802 additions and 13 deletions

View File

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