message definitions

This commit is contained in:
theo3
2023-12-28 21:58:54 -08:00
parent 56688ac226
commit d07c416641
81 changed files with 200 additions and 206 deletions
+6 -6
View File
@@ -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;
+3 -3
View File
@@ -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;
}
+1 -1
View File
@@ -38,7 +38,7 @@ void Bush(BushEntity* this) {
Bush_Action1,
Bush_Action2,
};
if (!EntityIsDeleted(super)) {
if (!EntityDisabled(super)) {
Bush_Actions[super->action](this);
}
}
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -104,7 +104,7 @@ void sub_0809F5F0(CloudEntity* this) {
super->action = 2;
super->timer = 120;
SetPlayerControl(3);
sub_08078B48();
PausePlayer();
gRoomControls.camera_target = super;
}
}
+1 -1
View File
@@ -266,7 +266,7 @@ void CrenelBeanSprout_Action6(CrenelBeanSproutEntity* this) {
CrenelBeanSprout_Action6SubAction2,
};
if (super->subAction != 2) {
sub_08078B48();
PausePlayer();
}
CrenelBeanSprout_Action6SubActions[super->subAction](this);
}
+1 -1
View File
@@ -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();
}
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -82,7 +82,7 @@ void GleerokParticle_Init(GleerokParticleEntity* this) {
DeleteThisEntity();
}
}
sub_08078B48();
PausePlayer();
return;
case 0:
super->direction = gUnk_081229D0[super->type2].direction;
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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();
}
}
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -18,7 +18,7 @@ void MoleMittsParticle(Entity* this) {
MoleMittsParticle_Init,
MoleMittsParticle_Action1,
};
if (!EntityIsDeleted(this)) {
if (!EntityDisabled(this)) {
MoleMittsParticle_Actions[this->action](this);
}
}
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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();
+6 -6
View File
@@ -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 {