diff options
-rw-r--r-- | scumm/actor.cpp | 11 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 22 | ||||
-rw-r--r-- | scumm/scumm.h | 1 |
3 files changed, 15 insertions, 19 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 280d7338a5..60d577daee 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -806,6 +806,17 @@ void ScummEngine::setTalkingActor(int value) { VAR(VAR_TALK_ACTOR) = value; } +void ScummEngine::putActors() { + Actor *a; + int i; + + for (i = 1; i < _numActors; i++) { + a = &_actors[i]; + if (a && a->isInCurrentRoom()) + a->putActor(a->_pos.x, a->_pos.y, a->room); + } +} + void ScummEngine::showActors() { int i; diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 551de8a685..813fd25709 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -1465,18 +1465,9 @@ void ScummEngine_v6::o6_setBoxFlags() { } void ScummEngine_v6::o6_createBoxMatrix() { - int i; - Actor *a; - createBoxMatrix(); - if ((_gameId == GID_DIG) || (_gameId == GID_CMI)) { - for (i = 1; i < _numActors; i++) { - a = &_actors[i]; - if (a && a->isInCurrentRoom()) - a->putActor(a->_pos.x, a->_pos.y, _currentRoom); - } - } + putActors(); } void ScummEngine_v6::o6_resourceRoutines() { @@ -3145,15 +3136,8 @@ void ScummEngine_v6::o6_setBoxSet() { assert(matrix); memcpy(matrix, boxm, mboxSize); - if (_version == 7) { - Actor *a; - - for (i = 1; i < _numActors; i++) { - a = &_actors[i]; - if (a && a->isInCurrentRoom()) - a->putActor(a->_pos.x, a->_pos.y, _currentRoom); - } - } + if (_version == 7) + putActors(); } void ScummEngine_v6::decodeParseString(int m, int n) { diff --git a/scumm/scumm.h b/scumm/scumm.h index 50e8cc8d3b..052cfa0a86 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -794,6 +794,7 @@ protected: void walkActors(); void playActorSounds(); void setActorRedrawFlags(); + void putActors(); void showActors(); void resetActorBgs(); void processActors(); |