diff options
author | Max Horn | 2003-05-20 16:13:34 +0000 |
---|---|---|
committer | Max Horn | 2003-05-20 16:13:34 +0000 |
commit | 3e3d6f1360332d9bed9fc28a1930b1d033f58138 (patch) | |
tree | 3b47d88a2b63c6ceb723a0208a1651cf3225c1af /scumm/object.cpp | |
parent | 93d29f2f9aa3c951aab75a0ce71af714aebbc54e (diff) | |
download | scummvm-rg350-3e3d6f1360332d9bed9fc28a1930b1d033f58138.tar.gz scummvm-rg350-3e3d6f1360332d9bed9fc28a1930b1d033f58138.tar.bz2 scummvm-rg350-3e3d6f1360332d9bed9fc28a1930b1d033f58138.zip |
renamed o2_matrixOps -> o2_setBoxFlags; V2 'objY' fixes; cleanup
svn-id: r7739
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r-- | scumm/object.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index d516e5b026..bbaa764cb2 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -203,6 +203,9 @@ void Scumm::getObjectXYPos(int object, int &x, int &y, int &dir) { x = od->x_pos + (int16)READ_LE_UINT16(&imhd->old.hotspot[state].x); y = od->y_pos + (int16)READ_LE_UINT16(&imhd->old.hotspot[state].y); } + } else if (_features & GF_AFTER_V2){ + x = od->walk_x * 8; + y = (od->walk_y & 0x1f) * 8; } else { x = od->walk_x; y = od->walk_y; @@ -656,8 +659,11 @@ void Scumm::setupRoomObject(ObjectData *od, byte *room, byte *searchptr) { od->parent = *(ptr + 12); if (_features & GF_AFTER_V2) { - od->walk_x = *(ptr + 13) * 8; - od->walk_y = *(ptr + 14) * 8; + od->walk_x = *(ptr + 13); + // V2 stores an as of now unknown value in the upper 3 bits of the Y coordinate. + // Maybe we shoudl add an entry for it to ObjectData. That would be cleaner, + // but requires us to inc the savegame format version. + od->walk_y = *(ptr + 14); od->actordir = (*(ptr + 15)) & 7; od->height = *(ptr + 15) & 0xf8; } else { |