Mercurial > hg > Game > Cerium
diff Renderer/Engine/SceneGraphRoot.h @ 562:d65f21b18165 draft
name search
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Oct 2009 22:22:31 +0900 |
parents | 00428ba0ba03 |
children | 5193d51294a2 |
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraphRoot.h Thu Oct 22 19:31:09 2009 +0900 +++ b/Renderer/Engine/SceneGraphRoot.h Thu Oct 22 22:22:31 2009 +0900 @@ -5,6 +5,18 @@ #include "SceneGraphArray.h" #include "Camera.h" #include "SceneGraphIterator.h" +// #include "Application.h" +#include "SceneGraphList.h" +#include "SgStruct.h" +// #include "TaskManager.h" +#include <sys/types.h> + +typedef struct { + caddr_t file_mmap; + off_t size; +} st_mmap_t; + +class Application; class SceneGraphRoot { public: @@ -13,8 +25,13 @@ ~SceneGraphRoot(); /* Variables */ + TaskManager *tmanager; + + // sgid と name を持った SgStruct のリスト + SceneGraphList *sglist; + // xml から読み込んだ、オリジナルの SceneGraph - SceneGraphPtr sg_src; + SceneGraphPtr *sg_src; int sg_src_length; // move, collision 用の SceneGraph (tree) @@ -48,8 +65,14 @@ */ /* User API */ void createFromXMLfile(TaskManager *manager, const char *); + //void createFromXMLmemory(TaskManager *manager, const char *xml); + //void createFromXMLmemory(TaskManager *manager, st_mmap_t mmap_t); + void createFromXMLmemory(TaskManager *manager, char *data, int len); SceneGraphPtr createSceneGraph(int id); SceneGraphPtr createSceneGraph(); + SceneGraphPtr createSceneGraph(const char *name); + int getSgid(const char *name); + void setSceneData(SceneGraphPtr sg); Pad *getController(); SceneGraphIteratorPtr getIterator(); @@ -64,19 +87,22 @@ void updateControllerState(); void speExecute(int screen_w, int screen_h); + void speExecute(int screen_w, int screen_h, Application *app); /* System API */ void registSceneGraph(SceneGraphPtr sg); + void registSceneGraphList(SceneGraphPtr sg); + void addSceneGraphList(TaskManager *manager, SceneGraphPtr tmp); void addNext(SceneGraphPtr sg); void allRemove(SceneGraphPtr list); }; typedef SceneGraphRoot *SceneGraphRootPtr; -#endif // 大域変数は無くすこと -// move に Controller を渡せば必要ないはず... -extern SceneGraphRootPtr sgroot; +extern SceneGraphRoot *sgroot; + +#endif /* end */