1 #ifndef BZ_GAME_SCENE_H
2 #define BZ_GAME_SCENE_H
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>
14 struct BZSceneEventData
{
16 uint32_t integerValue
;
17 const char *stringValue
;
21 typedef struct BZSceneEventData BZSceneEventData
;
23 typedef struct BZScene BZScene
;
24 typedef BZScene
* BZSceneID
;
26 extern BZSceneID
bzGameSceneSwitch(BZMemoryArenaID arena
, BZAudioPlaybackEngineID audioEngine
, const char *identifierFmt
, ...);
28 //extern void bzGameSceneGetTargetSceneIdentifier(char *identifierOut, BZSceneID scene); // We wipe our memory so we need to copy this out
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
);
34 extern BZActorID
bzGameSceneAddActor(BZSceneID scene
, const char *identifierFmt
, ...);
35 extern BZActorID
bzGameSceneFindActor(BZSceneID scene
, const char *identifierFmt
, ...);
37 extern float bzGameSceneGetTime(BZSceneID scene
);
39 extern bool bzGameSceneQueryEvent(BZSceneEventData
*dataOut
, BZSceneID scene
, BZIdentifierHash eventIdentifier
);
40 extern void bzGameScenePostEvent(BZSceneID scene
, BZIdentifierHash eventIdentifier
, const BZSceneEventData
*data
);
42 extern BZIdentifierHash bzSceneChangeEventIdentifier
;