Use PlayerActions enum in several places

This commit is contained in:
Tal Hayon
2022-01-29 15:43:09 +02:00
parent fd9049f598
commit b34067cb0b
9 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -297,7 +297,7 @@ void sub_08028CE8(Entity* this) {
}
void sub_08028DE8(Entity* this) {
if (gPlayerEntity.action == 8) {
if (gPlayerEntity.action == PLAYER_ITEMGET) {
if (this->field_0x80.HALF.HI == 0) {
SetPlayerControl(1);
this->field_0x80.HALF.HI = 1;
+2 -2
View File
@@ -182,7 +182,7 @@ void sub_080241C0(Entity* this) {
switch (this->field_0x80.HALF.LO) {
case 0:
if (PlayerInRange(this, 3, (gPlayerState.hurtBlinkSpeed != 0) ? 0xa0 : 0x40) && sub_08049FDC(this, 3) &&
gPlayerEntity.action != 0x1e) {
gPlayerEntity.action != PLAYER_USEENTRANCE) {
this->field_0x80.HALF.LO++;
this->speed = 0;
sub_08024A14(this, 3, 10);
@@ -829,7 +829,7 @@ void sub_08024F50(Entity* this) {
gPlayerState.field_0xa = 0;
gPlayerState.flags &= ~PL_DISABLE_ITEMS;
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.action = 1;
gPlayerEntity.action = PLAYER_NORMAL;
COLLISION_ON(&gPlayerEntity);
gPlayerEntity.iframes = -0x3c;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
+1 -1
View File
@@ -80,7 +80,7 @@ static bool32 ShouldSpawnTreeItem(Entity* this) {
int expectedStateX, expectedStateY;
int playerState;
if (gPlayerEntity.action != 0x6) {
if (gPlayerEntity.action != PLAYER_BOUNCE) {
return FALSE;
}