aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTobias Gunkel2012-01-15 19:26:02 +0100
committerTobias Gunkel2012-02-11 08:28:43 +0100
commit6ca91a2be5e2f2ad981e52a5c21ca97ca3dee48d (patch)
tree1d9e0b9578bb7ffd0bb170c6bb9accfcadd60651 /engines
parentb999fe9e265277dbd8e736edec1478013c86feba (diff)
downloadscummvm-rg350-6ca91a2be5e2f2ad981e52a5c21ca97ca3dee48d.tar.gz
scummvm-rg350-6ca91a2be5e2f2ad981e52a5c21ca97ca3dee48d.tar.bz2
scummvm-rg350-6ca91a2be5e2f2ad981e52a5c21ca97ca3dee48d.zip
SCUMM: Fix actor behind man-eating plant issue in v0.
Thanks segra for finding how it works in the original interpreter. The plant is handled specially and 0 is used instead of its y-position.
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/actor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index bccf4ef746..950f580f42 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -1474,6 +1474,18 @@ void ScummEngine::processActors() {
}
}
}
+ } else if (_game.version == 0) {
+ for (int j = 0; j < numactors; ++j) {
+ for (int i = 0; i < numactors; ++i) {
+ // Note: the plant is handled different in v0, the y value is not used.
+ // In v1/2 this is done by the actor's elevation instead.
+ int sc_actor1 = (_sortedActors[j]->_number == 19 ? 0 : _sortedActors[j]->getPos().y);
+ int sc_actor2 = (_sortedActors[i]->_number == 19 ? 0 : _sortedActors[i]->getPos().y);
+ if (sc_actor1 < sc_actor2) {
+ SWAP(_sortedActors[i], _sortedActors[j]);
+ }
+ }
+ }
} else {
for (int j = 0; j < numactors; ++j) {
for (int i = 0; i < numactors; ++i) {