diff options
author | Paul Gilbert | 2013-05-26 22:18:54 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-05-26 22:18:54 -0400 |
commit | ab4f798f5bedeec7520c15f8b5b64efda469d95f (patch) | |
tree | 77b210254552d7f5e98200873313e1a60fb4f0ab /engines/voyeur/files.cpp | |
parent | 23f3866e14fb1795145c9f3631955e5138c34628 (diff) | |
download | scummvm-rg350-ab4f798f5bedeec7520c15f8b5b64efda469d95f.tar.gz scummvm-rg350-ab4f798f5bedeec7520c15f8b5b64efda469d95f.tar.bz2 scummvm-rg350-ab4f798f5bedeec7520c15f8b5b64efda469d95f.zip |
VOYEUR: Added code for initViewPortList
Diffstat (limited to 'engines/voyeur/files.cpp')
-rw-r--r-- | engines/voyeur/files.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index 343485edf8..811bdf600b 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -379,7 +379,9 @@ void BoltFile::initViewPort() { } void BoltFile::initViewPortList() { - error("TODO: initViewPortList not implemented"); + initDefault(); + _state._curMemberPtr->_viewPortListResource = new ViewPortListResource( + _state, _state._curMemberPtr->_data); } void BoltFile::initFontInfo() { @@ -435,6 +437,7 @@ BoltEntry::~BoltEntry() { delete[] _data; delete _picResource; delete _viewPortResource; + delete _viewPortListResource; } void BoltEntry::load() { @@ -555,4 +558,20 @@ ViewPortResource::ViewPortResource(BoltFilesState &state, const byte *src) { _fn3 = &BoltFile::addRectNoSaveBack; } +/*------------------------------------------------------------------------*/ + +ViewPortListResource::ViewPortListResource(BoltFilesState &state, const byte *src) { + uint32 *idP = (uint32 *)&src[0]; + uint count = READ_LE_UINT32(idP++); + + for (uint i = 0; i < count; ++i, ++idP) { + uint32 id = READ_LE_UINT32(idP); + _entries.push_back(NULL); + state._curLibPtr->resolveIt(id, &_entries[_entries.size() - 1]); + } + + state._vm->_graphicsManager._vPort = &_entries[0]; + state._curLibPtr->resolveIt(READ_LE_UINT32(&src[4]), &_field4); +} + } // End of namespace Voyeur |