diff options
author | Max Horn | 2003-05-20 23:05:34 +0000 |
---|---|---|
committer | Max Horn | 2003-05-20 23:05:34 +0000 |
commit | 34eee8b33bb1295f1872b8752d904df68133ad4c (patch) | |
tree | 0d983dc1c018eeae71487b383a2e87d0c12e37a7 /scumm | |
parent | 4584cb9616ffa78324544c140ef7fc0ad71744a1 (diff) | |
download | scummvm-rg350-34eee8b33bb1295f1872b8752d904df68133ad4c.tar.gz scummvm-rg350-34eee8b33bb1295f1872b8752d904df68133ad4c.tar.bz2 scummvm-rg350-34eee8b33bb1295f1872b8752d904df68133ad4c.zip |
cleanup
svn-id: r7756
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 3 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 13 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 9 |
3 files changed, 14 insertions, 11 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index a7c2a04021..a99817ff99 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -625,11 +625,12 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY) { bestDist = (uint) 0xFFFF; bestBox = kInvalidBox; - // We iterate (backwards) over all boxes, searching the one closes + // We iterate (backwards) over all boxes, searching the one closest // to the desired coordinates. for (box = numBoxes; box >= firstValidBox; box--) { flags = _vm->getBoxFlags(box); + // Skip over invisible boxes if (flags & kBoxInvisible && !(flags & kBoxPlayerOnly && !isInClass(kObjectClassPlayer))) continue; diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index 59c77b23f3..b3cf4a1522 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -401,8 +401,10 @@ void Scumm_v5::o5_actorSet() { Actor *a; int i, j; - if (act == 0) + if (act == 0) { act = 1; + warning("o5_actorSet: act = 0, setting to 1 as a workaround"); + } a = derefActorSafe(act, "actorSet"); @@ -536,17 +538,16 @@ void Scumm_v5::o5_setClass() { while ((_opcode = fetchScriptByte()) != 0xFF) { newClass = getVarOrDirectWord(0x80); if (newClass == 0) { + // Class '0' means: clean all class data _classData[obj] = 0; if ((_features & GF_SMALL_HEADER) && obj <= _numActors) { Actor *a; a = derefActorSafe(obj, "setClass"); - a->ignoreBoxes = 0; + a->ignoreBoxes = false; a->forceClip = 0; } - continue; - } - - putClass(obj, newClass, (newClass & 0x80) ? true : false); + } else + putClass(obj, newClass, (newClass & 0x80) ? true : false); } } diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 1306ede6c1..6f68df086a 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -1686,21 +1686,22 @@ void Scumm_v6::o6_actorOps() { break; case 95: a->ignoreBoxes = 1; - if (_features & GF_AFTER_V7) // yazoo: I don't know if it's supposed to be 100 in other games too... + if (_features & GF_AFTER_V7) a->forceClip = 100; else a->forceClip = 0; - FixRooms:; if (a->isInCurrentRoom()) a->putActor(a->x, a->y, a->room); break; case 96: a->ignoreBoxes = 0; - if (_features & GF_AFTER_V7) // yazoo: I don't know if it's supposed to be 100 in other games too... + if (_features & GF_AFTER_V7) a->forceClip = 100; else a->forceClip = 0; - goto FixRooms; + if (a->isInCurrentRoom()) + a->putActor(a->x, a->y, a->room); + break; case 97: a->animSpeed = pop(); a->animProgress = 0; |