summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-01-29 16:21:57 +0200
committerTal Hayon <talhayon1@gmail.com>2022-01-30 00:32:10 +0200
commitb4f8429a2c951dbf6b92edd865f6a63c166301cb (patch)
tree898ba9d60e688da0ba432f7d70e421c898ea34da /src/object
parentd34aa9166f5d9f7958e586ae1daee3224eb11fa5 (diff)
Use PlayerFlags where possible
Diffstat (limited to 'src/object')
-rw-r--r--src/object/bigPushableLever.c2
-rw-r--r--src/object/gyorgBossObject.c4
-rw-r--r--src/object/lilypadLarge.c10
-rw-r--r--src/object/object86.c2
-rw-r--r--src/object/pushableLever.c2
5 files changed, 10 insertions, 10 deletions
diff --git a/src/object/bigPushableLever.c b/src/object/bigPushableLever.c
index 71f10a90..5c36d40b 100644
--- a/src/object/bigPushableLever.c
+++ b/src/object/bigPushableLever.c
@@ -60,7 +60,7 @@ void BigPushableLever_Idle(BigPushableLeverEntity* this) {
if (sub_08079F8C()) {
gPlayerState.pushedObject = 0x98;
gPlayerState.queued_action = 5;
- gPlayerState.flags |= 1;
+ gPlayerState.flags |= PL_BUSY;
gPlayerEntity.x.HALF.LO = 0;
gPlayerEntity.y.HALF.LO = 0;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
diff --git a/src/object/gyorgBossObject.c b/src/object/gyorgBossObject.c
index 3bef5d5f..d0cdb38d 100644
--- a/src/object/gyorgBossObject.c
+++ b/src/object/gyorgBossObject.c
@@ -90,7 +90,7 @@ void sub_080A1704(GyorgBossObjectEntity* this) {
this->unk_76 = 0xc0;
this->unk_78 = 0xc0;
gRoomTransition.field_0x39 = 1;
- gPlayerState.flags |= 0x20000;
+ gPlayerState.flags |= PL_FLAGS20000;
gPlayerState.startPosX = gRoomControls.origin_x + 0x200;
gPlayerState.startPosY = gRoomControls.origin_y + 0x210;
#ifndef EU
@@ -219,7 +219,7 @@ void sub_080A1B4C(GyorgBossObjectEntity* this) {
this->unk_6e = 0x1a4;
super->direction = 0;
super->speed = 0x60;
- gPlayerState.flags &= ~0x20000;
+ gPlayerState.flags &= ~PL_FLAGS20000;
CopyPosition(&gPlayerEntity, super);
gRoomControls.camera_target = super;
SetPlayerControl(2);
diff --git a/src/object/lilypadLarge.c b/src/object/lilypadLarge.c
index 9a7fe9d4..5b4bbd02 100644
--- a/src/object/lilypadLarge.c
+++ b/src/object/lilypadLarge.c
@@ -96,7 +96,7 @@ ASM_FUNC("asm/non_matching/lilypadLarge/sub_080855E8.inc", void sub_080855E8(Lil
void sub_08085A1C(LilypadLargeEntity* this) {
gUnk_0812062C[super->subAction](this);
- gPlayerState.flags |= 2;
+ gPlayerState.flags |= PL_FLAGS2;
sub_08078B48();
}
@@ -196,7 +196,7 @@ void sub_08085C5C(LilypadLargeEntity* this) {
gPlayerEntity.speed = super->speed;
gPlayerEntity.direction = super->direction;
LinearMoveUpdate(&gPlayerEntity);
- gPlayerState.flags |= 2;
+ gPlayerState.flags |= PL_FLAGS2;
if (super->collisionLayer == 1) {
ResetCollisionLayer(&gPlayerEntity);
} else {
@@ -228,7 +228,7 @@ void sub_08085D10(LilypadLargeEntity* this) {
}
void sub_08085D28(LilypadLargeEntity* this) {
- if (((gPlayerState.framestate != PL_STATE_TALKEZLO) && ((gPlayerState.flags & 2) != 0)) &&
+ if (((gPlayerState.framestate != PL_STATE_TALKEZLO) && ((gPlayerState.flags & PL_FLAGS2) != 0)) &&
(sub_080002B4(super, 0, 0x18) == 0x11)) {
super->action = 2;
super->subAction = 0;
@@ -239,7 +239,7 @@ void sub_08085D28(LilypadLargeEntity* this) {
NONMATCH("asm/non_matching/lilypadLarge/sub_08085D60.inc", void sub_08085D60(LilypadLargeEntity* this)) {
u32 r4; // horizontal direction?
u32 r6; // vertical direction?
- if ((gPlayerState.flags & 2) != 0) {
+ if ((gPlayerState.flags & PL_FLAGS2) != 0) {
if (gPlayerState.framestate != PL_STATE_DIE) {
if (gPlayerState.jump_status == 0) {
if ((super->direction & 7) == 0) { // North or South
@@ -351,7 +351,7 @@ void sub_08085F48(LilypadLargeEntity* this) {
super->actionDelay = 0;
}
} else {
- if ((gPlayerState.flags & 2) != 0) {
+ if ((gPlayerState.flags & PL_FLAGS2) != 0) {
if (super->actionDelay != 0) {
if (this->unk_78.WORD_U < 0x1200000) {
this->unk_78.WORD_U += 0x8000;
diff --git a/src/object/object86.c b/src/object/object86.c
index e6968b42..38692deb 100644
--- a/src/object/object86.c
+++ b/src/object/object86.c
@@ -69,5 +69,5 @@ void sub_08099ECC(Entity* this) {
CopyPosition(this, &gPlayerEntity);
gPlayerState.queued_action = PLAYER_FALL;
gPlayerState.field_0x34[4] = 0;
- gPlayerState.flags |= 0x8000;
+ gPlayerState.flags |= PL_FLAGS8000;
}
diff --git a/src/object/pushableLever.c b/src/object/pushableLever.c
index dff5ed9a..503f75d2 100644
--- a/src/object/pushableLever.c
+++ b/src/object/pushableLever.c
@@ -59,7 +59,7 @@ void PushableLever_Idle(PushableLeverEntity* this) {
if (sub_08079F8C()) {
gPlayerState.pushedObject = 0x90;
gPlayerState.queued_action = 5;
- gPlayerState.flags |= 1;
+ gPlayerState.flags |= PL_BUSY;
gPlayerEntity.x.HALF.LO = 0;
gPlayerEntity.y.HALF.LO = 0;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;