improve call_if macros

This commit is contained in:
Melody
2018-12-21 21:32:45 -05:00
parent ac2e4adf2d
commit 55005f1588
175 changed files with 1245 additions and 1400 deletions

View File

@@ -92,9 +92,9 @@ BattleFrontier_BattleTowerLobby_EventScript_2B69D3:
apprentice_menu APPRENTICE_ASK_2SPECIES
copyvar VAR_0x8005, VAR_RESULT
compare VAR_0x8005, 0
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_2B6ABA
call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6ABA
compare VAR_0x8005, 1
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_2B6AC0
call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6AC0
setvar VAR_0x8004, 12
special CallApprenticeFunction
copyvar VAR_0x8006, VAR_RESULT
@@ -105,7 +105,7 @@ BattleFrontier_BattleTowerLobby_EventScript_2B69D3:
setvar VAR_0x8004, 12
special CallApprenticeFunction
compare VAR_RESULT, 3
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_2B6AC6
call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6AC6
setvar VAR_0x8004, 16
setvar VAR_0x8005, 0
copyvar VAR_0x8006, VAR_0x8007
@@ -217,9 +217,9 @@ BattleFrontier_BattleTowerLobby_EventScript_2B6C77:
apprentice_menu APPRENTICE_ASK_MOVES
copyvar VAR_0x8005, VAR_RESULT
compare VAR_0x8005, 0
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_2B6D50
call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6D50
compare VAR_0x8005, 1
call_if 1, BattleFrontier_BattleTowerLobby_EventScript_2B6D56
call_if_eq BattleFrontier_BattleTowerLobby_EventScript_2B6D56
setvar VAR_0x8004, 17
special CallApprenticeFunction
setvar VAR_0x8004, 5

View File

@@ -1603,9 +1603,9 @@ MossdeepCity_GameCorner_1F_EventScript_277E55:: @ 8277E55
compare VAR_RESULT, 0
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_2772F9
compare VAR_0x8005, 0
call_if 1, MossdeepCity_GameCorner_1F_EventScript_277E84
call_if_eq MossdeepCity_GameCorner_1F_EventScript_277E84
compare VAR_0x8005, 1
call_if 1, MossdeepCity_GameCorner_1F_EventScript_277E8D
call_if_eq MossdeepCity_GameCorner_1F_EventScript_277E8D
goto MossdeepCity_GameCorner_1F_EventScript_2772F9
end

View File

