Correct type of sub_0806F520 and use it as a bool

This commit is contained in:
Elliptic Ellipsis 2022-03-18 23:16:15 +00:00
parent d6c8cf0250
commit 7780c76eac
15 changed files with 15 additions and 15 deletions

View File

@ -163,7 +163,7 @@ extern void sub_08060158(Entity*);
extern void sub_0806D02C(Entity*);
extern void sub_0806D0B0(Entity*);
extern void sub_0806F4E8(Entity*);
extern u32 sub_0806F520();
extern bool32 sub_0806F520(Entity*);
extern u32 sub_0806F5B0(u32);
extern u32 sub_0806F824(Entity*, Entity*, s32, s32);
extern u32 sub_0806F948(Entity*);

View File

@ -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 {

View File

@ -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);

View File

@ -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);

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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();
}

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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();
}