aboutsummaryrefslogtreecommitdiff
path: root/scumm/object.cpp
diff options
context:
space:
mode:
authorTravis Howell2005-04-18 07:30:26 +0000
committerTravis Howell2005-04-18 07:30:26 +0000
commit6f550d419a7d3d341f4d32598ec8b18f12859094 (patch)
treeac9f44faf3f28971f498f7d753e1e415dd4ccee9 /scumm/object.cpp
parentd4ba67a49793677a19680f72f9e7fb14fc6c747c (diff)
downloadscummvm-rg350-6f550d419a7d3d341f4d32598ec8b18f12859094.tar.gz
scummvm-rg350-6f550d419a7d3d341f4d32598ec8b18f12859094.tar.bz2
scummvm-rg350-6f550d419a7d3d341f4d32598ec8b18f12859094.zip
Add work around for inveotry background/items in putttime/puttzoo not always been drawn.
svn-id: r17663
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r--scumm/object.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index d966f829f8..899e85e06a 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -371,7 +371,7 @@ void ScummEngine::drawRoomObject(int i, int arg) {
do {
a = od->parentstate;
if (!od->parent) {
- if ((_version <= 6 && !(_features & GF_HUMONGOUS)) || od->fl_object_index == 0)
+ if (_version <= 6 || od->fl_object_index == 0)
drawObject(i, arg);
break;
}
@@ -383,7 +383,21 @@ void ScummEngine::drawRoomObjects(int arg) {
int i;
const int mask = (_version <= 2) ? 0x8 : 0xF;
- if (_gameId == GID_SAMNMAX) {
+ if (_features & GF_HUMONGOUS) {
+ // In HE games, normal objects are drawn, followed by FlObjects.
+ 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);
+ }
+ // 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++) {
+ if (_objs[i].obj_nr > 0 && (_objs[i].state & mask) && _objs[i].fl_object_index != 0)
+ drawRoomObject(i, arg);
+ }
+ if (_gameId == GID_SAMNMAX || _heversion >= 72) {
// In Sam & Max, objects are drawn in reverse order.
for (i = 1; i < _numLocalObjects; i++)
if (_objs[i].obj_nr > 0)