goto_if_eq and switch/case in scripts

This commit is contained in:
PikalaxALT
2019-05-16 13:30:03 -04:00
parent 006881415d
commit a2d1b854d6
150 changed files with 999 additions and 1231 deletions
+25 -38
View File
@@ -14,40 +14,27 @@ SilphCo_Elevator_EventScript_161F6F:: @ 8161F6F
specialvar VAR_RESULT, sub_80CB328
special sub_80CB7C4
waitstate
copyvar VAR_0x8000, VAR_RESULT
compare_var_to_value VAR_0x8000, 0
goto_if 1, EventScript_1621BF
compare_var_to_value VAR_0x8000, 1
goto_if 1, EventScript_162197
compare_var_to_value VAR_0x8000, 2
goto_if 1, EventScript_16216F
compare_var_to_value VAR_0x8000, 3
goto_if 1, EventScript_162147
compare_var_to_value VAR_0x8000, 4
goto_if 1, EventScript_16211F
compare_var_to_value VAR_0x8000, 5
goto_if 1, EventScript_1620F7
compare_var_to_value VAR_0x8000, 6
goto_if 1, EventScript_1620CF
compare_var_to_value VAR_0x8000, 7
goto_if 1, EventScript_1620A7
compare_var_to_value VAR_0x8000, 8
goto_if 1, EventScript_16207F
compare_var_to_value VAR_0x8000, 9
goto_if 1, EventScript_162057
compare_var_to_value VAR_0x8000, 10
goto_if 1, EventScript_16202F
compare_var_to_value VAR_0x8000, 11
goto_if 1, EventScript_1621E7
compare_var_to_value VAR_0x8000, 127
goto_if 1, EventScript_1621E7
switch VAR_RESULT
case 0, EventScript_1621BF
case 1, EventScript_162197
case 2, EventScript_16216F
case 3, EventScript_162147
case 4, EventScript_16211F
case 5, EventScript_1620F7
case 6, EventScript_1620CF
case 7, EventScript_1620A7
case 8, EventScript_16207F
case 9, EventScript_162057
case 10, EventScript_16202F
case 11, EventScript_1621E7
case 127, EventScript_1621E7
end
EventScript_16202F:: @ 816202F
setvar VAR_0x8006, 4
setdynamicwarp MAP_SILPH_CO_1F, 255, 22, 3
compare_var_to_value VAR_0x403A, 4
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 4
goto EventScript_1621E7
@@ -59,7 +46,7 @@ EventScript_162057:: @ 8162057
setvar VAR_0x8006, 5
setdynamicwarp MAP_SILPH_CO_2F, 255, 22, 3
compare_var_to_value VAR_0x403A, 5
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 5
goto EventScript_1621E7
@@ -71,7 +58,7 @@ EventScript_16207F:: @ 816207F
setvar VAR_0x8006, 6
setdynamicwarp MAP_SILPH_CO_3F, 255, 22, 3
compare_var_to_value VAR_0x403A, 6
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 6
goto EventScript_1621E7
@@ -83,7 +70,7 @@ EventScript_1620A7:: @ 81620A7
setvar VAR_0x8006, 7
setdynamicwarp MAP_SILPH_CO_4F, 255, 22, 3
compare_var_to_value VAR_0x403A, 7
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 7
goto EventScript_1621E7
@@ -95,7 +82,7 @@ EventScript_1620CF:: @ 81620CF
setvar VAR_0x8006, 8
setdynamicwarp MAP_SILPH_CO_5F, 255, 22, 3
compare_var_to_value VAR_0x403A, 8
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 8
goto EventScript_1621E7
@@ -107,7 +94,7 @@ EventScript_1620F7:: @ 81620F7
setvar VAR_0x8006, 9
setdynamicwarp MAP_SILPH_CO_6F, 255, 20, 3
compare_var_to_value VAR_0x403A, 9
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 9
goto EventScript_1621E7
@@ -119,7 +106,7 @@ EventScript_16211F:: @ 816211F
setvar VAR_0x8006, 10
setdynamicwarp MAP_SILPH_CO_7F, 255, 23, 3
compare_var_to_value VAR_0x403A, 10
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 10
goto EventScript_1621E7
@@ -131,7 +118,7 @@ EventScript_162147:: @ 8162147
setvar VAR_0x8006, 11
setdynamicwarp MAP_SILPH_CO_8F, 255, 22, 3
compare_var_to_value VAR_0x403A, 11
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 11
goto EventScript_1621E7
@@ -143,7 +130,7 @@ EventScript_16216F:: @ 816216F
setvar VAR_0x8006, 12
setdynamicwarp MAP_SILPH_CO_9F, 255, 24, 3
compare_var_to_value VAR_0x403A, 12
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 12
goto EventScript_1621E7
@@ -155,7 +142,7 @@ EventScript_162197:: @ 8162197
setvar VAR_0x8006, 13
setdynamicwarp MAP_SILPH_CO_10F, 255, 13, 3
compare_var_to_value VAR_0x403A, 13
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 13
goto EventScript_1621E7
@@ -167,7 +154,7 @@ EventScript_1621BF:: @ 81621BF
setvar VAR_0x8006, 14
setdynamicwarp MAP_SILPH_CO_11F, 255, 13, 3
compare_var_to_value VAR_0x403A, 14
goto_if 1, EventScript_1621E7
goto_if_eq EventScript_1621E7
call EventScript_1621EC
setvar VAR_0x403A, 14
goto EventScript_1621E7