@@ -3,10 +3,8 @@ LilycoveCity_ContestLobby_EventScript_279CC5:: @ 8279CC5
faceplayer
compare VAR_0x408A, 0
goto_if_ne LilycoveCity_ContestLobby_EventScript_279D13
checkflag FLAG_0x05F
call_if 1, LilycoveCity_ContestLobby_EventScript_279CEA
checkflag FLAG_0x05F
call_if 0, LilycoveCity_ContestLobby_EventScript_279CF3
call_if_set FLAG_0x05F, LilycoveCity_ContestLobby_EventScript_279CEA
call_if_unset FLAG_0x05F, LilycoveCity_ContestLobby_EventScript_279CF3
goto LilycoveCity_ContestLobby_EventScript_279D5A
end
@@ -486,15 +484,15 @@ LinkContestRoom1_EventScript_27A2D5:: @ 827A2D5
LinkContestRoom1_EventScript_27A34F:: @ 827A34F
special sub_80F82FC
compare VAR_0x4088, 1
call_if 1, LinkContestRoom1_EventScript_27A454
call_if_eq LinkContestRoom1_EventScript_27A454
compare VAR_0x4088, 2
call_if 1, LinkContestRoom1_EventScript_27A4B2
call_if_eq LinkContestRoom1_EventScript_27A4B2
compare VAR_0x4088, 3
call_if 1, LinkContestRoom1_EventScript_27A510
call_if_eq LinkContestRoom1_EventScript_27A510
compare VAR_0x4088, 4
call_if 1, LinkContestRoom1_EventScript_27A56E
call_if_eq LinkContestRoom1_EventScript_27A56E
compare VAR_0x4088, 5
call_if 1, LinkContestRoom1_EventScript_27A5CC
call_if_eq LinkContestRoom1_EventScript_27A5CC
setvar VAR_TEMP_1, 9
setvar VAR_TEMP_2, 9
setvar VAR_TEMP_3, 9
@@ -504,7 +502,7 @@ LinkContestRoom1_EventScript_27A34F:: @ 827A34F
setvar VAR_TEMP_7, 9
setvar VAR_TEMP_8, 9
compare VAR_TEMP_0, 0
call_if 2, LinkContestRoom1_EventScript_27A3E5
call_if_gt LinkContestRoom1_EventScript_27A3E5
setvar VAR_TEMP_1, 0
setvar VAR_TEMP_2, 0
setvar VAR_TEMP_3, 0
@@ -519,21 +517,21 @@ LinkContestRoom1_EventScript_27A3E5:: @ 827A3E5
setvar VAR_RESULT, 8
special ScriptRandom
compare VAR_RESULT, 0
call_if 1, LinkContestRoom1_EventScript_27A65A
call_if_eq LinkContestRoom1_EventScript_27A65A
compare VAR_RESULT, 1
call_if 1, LinkContestRoom1_EventScript_27A67E
call_if_eq LinkContestRoom1_EventScript_27A67E
compare VAR_RESULT, 2
call_if 1, LinkContestRoom1_EventScript_27A6A2
call_if_eq LinkContestRoom1_EventScript_27A6A2
compare VAR_RESULT, 3
call_if 1, LinkContestRoom1_EventScript_27A6C6
call_if_eq LinkContestRoom1_EventScript_27A6C6
compare VAR_RESULT, 4
call_if 1, LinkContestRoom1_EventScript_27A6EA
call_if_eq LinkContestRoom1_EventScript_27A6EA
compare VAR_RESULT, 5
call_if 1, LinkContestRoom1_EventScript_27A70E
call_if_eq LinkContestRoom1_EventScript_27A70E
compare VAR_RESULT, 6
call_if 1, LinkContestRoom1_EventScript_27A732
call_if_eq LinkContestRoom1_EventScript_27A732
compare VAR_RESULT, 7
call_if 1, LinkContestRoom1_EventScript_27A756
call_if_eq LinkContestRoom1_EventScript_27A756
compare VAR_TEMP_0, 0
goto_if_gt LinkContestRoom1_EventScript_27A3E5
waitmovement 0
@@ -999,7 +997,7 @@ LinkContestRoom1_EventScript_27AA1B:: @ 827AA1B
addvar VAR_TEMP_1, 1
lockall
compare VAR_0x4088, 1
call_if 2, LinkContestRoom1_EventScript_27AA6F
call_if_gt LinkContestRoom1_EventScript_27AA6F
applymovement 9, LinkContestRoom1_Movement_27AD3B
applymovement 12, LinkContestRoom1_Movement_27AD3F
applymovement 7, LinkContestRoom1_Movement_27AD3B
@@ -1204,7 +1202,7 @@ LinkContestRoom1_EventScript_27AC5E:: @ 827AC5E
LinkContestRoom1_EventScript_27AC77:: @ 827AC77
compare VAR_0x4088, 2
call_if 1, LinkContestRoom1_EventScript_27ABCE
call_if_eq LinkContestRoom1_EventScript_27ABCE
specialvar VAR_RESULT, sub_80F7F7C
compare VAR_RESULT, 0
goto_if_eq LinkContestRoom1_EventScript_27ACDF

View File

