added audio
[laserbrain_demo] / src / metascene.h
1 #ifndef METASCENE_H_
2 #define METASCENE_H_
3
4 #include <map>
5 #include "scene.h"
6 #include "mesh.h"
7 #include "audio/ovstream.h"
8 #include "datamap.h"
9
10 class MetaScene {
11 public:
12         DataMap datamap;
13
14         std::vector<Scene*> scenes;
15
16         Mesh *walk_mesh;
17         Vec3 start_pos;
18         Quat start_rot;
19
20         std::map<Scene*, void*> scndata;
21
22         AudioStream *music;
23
24         MetaScene();
25         ~MetaScene();
26
27         bool load(const char *fname);
28         bool scene_loaded(Scene *scn);
29
30         void update(float dt);
31         void draw() const;
32
33         /* helper functions which end up calling the corresponding Scene functions
34          * for every scene
35          */
36         SceneNode *find_node(const char *name) const;
37         SceneNode *match_node(const char *qstr) const;
38         std::list<SceneNode*> match_nodes(const char *qstr) const;
39
40         Scene *extract_nodes(const char *qstr);
41 };
42
43 #endif  // METASCENE_H_