summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbot02 <jtp.jtp@gmx.de>2026-09-27 17:57:44 +0000
committerGitHub <noreply@github.com>2026-09-27 17:57:44 +0000
commit6fb6dfb4a7efbe24d0fd1dda5097af6131faacde (patch)
tree8d1e080989250a2806732e7a1a53d73c07024080
parentd92d4581e202ae531bdcc206a7d6a90ddb8fd907 (diff)
parentecae1f4ded5f8e4eeb66ef6a20864132cc466ff5 (diff)
Merge pull request #708 from Henny022p/link-fireHEADmaster
document link fire
-rw-r--r--include/player.h12
-rw-r--r--src/collision.c6
-rw-r--r--src/enemy/beetle.c2
-rw-r--r--src/enemy/enemy50.c2
-rw-r--r--src/enemy/ghini.c2
-rw-r--r--src/enemy/gibdo.c2
-rw-r--r--src/enemy/likeLike.c2
-rw-r--r--src/enemy/pesto.c2
-rw-r--r--src/enemy/rupeeLike.c2
-rw-r--r--src/object/linkFire.c38
-rw-r--r--src/player.c4
-rw-r--r--src/playerUtils.c2
-rw-r--r--src/projectile/v1DarkMagicProjectile.c2
13 files changed, 39 insertions, 39 deletions
diff --git a/include/player.h b/include/player.h
index 3248f04f..834626c5 100644
--- a/include/player.h
+++ b/include/player.h
@@ -263,10 +263,10 @@ typedef struct {
typedef enum {
INPUT_USE_ITEM1 = 0x1, // A
INPUT_USE_ITEM2 = 0x2, // B
- INPUT_INTERACT = 0x8, // A sub_080782C0, sub_0807953C, PlayerUpdateSwimming, sub_08076518. ItemForSale_Action2
- INPUT_CANCEL = 0x10, // B sub_0807953C, ToggleDiving, sub_08076518, ItemForSale_Action2
- INPUT_CONTEXT = 0x20, // R sub_0807953C
- INPUT_40 = 0x40, // A CrenelBeanSprout_Action1
+ INPUT_INTERACT = 0x8, // A sub_080782C0, PlayerInputPressed, PlayerUpdateSwimming, sub_08076518, ItemForSale_Action2
+ INPUT_CANCEL = 0x10, // B PlayerInputPressed, ToggleDiving, sub_08076518, ItemForSale_Action2
+ INPUT_CONTEXT = 0x20, // R PlayerInputPressed
+ INPUT_40 = 0x40, // A CrenelBeanSprout_Action1
INPUT_ACTION =
0x80, // R sub_08073584, IsPreventedFromUsingItem, sub_080782C0, CrenelBeanSprout_Action1, ItemForSale_Action2
INPUT_RIGHT = 0x100,
@@ -763,7 +763,7 @@ void InitItemGetSequence(u32, u32, u32);
void sub_0807B7D8(u32 tileType, u32 tilePos, u32 layer);
void SetInteractableObjectCollision(Entity*, u32, u32, const void*);
void sub_08079D84(void);
-u32 sub_0807953C(void);
+u32 PlayerInputPressed(void);
void sub_0807BB68(const s16*, u32, u32);
void SetTileByIndex(u32 tileIndex, u32 tilePos, u32 layer);
void RestorePrevTileEntity(u32 tilePos, u32 layer);
@@ -801,7 +801,7 @@ void PausePlayer(void);
void sub_08078E84(Entity*, Entity*);
void sub_08078FB0(Entity*);
void sub_080792BC(s32, u32, u32);
-u32 sub_0807953C(void);
+u32 PlayerInputPressed(void);
void sub_08079BD8(Entity*);
u32 sub_08079D48();
void sub_08079D84(void);
diff --git a/src/collision.c b/src/collision.c
index aea865bf..68d915c7 100644
--- a/src/collision.c
+++ b/src/collision.c
@@ -326,7 +326,7 @@ CollisionResult sub_08017F40(Entity* org, Entity* tgt, u32 direction, ColSetting
CollisionResult sub_0801802C(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
CollisionResult sub_08017DD4(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
CollisionResult sub_080180E8(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
-CollisionResult sub_08017BBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
+CollisionResult CollisionFire(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
CollisionResult sub_08017C40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
CollisionResult sub_08017D6C(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
CollisionResult sub_08017D28(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
@@ -351,7 +351,7 @@ const CollisionHandler gCollisionHandlers[] = {
sub_0801802C,
sub_08017DD4,
sub_080180E8,
- sub_08017BBC,
+ CollisionFire,
sub_08017C40,
sub_08017D6C,
sub_08017D28,
@@ -409,7 +409,7 @@ CollisionResult sub_08017B58(Entity* org, Entity* tgt, u32 direction, ColSetting
return RESULT_COLLISION;
}
-CollisionResult sub_08017BBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
+CollisionResult CollisionFire(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
if ((gPlayerState.flags & (PL_BUSY | PL_MINISH | PL_BURNING | PL_IN_MINECART)) == 0) {
Entity* e = CreateObject(LINK_FIRE, 1, 0);
if (e != NULL) {
diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c
index 934e308a..59932f30 100644
--- a/src/enemy/beetle.c
+++ b/src/enemy/beetle.c
@@ -237,7 +237,7 @@ void sub_08021B64(BeetleEntity* this) {
s32 iVar4 = 1;
if (gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_CAPE) {
- if (sub_0807953C())
+ if (PlayerInputPressed())
iVar4 = super->type * 3 + 8;
iVar4 = super->timer - iVar4;
diff --git a/src/enemy/enemy50.c b/src/enemy/enemy50.c
index 13aefd52..d0cc1eab 100644
--- a/src/enemy/enemy50.c
+++ b/src/enemy/enemy50.c
@@ -301,7 +301,7 @@ void Enemy50_Action9(Enemy50Entity* this) {
if ((super->frame & 1) != 0) {
sub_0803F6C0(this);
}
- if (sub_0807953C()) {
+ if (PlayerInputPressed()) {
this->unk_78 += 8;
}
if (gPlayerEntity.base.health == 0) {
diff --git a/src/enemy/ghini.c b/src/enemy/ghini.c
index 9fb7dd7c..9376f439 100644
--- a/src/enemy/ghini.c
+++ b/src/enemy/ghini.c
@@ -257,7 +257,7 @@ void Ghini_Action9(GhiniEntity* this) {
if ((super->frame & 1) != 0) {
sub_0803F6C0(this);
}
- if (sub_0807953C() != 0) {
+ if (PlayerInputPressed() != 0) {
this->unk_78 += 0xc;
}
if (gPlayerEntity.base.health == 0) {
diff --git a/src/enemy/gibdo.c b/src/enemy/gibdo.c
index a7ad5224..96dfe811 100644
--- a/src/enemy/gibdo.c
+++ b/src/enemy/gibdo.c
@@ -315,7 +315,7 @@ void sub_080379BC(GibdoEntity* this) {
}
bool32 sub_080379EC(GibdoEntity* this) {
- if (sub_0807953C() != 0) {
+ if (PlayerInputPressed() != 0) {
if (--super->timer == 0) {
sub_08037A58(this);
return TRUE;
diff --git a/src/enemy/likeLike.c b/src/enemy/likeLike.c
index b69bfde1..e832d221 100644
--- a/src/enemy/likeLike.c
+++ b/src/enemy/likeLike.c
@@ -191,7 +191,7 @@ void sub_0802805C(LikeLikeEntity* this) {
UpdateAnimationVariableFrames(super, 2);
- if (sub_0807953C()) {
+ if (PlayerInputPressed()) {
u32 tmp2 = Random();
u32 tmp3 = super->subtimer + 1;
tmp3 += (tmp2 & 1);
diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c
index 86078197..372e16e8 100644
--- a/src/enemy/pesto.c
+++ b/src/enemy/pesto.c
@@ -832,7 +832,7 @@ u32 sub_08024E34(void) {
void sub_08024E4C(PestoEntity* this) {
if (this->unk_83 == 3) {
super->subtimer = ++super->subtimer & 0x1f;
- if (sub_0807953C()) {
+ if (PlayerInputPressed()) {
u32 r = Random();
this->unk_84++;
r &= 1;
diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c
index 7344e387..f96c6dde 100644
--- a/src/enemy/rupeeLike.c
+++ b/src/enemy/rupeeLike.c
@@ -171,7 +171,7 @@ void sub_0802953C(RupeeLikeEntity* this) {
sub_080296C8(this);
sub_080296C8(this);
- if (sub_0807953C() != 0) {
+ if (PlayerInputPressed() != 0) {
super->subtimer++;
}
if (super->timer != 0) {
diff --git a/src/object/linkFire.c b/src/object/linkFire.c
index b208398f..46331a19 100644
--- a/src/object/linkFire.c
+++ b/src/object/linkFire.c
@@ -14,54 +14,54 @@ typedef struct {
/*0x6c*/ u16 unk_6c;
} LinkFireEntity;
-void sub_0808DDB4(LinkFireEntity*);
-void sub_0808DDE0(LinkFireEntity*);
-void sub_0808DDE8(LinkFireEntity*);
+void LinkFire_Init(LinkFireEntity*);
+void LinkFire_Update_Type0(LinkFireEntity*);
+void LinkFire_Update_Type1(LinkFireEntity*);
void LinkFire(LinkFireEntity* this) {
- static void (*const gUnk_081217A8[])(LinkFireEntity*) = {
- sub_0808DDB4,
- sub_0808DDE0,
+ static void (*const sLinkFire_Type0_Actions[])(LinkFireEntity*) = {
+ LinkFire_Init,
+ LinkFire_Update_Type0,
};
- static void (*const gUnk_081217B0[])(LinkFireEntity*) = {
- sub_0808DDB4,
- sub_0808DDE8,
+ static void (*const sLinkFire_Type1_Actions[])(LinkFireEntity*) = {
+ LinkFire_Init,
+ LinkFire_Update_Type1,
};
if (super->type != 0) {
- gUnk_081217B0[super->action](this);
+ sLinkFire_Type1_Actions[super->action](this);
} else {
- gUnk_081217A8[super->action](this);
+ sLinkFire_Type0_Actions[super->action](this);
}
}
-void sub_0808DDB4(LinkFireEntity* this) {
+void LinkFire_Init(LinkFireEntity* this) {
super->action = 1;
if (super->type != 0) {
super->timer = 120;
this->unk_6c = 0xf0;
InitializeAnimation(super, 0);
- sub_0808DDE8(this);
+ LinkFire_Update_Type1(this);
}
}
-void sub_0808DDE0(LinkFireEntity* this) {
+void LinkFire_Update_Type0(LinkFireEntity* this) {
DeleteThisEntity();
}
-void sub_0808DDE8(LinkFireEntity* this) {
- static const s8 gUnk_081217B8[] = { 0, -6, 0, 6 };
+void LinkFire_Update_Type1(LinkFireEntity* this) {
+ static const s8 sLinkFire_PositionOffsets[] = { 0, -6, 0, 6 };
Entity* player;
this->unk_6c--;
- if (sub_0807953C()) {
+ if (PlayerInputPressed()) {
super->subtimer++;
}
- if (((0x1e < super->subtimer) || ((gPlayerState.flags & (PL_CAPTURED | PL_FROZEN | PL_IN_MINECART)) != 0)) ||
+ if ((30 < super->subtimer) || ((gPlayerState.flags & (PL_CAPTURED | PL_FROZEN | PL_IN_MINECART)) != 0) ||
(this->unk_6c == 0)) {
gPlayerState.flags &= ~PL_BURNING;
DeleteThisEntity();
}
player = &gPlayerEntity.base;
- super->x.HALF.HI = (s8)gUnk_081217B8[gPlayerEntity.base.animationState >> 1] + player->x.HALF.HI;
+ super->x.HALF.HI = sLinkFire_PositionOffsets[gPlayerEntity.base.animationState >> 1] + player->x.HALF.HI;
super->y.HALF.HI = gPlayerEntity.base.y.HALF.HI + -6;
super->z = gPlayerEntity.base.z;
super->collisionLayer = gPlayerEntity.base.collisionLayer;
diff --git a/src/player.c b/src/player.c
index e1cba46b..4619d606 100644
--- a/src/player.c
+++ b/src/player.c
@@ -1631,7 +1631,7 @@ static void sub_08071E04(PlayerEntity* this) {
}
sub_080792D8();
- if (sub_0807953C())
+ if (PlayerInputPressed())
super->timer -= 2;
else
super->timer--;
@@ -1723,7 +1723,7 @@ static void PlayerFrozenUpdate(PlayerEntity* this) {
sub_08079708(super);
} else {
if (gPlayerState.flags & PL_FROZEN) {
- if (sub_0807953C() != 0) {
+ if (PlayerInputPressed() != 0) {
super->timer -= 3;
super->spriteOffsetX = 2;
} else {
diff --git a/src/playerUtils.c b/src/playerUtils.c
index b417ff74..d0400d7a 100644
--- a/src/playerUtils.c
+++ b/src/playerUtils.c
@@ -1982,7 +1982,7 @@ void sub_08079520(Entity* this) {
}
}
-u32 sub_0807953C(void) {
+u32 PlayerInputPressed(void) {
u32 tmp = INPUT_ANY_DIRECTION | INPUT_CONTEXT | INPUT_CANCEL | INPUT_INTERACT;
return gPlayerState.playerInput.newInput & tmp;
}
diff --git a/src/projectile/v1DarkMagicProjectile.c b/src/projectile/v1DarkMagicProjectile.c
index b0a95ad3..9d90ea1f 100644
--- a/src/projectile/v1DarkMagicProjectile.c
+++ b/src/projectile/v1DarkMagicProjectile.c
@@ -218,7 +218,7 @@ void V1DarkMagicProjectile_Action3(V1DarkMagicProjectileEntity* this) {
}
void sub_080AAF74(V1DarkMagicProjectileEntity* this) {
- if (sub_0807953C() != 0) {
+ if (PlayerInputPressed() != 0) {
this->unk_80 += (Random() & 1) + 1;
}
if (++super->timer == 0x3c) {