]> git.bts.cx Git - benzene.git/blob - src/bz/game/scene_internal.h
Initial version
[benzene.git] / src / bz / game / scene_internal.h
1 #ifndef BZ_GAME_SCENE_INTERNAL_H
2 #define BZ_GAME_SCENE_INTERNAL_H
3
4 #include <bz/game/scene.h>
5
6 #include <bz/collision/collision.h>
7 //#include <bz/fx/agent_simulation.h>
8 #include <bz/fx/particle_simulation.h>
9 #include <bz/game/tilemap.h>
10 #include <bz/gfx/draw_queue.h>
11 #include <bz/math/matrix.h>
12 #include <bz/types/identifier.h>
13 #include <sun/vm/vm.h>
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 struct BZScriptBindingMetadata {
20 BZActorID actor;
21 BZSceneID scene;
22 BZIdentifierHash layer;
23 size_t sortIdx;
24 BZDrawQueueID drawQueue;
25 BZVector position;
26 float angle;
27 BZVector scale;
28 BZMatrix matrix;
29 uint32_t uuid;
30 // BZAgentID agent;
31 };
32 typedef struct BZScriptBindingMetadata BZScriptBindingMetadata;
33
34 typedef struct BZSceneLayer BZSceneLayer;
35 typedef BZSceneLayer * BZSceneLayerID;
36
37 extern size_t bzGameGetSceneLayerCount(BZSceneID scene);
38 extern BZSceneLayerID bzGameGetSceneLayerAtIndex(BZSceneID scene, size_t idx);
39
40 extern BZParticleSimulationID bzGameGetSceneLayerParticleSimulation2(BZSceneLayerID layer); // FIXME, what do we want to do...
41 extern BZCollisionSpaceID bzGameGetSceneLayerCollisionSpace2(BZSceneLayerID layer);
42
43 extern BZTilemapID bzGameGetSceneLayerTilemap(BZSceneID scene, BZIdentifierHash layerIdentifierHash);
44 extern BZDrawQueueID bzGameGetSceneLayerDrawQueue(BZSceneID scene, BZIdentifierHash layerIdentifierHash);
45 extern BZParticleSimulationID bzGameGetSceneLayerParticleSimulation(BZSceneID scene, BZIdentifierHash layerIdentifierHash);
46 extern BZCollisionSpaceID bzGameGetSceneLayerCollisionSpace(BZSceneID scene, BZIdentifierHash layerIdentifierHash);
47
48 //extern BZAgentSimulationID bzGameGetAgentSimulation(BZSceneID scene);
49
50 extern BZAudioPlaybackEngineID bzGameGetAudioPlaybackEngine(BZSceneID scene);
51
52 extern void bzGameSceneSetTargetSceneIdentifier(BZSceneID scene, const char *identifier);
53
54 extern bool bzScriptingGetEnvironmentPublic(SVMOperand *out, BZSceneID scene, BZIdentifierHash identifierHash);
55 extern void bzScriptingSetEnvironmentPublic(BZSceneID scene, BZIdentifierHash identifierHash, SVMOperand value);
56
57 extern void bzScriptingInitialiseMetadata(BZScriptBindingMetadata *metadata, BZActorID actor, BZSceneID scene, uint32_t uuid);
58
59 extern uint8_t gSystemTicksPerSecond;
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65 #endif