svn-id: r7756
This commit is contained in:
Max Horn 2003-05-20 23:05:34 +00:00
parent 4584cb9616
commit 34eee8b33b
3 changed files with 14 additions and 11 deletions

View file

@ -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;

View file

@ -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,16 +538,15 @@ 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;
}
} else
putClass(obj, newClass, (newClass & 0x80) ? true : false);
}
}

View file

@ -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;