added audio
[laserbrain_demo] / src / metascene.h
index 8d512eb..c363901 100644 (file)
@@ -1,8 +1,43 @@
 #ifndef METASCENE_H_
 #define METASCENE_H_
 
-class Scene;
+#include <map>
+#include "scene.h"
+#include "mesh.h"
+#include "audio/ovstream.h"
+#include "datamap.h"
 
-bool load_scene(Scene *scn, const char *fname);
+class MetaScene {
+public:
+       DataMap datamap;
+
+       std::vector<Scene*> scenes;
+
+       Mesh *walk_mesh;
+       Vec3 start_pos;
+       Quat start_rot;
+
+       std::map<Scene*, void*> scndata;
+
+       AudioStream *music;
+
+       MetaScene();
+       ~MetaScene();
+
+       bool load(const char *fname);
+       bool scene_loaded(Scene *scn);
+
+       void update(float dt);
+       void draw() const;
+
+       /* helper functions which end up calling the corresponding Scene functions
+        * for every scene
+        */
+       SceneNode *find_node(const char *name) const;
+       SceneNode *match_node(const char *qstr) const;
+       std::list<SceneNode*> match_nodes(const char *qstr) const;
+
+       Scene *extract_nodes(const char *qstr);
+};
 
 #endif // METASCENE_H_