diff options
author | Paul Gilbert | 2014-01-05 14:41:09 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-01-05 14:41:09 -0500 |
commit | 1690ffb2bfc3ddcbbebe755a33f94f62b7ba81a0 (patch) | |
tree | 142533fd5fbf9828049472c8ff38fad13091de7f /engines/voyeur | |
parent | 7c256c491a71feb3dd608e0351072939cb7ac796 (diff) | |
download | scummvm-rg350-1690ffb2bfc3ddcbbebe755a33f94f62b7ba81a0.tar.gz scummvm-rg350-1690ffb2bfc3ddcbbebe755a33f94f62b7ba81a0.tar.bz2 scummvm-rg350-1690ffb2bfc3ddcbbebe755a33f94f62b7ba81a0.zip |
VOYEUR: Moved _stampFlags to VoyeurEngine
Diffstat (limited to 'engines/voyeur')
-rw-r--r-- | engines/voyeur/files.h | 1 | ||||
-rw-r--r-- | engines/voyeur/files_threads.cpp | 8 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 1 | ||||
-rw-r--r-- | engines/voyeur/voyeur.h | 1 | ||||
-rw-r--r-- | engines/voyeur/voyeur_game.cpp | 2 |
5 files changed, 6 insertions, 7 deletions
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h index 69bbb78d14..b1eef580d1 100644 --- a/engines/voyeur/files.h +++ b/engines/voyeur/files.h @@ -439,7 +439,6 @@ public: class ThreadResource { public: - static int _stampFlags; static int _useCount[8]; static byte *_threadDataPtr; static CMapResource *_cmd14Pal; diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index 637b8ff65a..1e4fdb1bc6 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -27,13 +27,11 @@ namespace Voyeur { -int ThreadResource::_stampFlags; int ThreadResource::_useCount[8]; byte *ThreadResource::_threadDataPtr; CMapResource *ThreadResource::_cmd14Pal; void ThreadResource::init() { - _stampFlags = 0; Common::fill(&_useCount[0], &_useCount[8], 0); _threadDataPtr = nullptr; _cmd14Pal = nullptr; @@ -58,7 +56,7 @@ void ThreadResource::initThreadStruct(int idx, int id) { } bool ThreadResource::loadAStack(int idx) { - if (_stampFlags & 1) { + if (_vm->_stampFlags & 1) { unloadAStack(_controlIndex); if (!_useCount[idx]) { BoltEntry &boltEntry = _vm->_stampLibPtr->boltEntry(_vm->_controlPtr->_memberIds[idx]); @@ -76,7 +74,7 @@ bool ThreadResource::loadAStack(int idx) { } void ThreadResource::unloadAStack(int idx) { - if ((_stampFlags & 1) && _useCount[idx]) { + if ((_vm->_stampFlags & 1) && _useCount[idx]) { if (--_useCount[idx] == 0) { _vm->_stampLibPtr->freeBoltMember(_vm->_controlPtr->_memberIds[idx]); } @@ -186,7 +184,7 @@ void ThreadResource::getField1CE() { } void ThreadResource::unloadAllStacks(VoyeurEngine *vm) { - if (_stampFlags & 1) { + if (vm->_stampFlags & 1) { for (int i = 0; i < 8; ++i) { if (_useCount[i]) vm->_stampLibPtr->freeBoltMember(vm->_controlPtr->_memberIds[i]); diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 52bcd05930..dce4cf8ed5 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -43,6 +43,7 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc) _iForceDeath = -1; _controlPtr = NULL; _bob = false; + _stampFlags = 0; _playStamp1 = _playStamp2 = 0; _videoId = -1; _checkTransitionId = -1; diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index c0bc1d9c82..ed7891706b 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -157,6 +157,7 @@ public: int _glGoScene; int _glGoStack; bool _bob; + int _stampFlags; int _playStamp1; int _playStamp2; int _videoId; diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp index 25ad3310ac..762b98829b 100644 --- a/engines/voyeur/voyeur_game.cpp +++ b/engines/voyeur/voyeur_game.cpp @@ -212,7 +212,7 @@ void VoyeurEngine::playStamp() { } void VoyeurEngine::initStamp() { - ThreadResource::_stampFlags &= ~1; + _stampFlags &= ~1; _stackGroupPtr = _controlGroupPtr; if (!_controlPtr->_entries[0]) |