diff options
author | Travis Howell | 2007-03-03 23:02:54 +0000 |
---|---|---|
committer | Travis Howell | 2007-03-03 23:02:54 +0000 |
commit | 8e70329ce3d550a621843ffc055e416797e6054d (patch) | |
tree | 7a867653f8b8a55e0249be1e5d03dc8544381181 /engines/scumm/object.cpp | |
parent | 5cee9799f1f0684ac0947be7a1747021435148ba (diff) | |
download | scummvm-rg350-8e70329ce3d550a621843ffc055e416797e6054d.tar.gz scummvm-rg350-8e70329ce3d550a621843ffc055e416797e6054d.tar.bz2 scummvm-rg350-8e70329ce3d550a621843ffc055e416797e6054d.zip |
Fix level selection in PC Engine version of Loom.
svn-id: r25954
Diffstat (limited to 'engines/scumm/object.cpp')
-rw-r--r-- | engines/scumm/object.cpp | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index db3155d6e2..3667bee35f 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -900,27 +900,41 @@ void ScummEngine_v4::resetRoomObject(ObjectData *od, const byte *room, const byt od->obj_nr = READ_LE_UINT16(ptr + 6); - od->x_pos = *(ptr + 9) * 8; - od->y_pos = ((*(ptr + 10)) & 0x7F) * 8; + if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine) { + od->x_pos = *(ptr + 8) * 8; + od->y_pos = ((*(ptr + 9)) & 0x7F) * 8; - od->parentstate = (*(ptr + 10) & 0x80) ? 1 : 0; - if (_game.version <= 2) - od->parentstate *= 8; - - od->width = *(ptr + 11) * 8; - - od->parent = *(ptr + 12); + od->parentstate = (*(ptr + 11) & 0x80) ? 1 : 0; + od->width = *(ptr + 10) * 8; - if (_game.version <= 2) { + od->parent = *(ptr + 11); od->walk_x = *(ptr + 13) * 8; od->walk_y = (*(ptr + 14) & 0x1f) * 8; od->actordir = (*(ptr + 15)) & 7; od->height = *(ptr + 15) & 0xf8; } 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; + od->x_pos = *(ptr + 9) * 8; + od->y_pos = ((*(ptr + 10)) & 0x7F) * 8; + + od->parentstate = (*(ptr + 10) & 0x80) ? 1 : 0; + if (_game.version <= 2) + od->parentstate *= 8; + + od->width = *(ptr + 11) * 8; + + od->parent = *(ptr + 12); + + if (_game.version <= 2) { + od->walk_x = *(ptr + 13) * 8; + od->walk_y = (*(ptr + 14) & 0x1f) * 8; + od->actordir = (*(ptr + 15)) & 7; + od->height = *(ptr + 15) & 0xf8; + } 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; + } } } |