diff options
author | Eugene Sandulenko | 2013-06-23 23:32:51 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:48:15 +0300 |
commit | 68c5cfdf2c35d82b506dd4fc0c4335608a22a404 (patch) | |
tree | 169cba6e3f1e455083e451f2569fac4565946f57 /engines | |
parent | 1c1d8db613fccbab568efd1e57a86a419dc813c9 (diff) | |
download | scummvm-rg350-68c5cfdf2c35d82b506dd4fc0c4335608a22a404.tar.gz scummvm-rg350-68c5cfdf2c35d82b506dd4fc0c4335608a22a404.tar.bz2 scummvm-rg350-68c5cfdf2c35d82b506dd4fc0c4335608a22a404.zip |
FULLPIPE: Continued Scene loading
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/gfx.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/gfx.h | 3 | ||||
-rw-r--r-- | engines/fullpipe/scene.cpp | 54 | ||||
-rw-r--r-- | engines/fullpipe/scene.h | 6 | ||||
-rw-r--r-- | engines/fullpipe/utils.cpp | 1 |
5 files changed, 57 insertions, 9 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 8b801a7031..0305a004b8 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -33,6 +33,8 @@ Background::Background() { _bigPictureArray1Count = 0; _bigPictureArray2Count = 0; _bigPictureArray = 0; + _stringObj = 0; + _colorMemoryObj = 0; } bool Background::load(MfcArchive &file) { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 7b304eab22..53c10ee870 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -89,12 +89,13 @@ class PictureObject : public GameObject { }; class Background : public CObject { + protected: CPtrList _list; char *_stringObj; int _x; int _y; int16 _messageQueueId; - int _colorMemoryObj; + MemoryObject *_colorMemoryObj; int _bigPictureArray1Count; int _bigPictureArray2Count; BigPicture ***_bigPictureArray; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 238d6050aa..af031db735 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -113,14 +113,15 @@ Scene::Scene() { } bool Scene::load(MfcArchive &file) { - _bg.load(file); + Background::load(file); _sceneId = file.readUint16LE(); - _stringObj = file.readPascalString(); - debug(0, "scene: <%s>", _stringObj); + _scstringObj = file.readPascalString(); + debug(0, "scene: <%s>", _scstringObj); int count = file.readUint16LE(); + debug(7, "scene.ani: %d", count); for (int i = 0; i < count; i++) { int aniNum = file.readUint16LE(); @@ -141,7 +142,52 @@ bool Scene::load(MfcArchive &file) { free(aniname); } - warning("STUB: Scene::load"); + count = file.readUint16LE(); + debug(7, "scene.mq: %d", count); + + for (int i = 0; i < count; i++) { + int qNum = file.readUint16LE(); + char *qname = genFileName(0, qNum, "qu"); + + Common::SeekableReadStream *f = g_fullpipe->_currArchive->createReadStreamForMember(qname); + MfcArchive archive(f); + + MessageQueue *mq = new MessageQueue(); + + mq->load(archive); + + _messageQueueList.push_back(mq); + + delete f; + free(qname); + } + + count = file.readUint16LE(); + debug(7, "scene.fa: %d", count); + + for (int i = 0; i < count; i++) { + // There are no .FA files + assert(0); + } + + _libHandle = g_fullpipe->_currArchive; + + if (_list.size() > 0 && _stringObj && strlen(_stringObj) > 1) { + char fname[260]; + + strcpy(fname, _stringObj); + strcpy(strrchr(fname, '.') + 1, "col"); + + MemoryObject *col = new MemoryObject(); + col->loadFile(fname); + + _colorMemoryObj = col; + + } + + char *shdname = genFileName(0, _sceneId, "shd"); + + warning("STUB: Scene::load (%d bytes left)", file.size() - file.pos()); return true; } diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 1c7a9fda04..31af782a44 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -25,7 +25,7 @@ namespace Fullpipe { -class Scene : public CObject { +class Scene : public Background { Background _bg; CPtrList _staticANIObjectList1; CPtrList _staticANIObjectList2; @@ -34,9 +34,9 @@ class Scene : public CObject { Shadows *_shadows; int _soundList; int16 _sceneId; - char *_stringObj; + char *_scstringObj; int _field_BC; - int _libHandle; + NGIArchive *_libHandle; public: Scene(); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 5b6c972a0a..ff3cd71d42 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -136,7 +136,6 @@ void MemoryObject::loadFile(char *filename) { Common::SeekableReadStream *s = _libHandle->createReadStreamForMember(filename); if (s) { - debug(0, "Reading %s", filename); assert(s->size() > 0); _data = calloc(s->size(), 1); s->read(_data, s->size()); |