aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/object.cpp6
-rw-r--r--scumm/script_v6he.cpp4
2 files changed, 3 insertions, 7 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index 949541414e..ee15d6adab 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -394,11 +394,7 @@ void ScummEngine::drawRoomObjects(int arg) {
if (_objs[i].obj_nr > 0 && (_objs[i].state & mask) && _objs[i].fl_object_index == 0)
drawRoomObject(i, arg);
}
- // HACK: Reverse order is required to draw inventory background and items
- // in correct order in putttime/puttzoo. Otherwise the inventory background
- // is drawn over the items. But this doesn't match original, maybe masking
- // issue somewhere?
- for (i = 1; i < _numLocalObjects; i++) {
+ for (i = (_numLocalObjects-1); i > 0; i--) {
if (_objs[i].obj_nr > 0 && (_objs[i].state & mask) && _objs[i].fl_object_index != 0)
drawRoomObject(i, arg);
}
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index 208696f000..74828bfdd6 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -556,7 +556,7 @@ void ScummEngine_v60he::o60_roomOps() {
void ScummEngine_v60he::swapObjects(int object1, int object2) {
int idx1 = -1, idx2 = -1;
- for (int i = 0; i < _numObjectsInRoom; i++) {
+ for (int i = 0; i < _numLocalObjects; i++) {
if (_objs[i].obj_nr == object1)
idx1 = i;
@@ -564,7 +564,7 @@ void ScummEngine_v60he::swapObjects(int object1, int object2) {
idx2 = i;
}
- if (idx1 == -1 || idx2 == -1 || idx1 >= idx2)
+ if (idx1 == -1 || idx2 == -1 || idx1 <= idx2)
return;
stopObjectScript(object1);