OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
scene.h
Go to the documentation of this file.
1
122
123#ifndef SNES_SCENE_H
124#define SNES_SCENE_H
125
126#include <snes/types.h>
127
135#define SCENE_STACK_MAX 8
136
144typedef struct {
153 void (*init)(void);
154
168 void (*update)(void);
169} Scene;
170
186void sceneRun(const Scene *initial);
187
199void scenePush(const Scene *next);
200
212void scenePop(void);
213
214#endif /* SNES_SCENE_H */
void sceneRun(const Scene *initial)
Run the scene stack with initial at the bottom. Never returns.
void scenePop(void)
Pop the top scene. Resumes the scene below.
void scenePush(const Scene *next)
Push a scene onto the stack. Suspends the current top.
A single scene's callbacks.
Definition scene.h:144
void(* init)(void)
Called once when the scene is first pushed onto the stack.
Definition scene.h:153
void(* update)(void)
Called every VBlank while the scene is on top of the stack.
Definition scene.h:168
OpenSNES Standard Types.