@@ -48,7 +48,7 @@ Route117_EventScript_291C9D:: @ 8291C9D
Route117_EventScript_291CB7:: @ 8291CB7
specialvar VAR_RESULT, sub_8071614
compare VAR_RESULT, 1
call_if 1, Route117_EventScript_291CC8
call_if_eq Route117_EventScript_291CC8
return
Route117_EventScript_291CC8:: @ 8291CC8
@@ -162,7 +162,7 @@ Route117_PokemonDayCare_EventScript_291E15:: @ 8291E15
Route117_PokemonDayCare_EventScript_291E1E:: @ 8291E1E
specialvar VAR_RESULT, GetNumLevelsGainedFromDaycare
compare VAR_RESULT, 0
call_if 5, Route117_PokemonDayCare_EventScript_291E15
call_if_ne Route117_PokemonDayCare_EventScript_291E15
return
Route117_PokemonDayCare_EventScript_291E2F:: @ 8291E2F

View File

@@ -215,11 +215,11 @@ Route111_EventScript_28CF56:: @ 828CF56
special GabbyAndTyBeforeInterview
special GabbyAndTySetScriptVarsToEventObjectLocalIds
compare VAR_FACING, 2
call_if 1, Route111_EventScript_28CF94
call_if_eq Route111_EventScript_28CF94
compare VAR_FACING, 1
call_if 1, Route111_EventScript_28CF9F
call_if_eq Route111_EventScript_28CF9F
compare VAR_FACING, 4
call_if 1, Route111_EventScript_28CFB1
call_if_eq Route111_EventScript_28CFB1
goto_if_set FLAG_TEMP_1, Route111_EventScript_28D0EE
msgbox Route111_Text_28B042, MSGBOX_YESNO
goto Route111_EventScript_28D0A7
@@ -248,11 +248,11 @@ Route120_EventScript_28CFC3:: @ 828CFC3
special GabbyAndTyBeforeInterview
special GabbyAndTySetScriptVarsToEventObjectLocalIds
compare VAR_FACING, 2
call_if 1, Route111_EventScript_28CF94
call_if_eq Route111_EventScript_28CF94
compare VAR_FACING, 1
call_if 1, Route111_EventScript_28CF9F
call_if_eq Route111_EventScript_28CF9F
compare VAR_FACING, 4
call_if 1, Route111_EventScript_28CFB1
call_if_eq Route111_EventScript_28CFB1
goto_if_set FLAG_TEMP_1, Route111_EventScript_28D0EE
specialvar VAR_RESULT, GabbyAndTyGetLastQuote
compare VAR_RESULT, 0

View File

