summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2023-12-28 21:58:54 -0800
committertheo3 <arisstephenson2@gmail.com>2023-12-28 21:58:54 -0800
commitd07c41664190a12c4f56d2e71eae8aa41f40ce21 (patch)
tree5b5fcbabc56e46060cd64bb3db9e3f07a119c998 /src/object
parent56688ac226db420c7b8ee7080f7185da58437fbc (diff)
message definitions
Diffstat (limited to 'src/object')
-rw-r--r--src/object/bird.c12
-rw-r--r--src/object/book.c6
-rw-r--r--src/object/bush.c2
-rw-r--r--src/object/cameraTarget.c2
-rw-r--r--src/object/cloud.c2
-rw-r--r--src/object/crenelBeanSprout.c2
-rw-r--r--src/object/cutsceneMiscObject.c2
-rw-r--r--src/object/ezloCap.c4
-rw-r--r--src/object/fourElements.c2
-rw-r--r--src/object/frozenOctorok.c2
-rw-r--r--src/object/gleerokParticle.c2
-rw-r--r--src/object/itemForSale.c2
-rw-r--r--src/object/lilypadLarge.c4
-rw-r--r--src/object/linkAnimation.c2
-rw-r--r--src/object/moleMittsParticle.c2
-rw-r--r--src/object/octorokBossObject.c2
-rw-r--r--src/object/well.c2
-rw-r--r--src/object/windTribeTeleporter.c12
18 files changed, 32 insertions, 32 deletions
diff --git a/src/object/bird.c b/src/object/bird.c
index 2b4b0dac..485c0695 100644
--- a/src/object/bird.c
+++ b/src/object/bird.c
@@ -225,7 +225,7 @@ void Bird_Type8(BirdEntity* this) {
super->speed = 0x300;
}
- if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.doTextBox & 0x7f) == 0 &&
+ if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.state & MESSAGE_ACTIVE) == 0 &&
gPlayerEntity.action != PLAYER_SLEEP && gPlayerEntity.action != PLAYER_BOUNCE &&
gPlayerEntity.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB &&
gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_PARACHUTE &&
@@ -240,21 +240,21 @@ void Bird_Type8(BirdEntity* this) {
super->speed = 0x300;
this->gravity = Q_8_8(-32.0);
PlayerDropHeldObject();
- sub_08078B48();
+ PausePlayer();
ResetPlayerAnimationAndAction();
PutAwayItems();
gPlayerState.swim_state = 0;
gPlayerState.jump_status = 0;
gPlayerEntity.flags &= ~0x80;
gPlayerEntity.spriteSettings.draw = 0;
- gPriorityHandler.sys_priority = 6;
+ gPriorityHandler.event_priority = 6;
gPauseMenuOptions.disabled = 1;
}
}
}
break;
default:
- sub_08078B48();
+ PausePlayer();
gPlayerEntity.spriteSettings.draw = 0;
break;
}
@@ -313,7 +313,7 @@ void Bird_Type9(BirdEntity* this) {
SoundReq(SFX_123);
super->spritePriority.b1 = 2;
InitAnimationForceUpdate(super, 0);
- sub_08078B48();
+ PausePlayer();
} else if (super->action == 1) {
gPlayerEntity.spriteSettings.draw = 0;
child = super->child;
@@ -324,7 +324,7 @@ void Bird_Type9(BirdEntity* this) {
child->spriteRendering.b3 = super->spriteRendering.b3;
child->spriteOrientation.flipY = super->spriteOrientation.flipY;
}
- sub_08078B48();
+ PausePlayer();
if (gRoomControls.scroll_x + 0x78 < super->x.HALF.HI) {
super->action++;
super->spritePriority.b1 = 1;
diff --git a/src/object/book.c b/src/object/book.c
index 36f76c6a..4ebd3f7d 100644
--- a/src/object/book.c
+++ b/src/object/book.c
@@ -208,10 +208,10 @@ void Book_Action5(BookEntity* this) {
break;
}
case 1: {
- u8 doTextBox = gMessage.doTextBox & 0x7f;
- if (!doTextBox) {
+ u8 status = gMessage.state & MESSAGE_ACTIVE;
+ if (!status) {
super->spriteSettings.draw = 1;
- super->subAction = doTextBox;
+ super->subAction = status;
}
break;
}
diff --git a/src/object/bush.c b/src/object/bush.c
index e12d3883..857e63f7 100644
--- a/src/object/bush.c
+++ b/src/object/bush.c
@@ -38,7 +38,7 @@ void Bush(BushEntity* this) {
Bush_Action1,
Bush_Action2,
};
- if (!EntityIsDeleted(super)) {
+ if (!EntityDisabled(super)) {
Bush_Actions[super->action](this);
}
}
diff --git a/src/object/cameraTarget.c b/src/object/cameraTarget.c
index e19d0499..e21b2f7d 100644
--- a/src/object/cameraTarget.c
+++ b/src/object/cameraTarget.c
@@ -53,7 +53,7 @@ void CameraTarget(Entity* this) {
case FUSION_STATE_0:
case FUSION_STATE_1:
case FUSION_STATE_2:
- if ((gMessage.doTextBox & 0x7f) == 0) {
+ if ((gMessage.state & MESSAGE_ACTIVE) == 0) {
break;
}
default:
diff --git a/src/object/cloud.c b/src/object/cloud.c
index 1252aca6..9f99213d 100644
--- a/src/object/cloud.c
+++ b/src/object/cloud.c
@@ -104,7 +104,7 @@ void sub_0809F5F0(CloudEntity* this) {
super->action = 2;
super->timer = 120;
SetPlayerControl(3);
- sub_08078B48();
+ PausePlayer();
gRoomControls.camera_target = super;
}
}
diff --git a/src/object/crenelBeanSprout.c b/src/object/crenelBeanSprout.c
index 74db801c..7480ba07 100644
--- a/src/object/crenelBeanSprout.c
+++ b/src/object/crenelBeanSprout.c
@@ -266,7 +266,7 @@ void CrenelBeanSprout_Action6(CrenelBeanSproutEntity* this) {
CrenelBeanSprout_Action6SubAction2,
};
if (super->subAction != 2) {
- sub_08078B48();
+ PausePlayer();
}
CrenelBeanSprout_Action6SubActions[super->subAction](this);
}
diff --git a/src/object/cutsceneMiscObject.c b/src/object/cutsceneMiscObject.c
index 00fdc5e7..44fc603f 100644
--- a/src/object/cutsceneMiscObject.c
+++ b/src/object/cutsceneMiscObject.c
@@ -457,7 +457,7 @@ void CutsceneMiscObject_Type7(CutsceneMiscObjectEntity* this) {
}
break;
case 2:
- if ((gMessage.doTextBox & 0x7F) == 0) {
+ if ((gMessage.state & MESSAGE_ACTIVE) == 0) {
CreateItemEntity(ITEM_JABBERNUT, 0, 0);
DeleteThisEntity();
}
diff --git a/src/object/ezloCap.c b/src/object/ezloCap.c
index 6465dad9..4c7f39bb 100644
--- a/src/object/ezloCap.c
+++ b/src/object/ezloCap.c
@@ -81,11 +81,11 @@ void EzloCap_Type0Action1(EzloCapEntity* this) {
static const u8 gUnk_0811F16C[] = { 4, 0, 2, 6, 10, 8, 9, 5, 1, 0, 0, 0 };
u32 tmp = gPlayerEntity.palette.b.b0;
super->palette.b.b0 = tmp;
- if ((gMessage.doTextBox & 0x7f) == 0) {
+ if ((gMessage.state & MESSAGE_ACTIVE) == 0) {
DeleteEntity(super);
return;
}
- if ((gMessage.doTextBox & 0x7f) != 5) {
+ if ((gMessage.state & MESSAGE_ACTIVE) != 5) {
if (((gMessage.unk == 0xa) || (gMessage.unk == 0)) || ((gMessage.unk & 0xf) > 9)) {
if (super->animIndex != (super->subtimer | 3)) {
InitAnimationForceUpdate(super, super->subtimer | 3);
diff --git a/src/object/fourElements.c b/src/object/fourElements.c
index 1c3942ea..bb99e701 100644
--- a/src/object/fourElements.c
+++ b/src/object/fourElements.c
@@ -138,7 +138,7 @@ void FourElements_Action5(FourElementsEntity* this) {
void FourElements_Action6(FourElementsEntity* this) {
RequestPriorityDuration(NULL, 10);
- if ((gMessage.doTextBox & 0x7f) == 0) {
+ if ((gMessage.state & MESSAGE_ACTIVE) == 0) {
SetPriorityTimer(90);
gPlayerState.controlMode = 1;
EnablePauseMenu();
diff --git a/src/object/frozenOctorok.c b/src/object/frozenOctorok.c
index 540a85dd..089436dc 100644
--- a/src/object/frozenOctorok.c
+++ b/src/object/frozenOctorok.c
@@ -267,7 +267,7 @@ void FrozenOctorok_Action1SubAction0(FrozenOctorokEntity* this) {
void FrozenOctorok_Action1SubAction1(FrozenOctorokEntity* this) {
Entity* obj;
- if ((gMessage.doTextBox & 0x7f) == 0) {
+ if ((gMessage.state & MESSAGE_ACTIVE) == 0) {
if (this->unk_79-- == 0) {
obj = CreateObjectWithParent(super, FROZEN_OCTOROK, 7, 0);
if (obj != NULL) {
diff --git a/src/object/gleerokParticle.c b/src/object/gleerokParticle.c
index 5595ccda..67efcb36 100644
--- a/src/object/gleerokParticle.c
+++ b/src/object/gleerokParticle.c
@@ -82,7 +82,7 @@ void GleerokParticle_Init(GleerokParticleEntity* this) {
DeleteThisEntity();
}
}
- sub_08078B48();
+ PausePlayer();
return;
case 0:
super->direction = gUnk_081229D0[super->type2].direction;
diff --git a/src/object/itemForSale.c b/src/object/itemForSale.c
index 9a87f5c6..0106fb63 100644
--- a/src/object/itemForSale.c
+++ b/src/object/itemForSale.c
@@ -96,7 +96,7 @@ void ItemForSale_Action1(ItemForSaleEntity* this) {
if (super->interactType != INTERACTION_NONE) {
super->interactType = INTERACTION_NONE;
super->subAction = 1;
- sub_08078B48();
+ PausePlayer();
ResetActiveItems();
gPlayerState.heldObject = 4;
gNewPlayerEntity.unk_74 = super;
diff --git a/src/object/lilypadLarge.c b/src/object/lilypadLarge.c
index 5c1e9949..5571ca47 100644
--- a/src/object/lilypadLarge.c
+++ b/src/object/lilypadLarge.c
@@ -325,7 +325,7 @@ void LilypadLarge_Action2(LilypadLargeEntity* this) {
};
subActionFuncs[super->subAction](this);
gPlayerState.flags |= PL_FLAGS2;
- sub_08078B48();
+ PausePlayer();
}
void sub_08085A44(LilypadLargeEntity* this) {
@@ -460,7 +460,7 @@ void sub_08085D28(LilypadLargeEntity* this) {
(GetRelativeCollisionTile(super, 0, 0x18) == 0x11)) {
super->action = 2;
super->subAction = 0;
- sub_08078B48();
+ PausePlayer();
}
}
diff --git a/src/object/linkAnimation.c b/src/object/linkAnimation.c
index c811373c..5f790559 100644
--- a/src/object/linkAnimation.c
+++ b/src/object/linkAnimation.c
@@ -93,7 +93,7 @@ void LinkAnimation_ItemGet(LinkAnimationEntity* this) {
break;
case ITEMGET_WAIT:
UpdateAnimationSingleFrame(super);
- if ((gMessage.doTextBox & 0x7f) != 0) {
+ if ((gMessage.state & MESSAGE_ACTIVE) != 0) {
return;
}
if (super->frame & ANIM_DONE) {
diff --git a/src/object/moleMittsParticle.c b/src/object/moleMittsParticle.c
index 93a0379c..02f3e72e 100644
--- a/src/object/moleMittsParticle.c
+++ b/src/object/moleMittsParticle.c
@@ -18,7 +18,7 @@ void MoleMittsParticle(Entity* this) {
MoleMittsParticle_Init,
MoleMittsParticle_Action1,
};
- if (!EntityIsDeleted(this)) {
+ if (!EntityDisabled(this)) {
MoleMittsParticle_Actions[this->action](this);
}
}
diff --git a/src/object/octorokBossObject.c b/src/object/octorokBossObject.c
index 4619d170..1410d0d1 100644
--- a/src/object/octorokBossObject.c
+++ b/src/object/octorokBossObject.c
@@ -316,7 +316,7 @@ void OctorokBossObject_Action1(OctorokBossObjectEntity* this) {
}
break;
case 9:
- sub_08078B48();
+ PausePlayer();
if ((this->unk_78.WORD_U)-- == 0) {
gRoomControls.camera_target = &gPlayerEntity;
DeleteThisEntity();
diff --git a/src/object/well.c b/src/object/well.c
index 8b26a476..ed033493 100644
--- a/src/object/well.c
+++ b/src/object/well.c
@@ -40,7 +40,7 @@ void Well_Init(WellEntity* this) {
void Well_Action1(WellEntity* this) {
u32 tileIndex = GetTileType(this->unk_80, 1);
if (tileIndex != 0x407D) {
- sub_08078B48();
+ PausePlayer();
gPlayerEntity.x.WORD = super->x.WORD;
gPlayerEntity.y.HALF.HI = super->y.HALF.HI + 4;
DeleteThisEntity();
diff --git a/src/object/windTribeTeleporter.c b/src/object/windTribeTeleporter.c
index 997a91d0..fd785ab9 100644
--- a/src/object/windTribeTeleporter.c
+++ b/src/object/windTribeTeleporter.c
@@ -21,7 +21,7 @@ void WindTribeTeleporter_Action1(WindTribeTeleporterEntity*);
void WindTribeTeleporter_Action2(WindTribeTeleporterEntity*);
void WindTribeTeleporter_Action3(WindTribeTeleporterEntity*);
void sub_080A11E0(WindTribeTeleporterEntity*);
-bool32 sub_080A11C0(WindTribeTeleporterEntity*);
+static bool32 PlayerCollidingTeleporter(WindTribeTeleporterEntity*);
void WindTribeTeleporter(WindTribeTeleporterEntity* this) {
static void (*const WindTribeTeleporter_Actions[])(WindTribeTeleporterEntity*) = {
@@ -40,11 +40,11 @@ void WindTribeTeleporter_Init(WindTribeTeleporterEntity* this) {
super->spritePriority.b0 = 7;
super->hitbox = (Hitbox*)&gHitbox_22;
SetEntityPriority(super, 6);
- if (sub_080A11C0(this)) {
+ if (PlayerCollidingTeleporter(this)) {
gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
SetPlayerControl(CONTROL_DISABLED);
- sub_08078B48();
+ PausePlayer();
SetPlayerEventPriority();
SoundReq(SFX_112);
super->action = 3;
@@ -54,12 +54,12 @@ void WindTribeTeleporter_Init(WindTribeTeleporterEntity* this) {
}
void WindTribeTeleporter_Action1(WindTribeTeleporterEntity* this) {
- if (sub_080A11C0(this)) {
+ if (PlayerCollidingTeleporter(this)) {
if (this->unk_68 == 0) {
gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
SetPlayerControl(CONTROL_DISABLED);
- sub_08078B48();
+ PausePlayer();
SetPlayerEventPriority();
SoundReq(SFX_112);
super->action = 2;
@@ -177,7 +177,7 @@ void WindTribeTeleporter_Action3(WindTribeTeleporterEntity* this) {
}
}
-bool32 sub_080A11C0(WindTribeTeleporterEntity* this) {
+static bool32 PlayerCollidingTeleporter(WindTribeTeleporterEntity* this) {
if (gPlayerEntity.z.HALF.HI != 0) {
return FALSE;
} else {