improve goto_if macros
This commit is contained in:
@@ -14,9 +14,8 @@ BattleFrontier_BattleTowerLobby_MapScript1_23E694: @ 823E694
|
||||
setvar VAR_0x8004, 10
|
||||
special CallApprenticeFunction
|
||||
compare VAR_0x8004, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23E6B5
|
||||
checkflag FLAG_0x934
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23E6C1
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E6B5
|
||||
goto_if_set FLAG_0x934, BattleFrontier_BattleTowerLobby_EventScript_23E6C1
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23E6B5:: @ 823E6B5
|
||||
clearflag FLAG_HIDE_APPRENTICE
|
||||
@@ -79,7 +78,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E758:: @ 823E758
|
||||
setvar VAR_0x8004, 10
|
||||
special CallFrontierUtilFunc
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23E778
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E778
|
||||
message BattleFrontier_BattleTowerLobby_Text_23F60D
|
||||
waitmessage
|
||||
goto BattleFrontier_BattleTowerLobby_EventScript_23E780
|
||||
@@ -91,7 +90,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E780:: @ 823E780
|
||||
setvar VAR_0x8004, 5
|
||||
special sub_8161F74
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23E7A5
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E7A5
|
||||
message BattleFrontier_BattleTowerLobby_Text_23F844
|
||||
waitmessage
|
||||
playfanfare MUS_FANFA4
|
||||
@@ -108,7 +107,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E7A5:: @ 823E7A5
|
||||
setvar VAR_0x8005, 1
|
||||
special sub_8161F74
|
||||
compare VAR_RESULT, 49
|
||||
goto_if 5, BattleFrontier_BattleTowerLobby_EventScript_23E7E2
|
||||
goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E7E2
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_23F79D, MSGBOX_DEFAULT
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23E7E2:: @ 823E7E2
|
||||
@@ -120,14 +119,13 @@ BattleFrontier_BattleTowerLobby_EventScript_23E7E2:: @ 823E7E2
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23E7F2:: @ 823E7F2
|
||||
compare VAR_FRONTIER_BATTLE_MODE, 2
|
||||
goto_if 5, BattleFrontier_BattleTowerLobby_EventScript_23E81E
|
||||
checkflag FLAG_0x152
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23E81E
|
||||
goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E81E
|
||||
goto_if_set FLAG_0x152, BattleFrontier_BattleTowerLobby_EventScript_23E81E
|
||||
setvar VAR_0x8004, 1
|
||||
setvar VAR_0x8005, 1
|
||||
special sub_8161F74
|
||||
compare VAR_RESULT, 0
|
||||
goto_if 5, BattleFrontier_BattleTowerLobby_EventScript_23E830
|
||||
goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E830
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23E81E:: @ 823E81E
|
||||
setvar VAR_0x8004, 2
|
||||
@@ -161,7 +159,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E84D:: @ 823E84D
|
||||
waitse
|
||||
call BattleFrontier_BattleTowerLobby_EventScript_23E8E0
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23E8DF
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E8DF
|
||||
message BattleFrontier_BattleTowerLobby_Text_23FE3C
|
||||
waitmessage
|
||||
multichoicedefault 20, 8, 94, 1, 0
|
||||
@@ -184,7 +182,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E8B4:: @ 823E8B4
|
||||
setvar VAR_0x8004, 19
|
||||
special CallFrontierUtilFunc
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23E8D7
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E8D7
|
||||
playse SE_SAVE
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_2423CD, MSGBOX_DEFAULT
|
||||
goto BattleFrontier_BattleTowerLobby_EventScript_23E8DF
|
||||
@@ -264,7 +262,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E984:: @ 823E984
|
||||
setvar VAR_0x8004, 15
|
||||
special CallFrontierUtilFunc
|
||||
compare VAR_0x8004, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B
|
||||
setvar VAR_0x8004, 2
|
||||
setvar VAR_0x8005, 1
|
||||
copyvar VAR_0x8006, VAR_RESULT
|
||||
@@ -277,7 +275,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E984:: @ 823E984
|
||||
special sub_80F9490
|
||||
waitstate
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_23FDC7, MSGBOX_YESNO
|
||||
switch VAR_RESULT
|
||||
case 0, BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
@@ -305,7 +303,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EA2A:: @ 823EA2A
|
||||
call BattleFrontier_BattleTowerLobby_EventScript_27134F
|
||||
setvar VAR_TEMP_0, 255
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
|
||||
incrementgamestat 30
|
||||
setvar VAR_0x40BC, 1
|
||||
goto BattleFrontier_BattleTowerLobby_EventScript_23F0F3
|
||||
@@ -344,7 +342,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EAED:: @ 823EAED
|
||||
setvar VAR_0x8004, 15
|
||||
special CallFrontierUtilFunc
|
||||
compare VAR_0x8004, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B
|
||||
setvar VAR_0x8004, 2
|
||||
setvar VAR_0x8005, 1
|
||||
copyvar VAR_0x8006, VAR_RESULT
|
||||
@@ -357,7 +355,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EAED:: @ 823EAED
|
||||
special sub_80F9490
|
||||
waitstate
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_23FDC7, MSGBOX_YESNO
|
||||
switch VAR_RESULT
|
||||
case 0, BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
@@ -385,7 +383,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EB93:: @ 823EB93
|
||||
call BattleFrontier_BattleTowerLobby_EventScript_27134F
|
||||
setvar VAR_TEMP_0, 255
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
|
||||
incrementgamestat 30
|
||||
setvar VAR_0x40BC, 0
|
||||
goto BattleFrontier_BattleTowerLobby_EventScript_23F0F3
|
||||
@@ -425,7 +423,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EC59:: @ 823EC59
|
||||
setvar VAR_0x8004, 15
|
||||
special CallFrontierUtilFunc
|
||||
compare VAR_0x8004, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B
|
||||
setvar VAR_0x8004, 2
|
||||
setvar VAR_0x8005, 1
|
||||
copyvar VAR_0x8006, VAR_RESULT
|
||||
@@ -438,7 +436,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EC59:: @ 823EC59
|
||||
special sub_80F9490
|
||||
waitstate
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_23FDC7, MSGBOX_YESNO
|
||||
switch VAR_RESULT
|
||||
case 0, BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
@@ -466,7 +464,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23ECFF:: @ 823ECFF
|
||||
call BattleFrontier_BattleTowerLobby_EventScript_27134F
|
||||
setvar VAR_TEMP_0, 255
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
|
||||
incrementgamestat 30
|
||||
setvar VAR_0x40BC, 0
|
||||
goto BattleFrontier_BattleTowerLobby_EventScript_23F0F3
|
||||
@@ -505,7 +503,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EDC2:: @ 823EDC2
|
||||
setvar VAR_0x8004, 15
|
||||
special CallFrontierUtilFunc
|
||||
compare VAR_0x8004, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B
|
||||
setvar VAR_0x8004, 2
|
||||
setvar VAR_0x8005, 1
|
||||
copyvar VAR_0x8006, VAR_RESULT
|
||||
@@ -518,7 +516,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EDC2:: @ 823EDC2
|
||||
special sub_80F9490
|
||||
waitstate
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_23FDC7, MSGBOX_YESNO
|
||||
switch VAR_RESULT
|
||||
case 0, BattleFrontier_BattleTowerLobby_EventScript_23F0E3
|
||||
@@ -549,11 +547,11 @@ BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68
|
||||
call BattleFrontier_BattleTowerLobby_EventScript_27134F
|
||||
setvar VAR_TEMP_0, 255
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
|
||||
incrementgamestat 30
|
||||
specialvar VAR_RESULT, IsWirelessAdapterConnected
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F3E8
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F3E8
|
||||
goto BattleFrontier_BattleTowerLobby_EventScript_23F2C5
|
||||
end
|
||||
|
||||
@@ -606,9 +604,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23EF80:: @ 823EF80
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23EF8A:: @ 823EF8A
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23EFA1
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23EFA1
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23EFAB
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23EFAB
|
||||
end
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23EFA1:: @ 823EFA1
|
||||
@@ -744,7 +742,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F108:: @ 823F108
|
||||
special sub_8161F74
|
||||
delay 1
|
||||
compare VAR_RESULT, 6
|
||||
goto_if 5, BattleFrontier_BattleTowerLobby_EventScript_23F108
|
||||
goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23F108
|
||||
call BattleFrontier_BattleTowerLobby_EventScript_23F135
|
||||
clearflag FLAG_0x077
|
||||
warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 255, 1, 6
|
||||
@@ -755,7 +753,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F108:: @ 823F108
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23F135:: @ 823F135
|
||||
call BattleFrontier_BattleTowerLobby_EventScript_23F1A7
|
||||
compare VAR_FRONTIER_BATTLE_MODE, 3
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F152
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F152
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_23FE11, MSGBOX_DEFAULT
|
||||
goto BattleFrontier_BattleTowerLobby_EventScript_23F15B
|
||||
|
||||
@@ -935,25 +933,25 @@ BattleFrontier_BattleTowerLobby_EventScript_23F2C5:: @ 823F2C5
|
||||
special sub_80B2DA4
|
||||
waitstate
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F3AF
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F3AF
|
||||
compare VAR_RESULT, 2
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_2772D2
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2772D2
|
||||
compare VAR_RESULT, 3
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F327
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F327
|
||||
compare VAR_RESULT, 4
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F351
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F351
|
||||
compare VAR_RESULT, 5
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E6
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0E6
|
||||
compare VAR_RESULT, 6
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_2772C5
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_2772C5
|
||||
compare VAR_RESULT, 11
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F366
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F366
|
||||
end
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23F327:: @ 823F327
|
||||
special CloseLink
|
||||
compare VAR_0x8005, 3
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F33F
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F33F
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_278255, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -1035,26 +1033,26 @@ BattleFrontier_BattleTowerLobby_EventScript_23F3F3:: @ 823F3F3
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23F430:: @ 823F430
|
||||
call BattleFrontier_BattleTowerLobby_EventScript_277B30
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F496
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F496
|
||||
compare VAR_RESULT, 5
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F3F3
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F3F3
|
||||
compare VAR_RESULT, 8
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F430
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F430
|
||||
compare VAR_RESULT, 11
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F366
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F366
|
||||
release
|
||||
return
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_23F463:: @ 823F463
|
||||
call BattleFrontier_BattleTowerLobby_EventScript_277B35
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F496
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F496
|
||||
compare VAR_RESULT, 5
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F3F3
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F3F3
|
||||
compare VAR_RESULT, 8
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F463
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F463
|
||||
compare VAR_RESULT, 11
|
||||
goto_eq BattleFrontier_BattleTowerLobby_EventScript_23F366
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F366
|
||||
release
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user