summaryrefslogtreecommitdiff
path: root/src/object/fairy.c
diff options
context:
space:
mode:
authorHenny022p <73211432+Henny022p@users.noreply.github.com>2026-02-08 18:32:38 +0100
committerGitHub <noreply@github.com>2026-02-08 18:32:38 +0100
commit5ab63f00e522ff69c5bc987e379f0163943f2833 (patch)
tree53622222ac729c6ab6dc75ef7f9bafa8031daf18 /src/object/fairy.c
parent73901a0a012d55ebb66a4627dcb246d19737fcb5 (diff)
parent5b2cafdc894823d57beee8f3947a391d881d91de (diff)
Merge pull request #701 from Henny022p/cleanup/250302HEADmaster
Various code cleanup changes
Diffstat (limited to 'src/object/fairy.c')
-rw-r--r--src/object/fairy.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/object/fairy.c b/src/object/fairy.c
index 0f2eb209..430da8d9 100644
--- a/src/object/fairy.c
+++ b/src/object/fairy.c
@@ -5,10 +5,13 @@
* @brief Fairy object
*/
#include "collision.h"
-#include "functions.h"
#include "hitbox.h"
-#include "item.h"
#include "object.h"
+#include "asm.h"
+#include "sound.h"
+#include "physics.h"
+#include "player.h"
+#include "scroll.h"
typedef struct {
/*0x00*/ Entity base;
@@ -33,7 +36,7 @@ void Fairy_SubAction0(FairyEntity*);
void Fairy_SubAction1(FairyEntity*);
void Fairy_SubAction2(FairyEntity*);
-extern void sub_08081404(Entity*, u32);
+extern void ItemOnGround_SetFlagAndDelete(Entity*, u32);
void Fairy(FairyEntity* this) {
static void (*const Fairy_Actions[])(FairyEntity*) = {
@@ -167,7 +170,7 @@ void Fairy_Action2(FairyEntity* this) {
ProcessMovement1(super);
if ((AnyPrioritySet() == 0) && (super->type2 == 0)) {
if (--this->unk_78 == 0) {
- sub_08081404(super, 0);
+ ItemOnGround_SetFlagAndDelete(super, FALSE);
}
if (this->unk_78 < 0x78) {
super->spriteSettings.draw ^= 1;
@@ -177,7 +180,7 @@ void Fairy_Action2(FairyEntity* this) {
void Fairy_Action3(FairyEntity* this) {
if (*(u16*)&super->child->kind != 0x308) {
- sub_08081404(super, 0);
+ ItemOnGround_SetFlagAndDelete(super, FALSE);
} else {
CopyPosition(super->child, super);
super->z.HALF.HI--;
@@ -214,7 +217,7 @@ void Fairy_Action4(FairyEntity* this) {
if (--super->subtimer == 0) {
super->subtimer = 6;
if (--super->spriteOffsetY < -0x16) {
- sub_08081404(super, 1);
+ ItemOnGround_SetFlagAndDelete(super, TRUE);
}
}
if (super->spriteOffsetY < -0x11) {