Reformat compare + goto_if/call_if to single statements

This commit is contained in:
GriffinR
2021-11-18 23:06:30 -05:00
parent c57efdba5d
commit e66ea0cb99
293 changed files with 2990 additions and 5978 deletions

View File

@@ -18,10 +18,8 @@ FallarborTown_BattleTentBattleRoom_OnTransition:
FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfx::
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale
compare VAR_RESULT, FEMALE
goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale
goto_if_eq VAR_RESULT, MALE, FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale
goto_if_eq VAR_RESULT, FEMALE, FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale
return
FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale::
@@ -44,8 +42,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_EnterRoom::
applymovement LOCALID_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter
waitmovement 0
frontier_get FRONTIER_DATA_BATTLE_NUM
compare VAR_RESULT, 0
goto_if_ne FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge
goto_if_ne VAR_RESULT, 0, FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge
FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter::
tower_setopponent
addobject LOCALID_OPPONENT
@@ -103,10 +100,8 @@ FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum::
special HealPlayerParty
FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge::
frontier_get FRONTIER_DATA_BATTLE_NUM
compare VAR_RESULT, 1
call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent
compare VAR_RESULT, 2
call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent
call_if_eq VAR_RESULT, 1, FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent
call_if_eq VAR_RESULT, 2, FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent
multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, TRUE
switch VAR_RESULT
case 0, FallarborTown_BattleTentBattleRoom_EventScript_ContinueChallenge
@@ -147,8 +142,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon::
@ Unreachable code block? The flow into the next block also doesnt make sense
arena_get ARENA_DATA_WIN_STREAK
compare VAR_RESULT, MAX_STREAK
goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum
goto_if_eq VAR_RESULT, MAX_STREAK, FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum
addvar VAR_RESULT, 1
arena_set ARENA_DATA_WIN_STREAK, VAR_RESULT
@ See above