@@ -9,9 +9,9 @@ LittlerootTown_MaysHouse_1F_EventScript_292704:: @ 8292704
applymovement VAR_0x8004, LittlerootTown_BrendansHouse_1F_Movement_27259E
waitmovement 0
compare VAR_0x8005, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_29274D
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_29274D
compare VAR_0x8005, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292758
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292758
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7A46, MSGBOX_DEFAULT
closemessage
setvar VAR_0x4092, 4
@@ -69,9 +69,9 @@ LittlerootTown_MaysHouse_2F_EventScript_292799:: @ 8292799
setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_2
checkplayergender
compare VAR_RESULT, 0
call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_2927DF
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_2927DF
compare VAR_RESULT, 1
call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_29280F
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_29280F
playse SE_KAIDAN
removeobject VAR_0x8008
releaseall
@@ -439,13 +439,13 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2
lockall
checkplayergender
compare VAR_RESULT, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292C76
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292C76
compare VAR_RESULT, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292C86
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292C86
compare VAR_0x8008, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D08
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D08
compare VAR_0x8008, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D13
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D13
applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_27259E
waitmovement 0
playse SE_PIN
@@ -455,32 +455,32 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2
waitmovement 0
delay 20
compare VAR_0x8008, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292C96
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292C96
compare VAR_0x8008, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292CA1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CA1
msgbox LittlerootTown_BrendansHouse_1F_Text_1F800E, MSGBOX_DEFAULT
giveitem_std ITEM_SS_TICKET
msgbox LittlerootTown_BrendansHouse_1F_Text_1F80FE, MSGBOX_DEFAULT
closemessage
delay 20
compare VAR_0x8008, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292CAC
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CAC
compare VAR_0x8008, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292CC1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CC1
msgbox LittlerootTown_BrendansHouse_1F_Text_1F815B, MSGBOX_DEFAULT
closemessage
compare VAR_0x8008, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292CD6
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CD6
compare VAR_0x8008, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292CEF
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292CEF
playse SE_DOOR
removeobject VAR_0x8009
setflag FLAG_0x123
delay 30
compare VAR_0x8008, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D48
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D48
compare VAR_0x8008, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D5D
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D5D
delay 20
msgbox LittlerootTown_BrendansHouse_1F_Text_1F81B9, MSGBOX_DEFAULT
closemessage
@@ -488,24 +488,24 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2
special TurnOnTVScreen
delay 60
compare VAR_0x8008, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D72
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D72
compare VAR_0x8008, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D7D
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D7D
msgbox LittlerootTown_BrendansHouse_1F_Text_1F824B, MSGBOX_DEFAULT
closemessage
compare VAR_0x8008, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D1E
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D1E
compare VAR_0x8008, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D33
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D33
msgbox LittlerootTown_BrendansHouse_1F_Text_1F826F, MSGBOX_DEFAULT
closemessage
clearflag FLAG_SYS_TV_LATI
setflag FLAG_0x0FF
special TurnOffTVScreen
compare VAR_0x8008, 0
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D88
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D88
compare VAR_0x8008, 1
call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_292D9D
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D9D
msgbox LittlerootTown_BrendansHouse_1F_Text_1F8351, MSGBOX_DEFAULT
multichoice 22, 8, 108, 1
copyvar VAR_0x8004, VAR_RESULT

View File

@@ -492,7 +492,7 @@ LilycoveCity_ContestLobby_EventScript_293F28: @ 8293F28
LilycoveCity_ContestLobby_EventScript_293F64: @ 8293F64
msgbox LilycoveCity_ContestLobby_Text_2C43FA, MSGBOX_YESNO
compare VAR_RESULT, 0
call_if 1, LilycoveCity_ContestLobby_EventScript_293F85
call_if_eq LilycoveCity_ContestLobby_EventScript_293F85
msgbox LilycoveCity_ContestLobby_Text_2C451B, MSGBOX_DEFAULT
goto EventScript_StartBlending
end

View File

@@ -1016,11 +1016,11 @@ SecretBase_RedCave1_EventScript_276286:: @ 8276286
special DoSpecialTrainerBattle
waitstate
compare VAR_RESULT, 3
call_if 1, SecretBase_RedCave1_EventScript_2762BD
call_if_eq SecretBase_RedCave1_EventScript_2762BD
compare VAR_RESULT, 1
call_if 1, SecretBase_RedCave1_EventScript_2762C1
call_if_eq SecretBase_RedCave1_EventScript_2762C1
compare VAR_RESULT, 2
call_if 1, SecretBase_RedCave1_EventScript_2762C5
call_if_eq SecretBase_RedCave1_EventScript_2762C5
special HealPlayerParty
release
end

View File

@@ -52,11 +52,11 @@ Route111_EventScript_27661E:: @ 827661E
setflag FLAG_0x060
clearflag FLAG_HIDE_SLATEPORT_CITY_TM_SALESMAN
compare VAR_FACING, 3
call_if 1, Route111_EventScript_27666A
call_if_eq Route111_EventScript_27666A
compare VAR_FACING, 4
call_if 1, Route111_EventScript_27666A
call_if_eq Route111_EventScript_27666A
compare VAR_FACING, 2
call_if 1, Route111_EventScript_276675
call_if_eq Route111_EventScript_276675
removeobject VAR_LAST_TALKED
release
end