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

@@ -1,23 +1,14 @@
ProfBirch_EventScript_UpdateLocation::
compare VAR_PETALBURG_GYM_STATE, 0
goto_if_eq Common_EventScript_NopReturn
goto_if_eq VAR_PETALBURG_GYM_STATE, 0, Common_EventScript_NopReturn
goto_if_set FLAG_SYS_GAME_CLEAR, ProfBirch_EventScript_MoveToLab
compare VAR_BIRCH_STATE, 0
call_if_eq ProfBirch_EventScript_MoveToLab
compare VAR_BIRCH_STATE, 1
call_if_eq ProfBirch_EventScript_MoveToLab
compare VAR_BIRCH_STATE, 2
call_if_eq ProfBirch_EventScript_MoveToRoute101
compare VAR_BIRCH_STATE, 3
call_if_eq ProfBirch_EventScript_MoveToRoute101
compare VAR_BIRCH_STATE, 4
call_if_eq ProfBirch_EventScript_MoveToRoute103
compare VAR_BIRCH_STATE, 5
call_if_eq ProfBirch_EventScript_MoveToRoute103
compare VAR_BIRCH_STATE, 6
call_if_eq ProfBirch_EventScript_MoveToLab
compare VAR_BIRCH_STATE, 7
call_if_eq ProfBirch_EventScript_MoveToLab
call_if_eq VAR_BIRCH_STATE, 0, ProfBirch_EventScript_MoveToLab
call_if_eq VAR_BIRCH_STATE, 1, ProfBirch_EventScript_MoveToLab
call_if_eq VAR_BIRCH_STATE, 2, ProfBirch_EventScript_MoveToRoute101
call_if_eq VAR_BIRCH_STATE, 3, ProfBirch_EventScript_MoveToRoute101
call_if_eq VAR_BIRCH_STATE, 4, ProfBirch_EventScript_MoveToRoute103
call_if_eq VAR_BIRCH_STATE, 5, ProfBirch_EventScript_MoveToRoute103
call_if_eq VAR_BIRCH_STATE, 6, ProfBirch_EventScript_MoveToLab
call_if_eq VAR_BIRCH_STATE, 7, ProfBirch_EventScript_MoveToLab
return
ProfBirch_EventScript_MoveToLab::
@@ -49,8 +40,7 @@ ProfBirch_EventScript_RatePokedexOrRegister::
ProfBirch_EventScript_AskRatePokedex::
msgbox gBirchDexRatingText_AreYouCurious, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq ProfBirch_EventScript_DeclineRating
goto_if_eq VAR_RESULT, NO, ProfBirch_EventScript_DeclineRating
call ProfBirch_EventScript_RatePokedex
release
end
@@ -77,8 +67,7 @@ ProfBirch_EventScript_RatePokedex::
buffernumberstring STR_VAR_2, VAR_0x8009 @ Num Hoenn caught
msgbox gBirchDexRatingText_SoYouveSeenAndCaught, MSGBOX_DEFAULT
call ProfBirch_EventScript_ShowRatingMessage
compare VAR_0x800A, 0
goto_if_eq Common_EventScript_NopReturn @ National dex not enabled
goto_if_eq VAR_0x800A, 0, Common_EventScript_NopReturn @ National dex not enabled
setvar VAR_0x8004, 1
specialvar VAR_RESULT, ScriptGetPokedexInfo
copyvar VAR_0x8008, VAR_0x8005