mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
27 lines
858 B
C
27 lines
858 B
C
#include "chip8_scene.h"
|
|
|
|
#define ADD_SCENE(prefix, name, id) prefix##_scene_##name##_on_enter,
|
|
void (*const chip8_scene_on_enter_handlers[])(void*) = {
|
|
#include "chip8_scene_config.h"
|
|
};
|
|
#undef ADD_SCENE
|
|
|
|
#define ADD_SCENE(prefix, name, id) prefix##_scene_##name##_on_event,
|
|
bool (*const chip8_scene_on_event_handlers[])(void* context, SceneManagerEvent event) = {
|
|
#include "chip8_scene_config.h"
|
|
};
|
|
#undef ADD_SCENE
|
|
|
|
#define ADD_SCENE(prefix, name, id) prefix##_scene_##name##_on_exit,
|
|
void (*const chip8_scene_on_exit_handlers[])(void* context) = {
|
|
#include "chip8_scene_config.h"
|
|
};
|
|
#undef ADD_SCENE
|
|
|
|
const SceneManagerHandlers chip8_scene_handlers = {
|
|
.on_enter_handlers = chip8_scene_on_enter_handlers,
|
|
.on_event_handlers = chip8_scene_on_event_handlers,
|
|
.on_exit_handlers = chip8_scene_on_exit_handlers,
|
|
.scene_num = Chip8SceneNum,
|
|
};
|