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

View File

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

View File

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

View File

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