/** * 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(); } } }