Scene fixing
This commit is contained in:
@@ -12,14 +12,12 @@
|
||||
#include "display/framebuffer.h"
|
||||
#include "util/string.h"
|
||||
|
||||
#include "scene/scene/scenetest.h"
|
||||
|
||||
scenemanager_t SCENE_MANAGER;
|
||||
|
||||
errorret_t sceneManagerInit(void) {
|
||||
memoryZero(&SCENE_MANAGER, sizeof(scenemanager_t));
|
||||
|
||||
// sceneManagerRegisterScene(&SCENE_TEST);
|
||||
sceneManagerRegisterScene(&SCENE_TEST);
|
||||
|
||||
errorOk();
|
||||
}
|
||||
@@ -59,7 +57,7 @@ void sceneManagerSetScene(scene_t *scene) {
|
||||
|
||||
SCENE_MANAGER.current->flags &= ~SCENE_FLAG_INITIALIZED;
|
||||
if(SCENE_MANAGER.current->dispose) {
|
||||
SCENE_MANAGER.current->dispose(SCENE_MANAGER.current->data);
|
||||
SCENE_MANAGER.current->dispose(&SCENE_MANAGER.sceneData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +80,7 @@ void sceneManagerUpdate(void) {
|
||||
);
|
||||
|
||||
if(SCENE_MANAGER.current->update) {
|
||||
SCENE_MANAGER.current->update(SCENE_MANAGER.current->data);
|
||||
SCENE_MANAGER.current->update(&SCENE_MANAGER.sceneData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +98,7 @@ void sceneManagerRender(void) {
|
||||
);
|
||||
|
||||
if(SCENE_MANAGER.current->render) {
|
||||
SCENE_MANAGER.current->render(SCENE_MANAGER.current->data);
|
||||
SCENE_MANAGER.current->render(&SCENE_MANAGER.sceneData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +106,7 @@ void sceneManagerDispose(void) {
|
||||
for(uint8_t i = 0; i < SCENE_MANAGER.sceneCount; i++) {
|
||||
scene_t *scene = SCENE_MANAGER.scenes[i];
|
||||
if(scene->flags & SCENE_FLAG_INITIALIZED) {
|
||||
scene->dispose(scene->data);
|
||||
scene->dispose(&SCENE_MANAGER.sceneData);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user