diff options
author | Eric Fry | 2018-06-16 14:41:37 +1000 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 0303b83ead46346cd74a9649384d8a2dde0e145b (patch) | |
tree | 4bdcf38fb86a4f60036b5cbdf49216b1ae2a5769 /engines/illusions/actor.cpp | |
parent | ced1ff2356391f24c70f9bb4c514733aeadfc38b (diff) | |
download | scummvm-rg350-0303b83ead46346cd74a9649384d8a2dde0e145b.tar.gz scummvm-rg350-0303b83ead46346cd74a9649384d8a2dde0e145b.tar.bz2 scummvm-rg350-0303b83ead46346cd74a9649384d8a2dde0e145b.zip |
ILLUSIONS: Pause actors when entering menu
Diffstat (limited to 'engines/illusions/actor.cpp')
-rw-r--r-- | engines/illusions/actor.cpp | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/engines/illusions/actor.cpp b/engines/illusions/actor.cpp index 74d57d32b7..10f57446b0 100644 --- a/engines/illusions/actor.cpp +++ b/engines/illusions/actor.cpp @@ -1305,7 +1305,7 @@ bool Controls::getOverlappedObject(Control *control, Common::Point pt, Control * foundControl = testControl; foundPriority = testPriority; } - } + } } } @@ -1504,4 +1504,49 @@ void Controls::destroyControlInternal(Control *control) { delete control; } +void Controls::disappearActors() { + for (ItemsIterator it = _controls.begin(); it != _controls.end(); ++it) { + Control *control = *it; + if (control->_flags & 4 && control->_pauseCtr == 0) { + control->disappearActor(); + } + } + Control *control = _vm->_dict->getObjectControl(0x40148); + if (control) { + control->disappearActor(); + } +} + +void Controls::appearActors() { + for (ItemsIterator it = _controls.begin(); it != _controls.end(); ++it) { + Control *control = *it; + if (control->_flags & 4 && control->_pauseCtr == 0) { + control->appearActor(); + } + } + Control *control = _vm->_dict->getObjectControl(0x40148); + if (control) { + control->appearActor(); + } +} + +void Controls::pauseActors(uint32 objectId) { + for (ItemsIterator it = _controls.begin(); it != _controls.end(); ++it) { + Control *control = *it; + if (control->_actor && control->_objectId != objectId) { + control->_actor->pause(); + } + } +} + +void Controls::unpauseActors(uint32 objectId) { + for (ItemsIterator it = _controls.begin(); it != _controls.end(); ++it) { + Control *control = *it; + if (control->_actor && control->_objectId != objectId) { + control->_actor->unpause(); + } + } +} + + } // End of namespace Illusions |