diff options
-rw-r--r-- | engines/fullpipe/objects.h | 27 | ||||
-rw-r--r-- | engines/fullpipe/stateloader.cpp | 24 |
2 files changed, 37 insertions, 14 deletions
diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index dbeb7bc07b..69b12d00ff 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -47,24 +47,23 @@ class CObArray { int m_nGrowBy; }; -class CNode { - int pNext; - CNode *pPrev; - void *data; -}; +class SceneTag { + CObject _obj; + int _field_4; + char *_tag; + int _scene; + int16 _sceneId; + int16 _field_12; -class CPtrList { - CObject obj; - CNode *m_pNodeHead; - int m_pNodeTail; - int m_nCount; - int m_pNodeFree; - int m_pBlocks; - int m_nBlockSize; + public: + SceneTag(CFile &file); + ~SceneTag(); }; +typedef Common::List<SceneTag> SceneTagList_; + class SceneTagList { - CPtrList list; + SceneTagList_ list; public: SceneTagList(CFile &file); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 60b83a04db..e50bbb2399 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -23,6 +23,7 @@ #include "fullpipe/fullpipe.h" #include "common/file.h" +#include "common/list.h" #include "fullpipe/utils.h" #include "fullpipe/objects.h" @@ -90,6 +91,29 @@ GameProject::~GameProject() { } SceneTagList::SceneTagList(CFile &file) { + int numEntries = file.readUint16LE(); + + debug(0, "numEntries: %d", numEntries); + + for (int i = 0; i < numEntries; i++) { + SceneTag *t = new SceneTag(file); + list.push_back(*t); + } +} + +SceneTag::SceneTag(CFile &file) { + _field_4 = 0; + _scene = 0; + + _sceneId = file.readUint16LE(); + + _tag = file.readPascalString(); + + debug(0, "sceneId: %d tag: %s", _sceneId, _tag); +} + +SceneTag::~SceneTag() { + free(_tag); } } // End of namespace Fullpipe |