diff options
author | Max Horn | 2003-05-10 23:47:39 +0000 |
---|---|---|
committer | Max Horn | 2003-05-10 23:47:39 +0000 |
commit | bf270d92432e44648d93598b8153b094e16ece3e (patch) | |
tree | bd540eaf3f2a91bb18455548fb2603cd5eefe38d /scumm | |
parent | 5be0ce7adc9952ff065c7ec04cab4b87eb7b0e28 (diff) | |
download | scummvm-rg350-bf270d92432e44648d93598b8153b094e16ece3e.tar.gz scummvm-rg350-bf270d92432e44648d93598b8153b094e16ece3e.tar.bz2 scummvm-rg350-bf270d92432e44648d93598b8153b094e16ece3e.zip |
walkbox & putActor coords in V2 are in 'character coordinates' - x has to multiplied by 8 and y by 2
svn-id: r7426
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/boxes.cpp | 16 | ||||
-rw-r--r-- | scumm/script_v2.cpp | 20 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 9 |
3 files changed, 24 insertions, 21 deletions
diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp index 4dccfee31e..508c338dc2 100644 --- a/scumm/boxes.cpp +++ b/scumm/boxes.cpp @@ -350,15 +350,15 @@ void Scumm::getBoxCoordinates(int boxnum, BoxCoords *box) { SWAP(box->ll.y, box->lr.y); } } else if (_features & GF_AFTER_V2) { - box->ul.x = bp->v2.ulx; - box->ul.y = bp->v2.uy; - box->ur.x = bp->v2.urx; - box->ur.y = bp->v2.uy; + box->ul.x = bp->v2.ulx * 8; + box->ul.y = bp->v2.uy * 2; + box->ur.x = bp->v2.urx * 8; + box->ur.y = bp->v2.uy * 2; - box->ll.x = bp->v2.llx; - box->ll.y = bp->v2.ly; - box->lr.x = bp->v2.lrx; - box->lr.y = bp->v2.ly; + box->ll.x = bp->v2.llx * 8; + box->ll.y = bp->v2.ly * 2; + box->lr.x = bp->v2.lrx * 8; + box->lr.y = bp->v2.ly * 2; } else { box->ul.x = (int16)READ_LE_UINT16(&bp->old.ulx); box->ul.y = (int16)READ_LE_UINT16(&bp->old.uly); diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 36eca65518..77312ef504 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -849,8 +849,8 @@ void Scumm_v2::o2_walkActorTo() { int x, y; Actor *a; a = derefActorSafe(getVarOrDirectByte(0x80), "o2_walkActorTo"); - x = getVarOrDirectByte(0x40); - y = getVarOrDirectByte(0x20); + x = getVarOrDirectByte(0x40) * 8; + y = getVarOrDirectByte(0x20) * 2; a->ignoreBoxes = true; // FIXME: Disabling walkboxes a->startWalkActor(x, y, -1); // for now, just to debug the intro } @@ -860,8 +860,8 @@ void Scumm_v2::o2_putActor() { Actor *a; a = derefActorSafe(getVarOrDirectByte(0x80), "o2_putActor"); - x = getVarOrDirectByte(0x40); - y = getVarOrDirectByte(0x20); + x = getVarOrDirectByte(0x40) * 8; + y = getVarOrDirectByte(0x20) * 2; if (!a) return; @@ -972,8 +972,8 @@ void Scumm_v2::o2_loadRoomWithEgo() { a->putActor(0, 0, room); _egoPositioned = false; - x = (int16)fetchScriptByte(); - y = (int16)fetchScriptByte(); + x = (int16)fetchScriptByte() * 8; + y = (int16)fetchScriptByte() * 2; startScene(a->room, a, obj); @@ -1139,11 +1139,11 @@ void Scumm_v2::o2_cursorCommand() { if (a2 & 2) { // Cursor Show/Hide if (a2 & 16) - _cursor.state = 1; + _cursor.state = 1; else - _cursor.state = 0; - - verbMouseOver(0); + _cursor.state = 0; + + verbMouseOver(0); } } diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 0e90b8945b..b3e2ea31fc 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -884,9 +884,12 @@ int Scumm::scummLoop(int delta) { VAR(VAR_CAMERA_POS_X) = camera._cur.x; } VAR(VAR_HAVE_MSG) = (_haveMsg == 0xFE) ? 0xFF : _haveMsg; - VAR(VAR_VIRT_MOUSE_X) = _virtual_mouse_x; - VAR(VAR_VIRT_MOUSE_Y) = _virtual_mouse_y; - if (!(_features & GF_AFTER_V2)) { + if (_features & GF_AFTER_V2) { + VAR(VAR_VIRT_MOUSE_X) = _virtual_mouse_x; + VAR(VAR_VIRT_MOUSE_Y) = _virtual_mouse_y; + } else { + VAR(VAR_VIRT_MOUSE_X) = _virtual_mouse_x; + VAR(VAR_VIRT_MOUSE_Y) = _virtual_mouse_y; VAR(VAR_MOUSE_X) = mouse.x; VAR(VAR_MOUSE_Y) = mouse.y; VAR(VAR_DEBUGMODE) = _debugMode; |