summaryrefslogtreecommitdiff
path: root/src/enemy
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-01-29 15:43:09 +0200
committerTal Hayon <talhayon1@gmail.com>2022-01-29 15:43:09 +0200
commitb34067cb0bdad6e63e830db22a17c5436c8ee9ca (patch)
tree06669acecded4eef9d828b14874fcc1c11fc4148 /src/enemy
parentfd9049f59801a77ced44d85329ee871fda031d22 (diff)
Use PlayerActions enum in several places
Diffstat (limited to 'src/enemy')
-rw-r--r--src/enemy/businessScrub.c2
-rw-r--r--src/enemy/pesto.c4
-rw-r--r--src/enemy/treeItem.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c
index 5a4bb18a..c47c119f 100644
--- a/src/enemy/businessScrub.c
+++ b/src/enemy/businessScrub.c
@@ -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;
diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c
index b52a69fc..6dbb1dbe 100644
--- a/src/enemy/pesto.c
+++ b/src/enemy/pesto.c
@@ -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;
diff --git a/src/enemy/treeItem.c b/src/enemy/treeItem.c
index 188476a4..3e5eca1e 100644
--- a/src/enemy/treeItem.c
+++ b/src/enemy/treeItem.c
@@ -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;
}