aboutsummaryrefslogtreecommitdiff
path: root/scumm/object.cpp
diff options
context:
space:
mode:
authorMax Horn2003-04-28 12:38:24 +0000
committerMax Horn2003-04-28 12:38:24 +0000
commita1a8c3ed0515f471532975c7315df70e06c6c366 (patch)
tree0e0083080d38a216b99c0a086001096284359d14 /scumm/object.cpp
parentdabbbde957f76510f36f9b1761534733683ed680 (diff)
downloadscummvm-rg350-a1a8c3ed0515f471532975c7315df70e06c6c366.tar.gz
scummvm-rg350-a1a8c3ed0515f471532975c7315df70e06c6c366.tar.bz2
scummvm-rg350-a1a8c3ed0515f471532975c7315df70e06c6c366.zip
cleanup (yes, the parentstate was changed from 1 to 16 for V3/V4 games - but that actually seems to be correct, according to older comments in this file, and the disassmbly)
svn-id: r7175
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r--scumm/object.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index eb0c19ad2f..f6e43d514e 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -633,6 +633,8 @@ void Scumm::setupRoomObject(ObjectData *od, byte *room, byte *searchptr) {
od->x_pos = *(ptr + 9) << 3;
od->y_pos = ((*(ptr + 10)) & 0x7F) << 3;
+ od->parentstate = (*(ptr + 10) & 0x80) ? 16 : 0;
+
od->width = *(ptr + 11) << 3;
od->parent = *(ptr + 12);
@@ -642,18 +644,13 @@ void Scumm::setupRoomObject(ObjectData *od, byte *room, byte *searchptr) {
od->walk_y = *(ptr + 14);
od->actordir = (*(ptr + 15)) & 7;
od->height = *(ptr + 15) & 0xf8;
- od->parentstate = (*(ptr + 10) & 0x80) >> 4;
} else {
od->walk_x = READ_LE_UINT16(ptr + 13);
od->walk_y = READ_LE_UINT16(ptr + 15);
od->actordir = (*(ptr + 17)) & 7;
od->height = *(ptr + 17) & 0xf8;
- if (*(ptr + 10) & 0x80) {
- od->parentstate = 1;
- } else {
- od->parentstate = 0;
- }
}
+
return;
}