ASYLUM: identify more ActorStatus values

This commit is contained in:
Alex Bevilacqua 2011-09-25 20:41:29 -04:00 committed by Eugene Sandulenko
parent 68b9df5a4b
commit 9277116e09
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
4 changed files with 14 additions and 14 deletions

View File

@ -498,7 +498,7 @@ void Actor::update() {
if (_vm->getRandom(100) < 50) { if (_vm->getRandom(100) < 50) {
if (!getSpeech()->getSoundResourceId() || !getSound()->isPlaying(getSpeech()->getSoundResourceId())) { if (!getSpeech()->getSoundResourceId() || !getSound()->isPlaying(getSpeech()->getSoundResourceId())) {
if (isDefaultDirection(10)) if (isDefaultDirection(10))
updateStatus(kActorStatus9); updateStatus(kActorStatusFidget);
} }
} }
_lastScreenUpdate = _vm->screenUpdateCount; _lastScreenUpdate = _vm->screenUpdateCount;
@ -642,7 +642,7 @@ void Actor::update() {
updateStatus3_19(); updateStatus3_19();
break; break;
case kActorStatus7: case kActorStatusPickupItem:
if (getSharedData()->actorEnableForStatus7) { if (getSharedData()->actorEnableForStatus7) {
getSharedData()->actorEnableForStatus7 = false; getSharedData()->actorEnableForStatus7 = false;
enable(); enable();
@ -662,7 +662,7 @@ void Actor::update() {
updateStatus21(); updateStatus21();
break; break;
case kActorStatus9: case kActorStatusFidget:
updateStatus9(); updateStatus9();
break; break;
@ -705,7 +705,7 @@ void Actor::updateStatus(ActorStatus actorStatus) {
case kActorStatus12: case kActorStatus12:
if ((getWorld()->chapter == kChapter2 if ((getWorld()->chapter == kChapter2
&& _index == getSharedData()->getPlayerIndex() && (_status == kActorStatus18 || _status == kActorStatus16 || _status == kActorStatus17)) && _index == getSharedData()->getPlayerIndex() && (_status == kActorStatus18 || _status == kActorStatus16 || _status == kActorStatus17))
|| (_status != kActorStatusEnabled && _status != kActorStatus9 && _status != kActorStatus14 && _status != kActorStatus15 && _status != kActorStatus18)) || (_status != kActorStatusEnabled && _status != kActorStatusFidget && _status != kActorStatus14 && _status != kActorStatus15 && _status != kActorStatus18))
return; return;
updateGraphicData(0); updateGraphicData(0);
@ -741,7 +741,7 @@ void Actor::updateStatus(ActorStatus actorStatus) {
getScreen()->setFlag(-1); getScreen()->setFlag(-1);
break; break;
case kActorStatus7: case kActorStatusPickupItem:
if (getWorld()->chapter == kChapter2 && _index == 10 && _vm->isGameFlagSet(kGameFlag279)) { if (getWorld()->chapter == kChapter2 && _index == 10 && _vm->isGameFlagSet(kGameFlag279)) {
Actor *actor = getScene()->getActor(0); Actor *actor = getScene()->getActor(0);
actor->getPoint1()->x = _point2.x + _point1.x - actor->getPoint2()->x; actor->getPoint1()->x = _point2.x + _point1.x - actor->getPoint2()->x;
@ -766,7 +766,7 @@ void Actor::updateStatus(ActorStatus actorStatus) {
updateGraphicData(20); updateGraphicData(20);
break; break;
case kActorStatus9: case kActorStatusFidget:
if (getSharedData()->getFlag(kFlagIsEncounterRunning)) if (getSharedData()->getFlag(kFlagIsEncounterRunning))
return; return;
@ -1174,7 +1174,7 @@ void Actor::clearFields() {
} }
bool Actor::isResourcePresent() const { bool Actor::isResourcePresent() const {
if (_status != kActorStatus9) if (_status != kActorStatusFidget)
return false; return false;
int index; int index;
@ -2154,7 +2154,7 @@ void Actor::updateStatus3_19() {
++_frameIndex; ++_frameIndex;
} else { } else {
if (_status == kActorStatus3) if (_status == kActorStatus3)
updateStatus(kActorStatus7); updateStatus(kActorStatusPickupItem);
else else
updateStatus(kActorStatus20); updateStatus(kActorStatus20);
} }
@ -2201,7 +2201,7 @@ void Actor::updateStatusEnabled() {
if (_vm->getRandom(100) < 50 if (_vm->getRandom(100) < 50
&& (!getSpeech()->getSoundResourceId() || !getSound()->isPlaying(getSpeech()->getSoundResourceId())) && (!getSpeech()->getSoundResourceId() || !getSound()->isPlaying(getSpeech()->getSoundResourceId()))
&& isDefaultDirection(10)) && isDefaultDirection(10))
updateStatus(kActorStatus9); updateStatus(kActorStatusFidget);
_lastScreenUpdate = _vm->screenUpdateCount; _lastScreenUpdate = _vm->screenUpdateCount;
} }

View File

@ -961,7 +961,7 @@ IMPLEMENT_OPCODE(UpdateActor)
_processNextEntry = true; _processNextEntry = true;
return; return;
case kActorStatus7: case kActorStatusPickupItem:
actor->enable(); actor->enable();
break; break;

View File

@ -877,14 +877,14 @@ void Special::playSoundChapter3(Object *object, ActorIndex actorIndex) {
break; break;
case 1: case 1:
if (actor->getStatus() == kActorStatus9 if (actor->getStatus() == kActorStatusFidget
&& actor->isResourcePresent() && actor->isResourcePresent()
&& actor->getFrameIndex() == 0) && actor->getFrameIndex() == 0)
playSoundPanning(MAKE_RESOURCE(kResourcePackSharedSound, 1861), 22, actorIndex); playSoundPanning(MAKE_RESOURCE(kResourcePackSharedSound, 1861), 22, actorIndex);
break; break;
case 2: case 2:
if (actor->getStatus() == kActorStatus9 if (actor->getStatus() == kActorStatusFidget
&& actor->isResourcePresent() && actor->isResourcePresent()
&& actor->getFrameIndex() == 1) && actor->getFrameIndex() == 1)
playSoundPanning(MAKE_RESOURCE(kResourcePackSharedSound, 1892), 16, actorIndex); playSoundPanning(MAKE_RESOURCE(kResourcePackSharedSound, 1892), 16, actorIndex);

View File

@ -395,9 +395,9 @@ enum ActorStatus {
kActorStatusEnabled, // Standing Still kActorStatusEnabled, // Standing Still
kActorStatusDisabled, // 5 kActorStatusDisabled, // 5
kActorStatus6, kActorStatus6,
kActorStatus7, kActorStatusPickupItem,
kActorStatus8, kActorStatus8,
kActorStatus9, kActorStatusFidget,
kActorStatus10, kActorStatus10,
kActorStatus11, kActorStatus11,
kActorStatus12, kActorStatus12,