mirror of
https://github.com/zeldaret/tmc
synced 2026-07-29 23:48:33 -04:00
Clean up a couple of bools
This commit is contained in:
+8
-8
@@ -40,7 +40,7 @@ void sub_0809B3C4(Entity* this) {
|
||||
}
|
||||
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
InitAnimationForceUpdate(this, this->type + 0x39);
|
||||
InitAnimationForceUpdate(this, this->type + ITEM_QST_BOOK1);
|
||||
|
||||
switch (this->type2) {
|
||||
case 0:
|
||||
@@ -88,8 +88,8 @@ void sub_0809B4A8(Entity* this) {
|
||||
|
||||
this->action = 2;
|
||||
this->actionDelay = 30;
|
||||
this->speed = 64;
|
||||
this->direction = 16;
|
||||
this->speed = 0x40;
|
||||
this->direction = 0x10;
|
||||
|
||||
gPlayerState.pushedObject = TREE_THORNS;
|
||||
gPlayerState.queued_action = PLAYER_PUSH;
|
||||
@@ -100,7 +100,7 @@ void sub_0809B4A8(Entity* this) {
|
||||
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
|
||||
EnqueueSFX(SFX_10F);
|
||||
} else {
|
||||
this->actionDelay = 0x16;
|
||||
this->actionDelay = 22;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,12 +108,12 @@ void sub_0809B524(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->field_0xf == 0) {
|
||||
this->action = 3;
|
||||
this->y.HALF.HI += 32;
|
||||
this->z.HALF.HI -= 32;
|
||||
this->y.HALF.HI += 0x20;
|
||||
this->z.HALF.HI -= 0x20;
|
||||
} else {
|
||||
this->action = 1;
|
||||
this->actionDelay = 22;
|
||||
this->field_0x80.HALF.LO = 24;
|
||||
this->field_0x80.HALF.LO = 0x18;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ void sub_0809B5B4(Entity* this) {
|
||||
if (gPlayerState.flags & PL_MINISH) {
|
||||
sub_0800445C(this);
|
||||
} else if (IsCollidingPlayer(this)) {
|
||||
CreateItemEntity(this->type + 0x39, 0, 0);
|
||||
CreateItemEntity(this->type + ITEM_QST_BOOK1, 0, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,12 +33,11 @@ void sub_080860D8(FloatingPlatformEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0808611C(FloatingPlatformEntity* this) {
|
||||
int iVar2;
|
||||
bool32 iVar2 = sub_08086168(this);
|
||||
|
||||
iVar2 = sub_08086168(this);
|
||||
if (super->actionDelay != 0 && super->parent->actionDelay == 0) {
|
||||
|
||||
if (iVar2 != 0) {
|
||||
if (iVar2) {
|
||||
super->parent->actionDelay++;
|
||||
}
|
||||
|
||||
@@ -46,7 +45,7 @@ void sub_0808611C(FloatingPlatformEntity* this) {
|
||||
} else if (super->actionDelay == 0) {
|
||||
sub_080A2BE4(super, iVar2);
|
||||
} else {
|
||||
sub_080A2BE4(super, 0);
|
||||
sub_080A2BE4(super, FALSE);
|
||||
}
|
||||
|
||||
if (--this->unk70 == 0) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
extern const ScreenTransitionData gUnk_0813ABD0;
|
||||
|
||||
extern u32 sub_08079F8C(void);
|
||||
struct GyorgChildSpawns {
|
||||
s16 offsetX;
|
||||
s16 offsetY;
|
||||
|
||||
+10
-10
@@ -4,7 +4,7 @@
|
||||
extern u16 gUnk_08123318[];
|
||||
|
||||
static void sub_08097B24(Entity* this);
|
||||
static u32 sub_08097ADC(Entity* this);
|
||||
static bool32 sub_08097ADC(Entity* this);
|
||||
|
||||
void LilypadSmall(Entity* this) {
|
||||
u32 rand;
|
||||
@@ -29,19 +29,19 @@ void LilypadSmall(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
static u32 sub_08097ADC(Entity* this) {
|
||||
if ((gPlayerState.flags & PL_MINISH) == 0) {
|
||||
return 0;
|
||||
static bool32 sub_08097ADC(Entity* this) {
|
||||
if (!(gPlayerState.flags & PL_MINISH)) {
|
||||
return FALSE;
|
||||
} else if (EntityInRectRadius(this, &gPlayerEntity, 8, 8) == 0) {
|
||||
return 0;
|
||||
} else if (sub_08079F8C() == 0) {
|
||||
return 0;
|
||||
return FALSE;
|
||||
} else if (!sub_08079F8C()) {
|
||||
return FALSE;
|
||||
} else {
|
||||
gPlayerState.field_0x14 = 1;
|
||||
if (gPlayerEntity.z.HALF.HI != 0) {
|
||||
return 0;
|
||||
return FALSE;
|
||||
} else {
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ static void sub_08097B24(Entity* this) {
|
||||
u16* temp3;
|
||||
|
||||
if (--this->actionDelay == 0) {
|
||||
this->actionDelay = 0x5a;
|
||||
this->actionDelay = 90;
|
||||
this->frameIndex = (this->frameIndex + 1) & 3;
|
||||
}
|
||||
temp3 = gUnk_08123318;
|
||||
|
||||
Reference in New Issue
Block a user