diff options
author | Paweł Kołodziejski | 2003-04-21 11:19:56 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-04-21 11:19:56 +0000 |
commit | d9adc5d71ace78eb8282ff57f46fa9750abda67b (patch) | |
tree | 39c17f828adc70c622c90a916430a9628e2aeb79 /scumm/object.cpp | |
parent | d7deee507a8a08283ecc1e7d195923e88d213ae7 (diff) | |
download | scummvm-rg350-d9adc5d71ace78eb8282ff57f46fa9750abda67b.tar.gz scummvm-rg350-d9adc5d71ace78eb8282ff57f46fa9750abda67b.tar.bz2 scummvm-rg350-d9adc5d71ace78eb8282ff57f46fa9750abda67b.zip |
changes for v2 resources
svn-id: r7053
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r-- | scumm/object.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index 67deea62ad..e420117e39 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -634,21 +634,26 @@ void Scumm::setupRoomObject(ObjectData *od, byte *room, byte *searchptr) { od->y_pos = ((*(ptr + 10)) & 0x7F) << 3; od->width = *(ptr + 11) << 3; - od->height = *(ptr + 17) & 0xf8; - - if (*(ptr + 10) & 0x80) { - od->parentstate = 1; // it's 0x10 in the original code - } else { - od->parentstate = 0; - } od->parent = *(ptr + 12); - od->walk_x = READ_LE_UINT16(ptr + 13); - od->walk_y = READ_LE_UINT16(ptr + 15); - - od->actordir = (*(ptr + 17)) & 7; - + if (_features & GF_AFTER_V3) { + od->walk_x = *(ptr + 13); + 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; } |