summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.richards@comcast.net>2019-09-19 17:26:25 -0400
committerGriffinR <griffin.richards@comcast.net>2019-09-19 17:27:34 -0400
commit275695c1896fb4b51669eab89febcbe0460765d1 (patch)
tree234c001df7f1bd0b9333184db4cfaa4007f1f6c5
parentde0084ef7a932e27c0020c589f0e2916aef5aeb8 (diff)
Document more script_menu, lilycove harbor
-rw-r--r--data/event_scripts.s90
-rw-r--r--data/maps/BattleFrontier_BattleDomeLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_Lounge7/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_ReceptionGate/scripts.inc2
-rw-r--r--data/maps/BirthIsland_Harbor/scripts.inc6
-rw-r--r--data/maps/FarawayIsland_Entrance/scripts.inc8
-rw-r--r--data/maps/FarawayIsland_Interior/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_ContestLobby/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_Harbor/map.json6
-rw-r--r--data/maps/LilycoveCity_Harbor/scripts.inc428
-rw-r--r--data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc2
-rw-r--r--data/maps/NavelRock_Harbor/scripts.inc6
-rw-r--r--data/maps/RustboroCity/scripts.inc2
-rw-r--r--data/maps/SlateportCity/scripts.inc2
-rw-r--r--data/maps/SlateportCity_Harbor/scripts.inc2
-rw-r--r--data/maps/SouthernIsland_Exterior/scripts.inc8
-rw-r--r--data/maps/SouthernIsland_Interior/scripts.inc2
-rw-r--r--data/maps/VerdanturfTown_BattleTentLobby/scripts.inc2
-rw-r--r--data/specials.inc8
-rw-r--r--data/text/event_ticket_1.inc (renamed from data/text/eon_ticket.inc)23
-rw-r--r--data/text/event_ticket_2.inc71
-rw-r--r--include/constants/flags.h2
-rw-r--r--include/constants/script_menu.h242
-rw-r--r--include/script_menu.h8
-rw-r--r--src/apprentice.c4
-rw-r--r--src/data/script_menu.h6
-rw-r--r--src/field_specials.c354
-rw-r--r--src/hof_pc.c2
-rw-r--r--src/international_string_util.c4
-rw-r--r--src/mauville_old_man.c2
-rw-r--r--src/script_menu.c189
-rw-r--r--src/strings.c4
-rw-r--r--src/trader.c2
36 files changed, 782 insertions, 737 deletions
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 696050139..227f16eb7 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -1042,7 +1042,7 @@ EventScript_ResetAllMapFlags:: @ 82715DE
setflag FLAG_HIDE_ROUTE_101_BIRCH
setflag FLAG_HIDE_ROUTE_103_BIRCH
setflag FLAG_HIDE_LILYCOVE_HARBOR_FERRY_SAILOR
- setflag FLAG_HIDE_LILYCOVE_HARBOR_EON_TICKET_TAKER
+ setflag FLAG_HIDE_LILYCOVE_HARBOR_EVENT_TICKET_TAKER
setflag FLAG_HIDE_SOUTHERN_ISLAND_EON_STONE
setflag FLAG_HIDE_SOUTHERN_ISLAND_UNCHOSEN_EON_DUO_MON
setflag FLAG_UNKNOWN_0x393
@@ -1631,7 +1631,7 @@ EventScript_PC:: @ 8271D92
EventScript_271DAC:: @ 8271DAC
message gText_WhichPCShouldBeAccessed
waitmessage
- special ScrSpecial_CreatePCMenu
+ special ScriptMenu_CreatePCMultichoice
waitstate
goto EventScript_271DBC
end
@@ -1642,7 +1642,7 @@ EventScript_271DBC:: @ 8271DBC
case 1, EventScript_271DF9
case 2, EventScript_271E54
case 3, EventScript_271E47
- case 127, EventScript_271E47
+ case MULTI_B_PRESSED, EventScript_271E47
end
EventScript_271DF9:: @ 8271DF9
@@ -2042,15 +2042,13 @@ Route101_EventScript_272184:: @ 8272184
msgbox gUnknown_082A633D, MSGBOX_DEFAULT
return
-BattleFrontier_OutsideWest_EventScript_2721E2:: @ 82721E2
-LilycoveCity_Harbor_EventScript_2721E2:: @ 82721E2
-SlateportCity_Harbor_EventScript_2721E2:: @ 82721E2
+Common_EventScript_FerryDepart:: @ 82721E2
delay 60
- applymovement VAR_0x8004, SlateportCity_Harbor_Movement_2721F0
+ applymovement VAR_0x8004, Movement_FerryDepart
waitmovement 0
return
-SlateportCity_Harbor_Movement_2721F0: @ 82721F0
+Movement_FerryDepart: @ 82721F0
walk_slow_right
walk_slow_right
walk_slow_right
@@ -2107,7 +2105,7 @@ SouthernIsland_Exterior_EventScript_272250:: @ 8272250
call_if_eq BattleFrontier_OutsideWest_EventScript_242A2C
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
- call BattleFrontier_OutsideWest_EventScript_2721E2
+ call Common_EventScript_FerryDepart
return
EventScript_272274:: @ 8272274
@@ -4211,7 +4209,7 @@ MauvilleCity_GameCorner_EventScript_2A5B0D:: @ 82A5B0D
.include "data/text/roulette.inc"
.include "data/text/pokedex_rating.inc"
.include "data/text/lottery_corner.inc"
- .include "data/text/eon_ticket.inc"
+ .include "data/text/event_ticket_1.inc"
.include "data/text/braille.inc"
.include "data/text/berries.inc"
.include "data/text/shoal_cave.inc"
@@ -6306,77 +6304,7 @@ VerdanturfTown_BattleTentLobby_Text_2C6878: @ 82C6878
.string "The VERDANTURF BATTLE TENT\n"
.string "rules are listed.$"
-LilycoveCity_Harbor_Text_2C68A5: @ 82C68A5
- .string "What's up, youngster?\p"
- .string "What, it's you who's supposed to have\n"
- .string "a tattered old map?\p"
- .string "Let's have a look.\n"
- .string "… … … … … …\p"
- .string "Boy, this is quite a ways away.\n"
- .string "I'm afraid I can't help you…$"
-
-LilycoveCity_Harbor_Text_2C6951: @ 82C6951
- .string "BRINEY: Hold on a second!\p"
- .string "What's the idea of turning down\n"
- .string "someone that I owe so much to?$"
-
-LilycoveCity_Harbor_Text_2C69AA: @ 82C69AA
- .string "{PLAYER}{KUN}, I'm terribly sorry.\p"
- .string "You came to me seeking my help,\n"
- .string "and we almost turned you away.\p"
- .string "Well, let me make things right.\p"
- .string "We'll sail right away, of course!\p"
- .string "Let's find this island on\n"
- .string "this OLD SEA MAP!$"
-
-LilycoveCity_Harbor_Text_2C6A71: @ 82C6A71
- .string "Is it you who brought that odd\n"
- .string "ticket?\p"
- .string "Where you're trying to go is an island\n"
- .string "that's far, far away.\p"
- .string "No one knows what awaits there…\p"
- .string "The very thought excites my blood\n"
- .string "as a sailing man!\p"
- .string "Get on board, youngster!$"
-
-FarawayIsland_Entrance_Text_2C6B42: @ 82C6B42
- .string "CAPT. BRINEY can be so maddeningly\n"
- .string "fickle…\p"
- .string "Do you want to return to LILYCOVE?$"
-
-BirthIsland_Harbor_Text_2C6B90: @ 82C6B90
- .string "What an oddly shaped island, eh?\n"
- .string "Do you want to return to LILYCOVE?$"
-
-LilycoveCity_Harbor_Text_2C6BD4: @ 82C6BD4
- .string "Is it you who brought those\n"
- .string "odd tickets?\p"
- .string "… … …Hm.\p"
- .string "These tickets will get you to islands\n"
- .string "that are far, far away.\p"
- .string "No one knows what awaits there,\n"
- .string "or what may happen there.\p"
- .string "The very thought excites my blood\n"
- .string "as a sailing man!\p"
- .string "Get on board, youngster!\n"
- .string "Where shall we sail first?$"
-
-NavelRock_Harbor_Text_2C6CE6: @ 82C6CE6
- .string "Did… Did you hear that?\n"
- .string "That low growling from deep in there.\p"
- .string "Are you sure it's safe?\n"
- .string "Do you think we should leave?$"
-
-FarawayIsland_Entrance_Text_2C6D5A: @ 82C6D5A
- .string "The writing is fading as if it was\n"
- .string "written a long time ago…\p"
- .string "“…ber, 6th day\n"
- .string "If any human…sets foot here…\l"
- .string "again…et it be a kindhearted pers…\l"
- .string "…ith that hope, I depar…”$"
-
-FarawayIsland_Interior_Text_2C6DFF: @ 82C6DFF
- .string "Myuu…$"
+ .include "data/text/event_ticket_2.inc"
MauvilleCity_Text_2C6E05: @ 82C6E05
.string "This move can be learned only\n"
diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
index 74dd2203c..4ba6db967 100644
--- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
@@ -509,7 +509,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249E43:: @ 8249E43
case 1, BattleFrontier_BattleDomeLobby_EventScript_249E99
case 2, BattleFrontier_BattleDomeLobby_EventScript_249EA7
case 3, BattleFrontier_BattleDomeLobby_EventScript_249EB5
- case 127, BattleFrontier_BattleDomeLobby_EventScript_249EB5
+ case MULTI_B_PRESSED, BattleFrontier_BattleDomeLobby_EventScript_249EB5
end
BattleFrontier_BattleDomeLobby_EventScript_249E8B:: @ 8249E8B
diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
index 46d2fd1bf..f65ffae0d 100644
--- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
@@ -428,7 +428,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9:: @ 825A0B9
case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CFC
case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38
case 3, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66
- case 127, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A110:: @ 825A110
multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
@@ -436,7 +436,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A110:: @ 825A110
case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A146
case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38
case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66
- case 127, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A146:: @ 825A146
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AD61, MSGBOX_DEFAULT
diff --git a/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc b/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc
index 87915cd2c..2011c42df 100644
--- a/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc
@@ -102,7 +102,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185:: @ 825F185
case 8, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F336
case 9, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F359
case 10, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
- case 127, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
+ case MULTI_B_PRESSED, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
end
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F21E:: @ 825F21E
@@ -216,7 +216,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E:: @ 825F38E
case 3, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F459
case 4, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F47C
case 5, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
- case 127, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
+ case MULTI_B_PRESSED, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
end
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F3F0:: @ 825F3F0
@@ -286,7 +286,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1:: @ 825F4B1
case 4, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5AA
case 5, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5CD
case 6, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
- case 127, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
+ case MULTI_B_PRESSED, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
end
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F51E:: @ 825F51E
@@ -368,7 +368,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602:: @ 825F602
case 7, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F785
case 8, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F7A8
case 9, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
- case 127, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
+ case MULTI_B_PRESSED, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D
end
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F690:: @ 825F690
diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
index 486a79755..b2f7d4579 100644
--- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
@@ -274,7 +274,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250AF0:: @ 8250AF0
case 0, BattleFrontier_BattlePyramidLobby_EventScript_250B28
case 1, BattleFrontier_BattlePyramidLobby_EventScript_250B66
case 2, BattleFrontier_BattlePyramidLobby_EventScript_250B27
- case 127, BattleFrontier_BattlePyramidLobby_EventScript_250B27
+ case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250B27
return
BattleFrontier_BattlePyramidLobby_EventScript_250B27:: @ 8250B27
@@ -513,7 +513,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250E09:: @ 8250E09
case 0, BattleFrontier_BattlePyramidLobby_EventScript_250E40
case 1, BattleFrontier_BattlePyramidLobby_EventScript_250E50
case 2, BattleFrontier_BattlePyramidLobby_EventScript_250E60
- case 127, BattleFrontier_BattlePyramidLobby_EventScript_250E60
+ case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250E60
end
BattleFrontier_BattlePyramidLobby_EventScript_250E40:: @ 8250E40
@@ -569,7 +569,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250EA4:: @ 8250EA4
case 2, BattleFrontier_BattlePyramidLobby_EventScript_250F13
case 3, BattleFrontier_BattlePyramidLobby_EventScript_250F21
case 4, BattleFrontier_BattlePyramidLobby_EventScript_250F2F
- case 127, BattleFrontier_BattlePyramidLobby_EventScript_250F2F
+ case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250F2F
end
BattleFrontier_BattlePyramidLobby_EventScript_250EF7:: @ 8250EF7
diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc
index 5b3f88dcf..82b04023f 100644
--- a/data/maps/BattleFrontier_Lounge7/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge7/scripts.inc
@@ -38,7 +38,7 @@ BattleFrontier_Lounge7_EventScript_265284:: @ 8265284
case 8, BattleFrontier_Lounge7_EventScript_26542F
case 9, BattleFrontier_Lounge7_EventScript_26543A
case 10, BattleFrontier_Lounge7_EventScript_265635
- case 127, BattleFrontier_Lounge7_EventScript_265635
+ case MULTI_B_PRESSED, BattleFrontier_Lounge7_EventScript_265635
end
BattleFrontier_Lounge7_EventScript_26532F:: @ 826532F
@@ -62,7 +62,7 @@ BattleFrontier_Lounge7_EventScript_26532F:: @ 826532F
case 8, BattleFrontier_Lounge7_EventScript_26542F
case 9, BattleFrontier_Lounge7_EventScript_26543A
case 10, BattleFrontier_Lounge7_EventScript_265635
- case 127, BattleFrontier_Lounge7_EventScript_265635
+ case MULTI_B_PRESSED, BattleFrontier_Lounge7_EventScript_265635
end
BattleFrontier_Lounge7_EventScript_2653D7:: @ 82653D7
@@ -152,7 +152,7 @@ BattleFrontier_Lounge7_EventScript_265474:: @ 8265474
case 8, BattleFrontier_Lounge7_EventScript_26561F
case 9, BattleFrontier_Lounge7_EventScript_26562A
case 10, BattleFrontier_Lounge7_EventScript_265635
- case 127, BattleFrontier_Lounge7_EventScript_265635
+ case MULTI_B_PRESSED, BattleFrontier_Lounge7_EventScript_265635
end
BattleFrontier_Lounge7_EventScript_26551F:: @ 826551F
@@ -176,7 +176,7 @@ BattleFrontier_Lounge7_EventScript_26551F:: @ 826551F
case 8, BattleFrontier_Lounge7_EventScript_26561F
case 9, BattleFrontier_Lounge7_EventScript_26562A
case 10, BattleFrontier_Lounge7_EventScript_265635
- case 127, BattleFrontier_Lounge7_EventScript_265635
+ case MULTI_B_PRESSED, BattleFrontier_Lounge7_EventScript_265635
end
BattleFrontier_Lounge7_EventScript_2655C7:: @ 82655C7
diff --git a/data/maps/BattleFrontier_ReceptionGate/scripts.inc b/data/maps/BattleFrontier_ReceptionGate/scripts.inc
index b1eef8316..3eac4655b 100644
--- a/data/maps/BattleFrontier_ReceptionGate/scripts.inc
+++ b/data/maps/BattleFrontier_ReceptionGate/scripts.inc
@@ -150,7 +150,7 @@ BattleFrontier_ReceptionGate_EventScript_266320:: @ 8266320
case 7, BattleFrontier_ReceptionGate_EventScript_266410
case 8, BattleFrontier_ReceptionGate_EventScript_26641E
case 9, BattleFrontier_ReceptionGate_EventScript_26642C
- case 127, BattleFrontier_ReceptionGate_EventScript_26642C
+ case MULTI_B_PRESSED, BattleFrontier_ReceptionGate_EventScript_26642C
end
BattleFrontier_ReceptionGate_EventScript_2663AE:: @ 82663AE
diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc
index 5f850ed7b..9ef54cdc8 100644
--- a/data/maps/BirthIsland_Harbor/scripts.inc
+++ b/data/maps/BirthIsland_Harbor/scripts.inc
@@ -4,10 +4,10 @@ BirthIsland_Harbor_MapScripts:: @ 826805C
BirthIsland_Harbor_EventScript_26805D:: @ 826805D
lock
faceplayer
- msgbox BirthIsland_Harbor_Text_2C6B90, MSGBOX_YESNO
+ msgbox BirthIsland_Harbor_Text_SailorReturn, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq BirthIsland_Harbor_EventScript_2680A2
- msgbox BirthIsland_Harbor_Text_2A6A5D, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
@@ -21,7 +21,7 @@ BirthIsland_Harbor_EventScript_26805D:: @ 826805D
end
BirthIsland_Harbor_EventScript_2680A2:: @ 82680A2
- msgbox BirthIsland_Harbor_Text_2A6A82, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT
release
end
diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc
index bd91918c3..e0d54233b 100644
--- a/data/maps/FarawayIsland_Entrance/scripts.inc
+++ b/data/maps/FarawayIsland_Entrance/scripts.inc
@@ -19,10 +19,10 @@ FarawayIsland_Entrance_EventScript_267C9D:: @ 8267C9D
FarawayIsland_Entrance_EventScript_267CA2:: @ 8267CA2
lock
faceplayer
- msgbox FarawayIsland_Entrance_Text_2C6B42, MSGBOX_YESNO
+ msgbox FarawayIsland_Entrance_Text_SailorReturn, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq FarawayIsland_Entrance_EventScript_267CE7
- msgbox FarawayIsland_Entrance_Text_2A6A5D, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
@@ -36,11 +36,11 @@ FarawayIsland_Entrance_EventScript_267CA2:: @ 8267CA2
end
FarawayIsland_Entrance_EventScript_267CE7:: @ 8267CE7
- msgbox FarawayIsland_Entrance_Text_2A6A82, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT
release
end
FarawayIsland_Entrance_EventScript_267CF1:: @ 8267CF1
- msgbox FarawayIsland_Entrance_Text_2C6D5A, MSGBOX_SIGN
+ msgbox FarawayIsland_Entrance_Text_Sign, MSGBOX_SIGN
end
diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc
index de6545ec3..3b8f1f88f 100644
--- a/data/maps/FarawayIsland_Interior/scripts.inc
+++ b/data/maps/FarawayIsland_Interior/scripts.inc
@@ -122,7 +122,7 @@ FarawayIsland_Interior_EventScript_267DF2:: @ 8267DF2
waitmovement 0
setvar VAR_0x8004, 0
special sub_81D4A90
- message FarawayIsland_Interior_Text_2C6DFF
+ message FarawayIsland_Interior_Text_Mew
waitse
playmoncry SPECIES_MEW, 2
compare VAR_FACING, 2
diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc
index 9f9442ffd..3a4753d8a 100644
--- a/data/maps/LilycoveCity_ContestLobby/scripts.inc
+++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc
@@ -882,7 +882,7 @@ LilycoveCity_ContestLobby_EventScript_21ABA6:: @ 821ABA6
case 0, LilycoveCity_ContestLobby_EventScript_21AC0B
case 1, LilycoveCity_ContestLobby_EventScript_21ABE3
case 2, LilycoveCity_ContestLobby_EventScript_21A97F
- case 127, LilycoveCity_ContestLobby_EventScript_21A97F
+ case MULTI_B_PRESSED, LilycoveCity_ContestLobby_EventScript_21A97F
end
LilycoveCity_ContestLobby_EventScript_21ABE3:: @ 821ABE3
diff --git a/data/maps/LilycoveCity_Harbor/map.json b/data/maps/LilycoveCity_Harbor/map.json
index 28e2366e6..1b97c298d 100644
--- a/data/maps/LilycoveCity_Harbor/map.json
+++ b/data/maps/LilycoveCity_Harbor/map.json
@@ -24,7 +24,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "LilycoveCity_Harbor_EventScript_21E00F",
+ "script": "LilycoveCity_Harbor_EventScript_FerryAttendant",
"flag": "FLAG_HIDE_LILYCOVE_HARBOR_FERRY_ATTENDANT"
},
{
@@ -50,7 +50,7 @@
"movement_range_y": 1,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "LilycoveCity_Harbor_EventScript_21E637",
+ "script": "LilycoveCity_Harbor_EventScript_Sailor",
"flag": "0"
},
{
@@ -77,7 +77,7 @@
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
"script": "0x0",
- "flag": "FLAG_HIDE_LILYCOVE_HARBOR_EON_TICKET_TAKER"
+ "flag": "FLAG_HIDE_LILYCOVE_HARBOR_EVENT_TICKET_TAKER"
}
],
"warp_events": [
diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc
index 4b446c39b..292180d31 100644
--- a/data/maps/LilycoveCity_Harbor/scripts.inc
+++ b/data/maps/LilycoveCity_Harbor/scripts.inc
@@ -6,106 +6,107 @@ LilycoveCity_Harbor_OnTransition: @ 821E006
setescapewarp MAP_LILYCOVE_CITY, 255, 12, 33
end
-LilycoveCity_Harbor_EventScript_21E00F:: @ 821E00F
+LilycoveCity_Harbor_EventScript_FerryAttendant:: @ 821E00F
lock
faceplayer
- goto_if_unset FLAG_SYS_GAME_CLEAR, LilycoveCity_Harbor_EventScript_21E54D
- call LilycoveCity_Harbor_EventScript_21E194
- call LilycoveCity_Harbor_EventScript_21E1C6
- call LilycoveCity_Harbor_EventScript_21E1F8
- call LilycoveCity_Harbor_EventScript_21E22A
- call LilycoveCity_Harbor_EventScript_21E25C
- call LilycoveCity_Harbor_EventScript_21E2A6
+ goto_if_unset FLAG_SYS_GAME_CLEAR, LilycoveCity_Harbor_EventScript_FerryUnavailable
+ call LilycoveCity_Harbor_EventScript_GetEonTicketState
+ call LilycoveCity_Harbor_EventScript_GetAuroraTicketState
+ call LilycoveCity_Harbor_EventScript_GetOldSeaMapState
+ call LilycoveCity_Harbor_EventScript_GetMysticTicketState
+ call LilycoveCity_Harbor_EventScript_GetFirstTimeShowingTicket
+ call LilycoveCity_Harbor_EventScript_GetHasTicketsState
compare VAR_TEMP_C, 2
- goto_if_eq LilycoveCity_Harbor_EventScript_21E350
+ goto_if_eq LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime
compare VAR_TEMP_B, 1
- goto_if_eq LilycoveCity_Harbor_EventScript_21E2F0
+ goto_if_eq LilycoveCity_Harbor_EventScript_EonTicketFirstTime
compare VAR_TEMP_B, 2
- goto_if_eq LilycoveCity_Harbor_EventScript_21E320
+ goto_if_eq LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime
compare VAR_TEMP_B, 4
- goto_if_eq LilycoveCity_Harbor_EventScript_21E350
- compare VAR_TEMP_B, 8
- goto_if_eq LilycoveCity_Harbor_EventScript_21E41D
+ goto_if_eq LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime
+ compare VAR_TEMP_B, 8
+ goto_if_eq LilycoveCity_Harbor_EventScript_MysticTicketFirstTime
compare VAR_TEMP_B, 0
- goto_if_ne LilycoveCity_Harbor_EventScript_21E44D
- goto LilycoveCity_Harbor_EventScript_21E080
+ goto_if_ne LilycoveCity_Harbor_EventScript_MultipleEventTicketsFirstTime
+ goto LilycoveCity_Harbor_EventScript_NoFirstTimeEventTickets
end
-LilycoveCity_Harbor_EventScript_21E080:: @ 821E080
+@ First goto_if_eq is unnecessary; identical scripts
+LilycoveCity_Harbor_EventScript_NoFirstTimeEventTickets:: @ 821E080
compare VAR_TEMP_A, 0
- goto_if_eq LilycoveCity_Harbor_EventScript_21E557
- msgbox LilycoveCity_Harbor_Text_21E758, MSGBOX_DEFAULT
- message LilycoveCity_Harbor_Text_21E7ED
+ goto_if_eq LilycoveCity_Harbor_EventScript_NoEventTickets
+ msgbox LilycoveCity_Harbor_Text_MayISeeYourTicket, MSGBOX_DEFAULT
+ message LilycoveCity_Harbor_Text_FlashTicketWhereTo
waitmessage
- goto LilycoveCity_Harbor_EventScript_21E09F
+ goto LilycoveCity_Harbor_EventScript_FerryRegularLocationSelect
end
-LilycoveCity_Harbor_EventScript_21E09F:: @ 821E09F
+LilycoveCity_Harbor_EventScript_FerryRegularLocationSelect:: @ 821E09F
setvar VAR_0x8004, 0
- special sub_80E2548
+ special ScriptMenu_CreateLilycoveSSTidalMultichoice
waitstate
- special sub_80E2878
+ special GetLilycoveSSTidalSelection
switch VAR_RESULT
- case 0, LilycoveCity_Harbor_EventScript_21E149
- case 1, LilycoveCity_Harbor_EventScript_21E171
- case 2, LilycoveCity_Harbor_EventScript_21E109
- case 3, LilycoveCity_Harbor_EventScript_21E119
- case 4, LilycoveCity_Harbor_EventScript_21E129
- case 5, LilycoveCity_Harbor_EventScript_21E139
- case 6, LilycoveCity_Harbor_EventScript_21E626
- case 127, LilycoveCity_Harbor_EventScript_21E626
+ case 0, LilycoveCity_Harbor_EventScript_GoToSlateport
+ case 1, LilycoveCity_Harbor_EventScript_GoToBattleFrontier
+ case 2, LilycoveCity_Harbor_EventScript_GoToSouthernIsland
+ case 3, LilycoveCity_Harbor_EventScript_GoToNavelRock
+ case 4, LilycoveCity_Harbor_EventScript_GoToBirthIsland
+ case 5, LilycoveCity_Harbor_EventScript_GoToFarawayIsland
+ case 6, LilycoveCity_Harbor_EventScript_ExitSailSelect
+ case MULTI_B_PRESSED, LilycoveCity_Harbor_EventScript_ExitSailSelect
end
-LilycoveCity_Harbor_EventScript_21E109:: @ 821E109
- call LilycoveCity_Harbor_EventScript_21E5CC
+LilycoveCity_Harbor_EventScript_GoToSouthernIsland:: @ 821E109
+ call LilycoveCity_Harbor_EventScript_BoardFerry
warp MAP_SOUTHERN_ISLAND_EXTERIOR, 255, 13, 22
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E119:: @ 821E119
- call LilycoveCity_Harbor_EventScript_21E5CC
+LilycoveCity_Harbor_EventScript_GoToNavelRock:: @ 821E119
+ call LilycoveCity_Harbor_EventScript_BoardFerry
warp MAP_NAVEL_ROCK_HARBOR, 255, 8, 4
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E129:: @ 821E129
- call LilycoveCity_Harbor_EventScript_21E5CC
+LilycoveCity_Harbor_EventScript_GoToBirthIsland:: @ 821E129
+ call LilycoveCity_Harbor_EventScript_BoardFerry
warp MAP_BIRTH_ISLAND_HARBOR, 255, 8, 4
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E139:: @ 821E139
- call LilycoveCity_Harbor_EventScript_21E5CC
+LilycoveCity_Harbor_EventScript_GoToFarawayIsland:: @ 821E139
+ call LilycoveCity_Harbor_EventScript_BoardFerry
warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E149:: @ 821E149
- msgbox LilycoveCity_Harbor_Text_21E864, MSGBOX_YESNO
+LilycoveCity_Harbor_EventScript_GoToSlateport:: @ 821E149
+ msgbox LilycoveCity_Harbor_Text_SlateportItIs, MSGBOX_YESNO
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_Harbor_EventScript_21E5C0
+ goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind
setvar VAR_PORTHOLE_STATE, 5
- call LilycoveCity_Harbor_EventScript_21E5CC
+ call LilycoveCity_Harbor_EventScript_BoardFerry
warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E171:: @ 821E171
- msgbox LilycoveCity_Harbor_Text_21E880, MSGBOX_YESNO
+LilycoveCity_Harbor_EventScript_GoToBattleFrontier:: @ 821E171
+ msgbox LilycoveCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_Harbor_EventScript_21E5C0
- call LilycoveCity_Harbor_EventScript_21E5CC
+ goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind
+ call LilycoveCity_Harbor_EventScript_BoardFerry
warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E194:: @ 821E194
+LilycoveCity_Harbor_EventScript_GetEonTicketState:: @ 821E194
setvar VAR_TEMP_E, 0
goto_if_unset FLAG_SYS_HAS_EON_TICKET, Common_EventScript_NopReturn
checkitem ITEM_EON_TICKET, 1
@@ -116,7 +117,7 @@ LilycoveCity_Harbor_EventScript_21E194:: @ 821E194
setvar VAR_TEMP_E, 2
return
-LilycoveCity_Harbor_EventScript_21E1C6:: @ 821E1C6
+LilycoveCity_Harbor_EventScript_GetAuroraTicketState:: @ 821E1C6
setvar VAR_TEMP_D, 0
goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, Common_EventScript_NopReturn
checkitem ITEM_AURORA_TICKET, 1
@@ -127,7 +128,7 @@ LilycoveCity_Harbor_EventScript_21E1C6:: @ 821E1C6
setvar VAR_TEMP_D, 2
return
-LilycoveCity_Harbor_EventScript_21E1F8:: @ 821E1F8
+LilycoveCity_Harbor_EventScript_GetOldSeaMapState:: @ 821E1F8
setvar VAR_TEMP_C, 0
goto_if_unset FLAG_ENABLE_SHIP_FARAWAY_ISLAND, Common_EventScript_NopReturn
checkitem ITEM_OLD_SEA_MAP, 1
@@ -138,7 +139,7 @@ LilycoveCity_Harbor_EventScript_21E1F8:: @ 821E1F8
setvar VAR_TEMP_C, 2
return
-LilycoveCity_Harbor_EventScript_21E22A:: @ 821E22A
+LilycoveCity_Harbor_EventScript_GetMysticTicketState:: @ 821E22A
setvar VAR_TEMP_9, 0
goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, Common_EventScript_NopReturn
checkitem ITEM_MYSTIC_TICKET, 1
@@ -149,102 +150,102 @@ LilycoveCity_Harbor_EventScript_21E22A:: @ 821E22A
setvar VAR_TEMP_9, 2
return
-LilycoveCity_Harbor_EventScript_21E25C:: @ 821E25C
+LilycoveCity_Harbor_EventScript_GetFirstTimeShowingTicket:: @ 821E25C
setvar VAR_TEMP_B, 0
compare VAR_TEMP_E, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E28E
+ call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingEonTicket
compare VAR_TEMP_D, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E294
+ call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingAuroraTicket
compare VAR_TEMP_C, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E29A
+ call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingOldSeaMap
compare VAR_TEMP_9, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E2A0
+ call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingMysticTicket
return
-LilycoveCity_Harbor_EventScript_21E28E:: @ 821E28E
+LilycoveCity_Harbor_EventScript_SetFirstTimeShowingEonTicket:: @ 821E28E
addvar VAR_TEMP_B, 1
return
-LilycoveCity_Harbor_EventScript_21E294:: @ 821E294
+LilycoveCity_Harbor_EventScript_SetFirstTimeShowingAuroraTicket:: @ 821E294
addvar VAR_TEMP_B, 2
return
-LilycoveCity_Harbor_EventScript_21E29A:: @ 821E29A
+LilycoveCity_Harbor_EventScript_SetFirstTimeShowingOldSeaMap:: @ 821E29A
addvar VAR_TEMP_B, 4
return
-LilycoveCity_Harbor_EventScript_21E2A0:: @ 821E2A0
+LilycoveCity_Harbor_EventScript_SetFirstTimeShowingMysticTicket:: @ 821E2A0
addvar VAR_TEMP_B, 8
return
-LilycoveCity_Harbor_EventScript_21E2A6:: @ 821E2A6
+LilycoveCity_Harbor_EventScript_GetHasTicketsState:: @ 821E2A6
setvar VAR_TEMP_A, 0
compare VAR_TEMP_E, 1
- call_if_eq LilycoveCity_Harbor_EventScript_21E2D8
+ call_if_eq LilycoveCity_Harbor_EventScript_SetHasEonTicket
compare VAR_TEMP_D, 1
- call_if_eq LilycoveCity_Harbor_EventScript_21E2DE
+ call_if_eq LilycoveCity_Harbor_EventScript_SetHasAuroraTicket
compare VAR_TEMP_C, 1
- call_if_eq LilycoveCity_Harbor_EventScript_21E2E4
+ call_if_eq LilycoveCity_Harbor_EventScript_SetHasOldSeaMap
compare VAR_TEMP_9, 1
- call_if_eq LilycoveCity_Harbor_EventScript_21E2EA
+ call_if_eq LilycoveCity_Harbor_EventScript_SetHasMysticTicket
return
-LilycoveCity_Harbor_EventScript_21E2D8:: @ 821E2D8
+LilycoveCity_Harbor_EventScript_SetHasEonTicket:: @ 821E2D8
addvar VAR_TEMP_A, 1
return
-LilycoveCity_Harbor_EventScript_21E2DE:: @ 821E2DE
+LilycoveCity_Harbor_EventScript_SetHasAuroraTicket:: @ 821E2DE
addvar VAR_TEMP_A, 2
return
-LilycoveCity_Harbor_EventScript_21E2E4:: @ 821E2E4
+LilycoveCity_Harbor_EventScript_SetHasOldSeaMap:: @ 821E2E4
addvar VAR_TEMP_A, 4
return
-LilycoveCity_Harbor_EventScript_21E2EA:: @ 821E2EA
+LilycoveCity_Harbor_EventScript_SetHasMysticTicket:: @ 821E2EA
addvar VAR_TEMP_A, 8
return
-LilycoveCity_Harbor_EventScript_21E2F0:: @ 821E2F0
+LilycoveCity_Harbor_EventScript_EonTicketFirstTime:: @ 821E2F0
setflag FLAG_HAS_EON_TICKET
- msgbox LilycoveCity_Harbor_Text_2A68D2, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_ThatPass, MSGBOX_DEFAULT
closemessage
- call LilycoveCity_Harbor_EventScript_21E4EE
- msgbox LilycoveCity_Harbor_Text_2A68FC, MSGBOX_DEFAULT
- goto LilycoveCity_Harbor_EventScript_21E30F
+ call LilycoveCity_Harbor_EventScript_GetEventTicketSailor
+ msgbox EventTicket_Text_ShowEonTicket, MSGBOX_DEFAULT
+ goto LilycoveCity_Harbor_EventScript_GoToSouthernIslandFirstTime
end
-LilycoveCity_Harbor_EventScript_21E30F:: @ 821E30F
+LilycoveCity_Harbor_EventScript_GoToSouthernIslandFirstTime:: @ 821E30F
closemessage
- call LilycoveCity_Harbor_EventScript_21E514
+ call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor
warp MAP_SOUTHERN_ISLAND_EXTERIOR, 255, 13, 22
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E320:: @ 821E320
+LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime:: @ 821E320
setflag FLAG_HAS_AURORA_TICKET
- msgbox LilycoveCity_Harbor_Text_2A68D2, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_ThatPass, MSGBOX_DEFAULT
closemessage
- call LilycoveCity_Harbor_EventScript_21E4EE
- msgbox LilycoveCity_Harbor_Text_2C6A71, MSGBOX_DEFAULT
- goto LilycoveCity_Harbor_EventScript_21E33F
+ call LilycoveCity_Harbor_EventScript_GetEventTicketSailor
+ msgbox EventTicket_Text_OddTicketGetOnBoard, MSGBOX_DEFAULT
+ goto LilycoveCity_Harbor_EventScript_GoToBirthIslandFirstTime
end
-LilycoveCity_Harbor_EventScript_21E33F:: @ 821E33F
+LilycoveCity_Harbor_EventScript_GoToBirthIslandFirstTime:: @ 821E33F
closemessage
- call LilycoveCity_Harbor_EventScript_21E514
+ call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor
warp MAP_BIRTH_ISLAND_HARBOR, 255, 8, 4
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E350:: @ 821E350
+LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime:: @ 821E350
setflag FLAG_HAS_OLD_SEA_MAP
- msgbox LilycoveCity_Harbor_Text_2A6848, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_ShowOldSeaMap, MSGBOX_DEFAULT
closemessage
- call LilycoveCity_Harbor_EventScript_21E4EE
- msgbox LilycoveCity_Harbor_Text_2C68A5, MSGBOX_DEFAULT
+ call LilycoveCity_Harbor_EventScript_GetEventTicketSailor
+ msgbox EventTicket_Text_OldSeaMapTooFar, MSGBOX_DEFAULT
closemessage
applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
@@ -253,80 +254,80 @@ LilycoveCity_Harbor_EventScript_21E350:: @ 821E350
waitmovement 0
applymovement 4, Common_Movement_Delay48
waitmovement 0
- compare VAR_FACING, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E656
- compare VAR_FACING, 4
- call_if_eq LilycoveCity_Harbor_EventScript_21E661
+ compare VAR_FACING, DIR_NORTH
+ call_if_eq LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayNorth
+ compare VAR_FACING, DIR_EAST
+ call_if_eq LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayEast
addobject 5
- compare VAR_FACING, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E675
- compare VAR_FACING, 4
- call_if_eq LilycoveCity_Harbor_EventScript_21E680
- msgbox LilycoveCity_Harbor_Text_2C6951, MSGBOX_DEFAULT
- compare VAR_FACING, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E68B
- compare VAR_FACING, 4
- call_if_eq LilycoveCity_Harbor_EventScript_21E696
- msgbox LilycoveCity_Harbor_Text_2C69AA, MSGBOX_DEFAULT
+ compare VAR_FACING, DIR_NORTH
+ call_if_eq LilycoveCity_Harbor_EventScript_BrineyFaceSailorNorth
+ compare VAR_FACING, DIR_EAST
+ call_if_eq LilycoveCity_Harbor_EventScript_BrineyFaceSailorEast
+ msgbox EventTicket_Text_BrineyHoldOnASecond, MSGBOX_DEFAULT
+ compare VAR_FACING, DIR_NORTH
+ call_if_eq LilycoveCity_Harbor_EventScript_BrineyFacePlayerNorth
+ compare VAR_FACING, DIR_EAST
+ call_if_eq LilycoveCity_Harbor_EventScript_BrineyFacePlayerEast
+ msgbox EventTicket_Text_BrineyLetsSail, MSGBOX_DEFAULT
closemessage
- compare VAR_FACING, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E6A1
- compare VAR_FACING, 4
- call_if_eq LilycoveCity_Harbor_EventScript_21E6BA
+ compare VAR_FACING, DIR_NORTH
+ call_if_eq LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorNorth
+ compare VAR_FACING, DIR_EAST
+ call_if_eq LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast
setvar VAR_0x8004, 2
- call LilycoveCity_Harbor_EventScript_2721E2
+ call Common_EventScript_FerryDepart
warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E40C:: @ 821E40C
+LilycoveCity_Harbor_EventScript_GoToFarawayIslandFirstTime:: @ 821E40C
closemessage
- call LilycoveCity_Harbor_EventScript_21E514
+ call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor
warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E41D:: @ 821E41D
+LilycoveCity_Harbor_EventScript_MysticTicketFirstTime:: @ 821E41D
setflag FLAG_HAS_MYSTIC_TICKET
- msgbox LilycoveCity_Harbor_Text_2A68D2, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_ThatPass, MSGBOX_DEFAULT
closemessage
- call LilycoveCity_Harbor_EventScript_21E4EE
- msgbox LilycoveCity_Harbor_Text_2C6A71, MSGBOX_DEFAULT
- goto LilycoveCity_Harbor_EventScript_21E43C
+ call LilycoveCity_Harbor_EventScript_GetEventTicketSailor
+ msgbox EventTicket_Text_OddTicketGetOnBoard, MSGBOX_DEFAULT
+ goto LilycoveCity_Harbor_EventScript_GoToNavelRockFirstTime
end
-LilycoveCity_Harbor_EventScript_21E43C:: @ 821E43C
+LilycoveCity_Harbor_EventScript_GoToNavelRockFirstTime:: @ 821E43C
closemessage
- call LilycoveCity_Harbor_EventScript_21E514
+ call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor
warp MAP_NAVEL_ROCK_HARBOR, 255, 8, 4
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E44D:: @ 821E44D
- msgbox LilycoveCity_Harbor_Text_2A68D2, MSGBOX_DEFAULT
+LilycoveCity_Harbor_EventScript_MultipleEventTicketsFirstTime:: @ 821E44D
+ msgbox EventTicket_Text_ThatPass, MSGBOX_DEFAULT
closemessage
- call LilycoveCity_Harbor_EventScript_21E4EE
- message LilycoveCity_Harbor_Text_2C6BD4
+ call LilycoveCity_Harbor_EventScript_GetEventTicketSailor
+ message EventTicket_Text_OddTicketsWhereTo
waitmessage
setvar VAR_0x8004, 1
- special sub_80E2548
+ special ScriptMenu_CreateLilycoveSSTidalMultichoice
waitstate
- special sub_80E2878
+ special GetLilycoveSSTidalSelection
switch VAR_RESULT
- case 2, LilycoveCity_Harbor_EventScript_21E30F
- case 3, LilycoveCity_Harbor_EventScript_21E43C
- case 4, LilycoveCity_Harbor_EventScript_21E33F
- case 5, LilycoveCity_Harbor_EventScript_21E40C
- case 6, LilycoveCity_Harbor_EventScript_21E4B6
- case 127, LilycoveCity_Harbor_EventScript_21E4B6
+ case 2, LilycoveCity_Harbor_EventScript_GoToSouthernIslandFirstTime
+ case 3, LilycoveCity_Harbor_EventScript_GoToNavelRockFirstTime
+ case 4, LilycoveCity_Harbor_EventScript_GoToBirthIslandFirstTime
+ case 5, LilycoveCity_Harbor_EventScript_GoToFarawayIslandFirstTime
+ case 6, LilycoveCity_Harbor_EventScript_ExitFirstTimeTicketSailSelect
+ case MULTI_B_PRESSED, LilycoveCity_Harbor_EventScript_ExitFirstTimeTicketSailSelect
release
end
-LilycoveCity_Harbor_EventScript_21E4B6:: @ 821E4B6
- msgbox LilycoveCity_Harbor_Text_2A6A82, MSGBOX_DEFAULT
+LilycoveCity_Harbor_EventScript_ExitFirstTimeTicketSailSelect:: @ 821E4B6
+ msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT
closemessage
applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
@@ -337,11 +338,11 @@ LilycoveCity_Harbor_EventScript_21E4B6:: @ 821E4B6
waitmovement 0
showobjectat 1, MAP_LILYCOVE_CITY_HARBOR
delay 30
- msgbox LilycoveCity_Harbor_Text_21E842, MSGBOX_DEFAULT
+ msgbox LilycoveCity_Harbor_Text_SailAnotherTime, MSGBOX_DEFAULT
release
end
-LilycoveCity_Harbor_EventScript_21E4EE:: @ 821E4EE
+LilycoveCity_Harbor_EventScript_GetEventTicketSailor:: @ 821E4EE
applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 30
@@ -353,194 +354,198 @@ LilycoveCity_Harbor_EventScript_21E4EE:: @ 821E4EE
waitmovement 0
return
-LilycoveCity_Harbor_EventScript_21E514:: @ 821E514
+LilycoveCity_Harbor_EventScript_BoardFerryWithSailor:: @ 821E514
applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 30
removeobject 4
- compare VAR_FACING, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E61B
- compare VAR_FACING, 4
- call_if_eq LilycoveCity_Harbor_EventScript_21E610
+ compare VAR_FACING, DIR_NORTH
+ call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth
+ compare VAR_FACING, DIR_EAST
+ call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast
delay 30
hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY
setvar VAR_0x8004, 2
- call LilycoveCity_Harbor_EventScript_2721E2
+ call Common_EventScript_FerryDepart
return
-LilycoveCity_Harbor_EventScript_21E54D:: @ 821E54D
- msgbox LilycoveCity_Harbor_Text_21E6F1, MSGBOX_DEFAULT
+LilycoveCity_Harbor_EventScript_FerryUnavailable:: @ 821E54D
+ msgbox LilycoveCity_Harbor_Text_FerryUnavailable, MSGBOX_DEFAULT
release
end
-LilycoveCity_Harbor_EventScript_21E557:: @ 821E557
- msgbox LilycoveCity_Harbor_Text_21E758, MSGBOX_DEFAULT
- message LilycoveCity_Harbor_Text_21E7ED
+LilycoveCity_Harbor_EventScript_NoEventTickets:: @ 821E557
+ msgbox LilycoveCity_Harbor_Text_MayISeeYourTicket, MSGBOX_DEFAULT
+ message LilycoveCity_Harbor_Text_FlashTicketWhereTo
waitmessage
- goto LilycoveCity_Harbor_EventScript_21E09F
+ goto LilycoveCity_Harbor_EventScript_FerryRegularLocationSelect
end
-LilycoveCity_Harbor_EventScript_21E56B:: @ 821E56B
- msgbox LilycoveCity_Harbor_Text_21E792, MSGBOX_DEFAULT
+@ Unused
+LilycoveCity_Harbor_EventScript_NoTicket:: @ 821E56B
+ msgbox LilycoveCity_Harbor_Text_NoTicket, MSGBOX_DEFAULT
release
end
-LilycoveCity_Harbor_EventScript_21E575:: @ 821E575
- msgbox LilycoveCity_Harbor_Text_21E864, MSGBOX_YESNO
+@ Unused
+LilycoveCity_Harbor_EventScript_GoToSlateportUnused:: @ 821E575
+ msgbox LilycoveCity_Harbor_Text_SlateportItIs, MSGBOX_YESNO
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_Harbor_EventScript_21E5C0
+ goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind
setvar VAR_PORTHOLE_STATE, 5
- call LilycoveCity_Harbor_EventScript_21E5CC
+ call LilycoveCity_Harbor_EventScript_BoardFerry
warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E59D:: @ 821E59D
- msgbox LilycoveCity_Harbor_Text_21E880, MSGBOX_YESNO
+@ Unused
+LilycoveCity_Harbor_EventScript_GoToBattleFrontierUnused:: @ 821E59D
+ msgbox LilycoveCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_Harbor_EventScript_21E5C0
- call LilycoveCity_Harbor_EventScript_21E5CC
+ goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind
+ call LilycoveCity_Harbor_EventScript_BoardFerry
warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67
waitstate
release
end
-LilycoveCity_Harbor_EventScript_21E5C0:: @ 821E5C0
- message LilycoveCity_Harbor_Text_21E8CC
+LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind:: @ 821E5C0
+ message LilycoveCity_Harbor_Text_WhereWouldYouLikeToGo
waitmessage
- goto LilycoveCity_Harbor_EventScript_21E09F
+ goto LilycoveCity_Harbor_EventScript_FerryRegularLocationSelect
end
-LilycoveCity_Harbor_EventScript_21E5CC:: @ 821E5CC
- msgbox LilycoveCity_Harbor_Text_21E89D, MSGBOX_DEFAULT
+LilycoveCity_Harbor_EventScript_BoardFerry:: @ 821E5CC
+ msgbox LilycoveCity_Harbor_Text_PleaseBoard, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 30
hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR
- compare VAR_FACING, 2
- call_if_eq LilycoveCity_Harbor_EventScript_21E61B
- compare VAR_FACING, 4
- call_if_eq LilycoveCity_Harbor_EventScript_21E610
+ compare VAR_FACING, DIR_NORTH
+ call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth
+ compare VAR_FACING, DIR_EAST
+ call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast
delay 30
hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY
setvar VAR_0x8004, 2
- call LilycoveCity_Harbor_EventScript_2721E2
+ call Common_EventScript_FerryDepart
return
-LilycoveCity_Harbor_EventScript_21E610:: @ 821E610
- applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_Harbor_Movement_21E630
+LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast:: @ 821E610
+ applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardFerryEast
waitmovement 0
return
-LilycoveCity_Harbor_EventScript_21E61B:: @ 821E61B
- applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_Harbor_Movement_21E633
+LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth:: @ 821E61B
+ applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardFerryNorth
waitmovement 0
return
-LilycoveCity_Harbor_EventScript_21E626:: @ 821E626
- msgbox LilycoveCity_Harbor_Text_21E842, MSGBOX_DEFAULT
+LilycoveCity_Harbor_EventScript_ExitSailSelect:: @ 821E626
+ msgbox LilycoveCity_Harbor_Text_SailAnotherTime, MSGBOX_DEFAULT
release
end
-LilycoveCity_Harbor_Movement_21E630: @ 821E630
+LilycoveCity_Harbor_Movement_PlayerBoardFerryEast: @ 821E630
walk_right
walk_in_place_fastest_up
step_end
-LilycoveCity_Harbor_Movement_21E633: @ 821E633
+LilycoveCity_Harbor_Movement_PlayerBoardFerryNorth: @ 821E633
walk_up
step_end
+@ Unused
LilycoveCity_Harbor_Movement_21E635: @ 821E635
walk_up
step_end
-LilycoveCity_Harbor_EventScript_21E637:: @ 821E637
+LilycoveCity_Harbor_EventScript_Sailor:: @ 821E637
lock
faceplayer
- goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_Harbor_EventScript_21E64C
- msgbox LilycoveCity_Harbor_Text_21E8EE, MSGBOX_DEFAULT
+ goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_Harbor_EventScript_SailorFerryAvailable
+ msgbox LilycoveCity_Harbor_Text_SailorFerryUnavailable, MSGBOX_DEFAULT
release
end
-LilycoveCity_Harbor_EventScript_21E64C:: @ 821E64C
- msgbox LilycoveCity_Harbor_Text_21E976, MSGBOX_DEFAULT
+LilycoveCity_Harbor_EventScript_SailorFerryAvailable:: @ 821E64C
+ msgbox LilycoveCity_Harbor_Text_SailorFerryAvailable, MSGBOX_DEFAULT
release
end
-LilycoveCity_Harbor_EventScript_21E656:: @ 821E656
- applymovement 4, LilycoveCity_Harbor_Movement_21E66C
+LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayNorth:: @ 821E656
+ applymovement 4, LilycoveCity_Harbor_Movement_SailorOutOfWayNorth
waitmovement 0
return
-LilycoveCity_Harbor_EventScript_21E661:: @ 821E661
- applymovement 4, LilycoveCity_Harbor_Movement_21E671
+LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayEast:: @ 821E661
+ applymovement 4, LilycoveCity_Harbor_Movement_SailorOutOfWayEast
waitmovement 0
return
-LilycoveCity_Harbor_Movement_21E66C: @ 821E66C
+LilycoveCity_Harbor_Movement_SailorOutOfWayNorth: @ 821E66C
walk_in_place_fastest_right
lock_facing_direction
walk_left
unlock_facing_direction
step_end
-LilycoveCity_Harbor_Movement_21E671: @ 821E671
+LilycoveCity_Harbor_Movement_SailorOutOfWayEast: @ 821E671
lock_facing_direction
walk_down
unlock_facing_direction
step_end
-LilycoveCity_Harbor_EventScript_21E675:: @ 821E675
+LilycoveCity_Harbor_EventScript_BrineyFaceSailorNorth:: @ 821E675
applymovement 5, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
-LilycoveCity_Harbor_EventScript_21E680:: @ 821E680
+LilycoveCity_Harbor_EventScript_BrineyFaceSailorEast:: @ 821E680
applymovement 5, Common_Movement_WalkInPlaceDown
waitmovement 0
return
-LilycoveCity_Harbor_EventScript_21E68B:: @ 821E68B
+LilycoveCity_Harbor_EventScript_BrineyFacePlayerNorth:: @ 821E68B
applymovement 5, Common_Movement_WalkInPlaceDown
waitmovement 0
return
-LilycoveCity_Harbor_EventScript_21E696:: @ 821E696
+LilycoveCity_Harbor_EventScript_BrineyFacePlayerEast:: @ 821E696
applymovement 5, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
-LilycoveCity_Harbor_EventScript_21E6A1:: @ 821E6A1
- applymovement 5, LilycoveCity_Harbor_Movement_21E6D3
- applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_Harbor_Movement_21E6D7
- applymovement 4, LilycoveCity_Harbor_Movement_21E6DC
+LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorNorth:: @ 821E6A1
+ applymovement 5, LilycoveCity_Harbor_Movement_BrineyBoardFerry
+ applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardWithBrineyNorth
+ applymovement 4, LilycoveCity_Harbor_Movement_SailorBoardWithBrineyNorth
waitmovement 0
return
-LilycoveCity_Harbor_EventScript_21E6BA:: @ 821E6BA
- applymovement 5, LilycoveCity_Harbor_Movement_21E6D3
- applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_Harbor_Movement_21E6E4
- applymovement 4, LilycoveCity_Harbor_Movement_21E6EA
+LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast:: @ 821E6BA
+ applymovement 5, LilycoveCity_Harbor_Movement_BrineyBoardFerry
+ applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardWithBrineyEast
+ applymovement 4, LilycoveCity_Harbor_Movement_SailorBoardWithBrineyEast
waitmovement 0
return
-LilycoveCity_Harbor_Movement_21E6D3: @ 821E6D3
+LilycoveCity_Harbor_Movement_BrineyBoardFerry: @ 821E6D3
walk_in_place_fastest_up
delay_8
set_invisible
step_end
-LilycoveCity_Harbor_Movement_21E6D7: @ 821E6D7
+LilycoveCity_Harbor_Movement_PlayerBoardWithBrineyNorth: @ 821E6D7
delay_16
walk_up
delay_16
set_invisible
step_end
-LilycoveCity_Harbor_Movement_21E6DC: @ 821E6DC
+LilycoveCity_Harbor_Movement_SailorBoardWithBrineyNorth: @ 821E6DC
delay_16
delay_16
delay_16
@@ -550,7 +555,7 @@ LilycoveCity_Harbor_Movement_21E6DC: @ 821E6DC
set_invisible
step_end
-LilycoveCity_Harbor_Movement_21E6E4: @ 821E6E4
+LilycoveCity_Harbor_Movement_PlayerBoardWithBrineyEast: @ 821E6E4
delay_16
walk_right
walk_in_place_fastest_up
@@ -558,7 +563,7 @@ LilycoveCity_Harbor_Movement_21E6E4: @ 821E6E4
set_invisible
step_end
-LilycoveCity_Harbor_Movement_21E6EA: @ 821E6EA
+LilycoveCity_Harbor_Movement_SailorBoardWithBrineyEast: @ 821E6EA
delay_16
delay_16
delay_16
@@ -567,51 +572,50 @@ LilycoveCity_Harbor_Movement_21E6EA: @ 821E6EA
set_invisible
step_end
-LilycoveCity_Harbor_Text_21E6F1: @ 821E6F1
+LilycoveCity_Harbor_Text_FerryUnavailable: @ 821E6F1
.string "I beg your pardon?\n"
.string "You're looking for a ship?\p"
.string "I'm sorry, the ferry service isn't\n"
.string "available at present…$"
-LilycoveCity_Harbor_Text_21E758: @ 821E758
+LilycoveCity_Harbor_Text_MayISeeYourTicket: @ 821E758
.string "Hello, are you here for the ferry?\n"
.string "May I see your TICKET?$"
-
-LilycoveCity_Harbor_Text_21E792: @ 821E792
+LilycoveCity_Harbor_Text_NoTicket: @ 821E792
.string "{PLAYER} doesn't have the TICKET…\p"
.string "I'm terribly sorry.\p"
.string "You must have a TICKET to board\n"
.string "the ferry.$"
-LilycoveCity_Harbor_Text_21E7ED: @ 821E7ED
+LilycoveCity_Harbor_Text_FlashTicketWhereTo: @ 821E7ED
.string "{PLAYER} flashed the TICKET.\p"
.string "Perfect! That's all you need!\p"
.string "And where would you like to go?$"
-LilycoveCity_Harbor_Text_21E842: @ 821E842
+LilycoveCity_Harbor_Text_SailAnotherTime: @ 821E842
.string "Please sail with us another time!$"
-LilycoveCity_Harbor_Text_21E864: @ 821E864
+LilycoveCity_Harbor_Text_SlateportItIs: @ 821E864
.string "SLATEPORT CITY it is, then!$"
-LilycoveCity_Harbor_Text_21E880: @ 821E880
+LilycoveCity_Harbor_Text_BattleFrontierItIs: @ 821E880
.string "BATTLE FRONTIER it is, then!$"
-LilycoveCity_Harbor_Text_21E89D: @ 821E89D
+LilycoveCity_Harbor_Text_PleaseBoard: @ 821E89D
.string "Please board the ferry and wait for\n"
.string "departure.$"
-LilycoveCity_Harbor_Text_21E8CC: @ 821E8CC
+LilycoveCity_Harbor_Text_WhereWouldYouLikeToGo: @ 821E8CC
.string "Then, where would you like to go?$"
-LilycoveCity_Harbor_Text_21E8EE: @ 821E8EE
+LilycoveCity_Harbor_Text_SailorFerryUnavailable: @ 821E8EE
.string "Until they finish making the ferry,\n"
.string "we sailors have nothing to do…\p"
.string "I wish they'd get a move on, the folks\n"
.string "at the SHIPYARD in SLATEPORT.$"
-LilycoveCity_Harbor_Text_21E976: @ 821E976
+LilycoveCity_Harbor_Text_SailorFerryAvailable: @ 821E976
.string "The ferry S.S. TIDAL is finally in\n"
.string "operation.\p"
.string "The folks at the SHIPYARD in SLATEPORT\n"
diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
index 948c447bf..d9ba545fb 100644
--- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
@@ -564,7 +564,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CE4D:: @ 821CE4D
setvar VAR_0x8004, 8
switch VAR_RESULT
case 11, LilycoveCity_PokemonTrainerFanClub_EventScript_21CE9F
- case 127, LilycoveCity_PokemonTrainerFanClub_EventScript_21CE9F
+ case MULTI_B_PRESSED, LilycoveCity_PokemonTrainerFanClub_EventScript_21CE9F
setvar VAR_0x8004, 8
special BufferStreakTrainerText
copyvar VAR_0x8006, VAR_0x800A
diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc
index 332e6dbea..873b4fd3b 100644
--- a/data/maps/NavelRock_Harbor/scripts.inc
+++ b/data/maps/NavelRock_Harbor/scripts.inc
@@ -4,10 +4,10 @@ NavelRock_Harbor_MapScripts:: @ 82690BC
NavelRock_Harbor_EventScript_2690BD:: @ 82690BD
lock
faceplayer
- msgbox NavelRock_Harbor_Text_2C6CE6, MSGBOX_YESNO
+ msgbox NavelRock_Harbor_Text_SailorReturn, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq NavelRock_Harbor_EventScript_269102
- msgbox NavelRock_Harbor_Text_2A6A5D, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
@@ -21,7 +21,7 @@ NavelRock_Harbor_EventScript_2690BD:: @ 82690BD
end
NavelRock_Harbor_EventScript_269102:: @ 8269102
- msgbox NavelRock_Harbor_Text_2A6A82, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT
release
end
diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc
index 0a98c4d29..3caeebfc6 100644
--- a/data/maps/RustboroCity/scripts.inc
+++ b/data/maps/RustboroCity/scripts.inc
@@ -78,7 +78,7 @@ RustboroCity_EventScript_1E07AC:: @ 81E07AC
RustboroCity_EventScript_1E07BD:: @ 81E07BD
setflag FLAG_ADDED_MATCH_CALL_TO_POKENAV
- special CreateStartMenuForPokenavTutorial
+ special ScriptMenu_CreateStartMenuForPokenavTutorial
waitstate
switch VAR_RESULT
case 0, RustboroCity_EventScript_1E07AC
diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc
index 64d7f1c0f..d245cdff4 100644
--- a/data/maps/SlateportCity/scripts.inc
+++ b/data/maps/SlateportCity/scripts.inc
@@ -764,7 +764,7 @@ SlateportCity_EventScript_1DD3CA:: @ 81DD3CA
case 9, SlateportCity_EventScript_1DD522
case 10, SlateportCity_EventScript_1DD536
case 11, SlateportCity_EventScript_1DD54A
- case 127, SlateportCity_EventScript_1DD54A
+ case MULTI_B_PRESSED, SlateportCity_EventScript_1DD54A
end
SlateportCity_EventScript_1DD46E:: @ 81DD46E
diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc
index d92f0352c..a4f2f7c6c 100644
--- a/data/maps/SlateportCity_Harbor/scripts.inc
+++ b/data/maps/SlateportCity_Harbor/scripts.inc
@@ -237,7 +237,7 @@ SlateportCity_Harbor_EventScript_20CBE9:: @ 820CBE9
delay 30
hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY
setvar VAR_0x8004, 5
- call SlateportCity_Harbor_EventScript_2721E2
+ call Common_EventScript_FerryDepart
return
SlateportCity_Harbor_EventScript_20CC2D:: @ 820CC2D
diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc
index e3ecfa3db..2ee0ae602 100644
--- a/data/maps/SouthernIsland_Exterior/scripts.inc
+++ b/data/maps/SouthernIsland_Exterior/scripts.inc
@@ -9,10 +9,10 @@ SouthernIsland_Exterior_OnTransition: @ 82429CE
SouthernIsland_Exterior_EventScript_2429D2:: @ 82429D2
lock
faceplayer
- msgbox SouthernIsland_Exterior_Text_2A69F1, MSGBOX_YESNO
+ msgbox EventTicket_Text_SouthernIslandSailBack, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq SouthernIsland_Exterior_EventScript_242A17
- msgbox SouthernIsland_Exterior_Text_2A6A5D, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
@@ -26,7 +26,7 @@ SouthernIsland_Exterior_EventScript_2429D2:: @ 82429D2
end
SouthernIsland_Exterior_EventScript_242A17:: @ 8242A17
- msgbox SouthernIsland_Exterior_Text_2A6A82, MSGBOX_DEFAULT
+ msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT
release
end
@@ -50,6 +50,6 @@ BattleFrontier_OutsideWest_Movement_242A39: @ 8242A39
step_end
SouthernIsland_Exterior_EventScript_242A3C:: @ 8242A3C
- msgbox SouthernIsland_Exterior_Text_2A6AD5, MSGBOX_SIGN
+ msgbox SouthernIsland_Exterior_Text_Sign, MSGBOX_SIGN
end
diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc
index b60d157ae..a9b8c5e0c 100644
--- a/data/maps/SouthernIsland_Interior/scripts.inc
+++ b/data/maps/SouthernIsland_Interior/scripts.inc
@@ -108,7 +108,7 @@ SouthernIsland_Interior_EventScript_242B8F:: @ 8242B8F
end
SouthernIsland_Interior_EventScript_242B9A:: @ 8242B9A
- msgbox SouthernIsland_Interior_Text_2A6AA1, MSGBOX_DEFAULT
+ msgbox SouthernIsland_Interior_Text_Sign, MSGBOX_DEFAULT
releaseall
end
diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
index df0e91241..5bc309663 100644
--- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
@@ -343,7 +343,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201B11:: @ 8201B11
case 4, VerdanturfTown_BattleTentLobby_EventScript_201BB6
case 5, VerdanturfTown_BattleTentLobby_EventScript_201BC4
case 6, VerdanturfTown_BattleTentLobby_EventScript_201BD2
- case 127, VerdanturfTown_BattleTentLobby_EventScript_201BD2
+ case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_201BD2
end
VerdanturfTown_BattleTentLobby_EventScript_201B7E:: @ 8201B7E
diff --git a/data/specials.inc b/data/specials.inc
index 3a02ff83a..f1feaec85 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -273,7 +273,7 @@ gSpecials:: @ 81DBA64
def_special ShowBerryBlenderRecordWindow
def_special ResetTrickHouseEndRoomFlag
def_special SetTrickHouseEndRoomFlag
- def_special ScrSpecial_CreatePCMenu
+ def_special ScriptMenu_CreatePCMultichoice
def_special AccessHallOfFamePC
def_special Special_ShowDiploma
def_special CheckLeadMonCool
@@ -480,7 +480,7 @@ gSpecials:: @ 81DBA64
def_special ShowFrontierGamblerGoMessage
def_special Script_DoRayquazaScene
def_special sub_81C72A4
- def_special CreateStartMenuForPokenavTutorial
+ def_special ScriptMenu_CreateStartMenuForPokenavTutorial
def_special CountPlayerTrainerStars
def_special BufferBattleFrontierTutorMoveName
def_special CloseBattleFrontierTutorWindow
@@ -508,8 +508,8 @@ gSpecials:: @ 81DBA64
def_special sub_813B4E0
def_special ShouldDoBrailleRegicePuzzle
def_special EnableNationalPokedex
- def_special sub_80E2548
- def_special sub_80E2878
+ def_special ScriptMenu_CreateLilycoveSSTidalMultichoice
+ def_special GetLilycoveSSTidalSelection
def_special TurnOnTVScreen
def_special sub_81D4A90
def_special sub_813B514
diff --git a/data/text/eon_ticket.inc b/data/text/event_ticket_1.inc
index d436f2df1..da4d525f6 100644
--- a/data/text/eon_ticket.inc
+++ b/data/text/event_ticket_1.inc
@@ -1,16 +1,16 @@
-LilycoveCity_Harbor_Text_2A6848: @ 82A6848
+EventTicket_Text_ShowOldSeaMap: @ 82A6848
.string "The ferry to SLATEPORT is…\p"
.string "I beg your pardon?\n"
.string "Can we sail to this place on the map?\p"
.string "I know someone who will help you better.\n"
.string "Please wait.$"
-LilycoveCity_Harbor_Text_2A68D2: @ 82A68D2
+EventTicket_Text_ThatPass: @ 82A68D2
.string "The ferry to SLATEPORT is…\p"
.string "Oh?\n"
.string "That PASS…$"
-LilycoveCity_Harbor_Text_2A68FC: @ 82A68FC
+EventTicket_Text_ShowEonTicket: @ 82A68FC
.string "Aye, mate, are you the one who brought\n"
.string "that mighty odd PASS?\p"
.string "I'll tell you, you're trying to reach a\n"
@@ -20,29 +20,22 @@ LilycoveCity_Harbor_Text_2A68FC: @ 82A68FC
.string "That shivers my timbers!\p"
.string "All aboard!$"
-SouthernIsland_Exterior_Text_2A69F1: @ 82A69F1
+EventTicket_Text_SouthernIslandSailBack: @ 82A69F1
.string "Aye, mate, there's nothing here to\n"
.string "see or do on this forgettable island.\p"
.string "What say we sail back to LILYCOVE?$"
-BirthIsland_Harbor_Text_2A6A5D: @ 82A6A5D
-FarawayIsland_Entrance_Text_2A6A5D: @ 82A6A5D
-NavelRock_Harbor_Text_2A6A5D: @ 82A6A5D
-SouthernIsland_Exterior_Text_2A6A5D: @ 82A6A5D
+EventTicket_Text_SailHome: @ 82A6A5D
.string "Aye, right, then!\n"
.string "Sail home we will!$"
-BirthIsland_Harbor_Text_2A6A82: @ 82A6A82
-FarawayIsland_Entrance_Text_2A6A82: @ 82A6A82
-LilycoveCity_Harbor_Text_2A6A82: @ 82A6A82
-NavelRock_Harbor_Text_2A6A82: @ 82A6A82
-SouthernIsland_Exterior_Text_2A6A82: @ 82A6A82
+EventTicket_Text_AsYouLike: @ 82A6A82
.string "Aye, right, as you like, then.$"
-SouthernIsland_Interior_Text_2A6AA1: @ 82A6AA1
+SouthernIsland_Interior_Text_Sign: @ 82A6AA1
.string "“All dreams are but another reality.\n"
.string "Never forget…”$"
-SouthernIsland_Exterior_Text_2A6AD5: @ 82A6AD5
+SouthernIsland_Exterior_Text_Sign: @ 82A6AD5
.string "“Those whose memories fade seek to\n"
.string "carve them in their hearts…”$"
diff --git a/data/text/event_ticket_2.inc b/data/text/event_ticket_2.inc
new file mode 100644
index 000000000..e081edbd9
--- /dev/null
+++ b/data/text/event_ticket_2.inc
@@ -0,0 +1,71 @@
+EventTicket_Text_OldSeaMapTooFar: @ 82C68A5
+ .string "What's up, youngster?\p"
+ .string "What, it's you who's supposed to have\n"
+ .string "a tattered old map?\p"
+ .string "Let's have a look.\n"
+ .string "… … … … … …\p"
+ .string "Boy, this is quite a ways away.\n"
+ .string "I'm afraid I can't help you…$"
+
+EventTicket_Text_BrineyHoldOnASecond: @ 82C6951
+ .string "BRINEY: Hold on a second!\p"
+ .string "What's the idea of turning down\n"
+ .string "someone that I owe so much to?$"
+
+EventTicket_Text_BrineyLetsSail: @ 82C69AA
+ .string "{PLAYER}{KUN}, I'm terribly sorry.\p"
+ .string "You came to me seeking my help,\n"
+ .string "and we almost turned you away.\p"
+ .string "Well, let me make things right.\p"
+ .string "We'll sail right away, of course!\p"
+ .string "Let's find this island on\n"
+ .string "this OLD SEA MAP!$"
+
+EventTicket_Text_OddTicketGetOnBoard: @ 82C6A71
+ .string "Is it you who brought that odd\n"
+ .string "ticket?\p"
+ .string "Where you're trying to go is an island\n"
+ .string "that's far, far away.\p"
+ .string "No one knows what awaits there…\p"
+ .string "The very thought excites my blood\n"
+ .string "as a sailing man!\p"
+ .string "Get on board, youngster!$"
+
+FarawayIsland_Entrance_Text_SailorReturn: @ 82C6B42
+ .string "CAPT. BRINEY can be so maddeningly\n"
+ .string "fickle…\p"
+ .string "Do you want to return to LILYCOVE?$"
+
+BirthIsland_Harbor_Text_SailorReturn: @ 82C6B90
+ .string "What an oddly shaped island, eh?\n"
+ .string "Do you want to return to LILYCOVE?$"
+
+EventTicket_Text_OddTicketsWhereTo: @ 82C6BD4
+ .string "Is it you who brought those\n"
+ .string "odd tickets?\p"
+ .string "… … …Hm.\p"
+ .string "These tickets will get you to islands\n"
+ .string "that are far, far away.\p"
+ .string "No one knows what awaits there,\n"
+ .string "or what may happen there.\p"
+ .string "The very thought excites my blood\n"
+ .string "as a sailing man!\p"
+ .string "Get on board, youngster!\n"
+ .string "Where shall we sail first?$"
+
+NavelRock_Harbor_Text_SailorReturn: @ 82C6CE6
+ .string "Did… Did you hear that?\n"
+ .string "That low growling from deep in there.\p"
+ .string "Are you sure it's safe?\n"
+ .string "Do you think we should leave?$"
+
+FarawayIsland_Entrance_Text_Sign: @ 82C6D5A
+ .string "The writing is fading as if it was\n"
+ .string "written a long time ago…\p"
+ .string "“…ber, 6th day\n"
+ .string "If any human…sets foot here…\l"
+ .string "again…et it be a kindhearted pers…\l"
+ .string "…ith that hope, I depar…”$"
+
+FarawayIsland_Interior_Text_Mew: @ 82C6DFF
+ .string "Myuu…$"
diff --git a/include/constants/flags.h b/include/constants/flags.h
index d097eeb1b..4679e953c 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -701,7 +701,7 @@
#define FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_BRENDAN 0x2E9
#define FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_BRENDAN 0x2EA
#define FLAG_HIDE_SAFARI_ZONE_SOUTH_EAST_EXPANSION 0x2EB
-#define FLAG_HIDE_LILYCOVE_HARBOR_EON_TICKET_TAKER 0x2EC
+#define FLAG_HIDE_LILYCOVE_HARBOR_EVENT_TICKET_TAKER 0x2EC
#define FLAG_HIDE_SLATEPORT_CITY_SCOTT 0x2ED
#define FLAG_HIDE_ROUTE_101_ZIGZAGOON 0x2EE
#define FLAG_HIDE_VICTORY_ROAD_EXIT_WALLY 0x2EF
diff --git a/include/constants/script_menu.h b/include/constants/script_menu.h
index a3a48e588..820ecad6e 100644
--- a/include/constants/script_menu.h
+++ b/include/constants/script_menu.h
@@ -3,123 +3,135 @@
#define MULTICHOICE(name) {name, ARRAY_COUNT(name)}
+#define MAX_MULTICHOICE_WIDTH 28
+
#define MULTI_B_PRESSED 127
// Multichoice Ids
-#define MULTI_BRINEY_ON_DEWFORD 0
-#define MULTI_UNUSED_1 1
-#define MULTI_ENTERINFO 2
-#define MULTI_CONTEST_INFO 3
-#define MULTI_CONTEST_TYPE 4
-#define MULTI_DECOR_NOREGISTRY 5
-#define MULTI_DECOR_REGISTRY 6
-#define MULTI_REGISTER_MENU 7
-#define MULTI_UNUSED_8 8
-#define MULTI_UNUSED_9 9
-#define MULTI_UNUSED_10 10
-#define MULTI_FRONTIER_PASS_INFO 11
-#define MULTI_BIKE 12
-#define MULTI_STATUS_INFO 13
-#define MULTI_BRINEY_OFF_DEWFORD 14
-#define MULTI_UNUSED_15 15
-#define MULTI_VIEWED_PAINTINGS 16
-#define MULTI_YESNOINFO 17
-#define MULTI_BATTLE_MODE 18
-#define MULTI_UNUSED_19 19
-#define MULTI_YESNOINFO_2 20
-#define MULTI_UNUSED_21 21
-#define MULTI_UNUSED_22 22
-#define MULTI_CHALLENGEINFO 23
-#define MULTI_LEVEL_MODE 24
-#define MULTI_MECHADOLL1_Q1 25
-#define MULTI_MECHADOLL1_Q2 26
-#define MULTI_MECHADOLL1_Q3 27
-#define MULTI_MECHADOLL2_Q1 28
-#define MULTI_MECHADOLL2_Q2 29
-#define MULTI_MECHADOLL2_Q3 30
-#define MULTI_MECHADOLL3_Q1 31
-#define MULTI_MECHADOLL3_Q2 32
-#define MULTI_MECHADOLL3_Q3 33
-#define MULTI_MECHADOLL4_Q1 34
-#define MULTI_MECHADOLL4_Q2 35
-#define MULTI_MECHADOLL4_Q3 36
-#define MULTI_MECHADOLL5_Q1 37
-#define MULTI_MECHADOLL5_Q2 38
-#define MULTI_MECHADOLL5_Q3 39
-#define MULTI_UNUSED_40 40
-#define MULTI_UNUSED_41 41
-#define MULTI_VENDING_MACHINE 42
-#define MULTI_MACH_BIKE_INFO 43
-#define MULTI_ACRO_BIKE_INFO 44
-#define MULTI_SATISFACTION 45
-#define MULTI_STERN_DEEPSEA 46
-#define MULTI_UNUSED_ASH_VENDOR 47 // Replaced by scrollable multichoice
-#define MULTI_GAME_CORNER_DOLLS 48
-#define MULTI_GAME_CORNER_COINS 49
-#define MULTI_HOWS_FISHING 50
-#define MULTI_UNUSED_51 51
-#define MULTI_SSTIDAL_SLATEPORT_1 52
-#define MULTI_SSTIDAL_BATTLE_FRONTIER 53
-#define MULTI_RIGHTLEFT 54
-#define MULTI_GAME_CORNER_TMS 55
-#define MULTI_SSTIDAL_SLATEPORT_2 56
-#define MULTI_FLOORS 57
-#define MULTI_SHARDS_R 58
-#define MULTI_SHARDS_Y 59
-#define MULTI_SHARDS_RY 60
-#define MULTI_SHARDS_B 61
-#define MULTI_SHARDS_RB 62
-#define MULTI_SHARDS_YB 63
-#define MULTI_SHARDS_RYB 64
-#define MULTI_SHARDS_G 65
-#define MULTI_SHARDS_RG 66
-#define MULTI_SHARDS_YG 67
-#define MULTI_SHARDS_RYG 68
-#define MULTI_SHARDS_BG 69
-#define MULTI_SHARDS_RBG 70
-#define MULTI_SHARDS_YBG 71
-#define MULTI_SHARDS_RYBG 72
-#define MULTI_TOURNEY_WITH_RECORD 73
-#define MULTI_LINK_SERVICES_A1 74
-#define MULTI_LINK_SERVICES_A2 75
-#define MULTI_LINK_SERVICES_B1 76
-#define MULTI_LINK_SERVICES_B2 77
-#define MULTI_LINK_SERVICES_C 78
-#define MULTI_LINK_SERVICES_D 79
-#define MULTI_WIRELESS_MINIGAME 80
-#define MULTI_LINK_LEADER 81
-#define MULTI_CONTEST_RANK 82
-#define MULTI_FRONTIER_ITEM_CHOOSE 83
-#define MULTI_LINK_CONTEST_INFO 84
-#define MULTI_LINK_CONTEST_MODE 85
-#define MULTI_FORCED_START_MENU 86
-#define MULTI_FRONTIER_GAMBLER_BET 87
-#define MULTI_TENT 88
-#define MULTI_UNUSED_SSTIDAL_1 89 // These 4 replaced by scrollable multichoice
-#define MULTI_UNUSED_SSTIDAL_2 90 //
-#define MULTI_UNUSED_SSTIDAL_3 91 //
-#define MULTI_UNUSED_SSTIDAL_4 92 //
-#define MULTI_FOSSIL 93
-#define MULTI_YESNO 94
-#define MULTI_FRONTIER_RULES 95
-#define MULTI_BATTLE_ARENA_RULES 96
-#define MULTI_BATTLE_TOWER_RULES 97
-#define MULTI_BATTLE_DOME_RULES 98
-#define MULTI_BATTLE_FACTORY_RULES 99
-#define MULTI_BATTLE_PALACE_RULES 100
-#define MULTI_BATTLE_PYRAMID_RULES 101
-#define MULTI_BATTLE_PIKE_RULES 102
-#define MULTI_GO_ON_RECORD_REST_RETIRE 103
-#define MULTI_GO_ON_REST_RETIRE 104
-#define MULTI_GO_ON_RECORD_RETIRE 105
-#define MULTI_GO_ON_RETIRE 106
-#define MULTI_TOURNEY_NO_RECORD 107
-#define MULTI_TV_LATI 108
-#define MULTI_BATTLE_TOWER_FEELINGS 109
-#define MULTI_WHERES_RAYQUAZA 110
-#define MULTI_SLATEPORT_TENT_RULES 111
-#define MULTI_FALLARBOR_TENT_RULES 112
-#define MULTI_TAG_MATCH_TYPE 113
+#define MULTI_BRINEY_ON_DEWFORD 0
+#define MULTI_PC 1 // Exit only, populated by CreatePCMultichoice
+#define MULTI_ENTERINFO 2
+#define MULTI_CONTEST_INFO 3
+#define MULTI_CONTEST_TYPE 4
+#define MULTI_DECOR_NOREGISTRY 5
+#define MULTI_DECOR_REGISTRY 6
+#define MULTI_REGISTER_MENU 7
+#define MULTI_SSTIDAL_LILYCOVE 8 // Exit only, populated by CreateLilycoveSSTidalMultichoice
+#define MULTI_UNUSED_9 9
+#define MULTI_UNUSED_10 10
+#define MULTI_FRONTIER_PASS_INFO 11
+#define MULTI_BIKE 12
+#define MULTI_STATUS_INFO 13
+#define MULTI_BRINEY_OFF_DEWFORD 14
+#define MULTI_UNUSED_15 15
+#define MULTI_VIEWED_PAINTINGS 16
+#define MULTI_YESNOINFO 17
+#define MULTI_BATTLE_MODE 18
+#define MULTI_UNUSED_19 19
+#define MULTI_YESNOINFO_2 20
+#define MULTI_UNUSED_21 21
+#define MULTI_UNUSED_22 22
+#define MULTI_CHALLENGEINFO 23
+#define MULTI_LEVEL_MODE 24
+#define MULTI_MECHADOLL1_Q1 25
+#define MULTI_MECHADOLL1_Q2 26
+#define MULTI_MECHADOLL1_Q3 27
+#define MULTI_MECHADOLL2_Q1 28
+#define MULTI_MECHADOLL2_Q2 29
+#define MULTI_MECHADOLL2_Q3 30
+#define MULTI_MECHADOLL3_Q1 31
+#define MULTI_MECHADOLL3_Q2 32
+#define MULTI_MECHADOLL3_Q3 33
+#define MULTI_MECHADOLL4_Q1 34
+#define MULTI_MECHADOLL4_Q2 35
+#define MULTI_MECHADOLL4_Q3 36
+#define MULTI_MECHADOLL5_Q1 37
+#define MULTI_MECHADOLL5_Q2 38
+#define MULTI_MECHADOLL5_Q3 39
+#define MULTI_UNUSED_40 40
+#define MULTI_UNUSED_41 41
+#define MULTI_VENDING_MACHINE 42
+#define MULTI_MACH_BIKE_INFO 43
+#define MULTI_ACRO_BIKE_INFO 44
+#define MULTI_SATISFACTION 45
+#define MULTI_STERN_DEEPSEA 46
+#define MULTI_UNUSED_ASH_VENDOR 47 // Replaced by scrollable multichoice
+#define MULTI_GAME_CORNER_DOLLS 48
+#define MULTI_GAME_CORNER_COINS 49
+#define MULTI_HOWS_FISHING 50
+#define MULTI_UNUSED_51 51
+#define MULTI_SSTIDAL_SLATEPORT_1 52 // TODO: rename
+#define MULTI_SSTIDAL_BATTLE_FRONTIER 53
+#define MULTI_RIGHTLEFT 54
+#define MULTI_GAME_CORNER_TMS 55
+#define MULTI_SSTIDAL_SLATEPORT_2 56 //
+#define MULTI_FLOORS 57
+#define MULTI_SHARDS_R 58
+#define MULTI_SHARDS_Y 59
+#define MULTI_SHARDS_RY 60
+#define MULTI_SHARDS_B 61
+#define MULTI_SHARDS_RB 62
+#define MULTI_SHARDS_YB 63
+#define MULTI_SHARDS_RYB 64
+#define MULTI_SHARDS_G 65
+#define MULTI_SHARDS_RG 66
+#define MULTI_SHARDS_YG 67
+#define MULTI_SHARDS_RYG 68
+#define MULTI_SHARDS_BG 69
+#define MULTI_SHARDS_RBG 70
+#define MULTI_SHARDS_YBG 71
+#define MULTI_SHARDS_RYBG 72
+#define MULTI_TOURNEY_WITH_RECORD 73
+#define MULTI_LINK_SERVICES_A1 74 // TODO: rename
+#define MULTI_LINK_SERVICES_A2 75 //
+#define MULTI_LINK_SERVICES_B1 76 //
+#define MULTI_LINK_SERVICES_B2 77 //
+#define MULTI_LINK_SERVICES_C 78 //
+#define MULTI_LINK_SERVICES_D 79 //
+#define MULTI_WIRELESS_MINIGAME 80
+#define MULTI_LINK_LEADER 81
+#define MULTI_CONTEST_RANK 82
+#define MULTI_FRONTIER_ITEM_CHOOSE 83
+#define MULTI_LINK_CONTEST_INFO 84
+#define MULTI_LINK_CONTEST_MODE 85
+#define MULTI_FORCED_START_MENU 86
+#define MULTI_FRONTIER_GAMBLER_BET 87
+#define MULTI_TENT 88
+#define MULTI_UNUSED_SSTIDAL_1 89 // These 4 were replaced by CreateLilycoveSSTidalMultichoice
+#define MULTI_UNUSED_SSTIDAL_2 90 //
+#define MULTI_UNUSED_SSTIDAL_3 91 //
+#define MULTI_UNUSED_SSTIDAL_4 92 //
+#define MULTI_FOSSIL 93
+#define MULTI_YESNO 94
+#define MULTI_FRONTIER_RULES 95
+#define MULTI_BATTLE_ARENA_RULES 96
+#define MULTI_BATTLE_TOWER_RULES 97
+#define MULTI_BATTLE_DOME_RULES 98
+#define MULTI_BATTLE_FACTORY_RULES 99
+#define MULTI_BATTLE_PALACE_RULES 100
+#define MULTI_BATTLE_PYRAMID_RULES 101
+#define MULTI_BATTLE_PIKE_RULES 102
+#define MULTI_GO_ON_RECORD_REST_RETIRE 103
+#define MULTI_GO_ON_REST_RETIRE 104
+#define MULTI_GO_ON_RECORD_RETIRE 105
+#define MULTI_GO_ON_RETIRE 106
+#define MULTI_TOURNEY_NO_RECORD 107
+#define MULTI_TV_LATI 108
+#define MULTI_BATTLE_TOWER_FEELINGS 109
+#define MULTI_WHERES_RAYQUAZA 110
+#define MULTI_SLATEPORT_TENT_RULES 111
+#define MULTI_FALLARBOR_TENT_RULES 112
+#define MULTI_TAG_MATCH_TYPE 113
+
+// Lilycove SS Tidal Multichoice Selections
+#define SSTIDAL_SELECTION_SLATEPORT 0
+#define SSTIDAL_SELECTION_BATTLE_FRONTIER 1
+#define SSTIDAL_SELECTION_SOUTHERN_ISLAND 2
+#define SSTIDAL_SELECTION_NAVEL_ROCK 3
+#define SSTIDAL_SELECTION_BIRTH_ISLAND 4
+#define SSTIDAL_SELECTION_FARAWAY_ISLAND 5
+#define SSTIDAL_SELECTION_EXIT 6
+#define SSTIDAL_SELECTION_COUNT 7
// Std String Ids
#define STDSTRING_COOL 0
@@ -153,4 +165,4 @@
#define STDSTRING_BATTLE_PIKE 28
#define STDSTRING_BATTLE_PYRAMID 29
-#endif //GUARD_SCRIPT_MENU_CONSTANTS_H \ No newline at end of file
+#endif //GUARD_SCRIPT_MENU_CONSTANTS_H
diff --git a/include/script_menu.h b/include/script_menu.h
index 30a8b9b1b..683598bd4 100644
--- a/include/script_menu.h
+++ b/include/script_menu.h
@@ -9,12 +9,12 @@ bool8 ScriptMenu_YesNo(u8 var1, u8 var2);
bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount);
bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3);
bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void);
-int convert_pixel_width_to_tile_width(int);
+int ConvertPixelWidthToTileWidth(int);
u8 CreateWindowFromRect(u8, u8, u8, u8);
void ClearToTransparentAndRemoveWindow(u8);
-int display_text_and_get_width(const u8*, int);
-int sub_80E2D5C(int arg0, int tileWidth);
-bool16 ScrSpecial_CreatePCMenu(void);
+int DisplayTextAndGetWidth(const u8*, int);
+int ScriptMenu_AdjustLeftCoordFromWidth(int arg0, int tileWidth);
+bool16 ScriptMenu_CreatePCMultichoice(void);
void ScriptMenu_DisplayPCStartupPrompt(void);
#endif //GUARD_SCRIPT_MENU_H
diff --git a/src/apprentice.c b/src/apprentice.c
index 76962807e..113b22f6e 100644
--- a/src/apprentice.c
+++ b/src/apprentice.c
@@ -1559,8 +1559,8 @@ static void CreateMenuWithAnswers(u8 arg0)
pixelWidth = width;
}
- width = convert_pixel_width_to_tile_width(pixelWidth);
- left = sub_80E2D5C(left, width);
+ width = ConvertPixelWidthToTileWidth(pixelWidth);
+ left = ScriptMenu_AdjustLeftCoordFromWidth(left, width);
windowId = CreateAndShowWindow(left, top, width, count * 2);
SetStandardWindowBorderStyle(windowId, 0);
diff --git a/src/data/script_menu.h b/src/data/script_menu.h
index 9f634dc5b..382410652 100644
--- a/src/data/script_menu.h
+++ b/src/data/script_menu.h
@@ -785,14 +785,14 @@ struct MultichoiceListStruct
const struct MultichoiceListStruct gMultichoiceLists[] =
{
[MULTI_BRINEY_ON_DEWFORD] = MULTICHOICE(MultichoiceList_BrineyOnDewford),
- [MULTI_UNUSED_1] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_PC] = MULTICHOICE(MultichoiceList_Exit),
[MULTI_ENTERINFO] = MULTICHOICE(MultichoiceList_EnterInfo),
[MULTI_CONTEST_INFO] = MULTICHOICE(MultichoiceList_ContestInfo),
[MULTI_CONTEST_TYPE] = MULTICHOICE(MultichoiceList_ContestType),
[MULTI_DECOR_NOREGISTRY] = MULTICHOICE(MultichoiceList_DecorNoRegistry),
[MULTI_DECOR_REGISTRY] = MULTICHOICE(MultichoiceList_DecorRegistry),
[MULTI_REGISTER_MENU] = MULTICHOICE(MultichoiceList_RegisterMenu),
- [MULTI_UNUSED_8] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_SSTIDAL_LILYCOVE] = MULTICHOICE(MultichoiceList_Exit),
[MULTI_UNUSED_9] = MULTICHOICE(MultichoiceList_Exit),
[MULTI_UNUSED_10] = MULTICHOICE(MultichoiceList_Exit),
[MULTI_FRONTIER_PASS_INFO] = MULTICHOICE(MultichoiceList_FrontierPassInfo),
@@ -952,7 +952,7 @@ const u8 *const sPCNameStrings[] =
gText_LogOff,
};
-const u8 *const gSSTidalDestinations[] =
+const u8 *const gLilycoveSSTidalDestinations[] =
{
gText_SlateportCity,
gText_BattleFrontier,
diff --git a/src/field_specials.c b/src/field_specials.c
index 95e9c2388..d1fb49610 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -55,6 +55,7 @@
#include "constants/heal_locations.h"
#include "constants/map_types.h"
#include "constants/maps.h"
+#include "constants/script_menu.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/moves.h"
@@ -82,6 +83,7 @@ static EWRAM_DATA u8 sPCBoxToSendMon = 0;
static EWRAM_DATA u32 sUnknown_0203AB70 = 0;
struct ListMenuTemplate gScrollableMultichoice_ListMenuTemplate;
+static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH];
extern const u16 gEventObjectPalette8[];
extern const u16 gEventObjectPalette17[];
@@ -2270,144 +2272,160 @@ void BufferBattleTowerElevatorFloors(void)
gSpecialVar_0x8006 = 12;
}
-// data[1]: number of options in the multichoice
+// Scrollable Multichoice task data defines
+#define tMaxItemsOnScreen data[0]
+#define tNumItems data[1]
+#define tLeft data[2]
+#define tTop data[3]
+#define tWidth data[4]
+#define tHeight data[5]
+#define tKeepOpenAfterSelect data[6]
+#define tScrollOffset data[7]
+#define tSelectedRow data[8]
+#define tScrollMultiId data[11]
+#define tScrollArrowId data[12]
+#define tWindowId data[13]
+#define tListTaskId data[14]
+#define tTaskId data[15]
+// data[9] and [10] unused
+
void ShowScrollableMultichoice(void)
{
u8 taskId = CreateTask(Task_ShowScrollableMultichoice, 8);
struct Task *task = &gTasks[taskId];
- task->data[11] = gSpecialVar_0x8004;
+ task->tScrollMultiId = gSpecialVar_0x8004;
switch (gSpecialVar_0x8004)
{
case SCROLL_MULTI_NONE:
- task->data[0] = 1;
- task->data[1] = 1;
- task->data[2] = 1;
- task->data[3] = 1;
- task->data[4] = 1;
- task->data[5] = 1;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = 1;
+ task->tNumItems = 1;
+ task->tLeft = 1;
+ task->tTop = 1;
+ task->tWidth = 1;
+ task->tHeight = 1;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_GLASS_WORKSHOP_VENDOR:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN - 1;
- task->data[1] = 8;
- task->data[2] = 1;
- task->data[3] = 1;
- task->data[4] = 9;
- task->data[5] = 10;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN - 1;
+ task->tNumItems = 8;
+ task->tLeft = 1;
+ task->tTop = 1;
+ task->tWidth = 9;
+ task->tHeight = 10;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_POKEMON_FAN_CLUB_RATER:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 12;
- task->data[2] = 1;
- task->data[3] = 1;
- task->data[4] = 7;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 12;
+ task->tLeft = 1;
+ task->tTop = 1;
+ task->tWidth = 7;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 11;
- task->data[2] = 14;
- task->data[3] = 1;
- task->data[4] = 15;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 11;
+ task->tLeft = 14;
+ task->tTop = 1;
+ task->tWidth = 15;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 6;
- task->data[2] = 14;
- task->data[3] = 1;
- task->data[4] = 15;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 6;
+ task->tLeft = 14;
+ task->tTop = 1;
+ task->tWidth = 15;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 7;
- task->data[2] = 14;
- task->data[3] = 1;
- task->data[4] = 15;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 7;
+ task->tLeft = 14;
+ task->tTop = 1;
+ task->tWidth = 15;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 10;
- task->data[2] = 14;
- task->data[3] = 1;
- task->data[4] = 15;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 10;
+ task->tLeft = 14;
+ task->tTop = 1;
+ task->tWidth = 15;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BERRY_POWDER_VENDOR:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 12;
- task->data[2] = 15;
- task->data[3] = 1;
- task->data[4] = 14;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 12;
+ task->tLeft = 15;
+ task->tTop = 1;
+ task->tWidth = 14;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_RECEPTIONIST:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 10;
- task->data[2] = 17;
- task->data[3] = 1;
- task->data[4] = 11;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 10;
+ task->tLeft = 17;
+ task->tTop = 1;
+ task->tWidth = 11;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_MOVE_TUTOR_1:
case SCROLL_MULTI_BF_MOVE_TUTOR_2:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 11;
- task->data[2] = 15;
- task->data[3] = 1;
- task->data[4] = 14;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 11;
+ task->tLeft = 15;
+ task->tTop = 1;
+ task->tWidth = 14;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_SS_TIDAL_DESTINATION:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 7;
- task->data[2] = 19;
- task->data[3] = 1;
- task->data[4] = 10;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 7;
+ task->tLeft = 19;
+ task->tTop = 1;
+ task->tWidth = 10;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BATTLE_TENT_RULES:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 7;
- task->data[2] = 17;
- task->data[3] = 1;
- task->data[4] = 12;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 7;
+ task->tLeft = 17;
+ task->tTop = 1;
+ task->tWidth = 12;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
default:
- gSpecialVar_Result = 0x7F;
+ gSpecialVar_Result = MULTI_B_PRESSED;
DestroyTask(taskId);
break;
}
}
-static const u8 *const sScrollableMenuOptions[][MAX_SCROLL_MULTI_LENGTH] =
+static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] =
{
[SCROLL_MULTI_NONE] =
{
@@ -2565,7 +2583,7 @@ static const u8 *const sScrollableMenuOptions[][MAX_SCROLL_MULTI_LENGTH] =
static void Task_ShowScrollableMultichoice(u8 taskId)
{
- u32 unk1;
+ u32 width;
u8 i, windowId;
struct WindowTemplate template;
struct Task *task = &gTasks[taskId];
@@ -2573,46 +2591,46 @@ static void Task_ShowScrollableMultichoice(u8 taskId)
ScriptContext2_Enable();
sScrollableMultichoice_ScrollOffset = 0;
sScrollableMultichoice_ItemSpriteId = MAX_SPRITES;
- FillFrontierExchangeCornerWindowAndItemIcon(task->data[11], 0);
- ShowBattleFrontierTutorWindow(task->data[11], 0);
- sScrollableMultichoice_ListMenuItem = AllocZeroed(task->data[1] * 8);
+ FillFrontierExchangeCornerWindowAndItemIcon(task->tScrollMultiId, 0);
+ ShowBattleFrontierTutorWindow(task->tScrollMultiId, 0);
+ sScrollableMultichoice_ListMenuItem = AllocZeroed(task->tNumItems * 8);
sFrontierExchangeCorner_NeverRead = 0;
InitScrollableMultichoice();
- for (unk1 = 0, i = 0; i < task->data[1]; i++)
+ for (width = 0, i = 0; i < task->tNumItems; i++)
{
- const u8 *text = sScrollableMenuOptions[gSpecialVar_0x8004][i];
+ const u8 *text = sScrollableMultichoiceOptions[gSpecialVar_0x8004][i];
sScrollableMultichoice_ListMenuItem[i].name = text;
sScrollableMultichoice_ListMenuItem[i].id = i;
- unk1 = display_text_and_get_width(text, unk1);
+ width = DisplayTextAndGetWidth(text, width);
}
- task->data[4] = convert_pixel_width_to_tile_width(unk1);
+ task->tWidth = ConvertPixelWidthToTileWidth(width);
- if (task->data[2] + task->data[4] > 0x1D)
+ if (task->tLeft + task->tWidth > MAX_MULTICHOICE_WIDTH + 1)
{
- int unk2 = 0x1D - task->data[4];
- if (unk2 < 0)
+ int adjustedLeft = MAX_MULTICHOICE_WIDTH + 1 - task->tWidth;
+ if (adjustedLeft < 0)
{
- task->data[2] = 0;
+ task->tLeft = 0;
}
else
{
- task->data[2] = unk2;
+ task->tLeft = adjustedLeft;
}
}
- template = CreateWindowTemplate(0, task->data[2], task->data[3], task->data[4], task->data[5], 0xF, 0x64);
+ template = CreateWindowTemplate(0, task->tLeft, task->tTop, task->tWidth, task->tHeight, 0xF, 0x64);
windowId = AddWindow(&template);
- task->data[13] = windowId;
+ task->tWindowId = windowId;
SetStandardWindowBorderStyle(windowId, 0);
- gScrollableMultichoice_ListMenuTemplate.totalItems = task->data[1];
- gScrollableMultichoice_ListMenuTemplate.maxShowed = task->data[0];
- gScrollableMultichoice_ListMenuTemplate.windowId = task->data[13];
+ gScrollableMultichoice_ListMenuTemplate.totalItems = task->tNumItems;
+ gScrollableMultichoice_ListMenuTemplate.maxShowed = task->tMaxItemsOnScreen;
+ gScrollableMultichoice_ListMenuTemplate.windowId = task->tWindowId;
ScrollableMultichoice_UpdateScrollArrows(taskId);
- task->data[14] = ListMenuInit(&gScrollableMultichoice_ListMenuTemplate, task->data[7], task->data[8]);
+ task->tListTaskId = ListMenuInit(&gScrollableMultichoice_ListMenuTemplate, task->tScrollOffset, task->tSelectedRow);
schedule_bg_copy_tilemap_to_vram(0);
gTasks[taskId].func = ScrollableMultichoice_ProcessInput;
}
@@ -2648,12 +2666,12 @@ static void ScrollableMultichoice_MoveCursor(s32 itemIndex, bool8 onInit, struct
{
u16 selection;
struct Task *task = &gTasks[taskId];
- ListMenuGetScrollAndRow(task->data[14], &selection, NULL);
+ ListMenuGetScrollAndRow(task->tListTaskId, &selection, NULL);
sScrollableMultichoice_ScrollOffset = selection;
- ListMenuGetCurrentItemArrayId(task->data[14], &selection);
- HideFrontierExchangeCornerItemIcon(task->data[11], sFrontierExchangeCorner_NeverRead);
- FillFrontierExchangeCornerWindowAndItemIcon(task->data[11], selection);
- ShowBattleFrontierTutorMoveDescription(task->data[11], selection);
+ ListMenuGetCurrentItemArrayId(task->tListTaskId, &selection);
+ HideFrontierExchangeCornerItemIcon(task->tScrollMultiId, sFrontierExchangeCorner_NeverRead);
+ FillFrontierExchangeCornerWindowAndItemIcon(task->tScrollMultiId, selection);
+ ShowBattleFrontierTutorMoveDescription(task->tScrollMultiId, selection);
sFrontierExchangeCorner_NeverRead = selection;
}
}
@@ -2661,25 +2679,26 @@ static void ScrollableMultichoice_MoveCursor(s32 itemIndex, bool8 onInit, struct
static void ScrollableMultichoice_ProcessInput(u8 taskId)
{
struct Task *task = &gTasks[taskId];
- s32 input = ListMenu_ProcessInput(task->data[14]);
+ s32 input = ListMenu_ProcessInput(task->tListTaskId);
switch (input)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_CANCEL:
- gSpecialVar_Result = 0x7F;
+ gSpecialVar_Result = MULTI_B_PRESSED;
PlaySE(SE_SELECT);
CloseScrollableMultichoice(taskId);
break;
default:
gSpecialVar_Result = input;
PlaySE(SE_SELECT);
- if (!task->data[6])
+ if (!task->tKeepOpenAfterSelect)
{
CloseScrollableMultichoice(taskId);
}
- else if (input == task->data[1] - 1)
+ // if selected option was the last one (Exit)
+ else if (input == task->tNumItems - 1)
{
CloseScrollableMultichoice(taskId);
}
@@ -2697,28 +2716,29 @@ static void CloseScrollableMultichoice(u8 taskId)
{
u16 selection;
struct Task *task = &gTasks[taskId];
- ListMenuGetCurrentItemArrayId(task->data[14], &selection);
- HideFrontierExchangeCornerItemIcon(task->data[11], selection);
+ ListMenuGetCurrentItemArrayId(task->tListTaskId, &selection);
+ HideFrontierExchangeCornerItemIcon(task->tScrollMultiId, selection);
ScrollableMultichoice_RemoveScrollArrows(taskId);
- DestroyListMenuTask(task->data[14], NULL, NULL);
+ DestroyListMenuTask(task->tListTaskId, NULL, NULL);
Free(sScrollableMultichoice_ListMenuItem);
- ClearStdWindowAndFrameToTransparent(task->data[13], 1);
- FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0));
- CopyWindowToVram(task->data[13], 2);
- RemoveWindow(task->data[13]);
+ ClearStdWindowAndFrameToTransparent(task->tWindowId, 1);
+ FillWindowPixelBuffer(task->tWindowId, PIXEL_FILL(0));
+ CopyWindowToVram(task->tWindowId, 2);
+ RemoveWindow(task->tWindowId);
DestroyTask(taskId);
EnableBothScriptContexts();
}
+// Functionally unused; tKeepOpenAfterSelect is only != 0 in unused functions
static void sub_813A600(u8 taskId)
{
- switch (gTasks[taskId].data[6])
+ switch (gTasks[taskId].tKeepOpenAfterSelect)
{
case 1:
default:
break;
case 2:
- gTasks[taskId].data[6] = 1;
+ gTasks[taskId].tKeepOpenAfterSelect = 1;
gTasks[taskId].func = sub_813A664;
break;
}
@@ -2734,7 +2754,7 @@ void sub_813A630(void)
}
else
{
- gTasks[taskId].data[6]++;
+ gTasks[taskId].tKeepOpenAfterSelect++;
}
}
@@ -2763,24 +2783,24 @@ static void ScrollableMultichoice_UpdateScrollArrows(u8 taskId)
struct Task *task = &gTasks[taskId];
struct ScrollArrowsTemplate template = sScrollableMultichoice_ScrollArrowsTemplate;
- if (task->data[0] != task->data[1])
+ if (task->tMaxItemsOnScreen != task->data[1])
{
- template.firstX = (task->data[4] / 2) * 8 + 12 + (task->data[2] - 1) * 8;
+ template.firstX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8;
template.firstY = 8;
- template.secondX = (task->data[4] / 2) * 8 + 12 + (task->data[2] - 1) * 8;
- template.secondY = task->data[5] * 8 + 10;
+ template.secondX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8;
+ template.secondY = task->tHeight * 8 + 10;
template.fullyUpThreshold = 0;
- template.fullyDownThreshold = task->data[1] - task->data[0];
- task->data[12] = AddScrollIndicatorArrowPair(&template, &sScrollableMultichoice_ScrollOffset);
+ template.fullyDownThreshold = task->data[1] - task->tMaxItemsOnScreen;
+ task->tScrollArrowId = AddScrollIndicatorArrowPair(&template, &sScrollableMultichoice_ScrollOffset);
}
}
static void ScrollableMultichoice_RemoveScrollArrows(u8 taskId)
{
struct Task *task = &gTasks[taskId];
- if (task->data[0] != task->data[1])
+ if (task->tMaxItemsOnScreen != task->data[1])
{
- RemoveScrollIndicatorArrowPair(task->data[12]);
+ RemoveScrollIndicatorArrowPair(task->tScrollArrowId);
}
}
@@ -3041,7 +3061,7 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
{
#include "data/battle_frontier/battle_frontier_exchange_corner.h"
- if (menu > SCROLL_MULTI_POKEMON_FAN_CLUB_RATER && menu < SCROLL_MULTI_BERRY_POWDER_VENDOR)
+ if (menu >= SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1 && menu <= SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR)
{
FillWindowPixelRect(0, PIXEL_FILL(1), 0, 0, 216, 32);
switch (menu)
@@ -3240,17 +3260,17 @@ void sub_813ADD4(void)
if (taskId != 0xFF)
{
struct Task *task = &gTasks[taskId];
- ListMenuGetScrollAndRow(task->data[14], &scrollOffset, &selectedRow);
- SetStandardWindowBorderStyle(task->data[13], 0);
+ ListMenuGetScrollAndRow(task->tListTaskId, &scrollOffset, &selectedRow);
+ SetStandardWindowBorderStyle(task->tWindowId, 0);
for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++)
{
- AddTextPrinterParameterized5(task->data[13], 1, sScrollableMenuOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
+ AddTextPrinterParameterized5(task->tWindowId, 1, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
}
- AddTextPrinterParameterized(task->data[13], 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
- PutWindowTilemap(task->data[13]);
- CopyWindowToVram(task->data[13], 3);
+ AddTextPrinterParameterized(task->tWindowId, 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
+ PutWindowTilemap(task->tWindowId);
+ CopyWindowToVram(task->tWindowId, 3);
}
}
@@ -3299,17 +3319,33 @@ void sub_813AF48(void)
if (taskId != 0xFF)
{
struct Task *task = &gTasks[taskId];
- DestroyListMenuTask(task->data[14], NULL, NULL);
+ DestroyListMenuTask(task->tListTaskId, NULL, NULL);
Free(sScrollableMultichoice_ListMenuItem);
- ClearStdWindowAndFrameToTransparent(task->data[13], TRUE);
- FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0));
- ClearWindowTilemap(task->data[13]);
- CopyWindowToVram(task->data[13], 2);
- RemoveWindow(task->data[13]);
+ ClearStdWindowAndFrameToTransparent(task->tWindowId, TRUE);
+ FillWindowPixelBuffer(task->tWindowId, PIXEL_FILL(0));
+ ClearWindowTilemap(task->tWindowId);
+ CopyWindowToVram(task->tWindowId, 2);
+ RemoveWindow(task->tWindowId);
DestroyTask(taskId);
}
}
+// Undefine Scrollable Multichoice task data macros
+#undef tMaxItemsOnScreen
+#undef tNumItems
+#undef tLeft
+#undef tTop
+#undef tWidth
+#undef tHeight
+#undef tKeepOpenAfterSelect
+#undef tScrollOffset
+#undef tSelectedRow
+#undef tScrollMultiId
+#undef tScrollArrowId
+#undef tWindowId
+#undef tListTaskId
+#undef tTaskId
+
void DoDeoxysRockInteraction(void)
{
CreateTask(Task_DeoxysRockInteraction, 8);
diff --git a/src/hof_pc.c b/src/hof_pc.c
index 01015ee81..327749179 100644
--- a/src/hof_pc.c
+++ b/src/hof_pc.c
@@ -27,7 +27,7 @@ static void ReshowPCMenuAfterHallOfFamePC(void)
{
ScriptContext2_Enable();
Overworld_PlaySpecialMapMusic();
- ScrSpecial_CreatePCMenu();
+ ScriptMenu_CreatePCMultichoice();
ScriptMenu_DisplayPCStartupPrompt();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
CreateTask(Task_WaitForPaletteFade, 10);
diff --git a/src/international_string_util.c b/src/international_string_util.c
index 9dc795dd0..ec5057359 100644
--- a/src/international_string_util.c
+++ b/src/international_string_util.c
@@ -45,7 +45,7 @@ int GetMaxWidthInMenuTable(const struct MenuAction *str, int arg1)
var = stringWidth;
}
- return convert_pixel_width_to_tile_width(var);
+ return ConvertPixelWidthToTileWidth(var);
}
int sub_81DB3D8(const struct MenuAction *str, const u8* arg1, int arg2)
@@ -59,7 +59,7 @@ int sub_81DB3D8(const struct MenuAction *str, const u8* arg1, int arg2)
var = stringWidth;
}
- return convert_pixel_width_to_tile_width(var);
+ return ConvertPixelWidthToTileWidth(var);
}
int Intl_GetListMenuWidth(const struct ListMenuTemplate *listMenu)
diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c
index 64f04f3bc..a4d70c062 100644
--- a/src/mauville_old_man.c
+++ b/src/mauville_old_man.c
@@ -1155,7 +1155,7 @@ static void PrintStoryList(void)
if (curWidth > width)
width = curWidth;
}
- sStorytellerWindowId = CreateWindowFromRect(0, 0, convert_pixel_width_to_tile_width(width), GetFreeStorySlot() * 2 + 2);
+ sStorytellerWindowId = CreateWindowFromRect(0, 0, ConvertPixelWidthToTileWidth(width), GetFreeStorySlot() * 2 + 2);
SetStandardWindowBorderStyle(sStorytellerWindowId, 0);
for (i = 0; i < 4; i++)
{
diff --git a/src/script_menu.c b/src/script_menu.c
index 070a04932..3a01bcb66 100644
--- a/src/script_menu.c
+++ b/src/script_menu.c
@@ -20,21 +20,21 @@
#include "data/script_menu.h"
-EWRAM_DATA u8 gUnknown_02039F90 = 0;
+EWRAM_DATA u8 gProcessInputDelay = 0;
-static u8 gUnknown_03001124[ARRAY_COUNT(gSSTidalDestinations)];
-static u32 filler_0300112c;
+static u8 sLilycoveSSTidalSelections[ARRAY_COUNT(gLilycoveSSTidalDestinations)];
+//static u32 filler_0300112c;
static void Task_HandleMultichoiceInput(u8);
static void Task_HandleYesNoInput(u8);
static void Task_HandleMultichoiceGridInput(u8);
static void DrawMultichoiceMenu(u8, u8, u8, bool8, u8);
static void sub_80E1FBC(u8, u8, u8, u8);
-static void sub_80E2A94(u8);
-static void CreatePCMenu(void);
-static void sub_80E2578(void);
+static void DrawLinkServicesMultichoiceMenu(u8);
+static void CreatePCMultichoice(void);
+static void CreateLilycoveSSTidalMultichoice(void);
static bool8 IsPicboxClosed(void);
-static void CreateMultichoiceStartMenu(void);
+static void CreateStartMenuForPokenavTutorial(void);
static void sub_80E2CC4(u8, u8, u8, u8);
bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPress)
@@ -102,11 +102,11 @@ static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPre
for (i = 0; i < count; i++)
{
- width = display_text_and_get_width(actions[i].text, width);
+ width = DisplayTextAndGetWidth(actions[i].text, width);
}
- newWidth = convert_pixel_width_to_tile_width(width);
- left = sub_80E2D5C(left, newWidth);
+ newWidth = ConvertPixelWidthToTileWidth(width);
+ left = ScriptMenu_AdjustLeftCoordFromWidth(left, newWidth);
windowId = CreateWindowFromRect(left, top, newWidth, count * 2);
SetStandardWindowBorderStyle(windowId, 0);
PrintMenuTable(windowId, count, actions);
@@ -128,13 +128,13 @@ static void sub_80E1FBC(u8 ignoreBPress, u8 count, u8 windowId, u8 multichoiceId
{
u8 i;
u8 taskId;
- gUnknown_02039F90 = 2;
+ gProcessInputDelay = 2;
for (i = 0; i < ARRAY_COUNT(gLinkServicesMultichoiceIds); i++)
{
if (gLinkServicesMultichoiceIds[i] == multichoiceId)
{
- gUnknown_02039F90 = 12;
+ gProcessInputDelay = 12;
}
}
@@ -150,7 +150,7 @@ static void sub_80E1FBC(u8 ignoreBPress, u8 count, u8 windowId, u8 multichoiceId
gTasks[taskId].tWindowId = windowId;
gTasks[taskId].tMultichoiceId = multichoiceId;
- sub_80E2A94(multichoiceId);
+ DrawLinkServicesMultichoiceMenu(multichoiceId);
}
static void Task_HandleMultichoiceInput(u8 taskId)
@@ -160,9 +160,9 @@ static void Task_HandleMultichoiceInput(u8 taskId)
if (!gPaletteFade.active)
{
- if (gUnknown_02039F90)
+ if (gProcessInputDelay)
{
- gUnknown_02039F90--;
+ gProcessInputDelay--;
}
else
{
@@ -173,7 +173,7 @@ static void Task_HandleMultichoiceInput(u8 taskId)
if (gMain.newKeys & (DPAD_UP | DPAD_DOWN))
{
- sub_80E2A94(tMultichoiceId);
+ DrawLinkServicesMultichoiceMenu(tMultichoiceId);
}
if (selection != MENU_NOTHING_CHOSEN)
@@ -266,12 +266,12 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPr
for (i = 0; i < gMultichoiceLists[multichoiceId].count; i++)
{
- width = display_text_and_get_width(gMultichoiceLists[multichoiceId].list[i].text, width);
+ width = DisplayTextAndGetWidth(gMultichoiceLists[multichoiceId].list[i].text, width);
}
- newWidth = convert_pixel_width_to_tile_width(width);
+ newWidth = ConvertPixelWidthToTileWidth(width);
- left = sub_80E2D5C(left, columnCount * newWidth);
+ left = ScriptMenu_AdjustLeftCoordFromWidth(left, columnCount * newWidth);
rowCount = gMultichoiceLists[multichoiceId].count / columnCount;
taskId = CreateTask(Task_HandleMultichoiceGridInput, 80);
@@ -313,7 +313,7 @@ static void Task_HandleMultichoiceGridInput(u8 taskId)
#undef tWindowId
-bool16 ScrSpecial_CreatePCMenu(void)
+bool16 ScriptMenu_CreatePCMultichoice(void)
{
if (FuncIsActiveTask(Task_HandleMultichoiceInput) == TRUE)
{
@@ -322,12 +322,12 @@ bool16 ScrSpecial_CreatePCMenu(void)
else
{
gSpecialVar_Result = 0xFF;
- CreatePCMenu();
+ CreatePCMultichoice();
return TRUE;
}
}
-static void CreatePCMenu(void)
+static void CreatePCMultichoice(void)
{
u8 y = 8;
u32 pixelWidth = 0;
@@ -338,15 +338,15 @@ static void CreatePCMenu(void)
for (i = 0; i < ARRAY_COUNT(sPCNameStrings); i++)
{
- pixelWidth = display_text_and_get_width(sPCNameStrings[i], pixelWidth);
+ pixelWidth = DisplayTextAndGetWidth(sPCNameStrings[i], pixelWidth);
}
if (FlagGet(FLAG_SYS_GAME_CLEAR))
{
- pixelWidth = display_text_and_get_width(gText_HallOfFame, pixelWidth);
+ pixelWidth = DisplayTextAndGetWidth(gText_HallOfFame, pixelWidth);
}
- width = convert_pixel_width_to_tile_width(pixelWidth);
+ width = ConvertPixelWidthToTileWidth(pixelWidth);
if (FlagGet(FLAG_SYS_GAME_CLEAR)) // player has cleared game?
{
@@ -373,7 +373,7 @@ static void CreatePCMenu(void)
PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, numChoices, 0);
CopyWindowToVram(windowId, 3);
- sub_80E1FBC(FALSE, numChoices, windowId, 1);
+ sub_80E1FBC(FALSE, numChoices, windowId, MULTI_PC);
}
void ScriptMenu_DisplayPCStartupPrompt(void)
@@ -382,7 +382,7 @@ void ScriptMenu_DisplayPCStartupPrompt(void)
AddTextPrinterParameterized2(0, 1, gText_WhichPCShouldBeAccessed, 0, NULL, 2, 1, 3);
}
-bool8 sub_80E2548(void)
+bool8 ScriptMenu_CreateLilycoveSSTidalMultichoice(void)
{
if (FuncIsActiveTask(Task_HandleMultichoiceInput) == TRUE)
{
@@ -391,14 +391,16 @@ bool8 sub_80E2548(void)
else
{
gSpecialVar_Result = 0xFF;
- sub_80E2578();
+ CreateLilycoveSSTidalMultichoice();
return TRUE;
}
}
-static void sub_80E2578(void)
+// gSpecialVar_0x8004 is 1 if the Sailor was shown multiple event tickets at the same time
+// otherwise gSpecialVar_0x8004 is 0
+static void CreateLilycoveSSTidalMultichoice(void)
{
- u8 temp = 0;
+ u8 selectionCount = 0;
u8 count;
u32 pixelWidth;
u8 width;
@@ -406,21 +408,22 @@ static void sub_80E2578(void)
u8 i;
u32 j;
- for (i = 0; i < ARRAY_COUNT(gUnknown_03001124); i++)
+ for (i = 0; i < ARRAY_COUNT(sLilycoveSSTidalSelections); i++)
{
- gUnknown_03001124[i] = 0xFF;
+ sLilycoveSSTidalSelections[i] = 0xFF;
}
GetFontAttribute(1, FONTATTR_MAX_LETTER_WIDTH);
if (gSpecialVar_0x8004 == 0)
{
- gUnknown_03001124[temp] = 0;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_SLATEPORT;
+ selectionCount++;
+
if (FlagGet(FLAG_MET_SCOTT_ON_SS_TIDAL) == TRUE)
{
- gUnknown_03001124[temp] = 1;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_BATTLE_FRONTIER;
+ selectionCount++;
}
}
@@ -428,14 +431,14 @@ static void sub_80E2578(void)
{
if (gSpecialVar_0x8004 == 0)
{
- gUnknown_03001124[temp] = 2;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_SOUTHERN_ISLAND;
+ selectionCount++;
}
if (gSpecialVar_0x8004 == 1 && FlagGet(FLAG_HAS_EON_TICKET) == FALSE)
{
- gUnknown_03001124[temp] = 2;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_SOUTHERN_ISLAND;
+ selectionCount++;
FlagSet(FLAG_HAS_EON_TICKET);
}
}
@@ -444,14 +447,14 @@ static void sub_80E2578(void)
{
if (gSpecialVar_0x8004 == 0)
{
- gUnknown_03001124[temp] = 3;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_NAVEL_ROCK;
+ selectionCount++;
}
if (gSpecialVar_0x8004 == 1 && FlagGet(FLAG_HAS_MYSTIC_TICKET) == FALSE)
{
- gUnknown_03001124[temp] = 3;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_NAVEL_ROCK;
+ selectionCount++;
FlagSet(FLAG_HAS_MYSTIC_TICKET);
}
}
@@ -460,14 +463,14 @@ static void sub_80E2578(void)
{
if (gSpecialVar_0x8004 == 0)
{
- gUnknown_03001124[temp] = 4;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_BIRTH_ISLAND;
+ selectionCount++;
}
if (gSpecialVar_0x8004 == 1 && FlagGet(FLAG_HAS_AURORA_TICKET) == FALSE)
{
- gUnknown_03001124[temp] = 4;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_BIRTH_ISLAND;
+ selectionCount++;
FlagSet(FLAG_HAS_AURORA_TICKET);
}
}
@@ -476,28 +479,28 @@ static void sub_80E2578(void)
{
if (gSpecialVar_0x8004 == 0)
{
- gUnknown_03001124[temp] = 5;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_FARAWAY_ISLAND;
+ selectionCount++;
}
if (gSpecialVar_0x8004 == 1 && FlagGet(FLAG_HAS_OLD_SEA_MAP) == FALSE)
{
- gUnknown_03001124[temp] = 5;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_FARAWAY_ISLAND;
+ selectionCount++;
FlagSet(FLAG_HAS_OLD_SEA_MAP);
}
}
- gUnknown_03001124[temp] = 6;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_EXIT;
+ selectionCount++;
if (gSpecialVar_0x8004 == 0 && FlagGet(FLAG_MET_SCOTT_ON_SS_TIDAL) == TRUE)
{
- count = temp;
+ count = selectionCount;
}
- count = temp;
- if (count == 7)
+ count = selectionCount;
+ if (count == SSTIDAL_SELECTION_COUNT)
{
gSpecialVar_0x8004 = SCROLL_MULTI_SS_TIDAL_DESTINATION;
ShowScrollableMultichoice();
@@ -506,39 +509,39 @@ static void sub_80E2578(void)
{
pixelWidth = 0;
- for (j = 0; j < ARRAY_COUNT(gSSTidalDestinations); j++)
+ for (j = 0; j < ARRAY_COUNT(gLilycoveSSTidalDestinations); j++)
{
- u8 test = gUnknown_03001124[j];
- if (test != 0xFF)
+ u8 selection = sLilycoveSSTidalSelections[j];
+ if (selection != 0xFF)
{
- pixelWidth = display_text_and_get_width(gSSTidalDestinations[test], pixelWidth);
+ pixelWidth = DisplayTextAndGetWidth(gLilycoveSSTidalDestinations[selection], pixelWidth);
}
}
- width = convert_pixel_width_to_tile_width(pixelWidth);
- windowId = CreateWindowFromRect(28 - width, (6 - count) * 2, width, count * 2);
+ width = ConvertPixelWidthToTileWidth(pixelWidth);
+ windowId = CreateWindowFromRect(MAX_MULTICHOICE_WIDTH - width, (6 - count) * 2, width, count * 2);
SetStandardWindowBorderStyle(windowId, 0);
- for (temp = 0, i = 0; i < ARRAY_COUNT(gSSTidalDestinations); i++)
+ for (selectionCount = 0, i = 0; i < ARRAY_COUNT(gLilycoveSSTidalDestinations); i++)
{
- if (gUnknown_03001124[i] != 0xFF)
+ if (sLilycoveSSTidalSelections[i] != 0xFF)
{
- AddTextPrinterParameterized(windowId, 1, gSSTidalDestinations[gUnknown_03001124[i]], 8, temp * 16 + 1, TEXT_SPEED_FF, NULL);
- temp++;
+ AddTextPrinterParameterized(windowId, 1, gLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SPEED_FF, NULL);
+ selectionCount++;
}
}
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, count - 1);
CopyWindowToVram(windowId, 3);
- sub_80E1FBC(FALSE, count, windowId, 8);
+ sub_80E1FBC(FALSE, count, windowId, MULTI_SSTIDAL_LILYCOVE);
}
}
-void sub_80E2878(void)
+void GetLilycoveSSTidalSelection(void)
{
if (gSpecialVar_Result != MULTI_B_PRESSED)
{
- gSpecialVar_Result = gUnknown_03001124[gSpecialVar_Result];
+ gSpecialVar_Result = sLilycoveSSTidalSelections[gSpecialVar_Result];
}
}
@@ -635,7 +638,7 @@ void ClearToTransparentAndRemoveWindow(u8 windowId)
RemoveWindow(windowId);
}
-static void sub_80E2A94(u8 multichoiceId)
+static void DrawLinkServicesMultichoiceMenu(u8 multichoiceId)
{
switch (multichoiceId)
{
@@ -666,19 +669,21 @@ static void sub_80E2A94(u8 multichoiceId)
}
}
-bool16 CreateStartMenuForPokenavTutorial(void)
+bool16 ScriptMenu_CreateStartMenuForPokenavTutorial(void)
{
if (FuncIsActiveTask(Task_HandleMultichoiceInput) == TRUE)
{
return FALSE;
}
-
- gSpecialVar_Result = 0xFF;
- CreateMultichoiceStartMenu();
- return TRUE;
+ else
+ {
+ gSpecialVar_Result = 0xFF;
+ CreateStartMenuForPokenavTutorial();
+ return TRUE;
+ }
}
-static void CreateMultichoiceStartMenu(void)
+static void CreateStartMenuForPokenavTutorial(void)
{
u8 windowId = CreateWindowFromRect(21, 0, 7, 18);
SetStandardWindowBorderStyle(windowId, 0);
@@ -700,7 +705,7 @@ static void CreateMultichoiceStartMenu(void)
static void sub_80E2CC4(bool8 ignoreBPress, u8 unused, u8 windowId, u8 multichoiceId)
{
u8 taskId;
- gUnknown_02039F90 = 2;
+ gProcessInputDelay = 2;
taskId = CreateTask(Task_HandleMultichoiceInput, 80);
gTasks[taskId].tIgnoreBPress = ignoreBPress;
gTasks[taskId].tDoWrap = 0;
@@ -717,16 +722,16 @@ static void sub_80E2CC4(bool8 ignoreBPress, u8 unused, u8 windowId, u8 multichoi
#undef tWindowId
#undef tMultichoiceId
-static int display_text_and_get_width_internal(const u8 *str)
+static int DisplayTextAndGetWidthInternal(const u8 *str)
{
u8 temp[64];
StringExpandPlaceholders(temp, str);
return GetStringWidth(1, temp, 0);
}
-int display_text_and_get_width(const u8 *str, int prevMaxWidth)
+int DisplayTextAndGetWidth(const u8 *str, int prevMaxWidth)
{
- int len = display_text_and_get_width_internal(str);
+ int len = DisplayTextAndGetWidthInternal(str);
if (len < prevMaxWidth)
{
len = prevMaxWidth;
@@ -734,30 +739,26 @@ int display_text_and_get_width(const u8 *str, int prevMaxWidth)
return len;
}
-int convert_pixel_width_to_tile_width(int width)
+int ConvertPixelWidthToTileWidth(int width)
{
- return (((width + 9) / 8) + 1) > 28 ? 28 : (((width + 9) / 8) + 1);
+ return (((width + 9) / 8) + 1) > MAX_MULTICHOICE_WIDTH ? MAX_MULTICHOICE_WIDTH : (((width + 9) / 8) + 1);
}
-int sub_80E2D5C(int a0, int a1)
+int ScriptMenu_AdjustLeftCoordFromWidth(int left, int width)
{
- int ret = a0;
+ int adjustedLeft = left;
- if (a0 + a1 > 28)
+ if (left + width > MAX_MULTICHOICE_WIDTH)
{
- if (28 - a1 < 0)
+ if (MAX_MULTICHOICE_WIDTH - width < 0)
{
- ret = 0;
+ adjustedLeft = 0;
}
else
{
- ret = 28 - a1;
+ adjustedLeft = MAX_MULTICHOICE_WIDTH - width;
}
}
- else
- {
- ret = a0;
- }
- return ret;
+ return adjustedLeft;
}
diff --git a/src/strings.c b/src/strings.c
index d423dd5b4..36674e875 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -601,8 +601,8 @@ const u8 gText_Phoebe[] = _("PHOEBE");
const u8 gText_Glacia[] = _("GLACIA");
const u8 gText_Petalburg[] = _("PETALBURG");
const u8 gText_Slateport[] = _("SLATEPORT");
-const u8 gText_Littleroot[] = _("LITTLEROOT"); //unused
-const u8 gText_Lilycove[] = _("LILYCOVE"); //unused
+const u8 gText_Littleroot[] = _("LITTLEROOT"); // Unused. Given the context, Briney may at one point have been able to sail the player here
+const u8 gText_Lilycove[] = _("LILYCOVE"); // Unused. Given the context, Briney may at one point have been able to sail the player here
const u8 gText_Dewford[] = _("DEWFORD");
const u8 gText_Enter2[] = _("ENTER");
const u8 gText_Info2[] = _("INFO");
diff --git a/src/trader.c b/src/trader.c
index dcf1fa076..a3794a539 100644
--- a/src/trader.c
+++ b/src/trader.c
@@ -71,7 +71,7 @@ void CreateAvailableDecorationsMenu(u8 taskId)
if (curWidth > windowWidth)
windowWidth = curWidth;
}
- windowTemplate.width = convert_pixel_width_to_tile_width(windowWidth);
+ windowTemplate.width = ConvertPixelWidthToTileWidth(windowWidth);
data[3] = AddWindow(&windowTemplate);
DrawStdFrameWithCustomTileAndPalette(data[3], FALSE, 0x214, 14);
for (i = 0; i < 4; i++)