Merge pull request #508 from hatal175/goto2

This commit is contained in:
notyourav 2022-04-30 13:20:53 -07:00 committed by GitHub
commit 12f2ec8fd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 15 deletions

View File

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

View File

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

View File

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