mirror of https://github.com/zeldaret/tmc.git
Use PlayerActions enum in several places
This commit is contained in:
parent
fd9049f598
commit
b34067cb0b
|
@ -297,7 +297,7 @@ void sub_08028CE8(Entity* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_08028DE8(Entity* this) {
|
void sub_08028DE8(Entity* this) {
|
||||||
if (gPlayerEntity.action == 8) {
|
if (gPlayerEntity.action == PLAYER_ITEMGET) {
|
||||||
if (this->field_0x80.HALF.HI == 0) {
|
if (this->field_0x80.HALF.HI == 0) {
|
||||||
SetPlayerControl(1);
|
SetPlayerControl(1);
|
||||||
this->field_0x80.HALF.HI = 1;
|
this->field_0x80.HALF.HI = 1;
|
||||||
|
|
|
@ -182,7 +182,7 @@ void sub_080241C0(Entity* this) {
|
||||||
switch (this->field_0x80.HALF.LO) {
|
switch (this->field_0x80.HALF.LO) {
|
||||||
case 0:
|
case 0:
|
||||||
if (PlayerInRange(this, 3, (gPlayerState.hurtBlinkSpeed != 0) ? 0xa0 : 0x40) && sub_08049FDC(this, 3) &&
|
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->field_0x80.HALF.LO++;
|
||||||
this->speed = 0;
|
this->speed = 0;
|
||||||
sub_08024A14(this, 3, 10);
|
sub_08024A14(this, 3, 10);
|
||||||
|
@ -829,7 +829,7 @@ void sub_08024F50(Entity* this) {
|
||||||
gPlayerState.field_0xa = 0;
|
gPlayerState.field_0xa = 0;
|
||||||
gPlayerState.flags &= ~PL_DISABLE_ITEMS;
|
gPlayerState.flags &= ~PL_DISABLE_ITEMS;
|
||||||
CopyPosition(this, &gPlayerEntity);
|
CopyPosition(this, &gPlayerEntity);
|
||||||
gPlayerEntity.action = 1;
|
gPlayerEntity.action = PLAYER_NORMAL;
|
||||||
COLLISION_ON(&gPlayerEntity);
|
COLLISION_ON(&gPlayerEntity);
|
||||||
gPlayerEntity.iframes = -0x3c;
|
gPlayerEntity.iframes = -0x3c;
|
||||||
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
|
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
|
||||||
|
|
|
@ -80,7 +80,7 @@ static bool32 ShouldSpawnTreeItem(Entity* this) {
|
||||||
int expectedStateX, expectedStateY;
|
int expectedStateX, expectedStateY;
|
||||||
int playerState;
|
int playerState;
|
||||||
|
|
||||||
if (gPlayerEntity.action != 0x6) {
|
if (gPlayerEntity.action != PLAYER_BOUNCE) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -427,7 +427,7 @@ void sub_080594DC(ManagerF* this) {
|
||||||
#if defined(USA) || defined(DEMO_USA) || defined(DEMO_JP)
|
#if defined(USA) || defined(DEMO_USA) || defined(DEMO_JP)
|
||||||
void sub_08059548(ManagerF* this) {
|
void sub_08059548(ManagerF* this) {
|
||||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||||
if (gPlayerEntity.action == 0x16) {
|
if (gPlayerEntity.action == PLAYER_TALKEZLO) {
|
||||||
DeleteThisEntity();
|
DeleteThisEntity();
|
||||||
}
|
}
|
||||||
gInput.heldKeys |= 0x4;
|
gInput.heldKeys |= 0x4;
|
||||||
|
|
|
@ -64,7 +64,7 @@ void nullsub_110(void) {
|
||||||
|
|
||||||
void sub_080663D4(Entity* this) {
|
void sub_080663D4(Entity* this) {
|
||||||
if (this->x.HALF.HI == this->field_0x7c.HALF_U.HI - 8) {
|
if (this->x.HALF.HI == this->field_0x7c.HALF_U.HI - 8) {
|
||||||
if (gPlayerEntity.action != 0xf) {
|
if (gPlayerEntity.action != PLAYER_080720DC) {
|
||||||
this->action = 4;
|
this->action = 4;
|
||||||
this->direction = 0;
|
this->direction = 0;
|
||||||
this->speed = 0;
|
this->speed = 0;
|
||||||
|
@ -95,7 +95,7 @@ void sub_0806643C(Entity* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_08066474(void) {
|
void sub_08066474(void) {
|
||||||
if (gPlayerEntity.action != 0xf) {
|
if (gPlayerEntity.action != PLAYER_080720DC) {
|
||||||
gUnk_02034490[0] = 0;
|
gUnk_02034490[0] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ void sub_0806B540(Entity* this) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if ((gPlayerEntity.action != 8)) {
|
if ((gPlayerEntity.action != PLAYER_ITEMGET)) {
|
||||||
context->wait = 0x2d;
|
context->wait = 0x2d;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ void sub_080652E4(Entity* this) {
|
||||||
if (this->actionDelay != 0) {
|
if (this->actionDelay != 0) {
|
||||||
this->actionDelay -= 1;
|
this->actionDelay -= 1;
|
||||||
} else {
|
} else {
|
||||||
if (gPlayerEntity.action != 8) {
|
if (gPlayerEntity.action != PLAYER_ITEMGET) {
|
||||||
this->subAction += 1;
|
this->subAction += 1;
|
||||||
MessageNoOverlap(0x2c19, this);
|
MessageNoOverlap(0x2c19, this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ void sub_080929A4(Entity* this) {
|
||||||
// Probably related to knocking it down
|
// Probably related to knocking it down
|
||||||
void sub_08092A94(Entity* this) {
|
void sub_08092A94(Entity* this) {
|
||||||
// Check for the first frame of bonking animation
|
// Check for the first frame of bonking animation
|
||||||
if (gPlayerEntity.action != 6) {
|
if (gPlayerEntity.action != PLAYER_BOUNCE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -413,7 +413,7 @@ void sub_08094FA8(Object6AEntity* this) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (gPlayerEntity.action != 12) {
|
if (gPlayerEntity.action != PLAYER_EMPTYBOTTLE) {
|
||||||
super->action = 4;
|
super->action = 4;
|
||||||
#ifndef EU
|
#ifndef EU
|
||||||
if (!CheckGlobalFlag(BIN_DOGFOOD)) {
|
if (!CheckGlobalFlag(BIN_DOGFOOD)) {
|
||||||
|
|
Loading…
Reference in New Issue