diff options
author | Paul Gilbert | 2013-12-08 14:44:48 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-12-08 14:44:48 -0500 |
commit | ce3cb58d1511aa7de1dfad5bc92149559b4450f6 (patch) | |
tree | 9fc99d3897ee7c3b92f714c241fb0b09320e0fae /engines/voyeur | |
parent | a86b1c3d583d0c1646844e23005f3197fca608f3 (diff) | |
download | scummvm-rg350-ce3cb58d1511aa7de1dfad5bc92149559b4450f6.tar.gz scummvm-rg350-ce3cb58d1511aa7de1dfad5bc92149559b4450f6.tar.bz2 scummvm-rg350-ce3cb58d1511aa7de1dfad5bc92149559b4450f6.zip |
VOYEUR: Extra control/group initialisation
Diffstat (limited to 'engines/voyeur')
-rw-r--r-- | engines/voyeur/files.cpp | 1 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 1 | ||||
-rw-r--r-- | engines/voyeur/voyeur.h | 9 | ||||
-rw-r--r-- | engines/voyeur/voyeur_game.cpp | 24 |
4 files changed, 30 insertions, 5 deletions
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index ab8c54d1cd..b17f324ffe 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -558,6 +558,7 @@ void StampBoltFile::initControl() { _state._curMemberPtr->_controlResource = res = new ControlResource(_state, _state._curMemberPtr->_data); + _state._vm->_controlGroupPtr = _state._curGroupPtr; _state._vm->_controlPtr = res; } diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index b890d0af95..9348f5fb5a 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -41,6 +41,7 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc) _bVoy = NULL; _iForceDeath = -1; _controlPtr = NULL; + _stampFlags = 0; initialiseManagers(); } diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index 681e87637b..43a18e0a3a 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -66,7 +66,6 @@ private: Common::Array<int> _resolves; FontInfoResource _defaultFontInfo; int _iForceDeath; - byte *_stampData; void ESP_Init(); void initialiseManagers(); @@ -83,6 +82,8 @@ private: void doOpening(); void playStamp(); + void initStamp(); + void initUseCount(); void initThreadStruct(byte *threadStruct); protected: // Engine APIs @@ -97,7 +98,13 @@ public: SoundManager _soundManager; SVoy _voy; + BoltFile *_stampLibPtr; + BoltGroup *_controlGroupPtr; ControlResource *_controlPtr; + byte *_stampData; + BoltGroup *_stackGroupPtr; + int _stampFlags; + int _stm_useCount[8]; public: VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc); virtual ~VoyeurEngine(); diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp index fc21604651..07821d8086 100644 --- a/engines/voyeur/voyeur_game.cpp +++ b/engines/voyeur/voyeur_game.cpp @@ -36,12 +36,14 @@ void VoyeurEngine::addVideoEventStart() { } void VoyeurEngine::playStamp() { - BoltFile *boltFile = NULL; - _filesManager.openBoltLib("stampblt.blt", boltFile); + _stampLibPtr = NULL; + _filesManager.openBoltLib("stampblt.blt", _stampLibPtr); - boltFile->getBoltGroup(0x10000); + _stampLibPtr->getBoltGroup(0x10000); _voy._resolvePtr = &RESOLVE_TABLE[0]; - PtrResource *threadsList = boltFile->boltEntry(3)._ptrResource; + initStamp(); + + PtrResource *threadsList = _stampLibPtr->boltEntry(3)._ptrResource; byte *threadP = threadsList->_entries[0]->_data; initThreadStruct(threadP); @@ -59,6 +61,20 @@ void VoyeurEngine::playStamp() { _voy._field4386 = 0; } +void VoyeurEngine::initStamp() { + _stampFlags &= ~1; + _stackGroupPtr = _controlGroupPtr; + + if (_controlPtr->_entries.size() == 0) + error("No control entries"); + + initUseCount(); +} + +void VoyeurEngine::initUseCount() { + Common::fill(&_stm_useCount[0], &_stm_useCount[8], 0); +} + void VoyeurEngine::initThreadStruct(byte *threadStruct) { // TODO } |