]> git.bts.cx Git - benzene.git/blob - src/bz/game/scene.h
Fixed Aseprite rendering system
[benzene.git] / src / bz / game / scene.h
1 #ifndef BZ_GAME_SCENE_H
2 #define BZ_GAME_SCENE_H
3
4 #include <bz/audio/playback.h>
5 #include <bz/game/actor.h>
6 #include <bz/memory/arena.h>
7 #include <bz/types/common.h>
8 #include <bz/types/identifier.h>
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 struct BZSceneEventData {
15 union {
16 uint32_t integerValue;
17 const char *stringValue;
18 void *value;
19 };
20 };
21 typedef struct BZSceneEventData BZSceneEventData;
22
23 typedef struct BZScene BZScene;
24 typedef BZScene * BZSceneID;
25
26 extern BZSceneID bzGameSceneSwitch(BZMemoryArenaID arena, BZAudioPlaybackEngineID audioEngine, const char *identifierFmt, ...);
27
28 //extern void bzGameSceneGetTargetSceneIdentifier(char *identifierOut, BZSceneID scene); // We wipe our memory so we need to copy this out
29
30 //.extern BZMemoryArenaID bzGameSceneAddActorExt(BZGameSceneActorConfiguration **configurationOutPtr, const char *identifierFmt, ...);
31 extern bool bzGameSceneUpdate(BZSceneID scene, uint8_t pauseFlags, uint8_t systemTicks);
32 extern void bzGameSceneDraw(BZSceneID scene);
33
34 extern BZActorID bzGameSceneAddActor(BZSceneID scene, const char *identifierFmt, ...);
35 extern BZActorID bzGameSceneFindActor(BZSceneID scene, const char *identifierFmt, ...);
36
37 extern float bzGameSceneGetTime(BZSceneID scene);
38
39 extern bool bzGameSceneQueryEvent(BZSceneEventData *dataOut, BZSceneID scene, BZIdentifierHash eventIdentifier);
40 extern void bzGameScenePostEvent(BZSceneID scene, BZIdentifierHash eventIdentifier, const BZSceneEventData *data);
41
42 extern BZIdentifierHash bzSceneChangeEventIdentifier;
43
44 #ifdef __cplusplus
45 }
46 #endif
47
48 #endif