OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
scene.h
Go to the documentation of this file.
1
126
127#ifndef SNES_SCENE_H
128#define SNES_SCENE_H
129
130#include <snes/types.h>
131
139#define SCENE_STACK_MAX 8
140
148typedef struct {
158 void (*init)(void);
159
173 void (*update)(void);
174} Scene;
175
191void sceneRun(const Scene *initial);
192
206u8 scenePush(const Scene *next);
207
221
234void sceneReplace(const Scene *next);
235
236#endif /* SNES_SCENE_H */
unsigned char u8
8-bit unsigned integer (0 to 255)
Definition types.h:47
void sceneRun(const Scene *initial)
Run the scene stack with initial at the bottom. Never returns.
u8 scenePush(const Scene *next)
Push a scene onto the stack. Suspends the current top.
u8 scenePop(void)
Pop the top scene. Resumes the scene below.
void sceneReplace(const Scene *next)
Replace the top scene with another, at any depth — the bottom one included.
A single scene's callbacks.
Definition scene.h:148
void(* init)(void)
Called each time the scene is pushed onto the stack (not only the first; see the Behaviour section).
Definition scene.h:158
void(* update)(void)
Called every VBlank while the scene is on top of the stack.
Definition scene.h:173
OpenSNES Standard Types.