summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornotyourav <65437533+notyourav@users.noreply.github.com>2022-04-30 13:20:53 -0700
committerGitHub <noreply@github.com>2022-04-30 13:20:53 -0700
commit12f2ec8fd8858705ccec200e70be3f3a74d75cf7 (patch)
tree76daa0c8b0a7472dee34916ac48fb7295691e19d /src
parent51e67d2fc20df1c7657e04ec0308e1af00625510 (diff)
parent82f40860adf700bcb19f38f91ee65fde6a116710 (diff)
Merge pull request #508 from hatal175/goto2
Diffstat (limited to 'src')
-rw-r--r--src/item/itemGustJar.c16
-rw-r--r--src/object/lilypadLarge.c1
-rw-r--r--src/script.c11
3 files changed, 13 insertions, 15 deletions
diff --git a/src/item/itemGustJar.c b/src/item/itemGustJar.c
index a749ea37..7b1d681e 100644
--- a/src/item/itemGustJar.c
+++ b/src/item/itemGustJar.c
@@ -125,7 +125,7 @@ void sub_08076F64(ItemBehavior* this, u32 idx) {
return;
}
- break;
+ return;
case 3:
gPlayerState.field_0x1c = 4;
case 4:
@@ -147,31 +147,29 @@ void sub_08076F64(ItemBehavior* this, u32 idx) {
gPlayerEntity.direction = DirectionTurnAround(Direction8FromAnimationState(gPlayerEntity.animationState));
gPlayerEntity.speed = 0x80;
UpdatePlayerMovement();
- break;
+ return;
case 6:
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) == 0)
return;
- goto case0;
break;
case 7:
sub_08077DF4(this, 0x514);
gPlayerState.field_0x1c = 3;
gPlayerState.gustJarSpeed = 0;
- break;
+ return;
case 1:
case 2:
default:
gPlayerState.field_0x1c = 3;
sub_08077DF4(this, 0x514);
- break;
+ return;
case 0:
- case0:
- gPlayerState.field_0x1c = 0;
- gPlayerEntity.field_0x70.WORD = 0;
- DeletePlayerItem(this, idx);
break;
}
+ gPlayerState.field_0x1c = 0;
+ gPlayerEntity.field_0x70.WORD = 0;
+ DeletePlayerItem(this, idx);
}
void (*const ItemGustJar_StateFunctions[])(ItemBehavior* beh, u32) = {
diff --git a/src/object/lilypadLarge.c b/src/object/lilypadLarge.c
index 2e478e2c..81314d9b 100644
--- a/src/object/lilypadLarge.c
+++ b/src/object/lilypadLarge.c
@@ -313,7 +313,6 @@ void sub_080855E8(LilypadLargeEntity* this) {
this->unk_70 -= 0x80;
}
if ((super->collisions & 0xe0) == 0xe0) {
- // goto _080859D8;
u32 tmp2 = this->unk_70;
if ((s32)this->unk_70 < 0) {
tmp2 += 3;
diff --git a/src/script.c b/src/script.c
index 22725cc9..93b919c0 100644
--- a/src/script.c
+++ b/src/script.c
@@ -1150,10 +1150,13 @@ void ScriptCommand_0807E9E4(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_0807E9F0(Entity* entity, ScriptExecutionContext* context) {
- u32 tmp;
+ bool32 tmp;
sub_0801E00C();
- tmp = 1;
+ tmp = TRUE;
switch (gFuseInfo._0) {
+ default:
+ tmp = FALSE;
+ break;
case 2:
gPlayerState.controlMode = CONTROL_DISABLED;
gPauseMenuOptions.disabled = tmp;
@@ -1162,14 +1165,12 @@ void ScriptCommand_0807E9F0(Entity* entity, ScriptExecutionContext* context) {
case 1:
context->condition = 0;
break;
- default:
- goto lbl;
}
+
if (tmp) {
PlayerResetStateFromFusion();
gPlayerState.controlMode = CONTROL_1;
} else {
- lbl:
gActiveScriptInfo.commandSize = 0;
}
}