cleanup
svn-id: r7756
This commit is contained in:
parent
4584cb9616
commit
34eee8b33b
3 changed files with 14 additions and 11 deletions
|
@ -625,11 +625,12 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY) {
|
||||||
bestDist = (uint) 0xFFFF;
|
bestDist = (uint) 0xFFFF;
|
||||||
bestBox = kInvalidBox;
|
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.
|
// to the desired coordinates.
|
||||||
for (box = numBoxes; box >= firstValidBox; box--) {
|
for (box = numBoxes; box >= firstValidBox; box--) {
|
||||||
flags = _vm->getBoxFlags(box);
|
flags = _vm->getBoxFlags(box);
|
||||||
|
|
||||||
|
// Skip over invisible boxes
|
||||||
if (flags & kBoxInvisible && !(flags & kBoxPlayerOnly && !isInClass(kObjectClassPlayer)))
|
if (flags & kBoxInvisible && !(flags & kBoxPlayerOnly && !isInClass(kObjectClassPlayer)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -401,8 +401,10 @@ void Scumm_v5::o5_actorSet() {
|
||||||
Actor *a;
|
Actor *a;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (act == 0)
|
if (act == 0) {
|
||||||
act = 1;
|
act = 1;
|
||||||
|
warning("o5_actorSet: act = 0, setting to 1 as a workaround");
|
||||||
|
}
|
||||||
|
|
||||||
a = derefActorSafe(act, "actorSet");
|
a = derefActorSafe(act, "actorSet");
|
||||||
|
|
||||||
|
@ -536,17 +538,16 @@ void Scumm_v5::o5_setClass() {
|
||||||
while ((_opcode = fetchScriptByte()) != 0xFF) {
|
while ((_opcode = fetchScriptByte()) != 0xFF) {
|
||||||
newClass = getVarOrDirectWord(0x80);
|
newClass = getVarOrDirectWord(0x80);
|
||||||
if (newClass == 0) {
|
if (newClass == 0) {
|
||||||
|
// Class '0' means: clean all class data
|
||||||
_classData[obj] = 0;
|
_classData[obj] = 0;
|
||||||
if ((_features & GF_SMALL_HEADER) && obj <= _numActors) {
|
if ((_features & GF_SMALL_HEADER) && obj <= _numActors) {
|
||||||
Actor *a;
|
Actor *a;
|
||||||
a = derefActorSafe(obj, "setClass");
|
a = derefActorSafe(obj, "setClass");
|
||||||
a->ignoreBoxes = 0;
|
a->ignoreBoxes = false;
|
||||||
a->forceClip = 0;
|
a->forceClip = 0;
|
||||||
}
|
}
|
||||||
continue;
|
} else
|
||||||
}
|
putClass(obj, newClass, (newClass & 0x80) ? true : false);
|
||||||
|
|
||||||
putClass(obj, newClass, (newClass & 0x80) ? true : false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1686,21 +1686,22 @@ void Scumm_v6::o6_actorOps() {
|
||||||
break;
|
break;
|
||||||
case 95:
|
case 95:
|
||||||
a->ignoreBoxes = 1;
|
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;
|
a->forceClip = 100;
|
||||||
else
|
else
|
||||||
a->forceClip = 0;
|
a->forceClip = 0;
|
||||||
FixRooms:;
|
|
||||||
if (a->isInCurrentRoom())
|
if (a->isInCurrentRoom())
|
||||||
a->putActor(a->x, a->y, a->room);
|
a->putActor(a->x, a->y, a->room);
|
||||||
break;
|
break;
|
||||||
case 96:
|
case 96:
|
||||||
a->ignoreBoxes = 0;
|
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;
|
a->forceClip = 100;
|
||||||
else
|
else
|
||||||
a->forceClip = 0;
|
a->forceClip = 0;
|
||||||
goto FixRooms;
|
if (a->isInCurrentRoom())
|
||||||
|
a->putActor(a->x, a->y, a->room);
|
||||||
|
break;
|
||||||
case 97:
|
case 97:
|
||||||
a->animSpeed = pop();
|
a->animSpeed = pop();
|
||||||
a->animProgress = 0;
|
a->animProgress = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue