summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElliptic Ellipsis <elliptic.ellipsis@gmail.com>2022-03-18 23:16:15 +0000
committerElliptic Ellipsis <elliptic.ellipsis@gmail.com>2022-03-18 23:16:15 +0000
commit7780c76eac79febc6ad31a77e25637e2372522da (patch)
tree5310cb232f85b63dcff6f661c8c85fddb1d1af1b /src
parentd6c8cf025095f5e13d8dce1179bead030918320d (diff)
Correct type of sub_0806F520 and use it as a bool
Diffstat (limited to 'src')
-rw-r--r--src/enemy/chuchu.c2
-rw-r--r--src/enemy/enemy50.c2
-rw-r--r--src/enemy/ghini.c2
-rw-r--r--src/enemy/gyorgChild.c2
-rw-r--r--src/enemy/lakituCloud.c2
-rw-r--r--src/enemy/rope.c2
-rw-r--r--src/enemy/stalfos.c2
-rw-r--r--src/enemy/takkuri.c2
-rw-r--r--src/enemy/wisp.c2
-rw-r--r--src/projectile/lakituCloudProjectile.c2
-rw-r--r--src/projectile/spiderWeb.c2
-rw-r--r--src/projectile/stalfosProjectile.c2
-rw-r--r--src/projectile/v1DarkMagicProjectile.c2
-rw-r--r--src/projectile/v2Projectile.c2
14 files changed, 14 insertions, 14 deletions
diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c
index 9f23dd3b..34094ef5 100644
--- a/src/enemy/chuchu.c
+++ b/src/enemy/chuchu.c
@@ -123,7 +123,7 @@ void Chuchu_OnCollision(Entity* this) {
}
void Chuchu_OnGrabbed(Entity* this) {
- if (sub_0806F520(this) == 0 && this->confusedTime) {
+ if (!sub_0806F520(this) && this->confusedTime) {
Create0x68FX(this, FX_STARS);
InitializeAnimation(this, 6);
} else {
diff --git a/src/enemy/enemy50.c b/src/enemy/enemy50.c
index 2811e901..40bd1fde 100644
--- a/src/enemy/enemy50.c
+++ b/src/enemy/enemy50.c
@@ -154,7 +154,7 @@ void sub_08040D30(Enemy50Entity* this) {
}
void sub_08040D90(Enemy50Entity* this) {
- if (sub_0806F520()) {
+ if (sub_0806F520(super)) {
Enemy50_SubActions[super->subAction](this);
} else {
sub_08041128(this);
diff --git a/src/enemy/ghini.c b/src/enemy/ghini.c
index 7bd4179b..ab807ba0 100644
--- a/src/enemy/ghini.c
+++ b/src/enemy/ghini.c
@@ -113,7 +113,7 @@ void Ghini_OnConfused(GhiniEntity* this) {
}
void Ghini_OnGrabbed(GhiniEntity* this) {
- if (sub_0806F520()) {
+ if (sub_0806F520(super)) {
Ghini_SubActions[super->subAction](this);
} else {
sub_0803F51C(this);
diff --git a/src/enemy/gyorgChild.c b/src/enemy/gyorgChild.c
index 698ad03a..84bd4e6e 100644
--- a/src/enemy/gyorgChild.c
+++ b/src/enemy/gyorgChild.c
@@ -56,7 +56,7 @@ void GyorgChild_OnGrabbed(GyorgChildEntity* this) {
GyorgChild_OnGrabbed_Action1,
GyorgChild_OnGrabbed_Action3,
};
- if (sub_0806F520()) {
+ if (sub_0806F520(super)) {
GyorgChild_OnGrabbed_Actions[super->subAction](this);
}
}
diff --git a/src/enemy/lakituCloud.c b/src/enemy/lakituCloud.c
index 25616556..1c311f6c 100644
--- a/src/enemy/lakituCloud.c
+++ b/src/enemy/lakituCloud.c
@@ -34,7 +34,7 @@ void LakituCloud_OnKnockback(Entity* this) {
}
void LakituCloud_OnGrabbed(Entity* this) {
- if (sub_0806F520(this) == 0) {
+ if (!sub_0806F520(this)) {
if (this->subAction == 2) {
sub_0803CE3C(this);
}
diff --git a/src/enemy/rope.c b/src/enemy/rope.c
index 8d728a03..61f36bc5 100644
--- a/src/enemy/rope.c
+++ b/src/enemy/rope.c
@@ -39,7 +39,7 @@ void Rope_OnCollision(Entity* this) {
}
void Rope_OnGrabbed(Entity* this) {
- if (sub_0806F520()) {
+ if (sub_0806F520(this)) {
gUnk_080CE470[this->subAction](this);
}
}
diff --git a/src/enemy/stalfos.c b/src/enemy/stalfos.c
index 67f6b6e1..61512e7e 100644
--- a/src/enemy/stalfos.c
+++ b/src/enemy/stalfos.c
@@ -123,7 +123,7 @@ void sub_08039418(StalfosEntity* this) {
}
void sub_08039438(StalfosEntity* this) {
- if (sub_0806F520()) {
+ if (sub_0806F520(super)) {
Stalfos_SubActions[super->subAction](this);
}
}
diff --git a/src/enemy/takkuri.c b/src/enemy/takkuri.c
index dc28b862..a07b8330 100644
--- a/src/enemy/takkuri.c
+++ b/src/enemy/takkuri.c
@@ -74,7 +74,7 @@ void Takkuri_OnCollision(TakkuriEntity* this) {
void Takkuri_OnGrabbed(TakkuriEntity* this) {
gUnk_080CFF6C[super->subAction](this);
GetNextFrame(super);
- if (sub_0806F520(super) == 0) {
+ if (!sub_0806F520(super)) {
super->action = 2;
super->subAction = 0;
this->unk_0x84 = 2;
diff --git a/src/enemy/wisp.c b/src/enemy/wisp.c
index 94943d52..213453c2 100644
--- a/src/enemy/wisp.c
+++ b/src/enemy/wisp.c
@@ -69,7 +69,7 @@ void Wisp_OnCollision(Entity* this) {
}
void Wisp_OnGrabbed(Entity* this) {
- if (sub_0806F520() != 0) {
+ if (sub_0806F520(this)) {
gUnk_080CEB98[this->subAction](this);
}
}
diff --git a/src/projectile/lakituCloudProjectile.c b/src/projectile/lakituCloudProjectile.c
index f66dd20e..a766f97b 100644
--- a/src/projectile/lakituCloudProjectile.c
+++ b/src/projectile/lakituCloudProjectile.c
@@ -24,7 +24,7 @@ void nullsub_539(Entity* this) {
}
void sub_080A9CF0(Entity* this) {
- if (sub_0806F520() == 0) {
+ if (!sub_0806F520(this)) {
CreateFx(this, FX_DEATH, 0);
DeleteThisEntity();
}
diff --git a/src/projectile/spiderWeb.c b/src/projectile/spiderWeb.c
index 93951fad..8f24dae1 100644
--- a/src/projectile/spiderWeb.c
+++ b/src/projectile/spiderWeb.c
@@ -79,7 +79,7 @@ void sub_080AA78C(Entity* this) {
this->subAction = 1;
InitAnimationForceUpdate(this, animationState + 8);
}
- if (sub_0806F520(this) != 0) {
+ if (sub_0806F520(this)) {
UpdateAnimationSingleFrame(this);
if ((this->frame & 0x10) != 0) {
this->frame &= 0xef;
diff --git a/src/projectile/stalfosProjectile.c b/src/projectile/stalfosProjectile.c
index 841a68e3..3f8f679d 100644
--- a/src/projectile/stalfosProjectile.c
+++ b/src/projectile/stalfosProjectile.c
@@ -38,7 +38,7 @@ void sub_080A9A34(Entity* this) {
}
void sub_080A9A64(Entity* this) {
- if ((this->subAction < 3) && (sub_0806F520(this) == 0)) {
+ if ((this->subAction < 3) && !sub_0806F520(this)) {
sub_080A9BA8(this);
}
StalfosProjectile_SubActions[this->subAction](this);
diff --git a/src/projectile/v1DarkMagicProjectile.c b/src/projectile/v1DarkMagicProjectile.c
index aeca2aa3..8131c3d7 100644
--- a/src/projectile/v1DarkMagicProjectile.c
+++ b/src/projectile/v1DarkMagicProjectile.c
@@ -87,7 +87,7 @@ void sub_080AACE0(Entity* this) {
}
void sub_080AAD70(Entity* this) {
- if (sub_0806F520() == 0) {
+ if (!sub_0806F520(this)) {
this->health = 0;
}
V1DarkMagicProjectile_SubActions[this->subAction](this);
diff --git a/src/projectile/v2Projectile.c b/src/projectile/v2Projectile.c
index 3733945d..e2c86b53 100644
--- a/src/projectile/v2Projectile.c
+++ b/src/projectile/v2Projectile.c
@@ -62,7 +62,7 @@ void sub_080ABBF4(Entity* this) {
}
void sub_080ABC54(Entity* this) {
- if (sub_0806F520() == 0) {
+ if (!sub_0806F520(this)) {
CreateFx(this, FX_DEATH, 0);
DeleteThisEntity();
}