summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-09-27 09:11:22 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-09-27 09:11:22 -0400
commit7b8b5b5c8c02156d7cdaa76212ad68f01b1600c9 (patch)
tree32b1c3ce14f272708fdc4b5b944a8dc9c14d07e3
parent27aae9da9a570b6787171e33fa29c43c507187c1 (diff)
parent208e1c968959c781562f0b94c03368385ce7012c (diff)
Merge branch 'master' into gflib
-rw-r--r--asm/macros/event.inc16
-rw-r--r--charmap.txt9
-rw-r--r--common_syms/field_specials.txt2
-rw-r--r--constants/berry_constants.inc6
-rw-r--r--constants/constants.inc2
-rw-r--r--constants/pokemon_data_constants.inc35
-rw-r--r--data/event_scripts.s351
-rw-r--r--data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc24
-rw-r--r--data/maps/BattleFrontier_BattleArenaLobby/scripts.inc18
-rw-r--r--data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc124
-rw-r--r--data/maps/BattleFrontier_BattleDomeLobby/scripts.inc18
-rw-r--r--data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc18
-rw-r--r--data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc18
-rw-r--r--data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc28
-rw-r--r--data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc24
-rw-r--r--data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc18
-rw-r--r--data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePikeLobby/scripts.inc14
-rw-r--r--data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc118
-rw-r--r--data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc24
-rw-r--r--data/maps/BattleFrontier_BattlePyramidTop/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc24
-rw-r--r--data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc36
-rw-r--r--data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattleTowerElevator/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattleTowerLobby/scripts.inc58
-rw-r--r--data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_Lounge1/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_Lounge2/scripts.inc22
-rw-r--r--data/maps/BattleFrontier_Lounge3/scripts.inc50
-rw-r--r--data/maps/BattleFrontier_Lounge5/map.json2
-rw-r--r--data/maps/BattleFrontier_Lounge5/scripts.inc72
-rw-r--r--data/maps/BattleFrontier_Lounge7/scripts.inc46
-rw-r--r--data/maps/BattleFrontier_OutsideWest/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_ReceptionGate/scripts.inc14
-rw-r--r--data/maps/BattleFrontier_ScottsHouse/scripts.inc6
-rw-r--r--data/maps/BirthIsland_Harbor/scripts.inc6
-rw-r--r--data/maps/CaveOfOrigin_B1F/scripts.inc2
-rw-r--r--data/maps/DewfordTown/scripts.inc6
-rw-r--r--data/maps/EverGrandeCity_ChampionsRoom/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_DrakesRoom/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_GlaciasRoom/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_Hall1/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_Hall2/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_Hall3/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_Hall4/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_Hall5/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_HallOfFame/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_PhoebesRoom/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_SidneysRoom/scripts.inc2
-rw-r--r--data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc6
-rw-r--r--data/maps/FallarborTown_BattleTentLobby/scripts.inc10
-rw-r--r--data/maps/FarawayIsland_Entrance/scripts.inc8
-rw-r--r--data/maps/FarawayIsland_Interior/scripts.inc2
-rw-r--r--data/maps/FortreeCity_House2/scripts.inc6
-rw-r--r--data/maps/LilycoveCity/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_ContestLobby/scripts.inc20
-rw-r--r--data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc54
-rw-r--r--data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc26
-rw-r--r--data/maps/LilycoveCity_DepartmentStore_5F/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_LilycoveMuseum_1F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc6
-rw-r--r--data/maps/LittlerootTown/scripts.inc2
-rw-r--r--data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc2
-rw-r--r--data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc6
-rw-r--r--data/maps/LittlerootTown_MaysHouse_1F/scripts.inc2
-rw-r--r--data/maps/LittlerootTown_MaysHouse_2F/scripts.inc6
-rw-r--r--data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc26
-rw-r--r--data/maps/MauvilleCity_BikeShop/scripts.inc10
-rw-r--r--data/maps/MauvilleCity_GameCorner/scripts.inc60
-rw-r--r--data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc10
-rw-r--r--data/maps/MossdeepCity_StevensHouse/scripts.inc2
-rw-r--r--data/maps/MtChimney/scripts.inc4
-rw-r--r--data/maps/NavelRock_Harbor/scripts.inc6
-rw-r--r--data/maps/PetalburgCity_Gym/scripts.inc4
-rw-r--r--data/maps/PetalburgCity_WallysHouse/scripts.inc4
-rw-r--r--data/maps/Route104_MrBrineysHouse/scripts.inc4
-rw-r--r--data/maps/Route109/scripts.inc4
-rw-r--r--data/maps/Route109_SeashoreHouse/scripts.inc4
-rw-r--r--data/maps/Route110_TrickHouseEnd/scripts.inc12
-rw-r--r--data/maps/Route110_TrickHouseEntrance/scripts.inc14
-rw-r--r--data/maps/Route110_TrickHousePuzzle5/scripts.inc30
-rw-r--r--data/maps/Route111/scripts.inc2
-rw-r--r--data/maps/Route113_GlassWorkshop/scripts.inc42
-rw-r--r--data/maps/Route114/scripts.inc2
-rw-r--r--data/maps/Route114_LanettesHouse/scripts.inc2
-rw-r--r--data/maps/Route117/map.json2
-rw-r--r--data/maps/Route117_PokemonDayCare/map.json2
-rw-r--r--data/maps/Route119_WeatherInstitute_2F/scripts.inc2
-rw-r--r--data/maps/Route120/scripts.inc10
-rw-r--r--data/maps/Route121_SafariZoneEntrance/scripts.inc4
-rw-r--r--data/maps/Route123_BerryMastersHouse/scripts.inc6
-rw-r--r--data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc46
-rw-r--r--data/maps/RustboroCity/scripts.inc4
-rw-r--r--data/maps/RustboroCity_DevonCorp_2F/scripts.inc8
-rw-r--r--data/maps/RustboroCity_DevonCorp_3F/scripts.inc2
-rw-r--r--data/maps/RustboroCity_Flat1_2F/scripts.inc2
-rw-r--r--data/maps/RustboroCity_PokemonSchool/scripts.inc4
-rw-r--r--data/maps/SkyPillar_Top/scripts.inc4
-rw-r--r--data/maps/SlateportCity/scripts.inc28
-rw-r--r--data/maps/SlateportCity_BattleTentCorridor/scripts.inc12
-rw-r--r--data/maps/SlateportCity_BattleTentLobby/scripts.inc10
-rw-r--r--data/maps/SlateportCity_Harbor/scripts.inc14
-rw-r--r--data/maps/SlateportCity_House1/scripts.inc2
-rw-r--r--data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc4
-rw-r--r--data/maps/SootopolisCity/scripts.inc14
-rw-r--r--data/maps/SootopolisCity_House6/scripts.inc4
-rw-r--r--data/maps/SouthernIsland_Exterior/scripts.inc8
-rw-r--r--data/maps/SouthernIsland_Interior/scripts.inc14
-rw-r--r--data/maps/TrainerHill_Elevator/scripts.inc6
-rw-r--r--data/maps/TrainerHill_Entrance/scripts.inc8
-rw-r--r--data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc6
-rw-r--r--data/maps/VerdanturfTown_BattleTentLobby/scripts.inc12
-rw-r--r--data/mystery_event_msg.s5
-rw-r--r--data/scripts/cable_club.inc86
-rw-r--r--data/scripts/contest_hall.inc160
-rw-r--r--data/scripts/day_care.inc303
-rw-r--r--data/scripts/mystery_event_club.inc8
-rw-r--r--data/scripts/players_house.inc2
-rw-r--r--data/scripts/pokeblocks.inc4
-rw-r--r--data/scripts/trainer_battle.inc4
-rw-r--r--data/specials.inc86
-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--gflib/bg.c69
-rw-r--r--gflib/string_util.c28
-rw-r--r--gflib/text.h15
-rw-r--r--include/battle.h9
-rw-r--r--include/battle_controllers.h10
-rw-r--r--include/battle_tower.h4
-rw-r--r--include/berry.h33
-rw-r--r--include/constants/battle_frontier.h32
-rw-r--r--include/constants/berry.h28
-rw-r--r--include/constants/daycare.h27
-rw-r--r--include/constants/field_specials.h52
-rw-r--r--include/constants/flags.h4
-rw-r--r--include/constants/global.h3
-rw-r--r--include/constants/item.h20
-rw-r--r--include/constants/pokemon.h322
-rw-r--r--include/constants/script_menu.h168
-rw-r--r--include/constants/vars.h8
-rw-r--r--include/contest.h2
-rw-r--r--include/data.h4
-rw-r--r--include/daycare.h8
-rw-r--r--include/egg_hatch.h4
-rw-r--r--include/field_specials.h22
-rw-r--r--include/global.h10
-rw-r--r--include/global.tv.h5
-rw-r--r--include/graphics.h171
-rw-r--r--include/item.h21
-rw-r--r--include/mon_markings.h6
-rw-r--r--include/party_menu.h35
-rw-r--r--include/pokemon.h187
-rw-r--r--include/script_menu.h24
-rw-r--r--include/script_movement.h6
-rw-r--r--include/slot_machine.h1
-rw-r--r--include/strings.h332
-rw-r--r--include/task.h3
-rw-r--r--src/apprentice.c12
-rw-r--r--src/battle_ai_script_commands.c20
-rw-r--r--src/battle_ai_switch_items.c2
-rw-r--r--src/battle_controller_player.c2
-rw-r--r--src/battle_main.c6
-rw-r--r--src/battle_pike.c2
-rw-r--r--src/battle_pyramid.c2
-rw-r--r--src/battle_script_commands.c150
-rw-r--r--src/battle_tower.c8
-rw-r--r--src/battle_transition.c5
-rw-r--r--src/battle_util.c22
-rw-r--r--src/berry.c1
-rw-r--r--src/berry_blender.c1
-rw-r--r--src/berry_tag_screen.c5
-rw-r--r--src/clock.c2
-rw-r--r--src/data/battle_frontier/battle_frontier_exchange_corner.h99
-rw-r--r--src/data/decoration/icon.h245
-rw-r--r--src/data/graphics/decorations.h168
-rw-r--r--src/data/pokemon/tutor_learnsets.h33
-rw-r--r--src/data/script_menu.h1006
-rw-r--r--src/daycare.c282
-rw-r--r--src/decoration.c4
-rw-r--r--src/egg_hatch.c38
-rw-r--r--src/event_obj_lock.c4
-rw-r--r--src/field_specials.c1669
-rw-r--r--src/frontier_util.c6
-rw-r--r--src/hof_pc.c2
-rw-r--r--src/international_string_util.c4
-rw-r--r--src/match_call.c2
-rw-r--r--src/mauville_old_man.c2
-rw-r--r--src/mon_markings.c8
-rw-r--r--src/mossdeep_gym.c2
-rw-r--r--src/move_relearner.c2
-rw-r--r--src/naming_screen.c8
-rw-r--r--src/new_game.c2
-rw-r--r--src/option_menu.c53
-rw-r--r--src/overworld.c6
-rw-r--r--src/pokeblock.c2
-rw-r--r--src/pokemon.c46
-rw-r--r--src/pokemon_storage_system.c10
-rw-r--r--src/pokemon_summary_screen.c44
-rw-r--r--src/recorded_battle.c14
-rw-r--r--src/region_map.c11
-rw-r--r--src/scrcmd.c6
-rw-r--r--src/script_menu.c1284
-rw-r--r--src/script_movement.c174
-rwxr-xr-xsrc/script_pokemon_util_80F87D8.c12
-rw-r--r--src/secret_base.c6
-rw-r--r--src/strings.c257
-rw-r--r--src/trade.c10
-rw-r--r--src/trader.c2
-rw-r--r--src/tv.c46
-rw-r--r--tools/gbafix/gbafix.c2
217 files changed, 5489 insertions, 5096 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index bf1b8ce76..54078332c 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -825,7 +825,7 @@
.byte \y
.endm
- @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined (gMultichoiceLists) and the one to be used is specified with list. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
+ @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with list. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
.macro multichoice x:req, y:req, list:req, b:req
.byte 0x6f
.byte \x
@@ -834,7 +834,7 @@
.byte \b
.endm
- @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined (gMultichoiceLists) and the one to be used is specified with list. The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
+ @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with list. The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
.macro multichoicedefault x:req, y:req, list:req, default:req, b:req
.byte 0x70
.byte \x
@@ -844,7 +844,7 @@
.byte \b
.endm
- @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined (gMultichoiceLists) and the one to be used is specified with list. The per_row argument determines how many list items will be shown on a single row of the box.
+ @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with list. The per_row argument determines how many list items will be shown on a single row of the box.
.macro multichoicegrid x:req, y:req, list:req, per_row:req, B:req
.byte 0x71
.byte \x
@@ -902,15 +902,15 @@
.4byte \text
.endm
- @ Gives the player one of the specified (species) Pokemon at level level holding item. The unknown arguments should all be zeroes.
- .macro givemon species:req, level:req, item:req, unknown1:req, unknown2:req, unknown3:req
+ @ Gives the player one of the specified (species) Pokemon at level level holding item. The trailing 0s are unused parameters
+ .macro givemon species:req, level:req, item:req
.byte 0x79
.2byte \species
.byte \level
.2byte \item
- .4byte \unknown1
- .4byte \unknown2
- .byte \unknown3
+ .4byte 0x0
+ .4byte 0x0
+ .byte 0
.endm
.macro giveegg species:req
diff --git a/charmap.txt b/charmap.txt
index 43ff737a0..c449d12b0 100644
--- a/charmap.txt
+++ b/charmap.txt
@@ -990,7 +990,16 @@ PH_NURSE_SOLO = 61 02
A_BUTTON = F8 00
B_BUTTON = F8 01
+L_BUTTON = F8 02
+R_BUTTON = F8 03
+START_BUTTON = F8 04
+SELECT_BUTTON = F8 05
+DPAD_UP = F8 06
+DPAD_DOWN = F8 07
+DPAD_LEFT = F8 08
+DPAD_RIGHT = F8 09
DPAD_UPDOWN = F8 0A
+DPAD_LEFTRIGHT = F8 0B
DPAD_NONE = F8 0C
UP_ARROW_2 = F9 00
diff --git a/common_syms/field_specials.txt b/common_syms/field_specials.txt
index 25d874a65..7adb3f669 100644
--- a/common_syms/field_specials.txt
+++ b/common_syms/field_specials.txt
@@ -1 +1 @@
-gUnknown_030061D0
+gScrollableMultichoice_ListMenuTemplate
diff --git a/constants/berry_constants.inc b/constants/berry_constants.inc
deleted file mode 100644
index 2ecd7ac36..000000000
--- a/constants/berry_constants.inc
+++ /dev/null
@@ -1,6 +0,0 @@
- .set BERRY_FIRMNESS_UNKNOWN, 0
- .set BERRY_FIRMNESS_VERY_SOFT, 1
- .set BERRY_FIRMNESS_SOFT, 2
- .set BERRY_FIRMNESS_HARD, 3
- .set BERRY_FIRMNESS_VERY_HARD, 4
- .set BERRY_FIRMNESS_SUPER_HARD, 5
diff --git a/constants/constants.inc b/constants/constants.inc
index 7c74c8e87..a58bf92a2 100644
--- a/constants/constants.inc
+++ b/constants/constants.inc
@@ -1,6 +1,4 @@
.include "constants/gba_constants.inc"
.include "constants/global.inc"
.include "constants/contest_constants.inc"
- .include "constants/pokemon_data_constants.inc"
- .include "constants/berry_constants.inc"
.include "constants/contest_move_effects.inc"
diff --git a/constants/pokemon_data_constants.inc b/constants/pokemon_data_constants.inc
deleted file mode 100644
index 646bd6d4c..000000000
--- a/constants/pokemon_data_constants.inc
+++ /dev/null
@@ -1,35 +0,0 @@
- .set GROWTH_MEDIUM_FAST, 0x00
- .set GROWTH_ERRATIC, 0x01
- .set GROWTH_FLUCTUATING, 0x02
- .set GROWTH_MEDIUM_SLOW, 0x03
- .set GROWTH_FAST, 0x04
- .set GROWTH_SLOW, 0x05
-
- .set BODY_COLOR_RED, 0x00
- .set BODY_COLOR_BLUE, 0x01
- .set BODY_COLOR_YELLOW, 0x02
- .set BODY_COLOR_GREEN, 0x03
- .set BODY_COLOR_BLACK, 0x04
- .set BODY_COLOR_BROWN, 0x05
- .set BODY_COLOR_PURPLE, 0x06
- .set BODY_COLOR_GRAY, 0x07
- .set BODY_COLOR_WHITE, 0x08
- .set BODY_COLOR_PINK, 0x09
-
- .set F_SUMMARY_SCREEN_FLIP_SPRITE, 0x80
-
- .set EVO_FRIENDSHIP, 0x0001 @ Pokémon levels up with friendship ≥ 220
- .set EVO_FRIENDSHIP_DAY, 0x0002 @ Pokémon levels up during the day with friendship ≥ 220
- .set EVO_FRIENDSHIP_NIGHT, 0x0003 @ Pokémon levels up at night with friendship ≥ 220
- .set EVO_LEVEL, 0x0004 @ Pokémon reaches the specified level
- .set EVO_TRADE, 0x0005 @ Pokémon is traded
- .set EVO_TRADE_ITEM, 0x0006 @ Pokémon is traded while it's holding the specified item
- .set EVO_ITEM, 0x0007 @ specified item is used on Pokémon
- .set EVO_LEVEL_ATK_GT_DEF, 0x0008 @ Pokémon reaches the specified level with attack > defense
- .set EVO_LEVEL_ATK_EQ_DEF, 0x0009 @ Pokémon reaches the specified level with attack = defense
- .set EVO_LEVEL_ATK_LT_DEF, 0x000a @ Pokémon reaches the specified level with attack < defense
- .set EVO_LEVEL_SILCOON, 0x000b @ Pokémon reaches the specified level with a Silcoon personality value
- .set EVO_LEVEL_CASCOON, 0x000c @ Pokémon reaches the specified level with a Cascoon personality value
- .set EVO_LEVEL_NINJASK, 0x000d @ Pokémon reaches the specified level (special value for Ninjask)
- .set EVO_LEVEL_SHEDINJA, 0x000e @ Pokémon reaches the specified level (special value for Shedinja)
- .set EVO_BEAUTY, 0x000f @ Pokémon levels up with beauty ≥ specified value
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 0641cfe3e..1ed8581f9 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -1,28 +1,35 @@
#include "constants/global.h"
+#include "constants/battle.h"
#include "constants/battle_frontier.h"
#include "constants/battle_setup.h"
+#include "constants/berry.h"
#include "constants/contest.h"
+#include "constants/daycare.h"
+#include "constants/decorations.h"
#include "constants/easy_chat.h"
#include "constants/event_objects.h"
#include "constants/event_object_movement_constants.h"
#include "constants/field_effects.h"
+#include "constants/field_specials.h"
#include "constants/flags.h"
-#include "constants/decorations.h"
+#include "constants/game_stat.h"
+#include "constants/item.h"
#include "constants/items.h"
#include "constants/heal_locations.h"
#include "constants/layouts.h"
+#include "constants/lilycove_lady.h"
#include "constants/map_scripts.h"
#include "constants/maps.h"
+#include "constants/metatile_labels.h"
#include "constants/moves.h"
+#include "constants/pokemon.h"
+#include "constants/script_menu.h"
#include "constants/songs.h"
#include "constants/species.h"
+#include "constants/trainer_hill.h"
#include "constants/trainers.h"
#include "constants/vars.h"
#include "constants/weather.h"
-#include "constants/trainer_hill.h"
-#include "constants/lilycove_lady.h"
-#include "constants/battle.h"
-#include "constants/metatile_labels.h"
.include "asm/macros.inc"
.include "asm/macros/event.inc"
.include "constants/constants.inc"
@@ -468,22 +475,22 @@ gUnknown_0823B4E8:: @ 823B4E8 ;EventScript_SecretBasePCCancel?
end
EventScript_SecretBasePCMainMenuChoice:: @ 823B4EF
- multichoice 0, 0, 6, 0
+ multichoice 0, 0, MULTI_DECOR_REGISTRY, 0
switch VAR_RESULT
case 0, EventScript_23B581
case 1, EventScript_23B568
case 2, EventScript_23B585
case 3, EventScript_23B66E
- case 127, EventScript_23B66E
+ case MULTI_B_PRESSED, EventScript_23B66E
end
EventScript_23B531:: @ 823B531
- multichoice 0, 0, 5, 0
+ multichoice 0, 0, MULTI_DECOR_NOREGISTRY, 0
switch VAR_RESULT
case 0, EventScript_23B581
case 1, EventScript_23B568
case 2, EventScript_23B66E
- case 127, EventScript_23B66E
+ case MULTI_B_PRESSED, EventScript_23B66E
end
EventScript_23B568:: @ 823B568
@@ -518,13 +525,13 @@ EventScript_RecordMixingSecretBasePC:: @ 823B589
EventScript_23B5A1:: @ 823B5A1
message Text_SecretBasePCStartMenu
waitmessage
- multichoice 0, 0, 7, 0
+ multichoice 0, 0, MULTI_REGISTER_MENU, 0
switch VAR_RESULT
case 0, EventScript_23B5F0
case 1, EventScript_23B585
case 2, EventScript_23B660
case 3, EventScript_23B66E
- case 127, EventScript_23B66E
+ case MULTI_B_PRESSED, EventScript_23B66E
end
gUnknown_0823B5E9:: @ 823B5E9
@@ -851,86 +858,86 @@ Std_MsgboxAutoclose:: @ 8271494
return
EventScript_ResetAllBerries:: @ 827149D
- setberrytree 2, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5
- setberrytree 1, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5
- setberrytree 11, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5
- setberrytree 13, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5
- setberrytree 4, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5
- setberrytree 76, ITEM_TO_BERRY(ITEM_CHERI_BERRY), 5
- setberrytree 8, ITEM_TO_BERRY(ITEM_CHERI_BERRY), 5
- setberrytree 10, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5
- setberrytree 25, ITEM_TO_BERRY(ITEM_PINAP_BERRY), 5
- setberrytree 26, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), 5
- setberrytree 66, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), 5
- setberrytree 67, ITEM_TO_BERRY(ITEM_PINAP_BERRY), 5
- setberrytree 69, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), 5
- setberrytree 70, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), 5
- setberrytree 71, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), 5
- setberrytree 55, ITEM_TO_BERRY(ITEM_BLUK_BERRY), 5
- setberrytree 56, ITEM_TO_BERRY(ITEM_BLUK_BERRY), 5
- setberrytree 5, ITEM_TO_BERRY(ITEM_CHERI_BERRY), 5
- setberrytree 6, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5
- setberrytree 7, ITEM_TO_BERRY(ITEM_CHERI_BERRY), 5
- setberrytree 16, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5
- setberrytree 17, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5
- setberrytree 18, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5
- setberrytree 29, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), 5
- setberrytree 28, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), 5
- setberrytree 27, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), 5
- setberrytree 24, ITEM_TO_BERRY(ITEM_RAWST_BERRY), 5
- setberrytree 23, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5
- setberrytree 22, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5
- setberrytree 21, ITEM_TO_BERRY(ITEM_RAWST_BERRY), 5
- setberrytree 19, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), 5
- setberrytree 20, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), 5
- setberrytree 80, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5
- setberrytree 81, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5
- setberrytree 77, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), 5
- setberrytree 78, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), 5
- setberrytree 68, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), 5
- setberrytree 31, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), 5
- setberrytree 33, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), 5
- setberrytree 34, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5
- setberrytree 35, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5
- setberrytree 36, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5
- setberrytree 83, ITEM_TO_BERRY(ITEM_HONDEW_BERRY), 5
- setberrytree 84, ITEM_TO_BERRY(ITEM_HONDEW_BERRY), 5
- setberrytree 85, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), 5
- setberrytree 86, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5
- setberrytree 37, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), 5
- setberrytree 38, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), 5
- setberrytree 39, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), 5
- setberrytree 40, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5
- setberrytree 41, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5
- setberrytree 42, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5
- setberrytree 46, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), 5
- setberrytree 45, ITEM_TO_BERRY(ITEM_PINAP_BERRY), 5
- setberrytree 44, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5
- setberrytree 43, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), 5
- setberrytree 47, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), 5
- setberrytree 48, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), 5
- setberrytree 49, ITEM_TO_BERRY(ITEM_RAWST_BERRY), 5
- setberrytree 50, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), 5
- setberrytree 52, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5
- setberrytree 53, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5
- setberrytree 62, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5
- setberrytree 64, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5
- setberrytree 58, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5
- setberrytree 59, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5
- setberrytree 60, ITEM_TO_BERRY(ITEM_GREPA_BERRY), 5
- setberrytree 61, ITEM_TO_BERRY(ITEM_GREPA_BERRY), 5
- setberrytree 79, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), 5
- setberrytree 14, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), 5
- setberrytree 15, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5
- setberrytree 30, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5
- setberrytree 65, ITEM_TO_BERRY(ITEM_GREPA_BERRY), 5
- setberrytree 72, ITEM_TO_BERRY(ITEM_GREPA_BERRY), 5
- setberrytree 73, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), 5
- setberrytree 74, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), 5
- setberrytree 87, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5
- setberrytree 88, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), 5
- setberrytree 89, ITEM_TO_BERRY(ITEM_RAWST_BERRY), 5
- setberrytree 82, ITEM_TO_BERRY(ITEM_LIECHI_BERRY), 5
+ setberrytree 2, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 1, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 11, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 13, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 4, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 76, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 8, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 10, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 25, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 26, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 66, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 67, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 69, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 70, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 71, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 55, ITEM_TO_BERRY(ITEM_BLUK_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 56, ITEM_TO_BERRY(ITEM_BLUK_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 5, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 6, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 7, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 16, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 17, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 18, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 29, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 28, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 27, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 24, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 23, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 22, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 21, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 19, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 20, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 80, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 81, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 77, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 78, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 68, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 31, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 33, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 34, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 35, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 36, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 83, ITEM_TO_BERRY(ITEM_HONDEW_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 84, ITEM_TO_BERRY(ITEM_HONDEW_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 85, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 86, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 37, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 38, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 39, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 40, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 41, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 42, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 46, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 45, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 44, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 43, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 47, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 48, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 49, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 50, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 52, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 53, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 62, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 64, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 58, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 59, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 60, ITEM_TO_BERRY(ITEM_GREPA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 61, ITEM_TO_BERRY(ITEM_GREPA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 79, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 14, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 15, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 30, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 65, ITEM_TO_BERRY(ITEM_GREPA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 72, ITEM_TO_BERRY(ITEM_GREPA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 73, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 74, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 87, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 88, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 89, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
+ setberrytree 82, ITEM_TO_BERRY(ITEM_LIECHI_BERRY), BERRY_STAGE_BERRIES
return
EventScript_ResetAllMapFlags:: @ 82715DE
@@ -1038,7 +1045,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
@@ -1392,50 +1399,50 @@ Std_ObtainItem:: @ 8271AD3
EventScript_271AE3:: @ 8271AE3
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001
checkitemtype VAR_0x8000
- call EventScript_271B08
+ call EventScript_BufferStdString
compare VAR_0x8007, 1
call_if_eq EventScript_271B95
compare VAR_0x8007, 0
call_if_eq EventScript_271BA9
return
-EventScript_271B08:: @ 8271B08
+EventScript_BufferStdString:: @ 8271B08
switch VAR_RESULT
- case 1, EventScript_271B45
- case 5, EventScript_271B55
- case 2, EventScript_271B65
- case 3, EventScript_271B75
- case 4, EventScript_271B85
+ case POCKET_ITEMS, EventScript_StdStringItem
+ case POCKET_KEY_ITEMS, EventScript_StdStringKeyItems
+ case POCKET_POKE_BALLS, EventScript_StdStringPokeballs
+ case POCKET_TM_HM, EventScript_StdStringTMHMS
+ case POCKET_BERRIES, EventScript_StdStringBerries
end
-EventScript_271B45:: @ 8271B45
- bufferstdstring 2, 14
+EventScript_StdStringItem:: @ 8271B45
+ bufferstdstring 2, STDSTRING_ITEMS
compare VAR_0x8007, 1
- call_if_eq EventScript_271BAF
+ call_if_eq EventScript_PlayFanfare4
return
-EventScript_271B55:: @ 8271B55
- bufferstdstring 2, 15
+EventScript_StdStringKeyItems:: @ 8271B55
+ bufferstdstring 2, STDSTRING_KEYITEMS
compare VAR_0x8007, 1
- call_if_eq EventScript_271BAF
+ call_if_eq EventScript_PlayFanfare4
return
-EventScript_271B65:: @ 8271B65
- bufferstdstring 2, 16
+EventScript_StdStringPokeballs:: @ 8271B65
+ bufferstdstring 2, STDSTRING_POKEBALLS
compare VAR_0x8007, 1
- call_if_eq EventScript_271BAF
+ call_if_eq EventScript_PlayFanfare4
return
-EventScript_271B75:: @ 8271B75
- bufferstdstring 2, 17
+EventScript_StdStringTMHMS:: @ 8271B75
+ bufferstdstring 2, STDSTRING_TMHMS
compare VAR_0x8007, 1
call_if_eq EventScript_271BB3
return
-EventScript_271B85:: @ 8271B85
- bufferstdstring 2, 18
+EventScript_StdStringBerries:: @ 8271B85
+ bufferstdstring 2, STDSTRING_BERRIES
compare VAR_0x8007, 1
- call_if_eq EventScript_271BAF
+ call_if_eq EventScript_PlayFanfare4
return
EventScript_271B95:: @ 8271B95
@@ -1449,7 +1456,7 @@ EventScript_271BA9:: @ 8271BA9
setvar VAR_RESULT, 0
return
-EventScript_271BAF:: @ 8271BAF
+EventScript_PlayFanfare4:: @ 8271BAF
playfanfare MUS_FANFA4
return
@@ -1493,7 +1500,7 @@ Std_FindItem:: @ 8271BFD
copyvar VAR_0x8007, VAR_RESULT
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001
checkitemtype VAR_0x8000
- call EventScript_271B08
+ call EventScript_BufferStdString
compare VAR_0x8007, 1
call_if_eq EventScript_PickItemUp
compare VAR_0x8007, 0
@@ -1504,7 +1511,7 @@ Std_FindItem:: @ 8271BFD
EventScript_PickItemUp:: @ 8271C3A
removeobject VAR_LAST_TALKED
giveitem VAR_0x8004, VAR_0x8005
- specialvar VAR_RESULT, sub_81398C0
+ specialvar VAR_RESULT, BufferTMHMMoveName
copyvar VAR_0x8008, VAR_RESULT
compare VAR_0x8008, 1
call_if_eq EventScript_271C8F
@@ -1546,7 +1553,7 @@ EventScript_HiddenItemScript:: @ 8271CB7
copyvar VAR_0x8007, VAR_RESULT
bufferitemnameplural 1, VAR_0x8005, 1
checkitemtype VAR_0x8005
- call EventScript_271B08
+ call EventScript_BufferStdString
compare VAR_0x8007, 1
goto_if_eq EventScript_271CE8
compare VAR_0x8007, 0
@@ -1556,7 +1563,7 @@ EventScript_HiddenItemScript:: @ 8271CB7
EventScript_271CE8:: @ 8271CE8
copyvar VAR_0x8008, VAR_0x8004
copyvar VAR_0x8004, VAR_0x8005
- specialvar VAR_RESULT, sub_81398C0
+ specialvar VAR_RESULT, BufferTMHMMoveName
compare VAR_RESULT, 1
goto_if_eq EventScript_271D0E
compare VAR_RESULT, 0
@@ -1627,7 +1634,7 @@ EventScript_PC:: @ 8271D92
EventScript_271DAC:: @ 8271DAC
message gText_WhichPCShouldBeAccessed
waitmessage
- special ScrSpecial_CreatePCMenu
+ special ScriptMenu_CreatePCMultichoice
waitstate
goto EventScript_271DBC
end
@@ -1638,7 +1645,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
@@ -2038,15 +2045,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
@@ -2103,7 +2108,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
@@ -2895,34 +2900,34 @@ LittlerootTown_ProfessorBirchsLab_EventScript_2737A0:: @ 82737A0
MossdeepCity_StevensHouse_EventScript_2737A0:: @ 82737A0
Route119_WeatherInstitute_2F_EventScript_2737A0:: @ 82737A0
RustboroCity_DevonCorp_2F_EventScript_2737A0:: @ 82737A0
- bufferboxname 0, VAR_STORAGE_UNKNOWN
+ bufferboxname 0, VAR_PC_BOX_TO_SEND_MON
bufferspeciesname 1, VAR_TEMP_1
call_if_unset FLAG_SYS_PC_LANETTE, LittlerootTown_ProfessorBirchsLab_EventScript_2737BB
call_if_set FLAG_SYS_PC_LANETTE, LittlerootTown_ProfessorBirchsLab_EventScript_2737E6
return
LittlerootTown_ProfessorBirchsLab_EventScript_2737BB:: @ 82737BB
- specialvar VAR_RESULT, sub_813B21C
+ specialvar VAR_RESULT, ShouldShowBoxWasFullMessage
compare VAR_RESULT, 1
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_2737D4
msgbox gText_PkmnTransferredSomeonesPC, MSGBOX_DEFAULT
return
LittlerootTown_ProfessorBirchsLab_EventScript_2737D4:: @ 82737D4
- specialvar VAR_RESULT, get_unknown_box_id
+ specialvar VAR_RESULT, GetPCBoxToSendMon
bufferboxname 2, VAR_RESULT
msgbox gText_PkmnBoxSomeonesPCFull, MSGBOX_DEFAULT
return
LittlerootTown_ProfessorBirchsLab_EventScript_2737E6:: @ 82737E6
- specialvar VAR_RESULT, sub_813B21C
+ specialvar VAR_RESULT, ShouldShowBoxWasFullMessage
compare VAR_RESULT, 1
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_2737FF
msgbox gText_PkmnTransferredLanettesPC, MSGBOX_DEFAULT
return
LittlerootTown_ProfessorBirchsLab_EventScript_2737FF:: @ 82737FF
- specialvar VAR_RESULT, get_unknown_box_id
+ specialvar VAR_RESULT, GetPCBoxToSendMon
bufferboxname 2, VAR_RESULT
msgbox gText_PkmnBoxLanettesPCFull, MSGBOX_DEFAULT
return
@@ -2944,7 +2949,7 @@ EventScript_Questionnaire:: @ 827381B
call Common_ShowEasyChatScreen
lock
faceplayer
- specialvar VAR_0x8008, sub_813B490
+ specialvar VAR_0x8008, GetMartEmployeeObjectEventId
compare VAR_0x8004, 1
goto_if_eq EventScript_27386D
compare VAR_0x8004, 2
@@ -4015,7 +4020,7 @@ BattleFrontier_BattleTowerLobby_EventScript_28CB96:: @ 828CB96
BattleFrontier_BattleTowerLobby_EventScript_28CBD8:: @ 828CBD8
message BattleFrontier_BattleTowerLobby_Text_27F7BA
waitmessage
- multichoice 20, 8, 45, 1
+ multichoice 20, 8, MULTI_SATISFACTION, 1
copyvar VAR_0x8008, VAR_RESULT
compare VAR_RESULT, 0
call_if_eq BattleFrontier_BattleTowerLobby_EventScript_28CC38
@@ -4207,7 +4212,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"
@@ -5548,17 +5553,17 @@ BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EE8:: @ 82C3EE8
goto_if_eq BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3F3F
hideobjectat 2, MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM1
setvar VAR_TEMP_4, 1
- turnobject 255, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3F35:: @ 82C3F35
setvar VAR_TEMP_4, 1
- turnobject 255, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3F3F:: @ 82C3F3F
setvar VAR_TEMP_4, 1
- turnobject 255, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
hideobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM1
end
@@ -6302,77 +6307,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_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc
index f3a0ecfb4..205ee0e71 100644
--- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc
@@ -169,30 +169,30 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0:: @ 82576B0
call BattleFrontier_BattleArenaBattleRoom_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_257768
- multichoice 19, 4, 103, 1
+ multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_25783A
case 1, BattleFrontier_BattleArenaBattleRoom_EventScript_25779E
case 2, BattleFrontier_BattleArenaBattleRoom_EventScript_2577DA
case 3, BattleFrontier_BattleArenaBattleRoom_EventScript_257808
- case 127, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
BattleFrontier_BattleArenaBattleRoom_EventScript_257768:: @ 8257768
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_25783A
case 1, BattleFrontier_BattleArenaBattleRoom_EventScript_2577DA
case 2, BattleFrontier_BattleArenaBattleRoom_EventScript_257808
- case 127, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
BattleFrontier_BattleArenaBattleRoom_EventScript_25779E:: @ 825779E
message BattleFrontier_BattleArenaBattleRoom_Text_257F04
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_2577D0
- case 127, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
BattleFrontier_BattleArenaBattleRoom_EventScript_2577D0:: @ 82577D0
call BattleFrontier_BattleArenaBattleRoom_EventScript_23E8B4
@@ -208,11 +208,11 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_2577DA:: @ 82577DA
BattleFrontier_BattleArenaBattleRoom_EventScript_257808:: @ 8257808
message BattleFrontier_BattleArenaBattleRoom_Text_257E9E
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_257615
- case 127, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0
BattleFrontier_BattleArenaBattleRoom_EventScript_25783A:: @ 825783A
closemessage
@@ -286,21 +286,21 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_2578D4:: @ 82578D4
call BattleFrontier_BattleArenaBattleRoom_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_25792B
- multichoice 19, 4, 103, 1
+ multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_257961
case 1, BattleFrontier_BattleArenaBattleRoom_EventScript_25779E
case 2, BattleFrontier_BattleArenaBattleRoom_EventScript_2577DA
case 3, BattleFrontier_BattleArenaBattleRoom_EventScript_257808
- case 127, BattleFrontier_BattleArenaBattleRoom_EventScript_2578D4
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaBattleRoom_EventScript_2578D4
BattleFrontier_BattleArenaBattleRoom_EventScript_25792B:: @ 825792B
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_257961
case 1, BattleFrontier_BattleArenaBattleRoom_EventScript_2577DA
case 2, BattleFrontier_BattleArenaBattleRoom_EventScript_257808
- case 127, BattleFrontier_BattleArenaBattleRoom_EventScript_2578D4
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaBattleRoom_EventScript_2578D4
BattleFrontier_BattleArenaBattleRoom_EventScript_257961:: @ 8257961
call BattleFrontier_BattleArenaBattleRoom_EventScript_242170
diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
index 5df47aed1..0c55e9917 100644
--- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
@@ -9,7 +9,7 @@ BattleFrontier_BattleArenaLobby_MapScript2_255C41: @ 8255C41
BattleFrontier_BattleArenaLobby_EventScript_255C4B:: @ 8255C4B
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattleArenaLobby_MapScript2_255C55: @ 8255C55
@@ -101,11 +101,11 @@ BattleFrontier_BattleArenaLobby_EventScript_255D59:: @ 8255D59
goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_255DBF
message BattleFrontier_BattleArenaLobby_Text_256B19
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleArenaLobby_EventScript_255DBF
case 0, BattleFrontier_BattleArenaLobby_EventScript_255DBA
- case 127, BattleFrontier_BattleArenaLobby_EventScript_255DBF
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaLobby_EventScript_255DBF
BattleFrontier_BattleArenaLobby_EventScript_255DBA:: @ 8255DBA
call BattleFrontier_BattleArenaLobby_EventScript_23E8B4
@@ -140,20 +140,20 @@ BattleFrontier_BattleArenaLobby_EventScript_255DF4:: @ 8255DF4
BattleFrontier_BattleArenaLobby_EventScript_255E0B:: @ 8255E0B
message BattleFrontier_BattleArenaLobby_Text_2561EA
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleArenaLobby_EventScript_255E47
case 1, BattleFrontier_BattleArenaLobby_EventScript_255F9F
case 2, BattleFrontier_BattleArenaLobby_EventScript_255FFB
- case 127, BattleFrontier_BattleArenaLobby_EventScript_255FFB
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaLobby_EventScript_255FFB
BattleFrontier_BattleArenaLobby_EventScript_255E47:: @ 8255E47
message BattleFrontier_BattleArenaLobby_Text_256513
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattleArenaLobby_EventScript_255FFB
- case 127, BattleFrontier_BattleArenaLobby_EventScript_255FFB
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaLobby_EventScript_255FFB
setvar VAR_0x8004, 15
special CallFrontierUtilFunc
compare VAR_0x8004, 1
@@ -377,14 +377,14 @@ BattleFrontier_BattleArenaLobby_EventScript_2560CA:: @ 82560CA
BattleFrontier_BattleArenaLobby_EventScript_2560D9:: @ 82560D9
message BattleFrontier_BattleArenaLobby_Text_256DDF
waitmessage
- multichoice 17, 2, 96, 0
+ multichoice 17, 2, MULTI_BATTLE_ARENA_RULES, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleArenaLobby_EventScript_25612C
case 1, BattleFrontier_BattleArenaLobby_EventScript_25613A
case 2, BattleFrontier_BattleArenaLobby_EventScript_256148
case 3, BattleFrontier_BattleArenaLobby_EventScript_256156
case 4, BattleFrontier_BattleArenaLobby_EventScript_256164
- case 127, BattleFrontier_BattleArenaLobby_EventScript_256164
+ case MULTI_B_PRESSED, BattleFrontier_BattleArenaLobby_EventScript_256164
end
BattleFrontier_BattleArenaLobby_EventScript_25612C:: @ 825612C
diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
index 59a010691..a44b51ef5 100644
--- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
@@ -880,71 +880,71 @@ BattleFrontier_BattleDomeBattleRoom_Movement_24C82B: @ 824C82B
step_end
BattleFrontier_BattleDomeBattleRoom_EventScript_24C82E:: @ 824C82E
- turnvobject 0, 4
- turnvobject 2, 4
- turnvobject 4, 4
- turnvobject 6, 4
- turnvobject 8, 4
- turnvobject 10, 3
- turnvobject 12, 3
- turnvobject 14, 3
- turnvobject 16, 3
- turnvobject 18, 3
- turnvobject 20, 4
- turnvobject 22, 4
- turnvobject 24, 4
- turnvobject 26, 4
- turnvobject 28, 4
- turnvobject 30, 4
+ turnvobject 0, DIR_EAST
+ turnvobject 2, DIR_EAST
+ turnvobject 4, DIR_EAST
+ turnvobject 6, DIR_EAST
+ turnvobject 8, DIR_EAST
+ turnvobject 10, DIR_WEST
+ turnvobject 12, DIR_WEST
+ turnvobject 14, DIR_WEST
+ turnvobject 16, DIR_WEST
+ turnvobject 18, DIR_WEST
+ turnvobject 20, DIR_EAST
+ turnvobject 22, DIR_EAST
+ turnvobject 24, DIR_EAST
+ turnvobject 26, DIR_EAST
+ turnvobject 28, DIR_EAST
+ turnvobject 30, DIR_EAST
delay 20
- turnvobject 0, 1
- turnvobject 2, 1
- turnvobject 4, 1
- turnvobject 6, 1
- turnvobject 8, 1
- turnvobject 10, 1
- turnvobject 12, 1
- turnvobject 14, 1
- turnvobject 16, 1
- turnvobject 18, 1
- turnvobject 20, 1
- turnvobject 22, 1
- turnvobject 24, 1
- turnvobject 26, 1
- turnvobject 28, 1
- turnvobject 30, 1
+ turnvobject 0, DIR_SOUTH
+ turnvobject 2, DIR_SOUTH
+ turnvobject 4, DIR_SOUTH
+ turnvobject 6, DIR_SOUTH
+ turnvobject 8, DIR_SOUTH
+ turnvobject 10, DIR_SOUTH
+ turnvobject 12, DIR_SOUTH
+ turnvobject 14, DIR_SOUTH
+ turnvobject 16, DIR_SOUTH
+ turnvobject 18, DIR_SOUTH
+ turnvobject 20, DIR_SOUTH
+ turnvobject 22, DIR_SOUTH
+ turnvobject 24, DIR_SOUTH
+ turnvobject 26, DIR_SOUTH
+ turnvobject 28, DIR_SOUTH
+ turnvobject 30, DIR_SOUTH
delay 20
- turnvobject 1, 4
- turnvobject 3, 4
- turnvobject 5, 4
- turnvobject 7, 4
- turnvobject 9, 4
- turnvobject 11, 3
- turnvobject 13, 3
- turnvobject 15, 3
- turnvobject 17, 3
- turnvobject 19, 3
- turnvobject 21, 4
- turnvobject 23, 4
- turnvobject 25, 4
- turnvobject 27, 3
- turnvobject 31, 3
+ turnvobject 1, DIR_EAST
+ turnvobject 3, DIR_EAST
+ turnvobject 5, DIR_EAST
+ turnvobject 7, DIR_EAST
+ turnvobject 9, DIR_EAST
+ turnvobject 11, DIR_WEST
+ turnvobject 13, DIR_WEST
+ turnvobject 15, DIR_WEST
+ turnvobject 17, DIR_WEST
+ turnvobject 19, DIR_WEST
+ turnvobject 21, DIR_EAST
+ turnvobject 23, DIR_EAST
+ turnvobject 25, DIR_EAST
+ turnvobject 27, DIR_WEST
+ turnvobject 31, DIR_WEST
delay 20
- turnvobject 1, 1
- turnvobject 3, 1
- turnvobject 5, 1
- turnvobject 7, 1
- turnvobject 9, 1
- turnvobject 11, 1
- turnvobject 13, 1
- turnvobject 15, 1
- turnvobject 17, 1
- turnvobject 19, 1
- turnvobject 21, 1
- turnvobject 23, 1
- turnvobject 25, 1
- turnvobject 27, 1
- turnvobject 31, 1
+ turnvobject 1, DIR_SOUTH
+ turnvobject 3, DIR_SOUTH
+ turnvobject 5, DIR_SOUTH
+ turnvobject 7, DIR_SOUTH
+ turnvobject 9, DIR_SOUTH
+ turnvobject 11, DIR_SOUTH
+ turnvobject 13, DIR_SOUTH
+ turnvobject 15, DIR_SOUTH
+ turnvobject 17, DIR_SOUTH
+ turnvobject 19, DIR_SOUTH
+ turnvobject 21, DIR_SOUTH
+ turnvobject 23, DIR_SOUTH
+ turnvobject 25, DIR_SOUTH
+ turnvobject 27, DIR_SOUTH
+ turnvobject 31, DIR_SOUTH
delay 20
return
diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
index 68ecf802b..4ba6db967 100644
--- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
@@ -16,7 +16,7 @@ BattleFrontier_BattlePyramidLobby_MapScript2_2497FB: @ 82497FB
BattleFrontier_BattleDomeLobby_EventScript_249805:: @ 8249805
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattleDomeLobby_MapScript2_24980F: @ 824980F
@@ -131,11 +131,11 @@ BattleFrontier_BattleDomeLobby_EventScript_249991:: @ 8249991
goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_2499E9
message BattleFrontier_BattleDomeLobby_Text_24AE17
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleDomeLobby_EventScript_2499E9
case 0, BattleFrontier_BattleDomeLobby_EventScript_2499E4
- case 127, BattleFrontier_BattleDomeLobby_EventScript_2499E9
+ case MULTI_B_PRESSED, BattleFrontier_BattleDomeLobby_EventScript_2499E9
BattleFrontier_BattleDomeLobby_EventScript_2499E4:: @ 82499E4
call BattleFrontier_BattleDomeLobby_EventScript_23E8B4
@@ -193,20 +193,20 @@ BattleFrontier_BattleDomeLobby_EventScript_249A72:: @ 8249A72
compare VAR_FRONTIER_BATTLE_MODE, 1
call_if_eq BattleFrontier_BattleDomeLobby_EventScript_249D15
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleDomeLobby_EventScript_249ABF
case 1, BattleFrontier_BattleDomeLobby_EventScript_249BFA
case 2, BattleFrontier_BattleDomeLobby_EventScript_249C64
- case 127, BattleFrontier_BattleDomeLobby_EventScript_249C64
+ case MULTI_B_PRESSED, BattleFrontier_BattleDomeLobby_EventScript_249C64
BattleFrontier_BattleDomeLobby_EventScript_249ABF:: @ 8249ABF
message BattleFrontier_BattleDomeLobby_Text_24A210
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattleDomeLobby_EventScript_249C64
- case 127, BattleFrontier_BattleDomeLobby_EventScript_249C64
+ case MULTI_B_PRESSED, BattleFrontier_BattleDomeLobby_EventScript_249C64
setvar VAR_0x8004, 15
special CallFrontierUtilFunc
compare VAR_0x8004, 1
@@ -503,13 +503,13 @@ BattleFrontier_BattleDomeLobby_EventScript_249E34:: @ 8249E34
BattleFrontier_BattleDomeLobby_EventScript_249E43:: @ 8249E43
message BattleFrontier_BattleDomeLobby_Text_24AE8B
waitmessage
- multichoice 17, 4, 98, 0
+ multichoice 17, 4, MULTI_BATTLE_DOME_RULES, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleDomeLobby_EventScript_249E8B
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_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
index 3901201bb..3f5d53ac1 100644
--- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
@@ -9,7 +9,7 @@ BattleFrontier_BattleDomePreBattleRoom_MapScript2_24B204: @ 824B204
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B20E:: @ 824B20E
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattleDomePreBattleRoom_MapScript2_24B218: @ 824B218
@@ -35,7 +35,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F:: @ 824B24F
call BattleFrontier_BattleDomePreBattleRoom_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_24B2C1
- multichoice 16, 0, 73, 1
+ multichoice 16, 0, MULTI_TOURNEY_WITH_RECORD, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3DD
case 1, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3F5
@@ -43,26 +43,26 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F:: @ 824B24F
case 3, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B30D
case 4, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B349
case 5, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B377
- case 127, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
+ case MULTI_B_PRESSED, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B2C1:: @ 824B2C1
- multichoice 16, 2, 107, 1
+ multichoice 16, 2, MULTI_TOURNEY_NO_RECORD, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3DD
case 1, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3F5
case 2, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B46D
case 3, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B349
case 4, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B377
- case 127, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
+ case MULTI_B_PRESSED, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B30D:: @ 824B30D
message BattleFrontier_BattleDomePreBattleRoom_Text_24BAF7
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
case 0, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B33F
- case 127, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
+ case MULTI_B_PRESSED, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B33F:: @ 824B33F
call BattleFrontier_BattleDomePreBattleRoom_EventScript_23E8B4
@@ -78,11 +78,11 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B349:: @ 824B349
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B377:: @ 824B377
message BattleFrontier_BattleDomePreBattleRoom_Text_24BA93
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
case 0, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3A9
- case 127, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
+ case MULTI_B_PRESSED, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3A9:: @ 824B3A9
setvar VAR_0x8004, 12
diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
index a9e57dde6..9569d23ca 100644
--- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
@@ -9,7 +9,7 @@ BattleFrontier_BattleFactoryLobby_MapScript2_2583F3: @ 82583F3
BattleFrontier_BattleFactoryLobby_EventScript_2583FD:: @ 82583FD
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattleFactoryLobby_MapScript2_258407: @ 8258407
@@ -106,11 +106,11 @@ BattleFrontier_BattleFactoryLobby_EventScript_25853B:: @ 825853B
goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_258582
message BattleFrontier_BattleFactoryLobby_Text_259388
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleFactoryLobby_EventScript_258582
case 0, BattleFrontier_BattleFactoryLobby_EventScript_25857D
- case 127, BattleFrontier_BattleFactoryLobby_EventScript_258582
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_258582
BattleFrontier_BattleFactoryLobby_EventScript_25857D:: @ 825857D
call BattleFrontier_BattleFactoryLobby_EventScript_23E8B4
@@ -166,20 +166,20 @@ BattleFrontier_BattleFactoryLobby_EventScript_258606:: @ 8258606
compare VAR_FRONTIER_BATTLE_MODE, 1
call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_2587C9
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleFactoryLobby_EventScript_258653
case 1, BattleFrontier_BattleFactoryLobby_EventScript_258768
case 2, BattleFrontier_BattleFactoryLobby_EventScript_25879D
- case 127, BattleFrontier_BattleFactoryLobby_EventScript_25879D
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_25879D
BattleFrontier_BattleFactoryLobby_EventScript_258653:: @ 8258653
message BattleFrontier_BattleFactoryLobby_Text_258BE9
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattleFactoryLobby_EventScript_25879D
- case 127, BattleFrontier_BattleFactoryLobby_EventScript_25879D
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_25879D
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
copyvar VAR_0x8006, VAR_RESULT
@@ -347,7 +347,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_258839:: @ 8258839
BattleFrontier_BattleFactoryLobby_EventScript_258848:: @ 8258848
message BattleFrontier_BattleFactoryLobby_Text_259743
waitmessage
- multichoice 17, 0, 99, 0
+ multichoice 17, 0, MULTI_BATTLE_FACTORY_RULES, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleFactoryLobby_EventScript_2588A6
case 1, BattleFrontier_BattleFactoryLobby_EventScript_2588B4
@@ -355,7 +355,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_258848:: @ 8258848
case 3, BattleFrontier_BattleFactoryLobby_EventScript_2588D0
case 4, BattleFrontier_BattleFactoryLobby_EventScript_2588DE
case 5, BattleFrontier_BattleFactoryLobby_EventScript_2588EC
- case 127, BattleFrontier_BattleFactoryLobby_EventScript_2588EC
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_2588EC
end
BattleFrontier_BattleFactoryLobby_EventScript_2588A6:: @ 82588A6
diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
index 0049b3f58..f65ffae0d 100644
--- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
@@ -12,10 +12,10 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259ACF:: @ 8259ACF
compare VAR_0x8006, 1
goto_if_ne BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259AEA
setobjectxy 1, 8, 7
- turnobject 1, 1
+ turnobject 1, DIR_SOUTH
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259AEA:: @ 8259AEA
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AEF: @ 8259AEF
@@ -118,30 +118,30 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C26:: @ 8259C26
call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CC6
- multichoice 19, 4, 103, 1
+ multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98
case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CFC
case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38
case 3, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66
- case 127, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CC6:: @ 8259CC6
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98
case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38
case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66
- case 127, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CFC:: @ 8259CFC
message BattleFrontier_BattleFactoryPreBattleRoom_Text_25ABD2
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D2E
- case 127, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D2E:: @ 8259D2E
call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_23E8B4
@@ -157,11 +157,11 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38:: @ 8259D38
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66:: @ 8259D66
message BattleFrontier_BattleFactoryPreBattleRoom_Text_25A37A
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25AEF8
- case 127, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
+ case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98:: @ 8259D98
setvar VAR_0x8004, 12
@@ -422,21 +422,21 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9:: @ 825A0B9
call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A110
- multichoice 19, 4, 103, 1
+ multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A146
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, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
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_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
index bdd4a9ff4..605807580 100644
--- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
@@ -126,30 +126,30 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A:: @ 824F98A
call BattleFrontier_BattlePalaceBattleRoom_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA42
- multichoice 19, 4, 103, 1
+ multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB14
case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA78
case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4
case 3, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2
- case 127, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA42:: @ 824FA42
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB14
case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4
case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2
- case 127, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA78:: @ 824FA78
message BattleFrontier_BattlePalaceBattleRoom_Text_25009E
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAAA
- case 127, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAAA:: @ 824FAAA
call BattleFrontier_BattlePalaceBattleRoom_EventScript_23E8B4
@@ -165,11 +165,11 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4:: @ 824FAB4
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2:: @ 824FAE2
message BattleFrontier_BattlePalaceBattleRoom_Text_25005A
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8FA
- case 127, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB14:: @ 824FB14
applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE97
@@ -209,21 +209,21 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB79:: @ 824FB79
call BattleFrontier_BattlePalaceBattleRoom_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FBD0
- multichoice 19, 4, 103, 1
+ multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FC06
case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA78
case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4
case 3, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2
- case 127, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB79
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB79
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FBD0:: @ 824FBD0
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FC06
case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4
case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2
- case 127, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB79
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB79
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FC06:: @ 824FC06
call BattleFrontier_BattlePalaceBattleRoom_EventScript_242170
diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
index 40205e9b5..c3b688661 100644
--- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
@@ -9,7 +9,7 @@ BattleFrontier_BattlePalaceLobby_MapScript2_24D789: @ 824D789
BattleFrontier_BattlePalaceLobby_EventScript_24D793:: @ 824D793
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattlePalaceLobby_MapScript2_24D79D: @ 824D79D
@@ -101,11 +101,11 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D8A1:: @ 824D8A1
goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24D907
message BattleFrontier_BattlePalaceLobby_Text_24EF16
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattlePalaceLobby_EventScript_24D907
case 0, BattleFrontier_BattlePalaceLobby_EventScript_24D902
- case 127, BattleFrontier_BattlePalaceLobby_EventScript_24D907
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24D907
BattleFrontier_BattlePalaceLobby_EventScript_24D902:: @ 824D902
call BattleFrontier_BattlePalaceLobby_EventScript_23E8B4
@@ -164,20 +164,20 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D999:: @ 824D999
compare VAR_FRONTIER_BATTLE_MODE, 1
call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DBB6
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattlePalaceLobby_EventScript_24D9E6
case 1, BattleFrontier_BattlePalaceLobby_EventScript_24DB20
case 2, BattleFrontier_BattlePalaceLobby_EventScript_24DB94
- case 127, BattleFrontier_BattlePalaceLobby_EventScript_24DB94
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24DB94
BattleFrontier_BattlePalaceLobby_EventScript_24D9E6:: @ 824D9E6
message BattleFrontier_BattlePalaceLobby_Text_24E119
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattlePalaceLobby_EventScript_24DB94
- case 127, BattleFrontier_BattlePalaceLobby_EventScript_24DB94
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24DB94
setvar VAR_0x8004, 15
special CallFrontierUtilFunc
compare VAR_0x8004, 1
@@ -406,7 +406,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DCA6:: @ 824DCA6
BattleFrontier_BattlePalaceLobby_EventScript_24DCB5:: @ 824DCB5
message BattleFrontier_BattlePalaceLobby_Text_24EF88
waitmessage
- multichoice 16, 0, 100, 0
+ multichoice 16, 0, MULTI_BATTLE_PALACE_RULES, 0
switch VAR_RESULT
case 0, BattleFrontier_BattlePalaceLobby_EventScript_24DD13
case 1, BattleFrontier_BattlePalaceLobby_EventScript_24DD21
@@ -414,7 +414,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DCB5:: @ 824DCB5
case 3, BattleFrontier_BattlePalaceLobby_EventScript_24DD3D
case 4, BattleFrontier_BattlePalaceLobby_EventScript_24DD4B
case 5, BattleFrontier_BattlePalaceLobby_EventScript_24DD59
- case 127, BattleFrontier_BattlePalaceLobby_EventScript_24DD59
+ case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24DD59
end
BattleFrontier_BattlePalaceLobby_EventScript_24DD13:: @ 824DD13
diff --git a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc
index c7421c2c8..20e14b72b 100644
--- a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc
@@ -42,7 +42,7 @@ BattleFrontier_BattlePikeCorridor_MapScript2_25C7F7: @ 825C7F7
BattleFrontier_BattlePikeCorridor_EventScript_25C801:: @ 825C801
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattlePikeCorridor_Movement_25C80B: @ 825C80B
diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
index 51d6023c8..05cdfa8a3 100644
--- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
@@ -16,7 +16,7 @@ BattleFrontier_BattlePikeLobby_MapScript2_25B6F3: @ 825B6F3
BattleFrontier_BattlePikeLobby_EventScript_25B6FD:: @ 825B6FD
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattlePikeLobby_EventScript_25B707:: @ 825B707
@@ -133,20 +133,20 @@ BattleFrontier_BattlePikeLobby_EventScript_25B868:: @ 825B868
BattleFrontier_BattlePikeLobby_EventScript_25B87F:: @ 825B87F
message BattleFrontier_BattlePikeLobby_Text_25BBC1
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattlePikeLobby_EventScript_25B8BB
case 1, BattleFrontier_BattlePikeLobby_EventScript_25BA1A
case 2, BattleFrontier_BattlePikeLobby_EventScript_25BA76
- case 127, BattleFrontier_BattlePikeLobby_EventScript_25BA76
+ case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_25BA76
BattleFrontier_BattlePikeLobby_EventScript_25B8BB:: @ 825B8BB
message BattleFrontier_BattlePikeLobby_Text_25BE35
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattlePikeLobby_EventScript_25BA76
- case 127, BattleFrontier_BattlePikeLobby_EventScript_25BA76
+ case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_25BA76
setvar VAR_0x8004, 15
special CallFrontierUtilFunc
compare VAR_0x8004, 1
@@ -297,13 +297,13 @@ BattleFrontier_BattlePikeLobby_EventScript_25BAC6:: @ 825BAC6
BattleFrontier_BattlePikeLobby_EventScript_25BAD5:: @ 825BAD5
message BattleFrontier_BattlePikeLobby_Text_25C621
waitmessage
- multichoice 16, 4, 102, 0
+ multichoice 16, 4, MULTI_BATTLE_PIKE_RULES, 0
switch VAR_RESULT
case 0, BattleFrontier_BattlePikeLobby_EventScript_25BB1D
case 1, BattleFrontier_BattlePikeLobby_EventScript_25BB2B
case 2, BattleFrontier_BattlePikeLobby_EventScript_25BB39
case 3, BattleFrontier_BattlePikeLobby_EventScript_25BB47
- case 127, BattleFrontier_BattlePikeLobby_EventScript_25BB47
+ case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_25BB47
end
BattleFrontier_BattlePikeLobby_EventScript_25BB1D:: @ 825BB1D
diff --git a/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc b/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc
index 5d438d8bd..b12ff0d6e 100644
--- a/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc
@@ -34,7 +34,7 @@ BattleFrontier_BattlePikeRandomRoom2_MapScript2_25E3DE: @ 825E3DE
BattleFrontier_BattlePikeRandomRoom2_EventScript_25E3E8:: @ 825E3E8
setvar VAR_TEMP_4, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattlePikeRandomRoom2_Text_25E3F2: @ 825E3F2
diff --git a/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc b/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc
index 9f2dfec16..9a4448226 100644
--- a/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc
@@ -30,7 +30,7 @@ BattleFrontier_BattlePikeRandomRoom3_MapScript2_25E466: @ 825E466
BattleFrontier_BattlePikeRandomRoom3_EventScript_25E470:: @ 825E470
setvar VAR_TEMP_4, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattlePikeRandomRoom3_MapScript1_25E47A: @ 825E47A
diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc
index 54f11f071..927222e8c 100644
--- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc
@@ -18,7 +18,7 @@ BattleFrontier_BattlePikeThreePathRoom_MapScript2_25C87D: @ 825C87D
BattleFrontier_BattlePikeThreePathRoom_EventScript_25C887:: @ 825C887
setvar VAR_TEMP_4, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattlePikeThreePathRoom_EventScript_25C891:: @ 825C891
@@ -159,7 +159,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA2A:: @ 825CA2A
BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A:: @ 825CA5A
message BattleFrontier_BattlePikeThreePathRoom_Text_25CD3C
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4222
release
diff --git a/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc b/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc
index 4fa8d142a..2011c42df 100644
--- a/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePointExchangeServiceCorner/scripts.inc
@@ -3,17 +3,17 @@ BattleFrontier_BattlePointExchangeServiceCorner_MapScripts:: @ 825F070
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F071:: @ 825F071
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F7FA, MSGBOX_DEFAULT
- special sub_813A958
+ special ShowBattlePointsWindow
return
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D:: @ 825F07D
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FF12, MSGBOX_DEFAULT
- special sub_813A988
+ special CloseBattlePointsWindow
release
end
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A:: @ 825F08A
- specialvar VAR_TEMP_1, sub_813AA04
+ specialvar VAR_TEMP_1, GetFrontierBattlePoints
compare VAR_TEMP_1, VAR_0x8008
goto_if_ge BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F0C9
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FE86, MSGBOX_DEFAULT
@@ -39,9 +39,9 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F0E5:: @ 825F0E5
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F11D
copyvar VAR_0x8004, VAR_0x8008
- special sub_813A9A4
+ special TakeFrontierBattlePoints
givedecoration VAR_0x8009
- special sub_813A8FC
+ special UpdateBattlePointsWindow
playse SE_REGI
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FE45, MSGBOX_DEFAULT
compare VAR_TEMP_2, 0
@@ -51,7 +51,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F0E5:: @ 825F0E5
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F11D:: @ 825F11D
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FEB9, MSGBOX_DEFAULT
- special sub_813A988
+ special CloseBattlePointsWindow
release
end
@@ -60,9 +60,9 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F12A:: @ 825F12A
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F166
copyvar VAR_0x8004, VAR_0x8008
- special sub_813A9A4
+ special TakeFrontierBattlePoints
giveitem VAR_0x8009, 1
- special sub_813A8FC
+ special UpdateBattlePointsWindow
playse SE_REGI
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FE72, MSGBOX_DEFAULT
compare VAR_TEMP_2, 2
@@ -72,7 +72,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F12A:: @ 825F12A
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F166:: @ 825F166
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FEE3, MSGBOX_DEFAULT
- special sub_813A988
+ special CloseBattlePointsWindow
release
end
@@ -85,11 +85,11 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F173:: @ 825F173
end
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185:: @ 825F185
- setvar VAR_0x8004, 3
- special sub_813AA18
- special sub_813A128
+ setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1
+ special ShowFrontierExchangeCornerItemIconWindow
+ special ShowScrollableMultichoice
waitstate
- special sub_813AA44
+ special CloseFrontierExchangeCornerItemIconWindow
switch VAR_RESULT
case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F21E
case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F241
@@ -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
@@ -110,7 +110,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F21E:: @ 825F21E
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 16
- setvar VAR_0x8009, 75
+ setvar VAR_0x8009, DECOR_KISS_POSTER
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -119,7 +119,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F241:: @ 825F241
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 32
- setvar VAR_0x8009, 103
+ setvar VAR_0x8009, DECOR_KISS_CUSHION
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -128,7 +128,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F264:: @ 825F264
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 32
- setvar VAR_0x8009, 87
+ setvar VAR_0x8009, DECOR_SMOOCHUM_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -137,7 +137,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F287:: @ 825F287
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 48
- setvar VAR_0x8009, 79
+ setvar VAR_0x8009, DECOR_TOGEPI_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -146,7 +146,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F2AA:: @ 825F2AA
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 48
- setvar VAR_0x8009, 84
+ setvar VAR_0x8009, DECOR_MEOWTH_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -155,7 +155,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F2CD:: @ 825F2CD
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 48
- setvar VAR_0x8009, 85
+ setvar VAR_0x8009, DECOR_CLEFAIRY_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -164,7 +164,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F2F0:: @ 825F2F0
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 48
- setvar VAR_0x8009, 86
+ setvar VAR_0x8009, DECOR_DITTO_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -173,7 +173,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F313:: @ 825F313
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 80
- setvar VAR_0x8009, 80
+ setvar VAR_0x8009, DECOR_CYNDAQUIL_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -182,7 +182,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F336:: @ 825F336
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 80
- setvar VAR_0x8009, 81
+ setvar VAR_0x8009, DECOR_CHIKORITA_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -191,7 +191,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F359:: @ 825F359
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185
setvar VAR_0x8008, 80
- setvar VAR_0x8009, 82
+ setvar VAR_0x8009, DECOR_TOTODILE_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -204,11 +204,11 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F37C:: @ 825F37C
end
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E:: @ 825F38E
- setvar VAR_0x8004, 4
- special sub_813AA18
- special sub_813A128
+ setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2
+ special ShowFrontierExchangeCornerItemIconWindow
+ special ShowScrollableMultichoice
waitstate
- special sub_813AA44
+ special CloseFrontierExchangeCornerItemIconWindow
switch VAR_RESULT
case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F3F0
case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F413
@@ -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
@@ -224,7 +224,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F3F0:: @ 825F3F0
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E
setvar VAR_0x8008, 128
- setvar VAR_0x8009, 113
+ setvar VAR_0x8009, DECOR_LAPRAS_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -233,7 +233,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F413:: @ 825F413
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E
setvar VAR_0x8008, 128
- setvar VAR_0x8009, 111
+ setvar VAR_0x8009, DECOR_SNORLAX_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -242,7 +242,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F436:: @ 825F436
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E
setvar VAR_0x8008, 256
- setvar VAR_0x8009, 114
+ setvar VAR_0x8009, DECOR_VENUSAUR_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -251,7 +251,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F459:: @ 825F459
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E
setvar VAR_0x8008, 256
- setvar VAR_0x8009, 115
+ setvar VAR_0x8009, DECOR_CHARIZARD_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -260,7 +260,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F47C:: @ 825F47C
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E
setvar VAR_0x8008, 256
- setvar VAR_0x8009, 116
+ setvar VAR_0x8009, DECOR_BLASTOISE_DOLL
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -273,11 +273,11 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F49F:: @ 825F49F
end
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1:: @ 825F4B1
- setvar VAR_0x8004, 5
- special sub_813AA18
- special sub_813A128
+ setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR
+ special ShowFrontierExchangeCornerItemIconWindow
+ special ShowScrollableMultichoice
waitstate
- special sub_813AA44
+ special CloseFrontierExchangeCornerItemIconWindow
switch VAR_RESULT
case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F51E
case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F541
@@ -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
@@ -294,7 +294,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F51E:: @ 825F51E
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1
setvar VAR_0x8008, 1
- setvar VAR_0x8009, 64
+ setvar VAR_0x8009, ITEM_PROTEIN
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -303,7 +303,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F541:: @ 825F541
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1
setvar VAR_0x8008, 1
- setvar VAR_0x8009, 67
+ setvar VAR_0x8009, ITEM_CALCIUM
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -312,7 +312,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F564:: @ 825F564
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1
setvar VAR_0x8008, 1
- setvar VAR_0x8009, 65
+ setvar VAR_0x8009, ITEM_IRON
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -321,7 +321,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F587:: @ 825F587
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1
setvar VAR_0x8008, 1
- setvar VAR_0x8009, 70
+ setvar VAR_0x8009, ITEM_ZINC
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -330,7 +330,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5AA:: @ 825F5AA
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1
setvar VAR_0x8008, 1
- setvar VAR_0x8009, 66
+ setvar VAR_0x8009, ITEM_CARBOS
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -339,7 +339,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5CD:: @ 825F5CD
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1
setvar VAR_0x8008, 1
- setvar VAR_0x8009, 63
+ setvar VAR_0x8009, ITEM_HP_UP
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -352,11 +352,11 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5F0:: @ 825F5F0
end
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602:: @ 825F602
- setvar VAR_0x8004, 6
- special sub_813AA18
- special sub_813A128
+ setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR
+ special ShowFrontierExchangeCornerItemIconWindow
+ special ShowScrollableMultichoice
waitstate
- special sub_813AA44
+ special CloseFrontierExchangeCornerItemIconWindow
switch VAR_RESULT
case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F690
case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6B3
@@ -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
@@ -376,7 +376,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F690:: @ 825F690
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602
setvar VAR_0x8008, 48
- setvar VAR_0x8009, 200
+ setvar VAR_0x8009, ITEM_LEFTOVERS
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -385,7 +385,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6B3:: @ 825F6B3
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602
setvar VAR_0x8008, 48
- setvar VAR_0x8009, 180
+ setvar VAR_0x8009, ITEM_WHITE_HERB
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -394,7 +394,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6D6:: @ 825F6D6
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602
setvar VAR_0x8008, 48
- setvar VAR_0x8009, 183
+ setvar VAR_0x8009, ITEM_QUICK_CLAW
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -403,7 +403,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6F9:: @ 825F6F9
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602
setvar VAR_0x8008, 48
- setvar VAR_0x8009, 185
+ setvar VAR_0x8009, ITEM_MENTAL_HERB
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -412,7 +412,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F71C:: @ 825F71C
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602
setvar VAR_0x8008, 64
- setvar VAR_0x8009, 179
+ setvar VAR_0x8009, ITEM_BRIGHT_POWDER
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -421,7 +421,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F73F:: @ 825F73F
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602
setvar VAR_0x8008, 64
- setvar VAR_0x8009, 186
+ setvar VAR_0x8009, ITEM_CHOICE_BAND
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -430,7 +430,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F762:: @ 825F762
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602
setvar VAR_0x8008, 64
- setvar VAR_0x8009, 187
+ setvar VAR_0x8009, ITEM_KINGS_ROCK
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -439,7 +439,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F785:: @ 825F785
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602
setvar VAR_0x8008, 64
- setvar VAR_0x8009, 196
+ setvar VAR_0x8009, ITEM_FOCUS_BAND
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
@@ -448,7 +448,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F7A8:: @ 825F7A8
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602
setvar VAR_0x8008, 64
- setvar VAR_0x8009, 198
+ setvar VAR_0x8009, ITEM_SCOPE_LENS
goto BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F08A
end
diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
index 667c4847e..b2f7d4579 100644
--- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
@@ -9,7 +9,7 @@ BattleFrontier_BattlePyramidLobby_MapScript2_250721: @ 8250721
BattleFrontier_BattlePyramidLobby_EventScript_25072B: @ 825072B
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattlePyramidLobby_MapScript2_250735: @ 8250735
@@ -137,20 +137,20 @@ BattleFrontier_BattlePyramidLobby_EventScript_2508B1:: @ 82508B1
BattleFrontier_BattlePyramidLobby_EventScript_2508C8:: @ 82508C8
message BattleFrontier_BattlePyramidLobby_Text_250FA7
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattlePyramidLobby_EventScript_250904
case 1, BattleFrontier_BattlePyramidLobby_EventScript_250A68
case 2, BattleFrontier_BattlePyramidLobby_EventScript_250AC4
- case 127, BattleFrontier_BattlePyramidLobby_EventScript_250AC4
+ case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250AC4
BattleFrontier_BattlePyramidLobby_EventScript_250904:: @ 8250904
message BattleFrontier_BattlePyramidLobby_Text_251248
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattlePyramidLobby_EventScript_250AC4
- case 127, BattleFrontier_BattlePyramidLobby_EventScript_250AC4
+ case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250AC4
setvar VAR_0x8004, 15
special CallFrontierUtilFunc
compare VAR_0x8004, 1
@@ -269,12 +269,12 @@ BattleFrontier_BattlePyramidLobby_EventScript_250ACE:: @ 8250ACE
end
BattleFrontier_BattlePyramidLobby_EventScript_250AF0:: @ 8250AF0
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
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
@@ -318,7 +318,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250B91:: @ 8250B91
BattleFrontier_BattlePyramidLobby_EventScript_250BA4:: @ 8250BA4
copyvar VAR_0x8004, VAR_RESULT
- special sub_813B968
+ special GetBattlePyramidHint
switch VAR_RESULT
case 0, BattleFrontier_BattlePyramidLobby_EventScript_250C8E
case 1, BattleFrontier_BattlePyramidLobby_EventScript_250C97
@@ -508,12 +508,12 @@ BattleFrontier_BattlePyramidLobby_EventScript_250E00:: @ 8250E00
return
BattleFrontier_BattlePyramidLobby_EventScript_250E09:: @ 8250E09
- multichoice 17, 6, 83, 0
+ multichoice 17, 6, MULTI_FRONTIER_ITEM_CHOOSE, 0
switch VAR_RESULT
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
@@ -562,14 +562,14 @@ BattleFrontier_BattlePyramidLobby_EventScript_250E95:: @ 8250E95
BattleFrontier_BattlePyramidLobby_EventScript_250EA4:: @ 8250EA4
message BattleFrontier_BattlePyramidLobby_Text_2526D9
waitmessage
- multichoice 15, 2, 101, 0
+ multichoice 15, 2, MULTI_BATTLE_PYRAMID_RULES, 0
switch VAR_RESULT
case 0, BattleFrontier_BattlePyramidLobby_EventScript_250EF7
case 1, BattleFrontier_BattlePyramidLobby_EventScript_250F05
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_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc
index 39bb39f49..211ab0c87 100644
--- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc
@@ -19,7 +19,7 @@ BattleFrontier_BattlePyramidTop_MapScript2_2550CE: @ 82550CE
BattleFrontier_BattlePyramidTop_EventScript_2550D8:: @ 82550D8
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
compare VAR_TEMP_C, 0
goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_2550F3
setobjectxyperm 2, 0, 0
diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
index 6e3f0c8fa..ce171e3c0 100644
--- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
@@ -99,30 +99,30 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F:: @ 8241C8F
call BattleFrontier_BattleTowerBattleRoom_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_241D0A
- multichoice 19, 4, 103, 1
+ multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_241DDC
case 1, BattleFrontier_BattleTowerBattleRoom_EventScript_241D40
case 2, BattleFrontier_BattleTowerBattleRoom_EventScript_241D7C
case 3, BattleFrontier_BattleTowerBattleRoom_EventScript_241DAA
- case 127, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
BattleFrontier_BattleTowerBattleRoom_EventScript_241D0A:: @ 8241D0A
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_241DDC
case 1, BattleFrontier_BattleTowerBattleRoom_EventScript_241D7C
case 2, BattleFrontier_BattleTowerBattleRoom_EventScript_241DAA
- case 127, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
BattleFrontier_BattleTowerBattleRoom_EventScript_241D40:: @ 8241D40
message BattleFrontier_BattleTowerBattleRoom_Text_2423A3
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_241D72
- case 127, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
BattleFrontier_BattleTowerBattleRoom_EventScript_241D72:: @ 8241D72
call BattleFrontier_BattleTowerBattleRoom_EventScript_23E8B4
@@ -138,11 +138,11 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241D7C:: @ 8241D7C
BattleFrontier_BattleTowerBattleRoom_EventScript_241DAA:: @ 8241DAA
message BattleFrontier_BattleTowerBattleRoom_Text_24244C
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_24220E
- case 127, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
BattleFrontier_BattleTowerBattleRoom_EventScript_241DDC:: @ 8241DDC
closemessage
@@ -256,21 +256,21 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241F22:: @ 8241F22
call BattleFrontier_BattleTowerBattleRoom_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_241F79
- multichoice 19, 4, 103, 1
+ multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_241FAF
case 1, BattleFrontier_BattleTowerBattleRoom_EventScript_241D40
case 2, BattleFrontier_BattleTowerBattleRoom_EventScript_241D7C
case 3, BattleFrontier_BattleTowerBattleRoom_EventScript_241DAA
- case 127, BattleFrontier_BattleTowerBattleRoom_EventScript_241F22
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom_EventScript_241F22
BattleFrontier_BattleTowerBattleRoom_EventScript_241F79:: @ 8241F79
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_241FAF
case 1, BattleFrontier_BattleTowerBattleRoom_EventScript_241D7C
case 2, BattleFrontier_BattleTowerBattleRoom_EventScript_241DAA
- case 127, BattleFrontier_BattleTowerBattleRoom_EventScript_241F22
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom_EventScript_241F22
BattleFrontier_BattleTowerBattleRoom_EventScript_241FAF:: @ 8241FAF
call BattleFrontier_BattleTowerBattleRoom_EventScript_242170
diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc
index 8ebb7ed25..07883c7ca 100644
--- a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc
@@ -15,7 +15,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248F0F:: @ 8248F0F
setvar VAR_0x8004, 14
special sub_8161F74
checkplayergender
- compare VAR_RESULT, 1
+ compare VAR_RESULT, FEMALE
goto_if_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_248F29
setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_BRENDAN_NORMAL
return
@@ -25,7 +25,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248F29:: @ 8248F29
return
BattleFrontier_BattleTowerBattleRoom2_EventScript_248F2F:: @ 8248F2F
- special sub_813A76C
+ special SetBattleTowerLinkPlayerGfx
return
BattleFrontier_BattleTowerBattleRoom2_MapScript2_248F33: @ 8248F33
@@ -173,30 +173,30 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249143:: @ 8249143
call BattleFrontier_BattleTowerBattleRoom2_EventScript_23E8E0
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_2491B1
- multichoice 19, 4, 103, 1
+ multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerBattleRoom2_EventScript_249283
case 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_2491E7
case 2, BattleFrontier_BattleTowerBattleRoom2_EventScript_249223
case 3, BattleFrontier_BattleTowerBattleRoom2_EventScript_249251
- case 127, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
BattleFrontier_BattleTowerBattleRoom2_EventScript_2491B1:: @ 82491B1
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerBattleRoom2_EventScript_249283
case 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_249223
case 2, BattleFrontier_BattleTowerBattleRoom2_EventScript_249251
- case 127, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
BattleFrontier_BattleTowerBattleRoom2_EventScript_2491E7:: @ 82491E7
message BattleFrontier_BattleTowerBattleRoom2_Text_2423A3
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
case 0, BattleFrontier_BattleTowerBattleRoom2_EventScript_249219
- case 127, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
BattleFrontier_BattleTowerBattleRoom2_EventScript_249219:: @ 8249219
call BattleFrontier_BattleTowerBattleRoom2_EventScript_23E8B4
@@ -207,16 +207,16 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249223:: @ 8249223
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
case 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_2492DB
- case 127, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
BattleFrontier_BattleTowerBattleRoom2_EventScript_249251:: @ 8249251
message BattleFrontier_BattleTowerBattleRoom2_Text_24244C
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
case 0, BattleFrontier_BattleTowerBattleRoom2_EventScript_24907E
- case 127, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
BattleFrontier_BattleTowerBattleRoom2_EventScript_249283:: @ 8249283
closemessage
@@ -350,20 +350,20 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249412:: @ 8249412
BattleFrontier_BattleTowerBattleRoom2_EventScript_249417:: @ 8249417
goto_if_set FLAG_TEMP_2, BattleFrontier_BattleTowerBattleRoom2_EventScript_249457
- multichoice 19, 6, 105, 1
+ multichoice 19, 6, MULTI_GO_ON_RECORD_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerBattleRoom2_EventScript_249483
case 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_2494A8
case 2, BattleFrontier_BattleTowerBattleRoom2_EventScript_2494DD
- case 127, BattleFrontier_BattleTowerBattleRoom2_EventScript_2494DD
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom2_EventScript_2494DD
end
BattleFrontier_BattleTowerBattleRoom2_EventScript_249457:: @ 8249457
- multichoice 20, 8, 106, 1
+ multichoice 20, 8, MULTI_GO_ON_RETIRE, 1
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerBattleRoom2_EventScript_249483
case 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_2494DD
- case 127, BattleFrontier_BattleTowerBattleRoom2_EventScript_2494DD
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom2_EventScript_2494DD
end
BattleFrontier_BattleTowerBattleRoom2_EventScript_249483:: @ 8249483
@@ -381,10 +381,10 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249483:: @ 8249483
BattleFrontier_BattleTowerBattleRoom2_EventScript_2494A8:: @ 82494A8
message BattleFrontier_BattleTowerBattleRoom2_Text_2423A3
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
- case 127, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
call BattleFrontier_BattleTowerBattleRoom2_EventScript_23E8B4
setflag FLAG_TEMP_2
goto BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
@@ -393,7 +393,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_2494A8:: @ 82494A8
BattleFrontier_BattleTowerBattleRoom2_EventScript_2494DD:: @ 82494DD
message BattleFrontier_BattleTowerBattleRoom2_Text_24244C
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_2494FA
goto BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
diff --git a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc
index efab7be70..6e3e05959 100644
--- a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc
@@ -15,7 +15,7 @@ BattleFrontier_BattleTowerCorridor2_EventScript_248D71:: @ 8248D71
setvar VAR_0x8004, 14
special sub_8161F74
checkplayergender
- compare VAR_RESULT, 1
+ compare VAR_RESULT, FEMALE
goto_if_eq BattleFrontier_BattleTowerCorridor2_EventScript_248D8B
setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_BRENDAN_NORMAL
return
@@ -25,7 +25,7 @@ BattleFrontier_BattleTowerCorridor2_EventScript_248D8B:: @ 8248D8B
return
BattleFrontier_BattleTowerCorridor2_EventScript_248D91:: @ 8248D91
- special sub_813A76C
+ special SetBattleTowerLinkPlayerGfx
return
BattleFrontier_BattleTowerCorridor2_MapScript2_248D95: @ 8248D95
diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
index 0d07f5be2..f84ec194d 100644
--- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
@@ -12,9 +12,9 @@ BattleFrontier_BattleTowerElevator_EventScript_2419F0:: @ 82419F0
applymovement 1, BattleFrontier_BattleTowerElevator_Movement_241A86
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleTowerElevator_Movement_241A8A
waitmovement 0
- special sub_813A080
+ special BufferBattleTowerElevatorFloors
waitse
- special ShakeScreenInElevator
+ special MoveElevator
waitstate
delay 48
applymovement 1, BattleFrontier_BattleTowerElevator_Movement_241A8E
@@ -85,6 +85,6 @@ BattleFrontier_BattleTowerElevator_MapScript2_241A96: @ 8241A96
BattleFrontier_BattleTowerElevator_EventScript_241AA0:: @ 8241AA0
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
index 6d53a33e1..9b6a406b8 100644
--- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
@@ -35,7 +35,7 @@ BattleFrontier_BattleTowerLobby_MapScript2_23E6C9: @ 823E6C9
BattleFrontier_BattleTowerLobby_EventScript_23E6D3:: @ 823E6D3
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattleTowerLobby_MapScript2_23E6DD: @ 823E6DD
@@ -162,11 +162,11 @@ BattleFrontier_BattleTowerLobby_EventScript_23E84D:: @ 823E84D
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E8DF
message BattleFrontier_BattleTowerLobby_Text_23FE3C
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleTowerLobby_EventScript_23E8DF
case 0, BattleFrontier_BattleTowerLobby_EventScript_23E8B4
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23E8DF
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23E8DF
BattleFrontier_BattleArenaBattleRoom_EventScript_23E8B4:: @ 823E8B4
BattleFrontier_BattleArenaLobby_EventScript_23E8B4:: @ 823E8B4
@@ -244,21 +244,21 @@ BattleFrontier_BattleTowerLobby_EventScript_23E936:: @ 823E936
BattleFrontier_BattleTowerLobby_EventScript_23E948:: @ 823E948
message BattleFrontier_BattleTowerLobby_Text_2405B3
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerLobby_EventScript_23E984
case 1, BattleFrontier_BattleTowerLobby_EventScript_23EA91
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
BattleFrontier_BattleTowerLobby_EventScript_23E984:: @ 823E984
setvar VAR_FRONTIER_BATTLE_MODE, 0
message BattleFrontier_BattleTowerLobby_Text_23FD3B
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
setvar VAR_0x8004, 15
special CallFrontierUtilFunc
compare VAR_0x8004, 1
@@ -324,21 +324,21 @@ BattleFrontier_BattleTowerLobby_EventScript_23EA9F:: @ 823EA9F
BattleFrontier_BattleTowerLobby_EventScript_23EAB1:: @ 823EAB1
message BattleFrontier_BattleTowerLobby_Text_24085E
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerLobby_EventScript_23EAED
case 1, BattleFrontier_BattleTowerLobby_EventScript_23EBFA
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
BattleFrontier_BattleTowerLobby_EventScript_23EAED:: @ 823EAED
setvar VAR_FRONTIER_BATTLE_MODE, 1
message BattleFrontier_BattleTowerLobby_Text_23FD3B
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
setvar VAR_0x8004, 15
special CallFrontierUtilFunc
compare VAR_0x8004, 1
@@ -405,21 +405,21 @@ BattleFrontier_BattleTowerLobby_EventScript_23EC08:: @ 823EC08
BattleFrontier_BattleTowerLobby_EventScript_23EC1D:: @ 823EC1D
message BattleFrontier_BattleTowerLobby_Text_240B06
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerLobby_EventScript_23EC59
case 1, BattleFrontier_BattleTowerLobby_EventScript_23ED66
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
BattleFrontier_BattleTowerLobby_EventScript_23EC59:: @ 823EC59
setvar VAR_FRONTIER_BATTLE_MODE, 2
message BattleFrontier_BattleTowerLobby_Text_23FD3B
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
setvar VAR_0x8004, 15
special CallFrontierUtilFunc
compare VAR_0x8004, 1
@@ -485,21 +485,21 @@ BattleFrontier_BattleTowerLobby_EventScript_23ED74:: @ 823ED74
BattleFrontier_BattleTowerLobby_EventScript_23ED86:: @ 823ED86
message BattleFrontier_BattleTowerLobby_Text_240E95
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerLobby_EventScript_23EDC2
case 1, BattleFrontier_BattleTowerLobby_EventScript_23F3DA
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
BattleFrontier_BattleTowerLobby_EventScript_23EDC2:: @ 823EDC2
setvar VAR_FRONTIER_BATTLE_MODE, 3
message BattleFrontier_BattleTowerLobby_Text_23FD3B
waitmessage
- multichoice 17, 6, 24, 0
+ multichoice 17, 6, MULTI_LEVEL_MODE, 0
switch VAR_RESULT
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
setvar VAR_0x8004, 15
special CallFrontierUtilFunc
compare VAR_0x8004, 1
@@ -560,13 +560,13 @@ BattleFrontier_BattleTowerLobby_EventScript_23EEE7:: @ 823EEE7
faceplayer
message BattleFrontier_BattleTowerLobby_Text_23F8CD
waitmessage
- multichoice 16, 4, 109, 0
+ multichoice 16, 4, MULTI_BATTLE_TOWER_FEELINGS, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerLobby_EventScript_23EF32
case 1, BattleFrontier_BattleTowerLobby_EventScript_23EF4C
case 2, BattleFrontier_BattleTowerLobby_EventScript_23EF66
case 3, BattleFrontier_BattleTowerLobby_EventScript_23EF80
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23EF80
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23EF80
release
end
@@ -816,19 +816,19 @@ BattleFrontier_BattleTowerLobby_EventScript_23F1A7:: @ 823F1A7
return
BattleFrontier_BattleTowerLobby_EventScript_23F1D4:: @ 823F1D4
- bufferstdstring 0, 19
+ bufferstdstring 0, STDSTRING_SINGLE
return
BattleFrontier_BattleTowerLobby_EventScript_23F1D9:: @ 823F1D9
- bufferstdstring 0, 20
+ bufferstdstring 0, STDSTRING_DOUBLE
return
BattleFrontier_BattleTowerLobby_EventScript_23F1DE:: @ 823F1DE
- bufferstdstring 0, 21
+ bufferstdstring 0, STDSTRING_MULTI
return
BattleFrontier_BattleTowerLobby_EventScript_23F1E3:: @ 823F1E3
- bufferstdstring 0, 22
+ bufferstdstring 0, STDSTRING_MULTI_LINK
return
BattleFrontier_BattleTowerLobby_EventScript_23F1E8:: @ 823F1E8
@@ -1022,12 +1022,12 @@ BattleFrontier_BattleTowerLobby_EventScript_23F3E8:: @ 823F3E8
BattleFrontier_BattleTowerLobby_EventScript_23F3F3:: @ 823F3F3
message BattleFrontier_BattleTowerLobby_Text_2792CD
waitmessage
- multichoice 16, 6, 81, 0
+ multichoice 16, 6, MULTI_LINK_LEADER, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerLobby_EventScript_23F463
case 1, BattleFrontier_BattleTowerLobby_EventScript_23F430
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6
end
BattleFrontier_BattleTowerLobby_EventScript_23F430:: @ 823F430
@@ -1080,14 +1080,14 @@ BattleFrontier_BattleTowerLobby_EventScript_23F4BE:: @ 823F4BE
BattleFrontier_BattleTowerLobby_EventScript_23F4CD:: @ 823F4CD
message BattleFrontier_BattleTowerLobby_Text_241563
waitmessage
- multichoice 17, 2, 97, 0
+ multichoice 17, 2, MULTI_BATTLE_TOWER_RULES, 0
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerLobby_EventScript_23F520
case 1, BattleFrontier_BattleTowerLobby_EventScript_23F52E
case 2, BattleFrontier_BattleTowerLobby_EventScript_23F53C
case 3, BattleFrontier_BattleTowerLobby_EventScript_23F54A
case 4, BattleFrontier_BattleTowerLobby_EventScript_23F558
- case 127, BattleFrontier_BattleTowerLobby_EventScript_23F558
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F558
end
BattleFrontier_BattleTowerLobby_EventScript_23F520:: @ 823F520
diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc
index f09166f5a..29e14473d 100644
--- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc
@@ -43,7 +43,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScript2_243E14: @ 8243E14
.2byte 0
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243E1E:: @ 8243E1E
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
BattleFrontier_BattleTowerMultiBattleRoom_MapScript2_243E23: @ 8243E23
@@ -86,7 +86,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243E7A:: @ 8243E7A
faceplayer
message BattleFrontier_BattleTowerMultiBattleRoom_Text_244094
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243E9D
msgbox BattleFrontier_BattleTowerMultiBattleRoom_Text_24410C, MSGBOX_DEFAULT
@@ -180,10 +180,10 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243F36:: @ 8243F36
setvar VAR_0x8005, 2
special sub_8161F74
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243FC3
- case 127, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243FC3
+ case MULTI_B_PRESSED, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243FC3
setvar VAR_0x8004, 11
setvar VAR_0x8005, 3
special sub_8161F74
diff --git a/data/maps/BattleFrontier_Lounge1/scripts.inc b/data/maps/BattleFrontier_Lounge1/scripts.inc
index 28aab432b..dee3fd431 100644
--- a/data/maps/BattleFrontier_Lounge1/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge1/scripts.inc
@@ -29,9 +29,9 @@ BattleFrontier_Lounge1_EventScript_25E7B6:: @ 825E7B6
BattleFrontier_Lounge1_EventScript_25E7BF:: @ 825E7BF
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
- compare VAR_RESULT, 412
+ compare VAR_RESULT, SPECIES_EGG
goto_if_eq BattleFrontier_Lounge1_EventScript_25E7FF
- special sub_8139D98
+ special BufferVarsForIVRater
compare VAR_0x8005, 90
goto_if_le BattleFrontier_Lounge1_EventScript_25E87F
compare VAR_0x8005, 120
diff --git a/data/maps/BattleFrontier_Lounge2/scripts.inc b/data/maps/BattleFrontier_Lounge2/scripts.inc
index 435eb4127..02dd09a52 100644
--- a/data/maps/BattleFrontier_Lounge2/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge2/scripts.inc
@@ -40,7 +40,7 @@ BattleFrontier_Lounge2_EventScript_26066D:: @ 826066D
call_if_le BattleFrontier_Lounge2_EventScript_2606F8
compare VAR_FRONTIER_MANIAC_FACILITY, 4
call_if_ge BattleFrontier_Lounge2_EventScript_260701
- special sub_8139F20
+ special ShowFrontierManiacMessage
waitmessage
waitbuttonpress
release
@@ -55,43 +55,43 @@ BattleFrontier_Lounge2_EventScript_260701:: @ 8260701
return
BattleFrontier_Lounge2_EventScript_26070A:: @ 826070A
- bufferstdstring 0, 19
+ bufferstdstring 0, STDSTRING_SINGLE
return
BattleFrontier_Lounge2_EventScript_26070F:: @ 826070F
- bufferstdstring 0, 20
+ bufferstdstring 0, STDSTRING_DOUBLE
return
BattleFrontier_Lounge2_EventScript_260714:: @ 8260714
- bufferstdstring 0, 21
+ bufferstdstring 0, STDSTRING_MULTI
return
BattleFrontier_Lounge2_EventScript_260719:: @ 8260719
- bufferstdstring 0, 22
+ bufferstdstring 0, STDSTRING_MULTI_LINK
return
BattleFrontier_Lounge2_EventScript_26071E:: @ 826071E
- bufferstdstring 0, 24
+ bufferstdstring 0, STDSTRING_BATTLE_DOME
return
BattleFrontier_Lounge2_EventScript_260723:: @ 8260723
- bufferstdstring 0, 25
+ bufferstdstring 0, STDSTRING_BATTLE_FACTORY
return
BattleFrontier_Lounge2_EventScript_260728:: @ 8260728
- bufferstdstring 0, 26
+ bufferstdstring 0, STDSTRING_BATTLE_PALACE
return
BattleFrontier_Lounge2_EventScript_26072D:: @ 826072D
- bufferstdstring 0, 27
+ bufferstdstring 0, STDSTRING_BATTLE_ARENA
return
BattleFrontier_Lounge2_EventScript_260732:: @ 8260732
- bufferstdstring 0, 28
+ bufferstdstring 0, STDSTRING_BATTLE_PIKE
return
BattleFrontier_Lounge2_EventScript_260737:: @ 8260737
- bufferstdstring 0, 29
+ bufferstdstring 0, STDSTRING_BATTLE_PYRAMID
return
BattleFrontier_Lounge2_EventScript_26073C:: @ 826073C
diff --git a/data/maps/BattleFrontier_Lounge3/scripts.inc b/data/maps/BattleFrontier_Lounge3/scripts.inc
index 7977e75b4..3be247099 100644
--- a/data/maps/BattleFrontier_Lounge3/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge3/scripts.inc
@@ -14,7 +14,7 @@ BattleFrontier_Lounge3_EventScript_261D83:: @ 8261D83
end
BattleFrontier_Lounge3_EventScript_261DAF:: @ 8261DAF
- special sub_813A820
+ special ShowFrontierGamblerLookingMessage
waitmessage
waitbuttonpress
msgbox BattleFrontier_Lounge3_Text_262A60, MSGBOX_YESNO
@@ -25,19 +25,19 @@ BattleFrontier_Lounge3_EventScript_261DAF:: @ 8261DAF
goto_if_eq BattleFrontier_Lounge3_EventScript_261FA5
message BattleFrontier_Lounge3_Text_262B42
waitmessage
- special sub_813A958
+ special ShowBattlePointsWindow
goto BattleFrontier_Lounge3_EventScript_261DE9
end
BattleFrontier_Lounge3_EventScript_261DE9:: @ 8261DE9
- multichoice 20, 4, 87, 0
+ multichoice 20, 4, MULTI_FRONTIER_GAMBLER_BET, 0
copyvar VAR_FRONTIER_GAMBLER_AMOUNT_BET, VAR_RESULT
switch VAR_RESULT
- case 0, BattleFrontier_Lounge3_EventScript_261E30
- case 1, BattleFrontier_Lounge3_EventScript_261E3B
- case 2, BattleFrontier_Lounge3_EventScript_261E46
- case 3, BattleFrontier_Lounge3_EventScript_261FAF
- case 127, BattleFrontier_Lounge3_EventScript_261FAF
+ case FRONTIER_GAMBLER_BET_5, BattleFrontier_Lounge3_EventScript_261E30
+ case FRONTIER_GAMBLER_BET_10, BattleFrontier_Lounge3_EventScript_261E3B
+ case FRONTIER_GAMBLER_BET_15, BattleFrontier_Lounge3_EventScript_261E46
+ case FRONTIER_GAMBLER_BET_CANCEL, BattleFrontier_Lounge3_EventScript_261FAF
+ case MULTI_B_PRESSED, BattleFrontier_Lounge3_EventScript_261FAF
end
BattleFrontier_Lounge3_EventScript_261E30:: @ 8261E30
@@ -56,7 +56,7 @@ BattleFrontier_Lounge3_EventScript_261E46:: @ 8261E46
end
BattleFrontier_Lounge3_EventScript_261E51:: @ 8261E51
- specialvar VAR_TEMP_1, sub_813AA04
+ specialvar VAR_TEMP_1, GetFrontierBattlePoints
compare VAR_TEMP_1, VAR_0x8008
goto_if_ge BattleFrontier_Lounge3_EventScript_261E75
msgbox BattleFrontier_Lounge3_Text_262B6E, MSGBOX_DEFAULT
@@ -67,19 +67,19 @@ BattleFrontier_Lounge3_EventScript_261E51:: @ 8261E51
BattleFrontier_Lounge3_EventScript_261E75:: @ 8261E75
copyvar VAR_0x8004, VAR_0x8008
- special sub_813A9A4
- setvar VAR_FRONTIER_GAMBLER_PLACED_BET_F, 1
- special sub_813A8FC
+ special TakeFrontierBattlePoints
+ setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET
+ special UpdateBattlePointsWindow
playse SE_REGI
msgbox BattleFrontier_Lounge3_Text_262BE0, MSGBOX_DEFAULT
goto BattleFrontier_Lounge3_EventScript_261E96
end
BattleFrontier_Lounge3_EventScript_261E96:: @ 8261E96
- special sub_813A854
+ special ShowFrontierGamblerGoMessage
waitmessage
waitbuttonpress
- special sub_813A988
+ special CloseBattlePointsWindow
release
end
@@ -105,37 +105,37 @@ BattleFrontier_Lounge3_EventScript_261EEB:: @ 8261EEB
BattleFrontier_Lounge3_EventScript_261EF9:: @ 8261EF9
msgbox BattleFrontier_Lounge3_Text_26346B, MSGBOX_DEFAULT
- compare VAR_FRONTIER_GAMBLER_PLACED_BET_F, 1
+ compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET
goto_if_ge BattleFrontier_Lounge3_EventScript_261F12
goto BattleFrontier_Lounge3_EventScript_261DAF
end
BattleFrontier_Lounge3_EventScript_261F12:: @ 8261F12
- compare VAR_FRONTIER_GAMBLER_PLACED_BET_F, 1
+ compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET
goto_if_eq BattleFrontier_Lounge3_EventScript_261F9E
- compare VAR_FRONTIER_GAMBLER_PLACED_BET_F, 2
+ compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON
goto_if_eq BattleFrontier_Lounge3_EventScript_261F2E
goto BattleFrontier_Lounge3_EventScript_261F71
end
BattleFrontier_Lounge3_EventScript_261F2E:: @ 8261F2E
msgbox BattleFrontier_Lounge3_Text_263334, MSGBOX_DEFAULT
- compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, 0
+ compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_5
call_if_eq BattleFrontier_Lounge3_EventScript_261F80
- compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, 1
+ compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_10
call_if_eq BattleFrontier_Lounge3_EventScript_261F8A
- compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, 2
+ compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_15
call_if_eq BattleFrontier_Lounge3_EventScript_261F94
msgbox BattleFrontier_Lounge3_Text_2633D4, 9
- special sub_813A9D0
+ special GiveFrontierBattlePoints
msgbox BattleFrontier_Lounge3_Text_2633F2, MSGBOX_DEFAULT
- setvar VAR_FRONTIER_GAMBLER_PLACED_BET_F, 0
+ setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WAITING
release
end
BattleFrontier_Lounge3_EventScript_261F71:: @ 8261F71
msgbox BattleFrontier_Lounge3_Text_263298, MSGBOX_DEFAULT
- setvar VAR_FRONTIER_GAMBLER_PLACED_BET_F, 0
+ setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WAITING
release
end
@@ -155,7 +155,7 @@ BattleFrontier_Lounge3_EventScript_261F94:: @ 8261F94
return
BattleFrontier_Lounge3_EventScript_261F9E:: @ 8261F9E
- special sub_813A854
+ special ShowFrontierGamblerGoMessage
waitmessage
waitbuttonpress
release
@@ -167,7 +167,7 @@ BattleFrontier_Lounge3_EventScript_261FA5:: @ 8261FA5
end
BattleFrontier_Lounge3_EventScript_261FAF:: @ 8261FAF
- special sub_813A988
+ special CloseBattlePointsWindow
goto BattleFrontier_Lounge3_EventScript_261FA5
end
diff --git a/data/maps/BattleFrontier_Lounge5/map.json b/data/maps/BattleFrontier_Lounge5/map.json
index 698569d9b..3847e6691 100644
--- a/data/maps/BattleFrontier_Lounge5/map.json
+++ b/data/maps/BattleFrontier_Lounge5/map.json
@@ -24,7 +24,7 @@
"movement_range_y": 1,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "BattleFrontier_Lounge5_EventScript_2645C6",
+ "script": "BattleFrontier_Lounge5_EventScript_NatureGirl",
"flag": "0"
},
{
diff --git a/data/maps/BattleFrontier_Lounge5/scripts.inc b/data/maps/BattleFrontier_Lounge5/scripts.inc
index 7a8bd1929..020c8fdfb 100644
--- a/data/maps/BattleFrontier_Lounge5/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge5/scripts.inc
@@ -1,34 +1,34 @@
BattleFrontier_Lounge5_MapScripts:: @ 82645C5
.byte 0
-BattleFrontier_Lounge5_EventScript_2645C6:: @ 82645C6
+BattleFrontier_Lounge5_EventScript_NatureGirl:: @ 82645C6
lock
faceplayer
- msgbox BattleFrontier_Lounge5_Text_264632, MSGBOX_YESNO
+ msgbox BattleFrontier_Lounge5_Text_NatureGirlGreeting, MSGBOX_YESNO
compare VAR_RESULT, 0
- goto_if_eq BattleFrontier_Lounge5_EventScript_26460D
+ goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown
special sub_81B94B0
waitstate
lock
faceplayer
compare VAR_0x8004, 255
- goto_if_eq BattleFrontier_Lounge5_EventScript_26460D
+ goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
- compare VAR_RESULT, 412
- goto_if_eq BattleFrontier_Lounge5_EventScript_264603
- special sub_813A7B8
+ compare VAR_RESULT, SPECIES_EGG
+ goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlEgg
+ special ShowNatureGirlMessage
waitmessage
waitbuttonpress
release
end
-BattleFrontier_Lounge5_EventScript_264603:: @ 8264603
- msgbox BattleFrontier_Lounge5_Text_264EEE, MSGBOX_DEFAULT
+BattleFrontier_Lounge5_EventScript_NatureGirlEgg:: @ 8264603
+ msgbox BattleFrontier_Lounge5_Text_NatureGirlEgg, MSGBOX_DEFAULT
release
end
-BattleFrontier_Lounge5_EventScript_26460D:: @ 826460D
- msgbox BattleFrontier_Lounge5_Text_26467F, MSGBOX_DEFAULT
+BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown:: @ 826460D
+ msgbox BattleFrontier_Lounge5_Text_NatureGirlNoneShown, MSGBOX_DEFAULT
release
end
@@ -44,149 +44,149 @@ BattleFrontier_Lounge5_EventScript_264629:: @ 8264629
msgbox BattleFrontier_Lounge5_Text_264FAB, MSGBOX_NPC
end
-BattleFrontier_Lounge5_Text_264632:: @ 8264632
+BattleFrontier_Lounge5_Text_NatureGirlGreeting:: @ 8264632
.string "Ehehe!\n"
.string "I can tell what POKéMON are thinking!\p"
.string "Please!\n"
.string "Can I see your POKéMON?$"
-BattleFrontier_Lounge5_Text_26467F:: @ 826467F
+BattleFrontier_Lounge5_Text_NatureGirlNoneShown:: @ 826467F
.string "Boo!\n"
.string "Cheapie!$"
-BattleFrontier_Lounge5_Text_26468D:: @ 826468D
+BattleFrontier_Lounge5_Text_NatureGirlHardy:: @ 826468D
.string "Hmhm…\p"
.string "This one says it likes to battle!\n"
.string "It will battle even if it has a lot\l"
.string "of ouchies!$"
-BattleFrontier_Lounge5_Text_2646E5:: @ 82646E5
+BattleFrontier_Lounge5_Text_NatureGirlLonely:: @ 82646E5
.string "Hmhm…\p"
.string "This one says it likes to be sneaky!\n"
.string "But if it gets enough ouchies,\l"
.string "it will hit back!$"
-BattleFrontier_Lounge5_Text_264741:: @ 8264741
+BattleFrontier_Lounge5_Text_NatureGirlBrave:: @ 8264741
.string "Hmhm…\p"
.string "This one says it likes to battle!\n"
.string "But if it gets enough ouchies,\l"
.string "it will worry about itself!$"
-BattleFrontier_Lounge5_Text_2647A4:: @ 82647A4
+BattleFrontier_Lounge5_Text_NatureGirlAdamant:: @ 82647A4
.string "Hmhm…\p"
.string "This one says it likes to battle!\n"
.string "It will battle even if it has a lot\l"
.string "of ouchies!$"
-BattleFrontier_Lounge5_Text_2647FC:: @ 82647FC
+BattleFrontier_Lounge5_Text_NatureGirlNaughty:: @ 82647FC
.string "Hmhm…\p"
.string "This one says it looks after itself!\n"
.string "But if it gets enough ouchies,\l"
.string "it will hit back!$"
-BattleFrontier_Lounge5_Text_264858:: @ 8264858
+BattleFrontier_Lounge5_Text_NatureGirlBold:: @ 8264858
.string "Hmhm…\p"
.string "This one says it likes to be sneaky!\n"
.string "But if it gets enough ouchies,\l"
.string "it will worry about itself!$"
-BattleFrontier_Lounge5_Text_2648BE:: @ 82648BE
+BattleFrontier_Lounge5_Text_NatureGirlDocileNaiveQuietQuirky:: @ 82648BE
.string "Hmhm…\p"
.string "This one says it likes to battle!\n"
.string "It will battle even if it has a lot\l"
.string "of ouchies!$"
-BattleFrontier_Lounge5_Text_264916:: @ 8264916
+BattleFrontier_Lounge5_Text_NatureGirlRelaxed:: @ 8264916
.string "Hmhm…\p"
.string "This one says it likes to be sneaky!\n"
.string "But if it gets enough ouchies,\l"
.string "it will hit back!$"
-BattleFrontier_Lounge5_Text_264972:: @ 8264972
+BattleFrontier_Lounge5_Text_NatureGirlImpish:: @ 8264972
.string "Hmhm…\p"
.string "This one says it likes to battle!\n"
.string "But if it gets enough ouchies,\l"
.string "it will worry about itself!$"
-BattleFrontier_Lounge5_Text_2649D5:: @ 82649D5
+BattleFrontier_Lounge5_Text_NatureGirlLax:: @ 82649D5
.string "Hmhm…\p"
.string "This one says it likes to be sneaky!\n"
.string "It says it likes to be sneaky even\l"
.string "if it has a lot of ouchies!$"
-BattleFrontier_Lounge5_Text_264A3F:: @ 8264A3F
+BattleFrontier_Lounge5_Text_NatureGirlTimid:: @ 8264A3F
.string "Hmhm…\p"
.string "This one says it likes to battle!\n"
.string "But if it gets enough ouchies,\l"
.string "it will turn sneaky!$"
-BattleFrontier_Lounge5_Text_264A9B:: @ 8264A9B
+BattleFrontier_Lounge5_Text_NatureGirlHasty:: @ 8264A9B
.string "Hmhm…\p"
.string "This one says it likes to battle!\n"
.string "It will battle even if it has a lot\l"
.string "of ouchies!$"
-BattleFrontier_Lounge5_Text_264AF3:: @ 8264AF3
+BattleFrontier_Lounge5_Text_NatureGirlSerious:: @ 8264AF3
.string "Hmhm…\p"
.string "This one says it likes to be sneaky!\n"
.string "It says it likes to be sneaky even\l"
.string "if it has a lot of ouchies!$"
-BattleFrontier_Lounge5_Text_264B5D:: @ 8264B5D
+BattleFrontier_Lounge5_Text_NatureGirlJolly:: @ 8264B5D
.string "Hmhm…\p"
.string "This one says it likes to be sneaky!\n"
.string "But if it gets enough ouchies,\l"
.string "it will worry about itself!$"
-BattleFrontier_Lounge5_Text_264BC3:: @ 8264BC3
+BattleFrontier_Lounge5_Text_NatureGirlModest:: @ 8264BC3
.string "Hmhm…\p"
.string "This one says it looks after itself!\n"
.string "It says it worries about itself whether\l"
.string "or not it has a lot of ouchies!$"
-BattleFrontier_Lounge5_Text_264C36:: @ 8264C36
+BattleFrontier_Lounge5_Text_NatureGirlMild:: @ 8264C36
.string "Hmhm…\p"
.string "This one says it looks after itself!\n"
.string "But if it gets enough ouchies,\l"
.string "it will turn sneaky!$"
-BattleFrontier_Lounge5_Text_264C95:: @ 8264C95
+BattleFrontier_Lounge5_Text_NatureGirlBashful:: @ 8264C95
.string "Hmhm…\p"
.string "This one says it looks after itself!\n"
.string "It says it worries about itself even\l"
.string "if it has a lot of ouchies!$"
-BattleFrontier_Lounge5_Text_264D01:: @ 8264D01
+BattleFrontier_Lounge5_Text_NatureGirlRash:: @ 8264D01
.string "Hmhm…\p"
.string "This one says it likes to be sneaky!\n"
.string "It says it likes to be sneaky even\l"
.string "if it has a lot of ouchies!$"
-BattleFrontier_Lounge5_Text_264D6B:: @ 8264D6B
+BattleFrontier_Lounge5_Text_NatureGirlCalm:: @ 8264D6B
.string "Hmhm…\p"
.string "This one says it looks after itself!\n"
.string "It says it worries about itself even\l"
.string "if it has a lot of ouchies!$"
-BattleFrontier_Lounge5_Text_264DD7:: @ 8264DD7
+BattleFrontier_Lounge5_Text_NatureGirlGentle:: @ 8264DD7
.string "Hmhm…\p"
.string "This one says it looks after itself!\n"
.string "But if it gets enough ouchies,\l"
.string "it will hit back!$"
-BattleFrontier_Lounge5_Text_264E33:: @ 8264E33
+BattleFrontier_Lounge5_Text_NatureGirlSassy:: @ 8264E33
.string "Hmhm…\p"
.string "This one says it likes to battle!\n"
.string "But if it gets enough ouchies,\l"
.string "it will turn sneaky!$"
-BattleFrontier_Lounge5_Text_264E8F:: @ 8264E8F
+BattleFrontier_Lounge5_Text_NatureGirlCareful:: @ 8264E8F
.string "Hmhm…\p"
.string "This one says it looks after itself!\n"
.string "But if it gets enough ouchies,\l"
.string "it will turn sneaky!$"
-BattleFrontier_Lounge5_Text_264EEE:: @ 8264EEE
+BattleFrontier_Lounge5_Text_NatureGirlEgg:: @ 8264EEE
.string "That's silly! An EGG is asleep!\n"
.string "I can't talk to it!$"
diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc
index 1339b54c9..82b04023f 100644
--- a/data/maps/BattleFrontier_Lounge7/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge7/scripts.inc
@@ -19,11 +19,11 @@ BattleFrontier_Lounge7_EventScript_265276:: @ 8265276
BattleFrontier_Lounge7_EventScript_265284:: @ 8265284
message BattleFrontier_Lounge7_Text_2658EF
waitmessage
- special sub_813A958
+ special ShowBattlePointsWindow
setvar VAR_TEMP_E, 0
- setvar VAR_0x8004, 9
+ setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_1
setvar VAR_0x8006, 0
- special sub_813A128
+ special ShowScrollableMultichoice
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
switch VAR_RESULT
@@ -38,16 +38,16 @@ 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
message BattleFrontier_Lounge7_Text_2658EF
waitmessage
setvar VAR_TEMP_E, 0
- setvar VAR_0x8004, 9
+ setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_1
setvar VAR_0x8006, 1
- special sub_813A128
+ special ShowScrollableMultichoice
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
switch VAR_RESULT
@@ -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
@@ -133,11 +133,11 @@ BattleFrontier_Lounge7_EventScript_265466:: @ 8265466
BattleFrontier_Lounge7_EventScript_265474:: @ 8265474
message BattleFrontier_Lounge7_Text_2658EF
waitmessage
- special sub_813A958
+ special ShowBattlePointsWindow
setvar VAR_TEMP_E, 1
- setvar VAR_0x8004, 10
+ setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2
setvar VAR_0x8006, 0
- special sub_813A128
+ special ShowScrollableMultichoice
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
switch VAR_RESULT
@@ -152,16 +152,16 @@ 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
message BattleFrontier_Lounge7_Text_2658EF
waitmessage
setvar VAR_TEMP_E, 1
- setvar VAR_0x8004, 10
+ setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2
setvar VAR_0x8006, 1
- special sub_813A128
+ special ShowScrollableMultichoice
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
switch VAR_RESULT
@@ -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
@@ -230,8 +230,8 @@ BattleFrontier_Lounge7_EventScript_26562A:: @ 826562A
end
BattleFrontier_Lounge7_EventScript_265635:: @ 8265635
- special sub_813ADB8
- special sub_813A988
+ special CloseBattleFrontierTutorWindow
+ special CloseBattlePointsWindow
msgbox BattleFrontier_Lounge7_Text_265A0E, MSGBOX_DEFAULT
release
end
@@ -241,16 +241,18 @@ BattleFrontier_Lounge7_EventScript_265645:: @ 8265645
release
end
+@ VAR_0x8004 here is used to determine which move name to buffer
+@ VAR_0x8005 here is used to determine which move tutor was spoken to
BattleFrontier_Lounge7_EventScript_26564F:: @ 826564F
copyvar VAR_0x8004, VAR_TEMP_D
copyvar VAR_0x8005, VAR_TEMP_E
- special sub_813AC7C
+ special BufferBattleFrontierTutorMoveName
buffernumberstring 1, VAR_0x8008
copyvar VAR_0x8004, VAR_TEMP_C
msgbox BattleFrontier_Lounge7_Text_265921, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_Lounge7_EventScript_2656CA
- specialvar VAR_TEMP_1, sub_813AA04
+ specialvar VAR_TEMP_1, GetFrontierBattlePoints
compare VAR_TEMP_1, VAR_0x8008
goto_if_ge BattleFrontier_Lounge7_EventScript_265696
msgbox BattleFrontier_Lounge7_Text_265997, MSGBOX_DEFAULT
@@ -259,17 +261,17 @@ BattleFrontier_Lounge7_EventScript_26564F:: @ 826564F
BattleFrontier_Lounge7_EventScript_265696:: @ 8265696
msgbox BattleFrontier_Lounge7_Text_26595A, MSGBOX_DEFAULT
- special sub_813AEB4
+ special GetBattleFrontierTutorMoveIndex
fadescreen 1
- special sub_813A988
- special sub_813ADB8
+ special CloseBattlePointsWindow
+ special CloseBattleFrontierTutorWindow
special sub_81B892C
waitstate
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_Lounge7_EventScript_265645
msgbox BattleFrontier_Lounge7_Text_2659C7, MSGBOX_DEFAULT
copyvar VAR_0x8004, VAR_0x8008
- special sub_813A9A4
+ special TakeFrontierBattlePoints
release
end
diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc
index 2d2bdb1c0..fb96172d2 100644
--- a/data/maps/BattleFrontier_OutsideWest/scripts.inc
+++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc
@@ -20,12 +20,12 @@ BattleFrontier_OutsideWest_EventScript_23D3F0:: @ 823D3F0
end
BattleFrontier_OutsideWest_EventScript_23D416:: @ 823D416
- multichoicedefault 18, 6, 53, 2, 0
+ multichoicedefault 18, 6, MULTI_SSTIDAL_BATTLE_FRONTIER, 2, 0
switch VAR_RESULT
case 0, BattleFrontier_OutsideWest_EventScript_23D458
case 1, BattleFrontier_OutsideWest_EventScript_23D483
case 2, BattleFrontier_OutsideWest_EventScript_23D4D8
- case 127, BattleFrontier_OutsideWest_EventScript_23D4D8
+ case MULTI_B_PRESSED, BattleFrontier_OutsideWest_EventScript_23D4D8
end
BattleFrontier_OutsideWest_EventScript_23D44E:: @ 823D44E
diff --git a/data/maps/BattleFrontier_ReceptionGate/scripts.inc b/data/maps/BattleFrontier_ReceptionGate/scripts.inc
index 5f0952cb0..3eac4655b 100644
--- a/data/maps/BattleFrontier_ReceptionGate/scripts.inc
+++ b/data/maps/BattleFrontier_ReceptionGate/scripts.inc
@@ -136,8 +136,8 @@ BattleFrontier_ReceptionGate_EventScript_266310:: @ 8266310
BattleFrontier_ReceptionGate_EventScript_266320:: @ 8266320
message BattleFrontier_ReceptionGate_Text_26689D
waitmessage
- setvar VAR_0x8004, 8
- special sub_813A128
+ setvar VAR_0x8004, SCROLL_MULTI_BF_RECEPTIONIST
+ special ShowScrollableMultichoice
waitstate
switch VAR_RESULT
case 0, BattleFrontier_ReceptionGate_EventScript_2663AE
@@ -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
@@ -213,7 +213,7 @@ BattleFrontier_ReceptionGate_EventScript_266436:: @ 8266436
BattleFrontier_ReceptionGate_EventScript_266446:: @ 8266446
message BattleFrontier_ReceptionGate_Text_266EE0
waitmessage
- multichoice 15, 0, 95, 0
+ multichoice 15, 0, MULTI_FRONTIER_RULES, 0
switch VAR_RESULT
case 0, BattleFrontier_ReceptionGate_EventScript_2664A4
case 1, BattleFrontier_ReceptionGate_EventScript_2664B2
@@ -221,7 +221,7 @@ BattleFrontier_ReceptionGate_EventScript_266446:: @ 8266446
case 3, BattleFrontier_ReceptionGate_EventScript_2664CE
case 4, BattleFrontier_ReceptionGate_EventScript_2664DC
case 5, BattleFrontier_ReceptionGate_EventScript_2664EA
- case 127, BattleFrontier_ReceptionGate_EventScript_2664EA
+ case MULTI_B_PRESSED, BattleFrontier_ReceptionGate_EventScript_2664EA
end
BattleFrontier_ReceptionGate_EventScript_2664A4:: @ 82664A4
@@ -264,13 +264,13 @@ BattleFrontier_ReceptionGate_EventScript_2664F4:: @ 82664F4
BattleFrontier_ReceptionGate_EventScript_266504:: @ 8266504
message BattleFrontier_ReceptionGate_Text_26737C
waitmessage
- multichoice 16, 4, 11, 0
+ multichoice 16, 4, MULTI_FRONTIER_PASS_INFO, 0
switch VAR_RESULT
case 0, BattleFrontier_ReceptionGate_EventScript_26654C
case 1, BattleFrontier_ReceptionGate_EventScript_26655A
case 2, BattleFrontier_ReceptionGate_EventScript_266568
case 3, BattleFrontier_ReceptionGate_EventScript_266576
- case 127, BattleFrontier_ReceptionGate_EventScript_266576
+ case MULTI_B_PRESSED, BattleFrontier_ReceptionGate_EventScript_266576
end
BattleFrontier_ReceptionGate_EventScript_26654C:: @ 826654C
diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc
index 52863d474..b59adefcc 100644
--- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc
+++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc
@@ -112,7 +112,7 @@ BattleFrontier_ScottsHouse_EventScript_26381B:: @ 826381B
BattleFrontier_ScottsHouse_EventScript_26387A:: @ 826387A
msgbox BattleFrontier_ScottsHouse_Text_264412, MSGBOX_DEFAULT
- givedecoration_std 42
+ givedecoration_std DECOR_SILVER_SHIELD
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_ScottsHouse_EventScript_2638A0
setflag FLAG_RECEIVED_SILVER_SHIELD
@@ -155,7 +155,7 @@ BattleFrontier_ScottsHouse_EventScript_2638B4:: @ 82638B4
BattleFrontier_ScottsHouse_EventScript_263913:: @ 8263913
msgbox BattleFrontier_ScottsHouse_Text_26449F, MSGBOX_DEFAULT
- givedecoration_std 43
+ givedecoration_std DECOR_GOLD_SHIELD
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_ScottsHouse_EventScript_2638A0
setflag FLAG_RECEIVED_GOLD_SHIELD
@@ -218,7 +218,7 @@ BattleFrontier_ScottsHouse_EventScript_2639E9:: @ 82639E9
end
BattleFrontier_ScottsHouse_EventScript_2639F8:: @ 82639F8
- special sub_813A9D0
+ special GiveFrontierBattlePoints
msgbox BattleFrontier_ScottsHouse_Text_263CB0, 9
msgbox BattleFrontier_ScottsHouse_Text_263CD0, MSGBOX_DEFAULT
setflag FLAG_SCOTT_GIVES_BATTLE_POINTS
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/CaveOfOrigin_B1F/scripts.inc b/data/maps/CaveOfOrigin_B1F/scripts.inc
index 5148d2942..3b130e756 100644
--- a/data/maps/CaveOfOrigin_B1F/scripts.inc
+++ b/data/maps/CaveOfOrigin_B1F/scripts.inc
@@ -22,7 +22,7 @@ CaveOfOrigin_B1F_EventScript_2357A9:: @ 82357A9
goto CaveOfOrigin_B1F_EventScript_2357F0
CaveOfOrigin_B1F_EventScript_2357F0:: @ 82357F0
- multichoice 0, 0, 110, 0
+ multichoice 0, 0, MULTI_WHERES_RAYQUAZA, 0
switch VAR_RESULT
case 0, CaveOfOrigin_B1F_EventScript_23582C
case 1, CaveOfOrigin_B1F_EventScript_235837
diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc
index fa29f4099..1711405e1 100644
--- a/data/maps/DewfordTown/scripts.inc
+++ b/data/maps/DewfordTown/scripts.inc
@@ -12,12 +12,12 @@ DewfordTown_EventScript_1E9511:: @ 81E9511
goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, DewfordTown_EventScript_1E9585
message DewfordTown_Text_1E9C8A
waitmessage
- multichoicedefault 21, 6, 0, 2, 0
+ multichoicedefault 21, 6, MULTI_BRINEY_ON_DEWFORD, 2, 0
switch VAR_RESULT
case 0, DewfordTown_EventScript_1E955A
case 1, DewfordTown_EventScript_1E956A
case 2, DewfordTown_EventScript_1E957A
- case 127, DewfordTown_EventScript_1E957A
+ case MULTI_B_PRESSED, DewfordTown_EventScript_1E957A
end
DewfordTown_EventScript_1E955A:: @ 81E955A
@@ -97,7 +97,7 @@ DewfordTown_EventScript_1E9620:: @ 81E9620
DewfordTown_EventScript_1E962A:: @ 81E962A
message DewfordTown_Text_1E9FB8
waitmessage
- multichoice 20, 8, 50, 1
+ multichoice 20, 8, MULTI_HOWS_FISHING, 1
compare VAR_RESULT, 0
goto_if_eq DewfordTown_EventScript_1E964C
compare VAR_RESULT, 1
diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
index 88d02b29b..b26e0e030 100644
--- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
@@ -13,7 +13,7 @@ EverGrandeCity_ChampionsRoom_MapScript2_228A05: @ 8228A05
.2byte 0
EverGrandeCity_ChampionsRoom_EventScript_228A0F:: @ 8228A0F
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
EverGrandeCity_ChampionsRoom_MapScript2_228A14: @ 8228A14
diff --git a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc
index ed8d82be2..bfc1b6027 100644
--- a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc
@@ -9,7 +9,7 @@ EverGrandeCity_DrakesRoom_MapScript2_2286AC: @ 82286AC
.2byte 0
EverGrandeCity_DrakesRoom_EventScript_2286B6:: @ 82286B6
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
EverGrandeCity_DrakesRoom_MapScript2_2286BB: @ 82286BB
diff --git a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc
index 24960d95e..00e829930 100644
--- a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc
@@ -9,7 +9,7 @@ EverGrandeCity_GlaciasRoom_MapScript2_228422: @ 8228422
.2byte 0
EverGrandeCity_GlaciasRoom_EventScript_22842C:: @ 822842C
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
EverGrandeCity_GlaciasRoom_MapScript2_228431: @ 8228431
diff --git a/data/maps/EverGrandeCity_Hall1/scripts.inc b/data/maps/EverGrandeCity_Hall1/scripts.inc
index d9a7adfe3..c2ffaca47 100644
--- a/data/maps/EverGrandeCity_Hall1/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall1/scripts.inc
@@ -7,6 +7,6 @@ EverGrandeCity_Hall1_MapScript2_22956F: @ 822956F
.2byte 0
EverGrandeCity_Hall1_EventScript_229579:: @ 8229579
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
diff --git a/data/maps/EverGrandeCity_Hall2/scripts.inc b/data/maps/EverGrandeCity_Hall2/scripts.inc
index b831d0fd5..be19992ef 100644
--- a/data/maps/EverGrandeCity_Hall2/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall2/scripts.inc
@@ -7,6 +7,6 @@ EverGrandeCity_Hall2_MapScript2_229584: @ 8229584
.2byte 0
EverGrandeCity_Hall2_EventScript_22958E:: @ 822958E
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
diff --git a/data/maps/EverGrandeCity_Hall3/scripts.inc b/data/maps/EverGrandeCity_Hall3/scripts.inc
index d75cf95b6..eaf2f4e5a 100644
--- a/data/maps/EverGrandeCity_Hall3/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall3/scripts.inc
@@ -7,6 +7,6 @@ EverGrandeCity_Hall3_MapScript2_229599: @ 8229599
.2byte 0
EverGrandeCity_Hall3_EventScript_2295A3:: @ 82295A3
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
diff --git a/data/maps/EverGrandeCity_Hall4/scripts.inc b/data/maps/EverGrandeCity_Hall4/scripts.inc
index faf20646a..e36890874 100644
--- a/data/maps/EverGrandeCity_Hall4/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall4/scripts.inc
@@ -7,6 +7,6 @@ EverGrandeCity_Hall4_MapScript2_2295AE: @ 82295AE
.2byte 0
EverGrandeCity_Hall4_EventScript_2295B8:: @ 82295B8
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
diff --git a/data/maps/EverGrandeCity_Hall5/scripts.inc b/data/maps/EverGrandeCity_Hall5/scripts.inc
index e586958c2..6079bbd42 100644
--- a/data/maps/EverGrandeCity_Hall5/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall5/scripts.inc
@@ -7,6 +7,6 @@ EverGrandeCity_Hall5_MapScript2_2295C3: @ 82295C3
.2byte 0
EverGrandeCity_Hall5_EventScript_2295CD:: @ 82295CD
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
index 343614d85..ebfcb3311 100644
--- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc
+++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
@@ -8,7 +8,7 @@ EverGrandeCity_HallOfFame_MapScript2_229837: @ 8229837
.2byte 0
EverGrandeCity_HallOfFame_EventScript_229841:: @ 8229841
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
EverGrandeCity_HallOfFame_MapScript2_229846: @ 8229846
diff --git a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc
index 971eff7ca..b5a3a9999 100644
--- a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc
@@ -9,7 +9,7 @@ EverGrandeCity_PhoebesRoom_MapScript2_228184: @ 8228184
.2byte 0
EverGrandeCity_PhoebesRoom_EventScript_22818E:: @ 822818E
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
EverGrandeCity_PhoebesRoom_MapScript2_228193: @ 8228193
diff --git a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc
index 380b3aaf7..432747fda 100644
--- a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc
@@ -30,7 +30,7 @@ EverGrandeCity_SidneysRoom_MapScript2_227F3E: @ 8227F3E
.2byte 0
EverGrandeCity_SidneysRoom_EventScript_227F48:: @ 8227F48
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
EverGrandeCity_SidneysRoom_MapScript2_227F4D: @ 8227F4D
diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc
index 7501f6e8d..b63846abd 100644
--- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc
+++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc
@@ -120,7 +120,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_200A2A:: @ 8200A2A
call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_200B43
compare VAR_RESULT, 2
call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_200B4A
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, FallarborTown_BattleTentBattleRoom_EventScript_200AD8
case 1, FallarborTown_BattleTentBattleRoom_EventScript_200A78
@@ -136,11 +136,11 @@ FallarborTown_BattleTentBattleRoom_EventScript_200A78:: @ 8200A78
FallarborTown_BattleTentBattleRoom_EventScript_200AA6:: @ 8200AA6
message FallarborTown_BattleTentBattleRoom_Text_257E9E
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, FallarborTown_BattleTentBattleRoom_EventScript_200A2A
case 0, FallarborTown_BattleTentBattleRoom_EventScript_20097E
- case 127, FallarborTown_BattleTentBattleRoom_EventScript_200A2A
+ case MULTI_B_PRESSED, FallarborTown_BattleTentBattleRoom_EventScript_200A2A
FallarborTown_BattleTentBattleRoom_EventScript_200AD8:: @ 8200AD8
closemessage
diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc
index f6b7e1097..3f6eec374 100644
--- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc
+++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc
@@ -9,7 +9,7 @@ FallarborTown_BattleTentLobby_MapScript2_1FFE71: @ 81FFE71
FallarborTown_BattleTentLobby_EventScript_1FFE7B:: @ 81FFE7B
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
FallarborTown_BattleTentLobby_MapScript2_1FFE85: @ 81FFE85
@@ -140,12 +140,12 @@ FallarborTown_BattleTentLobby_EventScript_200001:: @ 8200001
FallarborTown_BattleTentLobby_EventScript_200021:: @ 8200021
message FallarborTown_BattleTentLobby_Text_2C4843
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, FallarborTown_BattleTentLobby_EventScript_20005D
case 1, FallarborTown_BattleTentLobby_EventScript_200169
case 2, FallarborTown_BattleTentLobby_EventScript_2001C5
- case 127, FallarborTown_BattleTentLobby_EventScript_2001C5
+ case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_2001C5
FallarborTown_BattleTentLobby_EventScript_20005D:: @ 820005D
setvar VAR_FRONTIER_FACILITY, 3
@@ -315,7 +315,7 @@ FallarborTown_BattleTentLobby_EventScript_20024F:: @ 820024F
FallarborTown_BattleTentLobby_EventScript_20025E:: @ 820025E
message FallarborTown_BattleTentLobby_Text_256DDF
waitmessage
- multichoice 17, 0, 112, 0
+ multichoice 17, 0, MULTI_FALLARBOR_TENT_RULES, 0
switch VAR_RESULT
case 0, FallarborTown_BattleTentLobby_EventScript_2002BC
case 1, FallarborTown_BattleTentLobby_EventScript_2002CA
@@ -323,7 +323,7 @@ FallarborTown_BattleTentLobby_EventScript_20025E:: @ 820025E
case 3, FallarborTown_BattleTentLobby_EventScript_2002E6
case 4, FallarborTown_BattleTentLobby_EventScript_2002F4
case 5, FallarborTown_BattleTentLobby_EventScript_200302
- case 127, FallarborTown_BattleTentLobby_EventScript_200302
+ case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_200302
end
FallarborTown_BattleTentLobby_EventScript_2002BC:: @ 82002BC
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/FortreeCity_House2/scripts.inc b/data/maps/FortreeCity_House2/scripts.inc
index 34344bca3..14ab157ed 100644
--- a/data/maps/FortreeCity_House2/scripts.inc
+++ b/data/maps/FortreeCity_House2/scripts.inc
@@ -7,15 +7,15 @@ FortreeCity_House2_EventScript_2177CB:: @ 82177CB
goto_if_set FLAG_RECEIVED_TM10, FortreeCity_House2_EventScript_21786E
call_if_unset FLAG_MET_HIDDEN_POWER_GIVER, FortreeCity_House2_EventScript_217862
msgbox FortreeCity_House2_Text_2178D6, MSGBOX_DEFAULT
- multichoice 21, 8, 54, 1
+ multichoice 21, 8, MULTI_RIGHTLEFT, 1
switch VAR_RESULT
case 1, FortreeCity_House2_EventScript_217878
msgbox FortreeCity_House2_Text_21796A, MSGBOX_DEFAULT
- multichoice 21, 8, 54, 1
+ multichoice 21, 8, MULTI_RIGHTLEFT, 1
switch VAR_RESULT
case 1, FortreeCity_House2_EventScript_217878
msgbox FortreeCity_House2_Text_2179C9, MSGBOX_DEFAULT
- multichoice 21, 8, 54, 1
+ multichoice 21, 8, MULTI_RIGHTLEFT, 1
switch VAR_RESULT
case 0, FortreeCity_House2_EventScript_217878
msgbox FortreeCity_House2_Text_217A28, MSGBOX_DEFAULT
diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc
index 9a777e551..364b376bf 100644
--- a/data/maps/LilycoveCity/scripts.inc
+++ b/data/maps/LilycoveCity/scripts.inc
@@ -37,7 +37,7 @@ LilycoveCity_EventScript_1E2BD8:: @ 81E2BD8
goto_if_set FLAG_DAILY_LILYCOVE_RECEIVED_BERRY, LilycoveCity_EventScript_1E2C18
msgbox LilycoveCity_Text_2A7244, MSGBOX_DEFAULT
random 10
- addvar VAR_RESULT, 133
+ addvar VAR_RESULT, FIRST_BERRY_INDEX
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc
index cd4749bfc..3a4753d8a 100644
--- a/data/maps/LilycoveCity_ContestLobby/scripts.inc
+++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc
@@ -630,12 +630,12 @@ LilycoveCity_ContestLobby_EventScript_21A806:: @ 821A806
LilycoveCity_ContestLobby_EventScript_21A819:: @ 821A819
message LilycoveCity_ContestLobby_Text_27C0F6
waitmessage
- multichoice 0, 0, 2, 0
+ multichoice 0, 0, MULTI_ENTERINFO, 0
switch VAR_RESULT
case 0, LilycoveCity_ContestLobby_EventScript_21A856
case 1, LilycoveCity_ContestLobby_EventScript_21A90D
case 2, LilycoveCity_ContestLobby_EventScript_21A97F
- case 127, LilycoveCity_ContestLobby_EventScript_21A97F
+ case MULTI_B_PRESSED, LilycoveCity_ContestLobby_EventScript_21A97F
end
LilycoveCity_ContestLobby_EventScript_21A856:: @ 821A856
@@ -648,12 +648,12 @@ LilycoveCity_ContestLobby_EventScript_21A856:: @ 821A856
message LilycoveCity_ContestLobby_Text_27C8FD
waitmessage
specialvar VAR_TEMP_D, IsWirelessAdapterConnected
- multichoice 0, 0, 85, 0
+ multichoice 0, 0, MULTI_LINK_CONTEST_MODE, 0
switch VAR_RESULT
case 0, LilycoveCity_ContestLobby_EventScript_21A8BB
case 1, LilycoveCity_ContestLobby_EventScript_21A8C6
case 2, LilycoveCity_ContestLobby_EventScript_21A97F
- case 127, LilycoveCity_ContestLobby_EventScript_21A97F
+ case MULTI_B_PRESSED, LilycoveCity_ContestLobby_EventScript_21A97F
end
LilycoveCity_ContestLobby_EventScript_21A8BB:: @ 821A8BB
@@ -671,10 +671,10 @@ LilycoveCity_ContestLobby_EventScript_21A8C6:: @ 821A8C6
LilycoveCity_ContestLobby_EventScript_21A8DC:: @ 821A8DC
message LilycoveCity_ContestLobby_Text_27C119
waitmessage
- multichoice 0, 0, 4, 0
+ multichoice 0, 0, MULTI_CONTEST_TYPE, 0
switch VAR_RESULT
case 5, LilycoveCity_ContestLobby_EventScript_21A97F
- case 127, LilycoveCity_ContestLobby_EventScript_21A97F
+ case MULTI_B_PRESSED, LilycoveCity_ContestLobby_EventScript_21A97F
copyvar VAR_CONTEST_CATEGORY, VAR_RESULT
goto LilycoveCity_ContestLobby_EventScript_21A98C
end
@@ -682,13 +682,13 @@ LilycoveCity_ContestLobby_EventScript_21A8DC:: @ 821A8DC
LilycoveCity_ContestLobby_EventScript_21A90D:: @ 821A90D
message LilycoveCity_ContestLobby_Text_27C0DA
waitmessage
- multichoice 0, 0, 84, 0
+ multichoice 0, 0, MULTI_LINK_CONTEST_INFO, 0
switch VAR_RESULT
case 0, LilycoveCity_ContestLobby_EventScript_21A955
case 1, LilycoveCity_ContestLobby_EventScript_21A963
case 2, LilycoveCity_ContestLobby_EventScript_21A971
case 3, LilycoveCity_ContestLobby_EventScript_21A819
- case 127, LilycoveCity_ContestLobby_EventScript_21A819
+ case MULTI_B_PRESSED, LilycoveCity_ContestLobby_EventScript_21A819
end
LilycoveCity_ContestLobby_EventScript_21A955:: @ 821A955
@@ -877,12 +877,12 @@ LilycoveCity_ContestLobby_EventScript_21ABA0:: @ 821ABA0
LilycoveCity_ContestLobby_EventScript_21ABA6:: @ 821ABA6
message Text_DecideLinkLeader
waitmessage
- multichoice 16, 6, 81, 0
+ multichoice 16, 6, MULTI_LINK_LEADER, 0
switch VAR_RESULT
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_DepartmentStoreElevator/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
index 18fc0404b..c22e0c0ec 100644
--- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
@@ -7,11 +7,11 @@ LilycoveCity_DepartmentStoreElevator_EventScript_220624:: @ 8220624
setvar VAR_0x8004, 0
call_if_unset FLAG_TEMP_2, LilycoveCity_DepartmentStoreElevator_EventScript_2207FC
copyvar VAR_0x8005, VAR_DEPT_STORE_FLOOR
- special sub_8139B60
+ special ShowDeptStoreElevatorFloorSelect
message gUnknown_08272C1D
waitmessage
setvar VAR_0x8004, 0
- specialvar VAR_RESULT, sub_81399F4
+ specialvar VAR_RESULT, GetDeptStoreDefaultFloorChoice
switch VAR_RESULT
case 0, LilycoveCity_DepartmentStoreElevator_EventScript_220689
case 1, LilycoveCity_DepartmentStoreElevator_EventScript_220695
@@ -21,27 +21,27 @@ LilycoveCity_DepartmentStoreElevator_EventScript_220624:: @ 8220624
end
LilycoveCity_DepartmentStoreElevator_EventScript_220689:: @ 8220689
- multichoicedefault 0, 0, 57, 0, 0
+ multichoicedefault 0, 0, MULTI_FLOORS, 0, 0
goto LilycoveCity_DepartmentStoreElevator_EventScript_2206C5
end
LilycoveCity_DepartmentStoreElevator_EventScript_220695:: @ 8220695
- multichoicedefault 0, 0, 57, 1, 0
+ multichoicedefault 0, 0, MULTI_FLOORS, 1, 0
goto LilycoveCity_DepartmentStoreElevator_EventScript_2206C5
end
LilycoveCity_DepartmentStoreElevator_EventScript_2206A1:: @ 82206A1
- multichoicedefault 0, 0, 57, 2, 0
+ multichoicedefault 0, 0, MULTI_FLOORS, 2, 0
goto LilycoveCity_DepartmentStoreElevator_EventScript_2206C5
end
LilycoveCity_DepartmentStoreElevator_EventScript_2206AD:: @ 82206AD
- multichoicedefault 0, 0, 57, 3, 0
+ multichoicedefault 0, 0, MULTI_FLOORS, 3, 0
goto LilycoveCity_DepartmentStoreElevator_EventScript_2206C5
end
LilycoveCity_DepartmentStoreElevator_EventScript_2206B9:: @ 82206B9
- multichoicedefault 0, 0, 57, 4, 0
+ multichoicedefault 0, 0, MULTI_FLOORS, 4, 0
goto LilycoveCity_DepartmentStoreElevator_EventScript_2206C5
end
@@ -53,76 +53,76 @@ LilycoveCity_DepartmentStoreElevator_EventScript_2206C5:: @ 82206C5
case 3, LilycoveCity_DepartmentStoreElevator_EventScript_220740
case 4, LilycoveCity_DepartmentStoreElevator_EventScript_220718
case 5, LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
- case 127, LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
+ case MULTI_B_PRESSED, LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
end
LilycoveCity_DepartmentStoreElevator_EventScript_220718:: @ 8220718
- setvar VAR_0x8006, 4
+ setvar VAR_0x8006, DEPT_STORE_FLOORNUM_1F
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 255, 2, 1
- compare VAR_DEPT_STORE_FLOOR, 4
+ compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
call LilycoveCity_DepartmentStoreElevator_EventScript_2207E5
- setvar VAR_DEPT_STORE_FLOOR, 4
+ setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F
goto LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
end
LilycoveCity_DepartmentStoreElevator_EventScript_220740:: @ 8220740
- setvar VAR_0x8006, 5
+ setvar VAR_0x8006, DEPT_STORE_FLOORNUM_2F
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 255, 2, 1
- compare VAR_DEPT_STORE_FLOOR, 5
+ compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
call LilycoveCity_DepartmentStoreElevator_EventScript_2207E5
- setvar VAR_DEPT_STORE_FLOOR, 5
+ setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F
goto LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
end
LilycoveCity_DepartmentStoreElevator_EventScript_220768:: @ 8220768
- setvar VAR_0x8006, 6
+ setvar VAR_0x8006, DEPT_STORE_FLOORNUM_3F
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 255, 2, 1
- compare VAR_DEPT_STORE_FLOOR, 6
+ compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
call LilycoveCity_DepartmentStoreElevator_EventScript_2207E5
- setvar VAR_DEPT_STORE_FLOOR, 6
+ setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F
goto LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
end
LilycoveCity_DepartmentStoreElevator_EventScript_220790:: @ 8220790
- setvar VAR_0x8006, 7
+ setvar VAR_0x8006, DEPT_STORE_FLOORNUM_4F
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 255, 2, 1
- compare VAR_DEPT_STORE_FLOOR, 7
+ compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
call LilycoveCity_DepartmentStoreElevator_EventScript_2207E5
- setvar VAR_DEPT_STORE_FLOOR, 7
+ setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F
goto LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
end
LilycoveCity_DepartmentStoreElevator_EventScript_2207B8:: @ 82207B8
- setvar VAR_0x8006, 8
+ setvar VAR_0x8006, DEPT_STORE_FLOORNUM_5F
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 255, 2, 1
- compare VAR_DEPT_STORE_FLOOR, 8
+ compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
call LilycoveCity_DepartmentStoreElevator_EventScript_2207E5
- setvar VAR_DEPT_STORE_FLOOR, 8
+ setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F
goto LilycoveCity_DepartmentStoreElevator_EventScript_2207E0
end
LilycoveCity_DepartmentStoreElevator_EventScript_2207E0:: @ 82207E0
- special sub_8139C10
+ special CloseDeptStoreElevatorWindow
release
end
LilycoveCity_DepartmentStoreElevator_EventScript_2207E5:: @ 82207E5
- special sub_8139C10
+ special CloseDeptStoreElevatorWindow
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
waitse
- special ShakeScreenInElevator
+ special MoveElevator
waitstate
setflag FLAG_TEMP_2
return
LilycoveCity_DepartmentStoreElevator_EventScript_2207FC:: @ 82207FC
- special SetDepartmentStoreFloorVar
+ special SetDeptStoreFloor
return
diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
index b8d0a7c44..c9e423ebb 100644
--- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
@@ -76,7 +76,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_220295:: @ 8220295
end
LilycoveCity_DepartmentStoreRooftop_EventScript_2202A6:: @ 82202A6
- multichoice 16, 0, 42, 0
+ multichoice 16, 0, MULTI_VENDING_MACHINE, 0
copyvar VAR_TEMP_1, VAR_RESULT
switch VAR_TEMP_1
case 0, LilycoveCity_DepartmentStoreRooftop_EventScript_2202E4
@@ -87,42 +87,42 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_2202A6:: @ 82202A6
end
LilycoveCity_DepartmentStoreRooftop_EventScript_2202E4:: @ 82202E4
- setvar VAR_TEMP_0, 26
+ setvar VAR_TEMP_0, ITEM_FRESH_WATER
goto LilycoveCity_DepartmentStoreRooftop_EventScript_22032F
end
LilycoveCity_DepartmentStoreRooftop_EventScript_2202EF:: @ 82202EF
- setvar VAR_TEMP_0, 27
+ setvar VAR_TEMP_0, ITEM_SODA_POP
goto LilycoveCity_DepartmentStoreRooftop_EventScript_22032F
end
LilycoveCity_DepartmentStoreRooftop_EventScript_2202FA:: @ 82202FA
- setvar VAR_TEMP_0, 28
+ setvar VAR_TEMP_0, ITEM_LEMONADE
goto LilycoveCity_DepartmentStoreRooftop_EventScript_22032F
end
LilycoveCity_DepartmentStoreRooftop_EventScript_220305:: @ 8220305
- checkmoney 0xc8, 0
+ checkmoney 200, 0
return
LilycoveCity_DepartmentStoreRooftop_EventScript_22030C:: @ 822030C
- checkmoney 0x12c, 0
+ checkmoney 300, 0
return
LilycoveCity_DepartmentStoreRooftop_EventScript_220313:: @ 8220313
- checkmoney 0x15e, 0
+ checkmoney 350, 0
return
LilycoveCity_DepartmentStoreRooftop_EventScript_22031A:: @ 822031A
- takemoney 0xc8, 0
+ takemoney 200, 0
return
LilycoveCity_DepartmentStoreRooftop_EventScript_220321:: @ 8220321
- takemoney 0x12c, 0
+ takemoney 300, 0
return
LilycoveCity_DepartmentStoreRooftop_EventScript_220328:: @ 8220328
- takemoney 0x15e, 0
+ takemoney 350, 0
return
LilycoveCity_DepartmentStoreRooftop_EventScript_22032F:: @ 822032F
@@ -149,7 +149,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_22032F:: @ 822032F
msgbox LilycoveCity_DepartmentStoreRooftop_Text_2205A1, MSGBOX_DEFAULT
giveitem VAR_TEMP_0, 1
bufferitemname 1, VAR_TEMP_0
- bufferstdstring 2, 14
+ bufferstdstring 2, STDSTRING_ITEMS
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
random 64
compare VAR_RESULT, 0
@@ -161,7 +161,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_22032F:: @ 822032F
msgbox LilycoveCity_DepartmentStoreRooftop_Text_2205C2, MSGBOX_DEFAULT
giveitem VAR_TEMP_0, 1
bufferitemname 1, VAR_TEMP_0
- bufferstdstring 2, 14
+ bufferstdstring 2, STDSTRING_ITEMS
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
random 64
compare VAR_RESULT, 0
@@ -173,7 +173,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_22032F:: @ 822032F
msgbox LilycoveCity_DepartmentStoreRooftop_Text_2205C2, MSGBOX_DEFAULT
giveitem VAR_TEMP_0, 1
bufferitemname 1, VAR_TEMP_0
- bufferstdstring 2, 14
+ bufferstdstring 2, STDSTRING_ITEMS
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
goto LilycoveCity_DepartmentStoreRooftop_EventScript_220436
end
diff --git a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc
index 6b5796604..ccad13e27 100644
--- a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc
@@ -10,7 +10,7 @@ LilycoveCity_DepartmentStore_5F_MapScript2_21FF80: @ 821FF80
LilycoveCity_DepartmentStore_5F_EventScript_21FF9A:: @ 821FF9A
setobjectxy 7, 16, 2
- turnobject 7, 2
+ turnobject 7, DIR_NORTH
end
LilycoveCity_DepartmentStore_5F_EventScript_21FFA6:: @ 821FFA6
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_LilycoveMuseum_1F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
index 8f2cdde28..8ac18ba85 100644
--- a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
+++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
@@ -10,7 +10,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_218CC2:: @ 8218CC2
applymovement 2, Common_Movement_FacePlayer
message LilycoveCity_LilycoveMuseum_1F_Text_218EBC
waitmessage
- multichoice 20, 8, 16, 1
+ multichoice 20, 8, MULTI_VIEWED_PAINTINGS, 1
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_218CF5
compare VAR_RESULT, 1
diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
index add7ef22f..71aead3e4 100644
--- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
+++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
@@ -118,7 +118,7 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_2198C3:: @ 82198C3
LilycoveCity_LilycoveMuseum_2F_EventScript_2198EA:: @ 82198EA
applymovement 1, Common_Movement_FacePlayer
msgbox LilycoveCity_LilycoveMuseum_2F_Text_219EC5, MSGBOX_DEFAULT
- givedecoration_std 44
+ givedecoration_std DECOR_GLASS_ORNAMENT
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_219911
setflag FLAG_RECEIVED_GLASS_ORNAMENT
diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
index 62fdd3427..d9ba545fb 100644
--- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
@@ -558,13 +558,13 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CE4D:: @ 821CE4D
special BufferStreakTrainerText
message LilycoveCity_PokemonTrainerFanClub_Text_281C95
waitmessage
- setvar VAR_0x8004, 2
- special sub_813A128
+ setvar VAR_0x8004, SCROLL_MULTI_POKEMON_FAN_CLUB_RATER
+ special ShowScrollableMultichoice
waitstate
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/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc
index 8f10f2b4d..d42f277eb 100644
--- a/data/maps/LittlerootTown/scripts.inc
+++ b/data/maps/LittlerootTown/scripts.inc
@@ -208,7 +208,7 @@ LittlerootTown_EventScript_1E7FEC:: @ 81E7FEC
addobject 8
addobject 7
checkplayergender
- compare VAR_RESULT, 0
+ compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_EventScript_1E8004
goto LittlerootTown_EventScript_1E8013
end
diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
index 17cca3ea9..397bdfb8f 100644
--- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
+++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
@@ -17,7 +17,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F777A:: @ 81F777A
LittlerootTown_BrendansHouse_1F_EventScript_1F778D:: @ 81F778D
checkplayergender
- compare VAR_RESULT, 0
+ compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F779A
return
diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc
index 3bb088ccf..394db3e22 100644
--- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc
+++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc
@@ -22,7 +22,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F841A:: @ 81F841A
LittlerootTown_BrendansHouse_2F_EventScript_1F8433:: @ 81F8433
checkplayergender
- compare VAR_RESULT, 0
+ compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8456
compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2
goto_if_ge LittlerootTown_BrendansHouse_2F_EventScript_1F9309
@@ -35,7 +35,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8456:: @ 81F8456
LittlerootTown_BrendansHouse_2F_EventScript_1F8457:: @ 81F8457
checkplayergender
- compare VAR_RESULT, 1
+ compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8464
return
@@ -49,7 +49,7 @@ LittlerootTown_BrendansHouse_2F_MapScript2_1F846A: @ 81F846A
LittlerootTown_BrendansHouse_2F_EventScript_1F8474:: @ 81F8474
checkplayergender
- compare VAR_RESULT, 0
+ compare VAR_RESULT, MALE
goto_if_eq EventScript_275D0C
end
diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
index d983c9e64..510f8c249 100644
--- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
+++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
@@ -17,7 +17,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1F88CA:: @ 81F88CA
LittlerootTown_MaysHouse_1F_EventScript_1F88DD:: @ 81F88DD
checkplayergender
- compare VAR_RESULT, 1
+ compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F88EA
return
diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc
index dde6df71d..13fefa5a3 100644
--- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc
+++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc
@@ -22,7 +22,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F92CD:: @ 81F92CD
LittlerootTown_MaysHouse_2F_EventScript_1F92E6:: @ 81F92E6
checkplayergender
- compare VAR_RESULT, 1
+ compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9309
compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2
goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_1F9309
@@ -36,7 +36,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F9309:: @ 81F9309
LittlerootTown_MaysHouse_2F_EventScript_1F930A:: @ 81F930A
checkplayergender
- compare VAR_RESULT, 0
+ compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9317
return
@@ -50,7 +50,7 @@ LittlerootTown_MaysHouse_2F_MapScript2_1F931D: @ 81F931D
LittlerootTown_MaysHouse_2F_EventScript_1F9327:: @ 81F9327
checkplayergender
- compare VAR_RESULT, 1
+ compare VAR_RESULT, FEMALE
goto_if_eq EventScript_275D0C
end
diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
index c4f704520..9949df08c 100644
--- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
+++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
@@ -48,18 +48,18 @@ LittlerootTown_ProfessorBirchsLab_MapScript2_1F9D06: @ 81F9D06
.2byte 0
LittlerootTown_ProfessorBirchsLab_EventScript_1F9D40:: @ 81F9D40
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
LittlerootTown_ProfessorBirchsLab_EventScript_1F9D45:: @ 81F9D45
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
addobject 2
addobject 3
- turnobject 3, 2
+ turnobject 3, DIR_NORTH
setobjectxy 3, 5, 5
- turnobject 2, 1
+ turnobject 2, DIR_SOUTH
setobjectxy 2, 6, 4
- turnobject 1, 4
+ turnobject 1, DIR_EAST
setobjectxy 1, 10, 10
end
@@ -72,15 +72,15 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9D75:: @ 81F9D75
addobject 5
addobject 6
addobject 3
- turnobject 4, 1
+ turnobject 4, DIR_SOUTH
setobjectxy 4, 8, 4
- turnobject 5, 1
+ turnobject 5, DIR_SOUTH
setobjectxy 5, 9, 4
- turnobject 6, 1
+ turnobject 6, DIR_SOUTH
setobjectxy 6, 10, 4
- turnobject 2, 1
+ turnobject 2, DIR_SOUTH
setobjectxy 2, 6, 4
- turnobject 3, 4
+ turnobject 3, DIR_EAST
setobjectxy 3, 5, 5
end
@@ -335,7 +335,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA061:: @ 81FA061
LittlerootTown_ProfessorBirchsLab_EventScript_1FA06C:: @ 81FA06C
bufferspeciesname 0, SPECIES_CYNDAQUIL
setvar VAR_TEMP_1, SPECIES_CYNDAQUIL
- givemon SPECIES_CYNDAQUIL, 5, ITEM_NONE, 0x0, 0x0, 0
+ givemon SPECIES_CYNDAQUIL, 5, ITEM_NONE
compare VAR_RESULT, 0
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA0A1
compare VAR_RESULT, 1
@@ -380,7 +380,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA0FD:: @ 81FA0FD
LittlerootTown_ProfessorBirchsLab_EventScript_1FA10D:: @ 81FA10D
bufferspeciesname 0, SPECIES_TOTODILE
setvar VAR_TEMP_1, SPECIES_TOTODILE
- givemon SPECIES_TOTODILE, 5, ITEM_NONE, 0x0, 0x0, 0
+ givemon SPECIES_TOTODILE, 5, ITEM_NONE
compare VAR_RESULT, 0
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA142
compare VAR_RESULT, 1
@@ -425,7 +425,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA19E:: @ 81FA19E
LittlerootTown_ProfessorBirchsLab_EventScript_1FA1AE:: @ 81FA1AE
bufferspeciesname 0, SPECIES_CHIKORITA
setvar VAR_TEMP_1, SPECIES_CHIKORITA
- givemon SPECIES_CHIKORITA, 5, ITEM_NONE, 0x0, 0x0, 0
+ givemon SPECIES_CHIKORITA, 5, ITEM_NONE
compare VAR_RESULT, 0
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA1E3
compare VAR_RESULT, 1
diff --git a/data/maps/MauvilleCity_BikeShop/scripts.inc b/data/maps/MauvilleCity_BikeShop/scripts.inc
index fe6832423..a5b20cf60 100644
--- a/data/maps/MauvilleCity_BikeShop/scripts.inc
+++ b/data/maps/MauvilleCity_BikeShop/scripts.inc
@@ -25,7 +25,7 @@ MauvilleCity_BikeShop_EventScript_20EBF7:: @ 820EBF7
MauvilleCity_BikeShop_EventScript_20EC16:: @ 820EC16
message MauvilleCity_BikeShop_Text_20EF32
waitmessage
- multichoice 21, 8, 12, 1
+ multichoice 21, 8, MULTI_BIKE, 1
switch VAR_RESULT
case 0, MauvilleCity_BikeShop_EventScript_20EC53
case 1, MauvilleCity_BikeShop_EventScript_20EC6D
@@ -112,13 +112,13 @@ MauvilleCity_BikeShop_EventScript_20ED3A:: @ 820ED3A
end
MauvilleCity_BikeShop_EventScript_20ED46:: @ 820ED46
- multichoice 0, 0, 43, 0
+ multichoice 0, 0, MULTI_MACH_BIKE_INFO, 0
switch VAR_RESULT
case 0, MauvilleCity_BikeShop_EventScript_20ED88
case 1, MauvilleCity_BikeShop_EventScript_20ED94
case 2, MauvilleCity_BikeShop_EventScript_20EDA0
case 3, MauvilleCity_BikeShop_EventScript_20EDAC
- case 127, MauvilleCity_BikeShop_EventScript_20EDAC
+ case MULTI_B_PRESSED, MauvilleCity_BikeShop_EventScript_20EDAC
end
MauvilleCity_BikeShop_EventScript_20ED88:: @ 820ED88
@@ -150,13 +150,13 @@ MauvilleCity_BikeShop_EventScript_20EDAE:: @ 820EDAE
end
MauvilleCity_BikeShop_EventScript_20EDBA:: @ 820EDBA
- multichoice 0, 0, 44, 0
+ multichoice 0, 0, MULTI_ACRO_BIKE_INFO, 0
switch VAR_RESULT
case 0, MauvilleCity_BikeShop_EventScript_20EDFC
case 1, MauvilleCity_BikeShop_EventScript_20EE08
case 2, MauvilleCity_BikeShop_EventScript_20EE14
case 3, MauvilleCity_BikeShop_EventScript_20EE20
- case 127, MauvilleCity_BikeShop_EventScript_20EE20
+ case MULTI_B_PRESSED, MauvilleCity_BikeShop_EventScript_20EE20
end
MauvilleCity_BikeShop_EventScript_20EDFC:: @ 820EDFC
diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc
index 0df7afe54..a6ee8ec85 100644
--- a/data/maps/MauvilleCity_GameCorner/scripts.inc
+++ b/data/maps/MauvilleCity_GameCorner/scripts.inc
@@ -15,7 +15,7 @@ MauvilleCity_GameCorner_EventScript_20FBB9:: @ 820FBB9
goto MauvilleCity_GameCorner_EventScript_20FBE5
MauvilleCity_GameCorner_EventScript_20FBE5:: @ 820FBE5
- multichoicedefault 15, 0, 49, 0, 0
+ multichoicedefault 15, 0, MULTI_GAME_CORNER_COINS, 0, 0
switch VAR_RESULT
case 0, MauvilleCity_GameCorner_EventScript_20FC33
case 1, MauvilleCity_GameCorner_EventScript_20FC75
@@ -23,7 +23,7 @@ MauvilleCity_GameCorner_EventScript_20FBE5:: @ 820FBE5
end
MauvilleCity_GameCorner_EventScript_20FC0C:: @ 820FC0C
- multichoicedefault 15, 0, 49, 1, 0
+ multichoicedefault 15, 0, MULTI_GAME_CORNER_COINS, 1, 0
switch VAR_RESULT
case 0, MauvilleCity_GameCorner_EventScript_20FC33
case 1, MauvilleCity_GameCorner_EventScript_20FC75
@@ -34,11 +34,11 @@ MauvilleCity_GameCorner_EventScript_20FC33:: @ 820FC33
checkcoins VAR_TEMP_1
compare VAR_TEMP_1, 9950
goto_if_ge MauvilleCity_GameCorner_EventScript_20FCE1
- checkmoney 0x3e8, 0
+ checkmoney 1000, 0
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1
givecoins 50
- takemoney 0x3e8, 0
+ takemoney 1000, 0
updatemoneybox 0, 0
updatecoinsbox 1, 6
playse SE_REGI
@@ -54,11 +54,11 @@ MauvilleCity_GameCorner_EventScript_20FC75:: @ 820FC75
checkcoins VAR_TEMP_1
compare VAR_TEMP_1, 9500
goto_if_ge MauvilleCity_GameCorner_EventScript_20FCE1
- checkmoney 0x2710, 0
+ checkmoney 10000, 0
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1
givecoins 500
- takemoney 0x2710, 0
+ takemoney 10000, 0
updatemoneybox 0, 0
updatecoinsbox 1, 6
playse SE_REGI
@@ -125,7 +125,7 @@ MauvilleCity_GameCorner_EventScript_20FD20:: @ 820FD20
goto MauvilleCity_GameCorner_EventScript_20FD2B
MauvilleCity_GameCorner_EventScript_20FD2B:: @ 820FD2B
- multichoice 12, 0, 48, 0
+ multichoice 12, 0, MULTI_GAME_CORNER_DOLLS, 0
switch VAR_RESULT
case 0, MauvilleCity_GameCorner_EventScript_20FD67
case 1, MauvilleCity_GameCorner_EventScript_20FD75
@@ -136,17 +136,17 @@ MauvilleCity_GameCorner_EventScript_20FD2B:: @ 820FD2B
MauvilleCity_GameCorner_EventScript_20FD67:: @ 820FD67
setvar VAR_TEMP_1, 1
- bufferdecorationname 0, 88
+ bufferdecorationname 0, DECOR_TREECKO_DOLL
goto MauvilleCity_GameCorner_EventScript_20FD91
MauvilleCity_GameCorner_EventScript_20FD75:: @ 820FD75
setvar VAR_TEMP_1, 2
- bufferdecorationname 0, 89
+ bufferdecorationname 0, DECOR_TORCHIC_DOLL
goto MauvilleCity_GameCorner_EventScript_20FD91
MauvilleCity_GameCorner_EventScript_20FD83:: @ 820FD83
setvar VAR_TEMP_1, 3
- bufferdecorationname 0, 90
+ bufferdecorationname 0, DECOR_MUDKIP_DOLL
goto MauvilleCity_GameCorner_EventScript_20FD91
MauvilleCity_GameCorner_EventScript_20FD91:: @ 820FD91
@@ -163,12 +163,12 @@ MauvilleCity_GameCorner_EventScript_20FDCB:: @ 820FDCB
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 1000
goto_if_lt MauvilleCity_GameCorner_EventScript_20FE79
- bufferdecorationname 1, 88
- checkdecorspace 88
+ bufferdecorationname 1, DECOR_TREECKO_DOLL
+ checkdecorspace DECOR_TREECKO_DOLL
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_20FE87
takecoins 1000
- givedecoration 88
+ givedecoration DECOR_TREECKO_DOLL
updatecoinsbox 1, 1
playse SE_REGI
msgbox MauvilleCity_GameCorner_Text_210646, MSGBOX_DEFAULT
@@ -179,12 +179,12 @@ MauvilleCity_GameCorner_EventScript_20FE05:: @ 820FE05
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 1000
goto_if_lt MauvilleCity_GameCorner_EventScript_20FE79
- bufferdecorationname 1, 89
- checkdecorspace 89
+ bufferdecorationname 1, DECOR_TORCHIC_DOLL
+ checkdecorspace DECOR_TORCHIC_DOLL
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_20FE87
takecoins 1000
- givedecoration 89
+ givedecoration DECOR_TORCHIC_DOLL
updatecoinsbox 1, 1
playse SE_REGI
msgbox MauvilleCity_GameCorner_Text_210646, MSGBOX_DEFAULT
@@ -195,12 +195,12 @@ MauvilleCity_GameCorner_EventScript_20FE3F:: @ 820FE3F
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 1000
goto_if_lt MauvilleCity_GameCorner_EventScript_20FE79
- bufferdecorationname 1, 90
- checkdecorspace 90
+ bufferdecorationname 1, DECOR_MUDKIP_DOLL
+ checkdecorspace DECOR_MUDKIP_DOLL
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_20FE87
takecoins 1000
- givedecoration 90
+ givedecoration DECOR_MUDKIP_DOLL
updatecoinsbox 1, 1
playse SE_REGI
msgbox MauvilleCity_GameCorner_Text_210646, MSGBOX_DEFAULT
@@ -246,7 +246,7 @@ MauvilleCity_GameCorner_EventScript_20FECE:: @ 820FECE
goto MauvilleCity_GameCorner_EventScript_20FED9
MauvilleCity_GameCorner_EventScript_20FED9:: @ 820FED9
- multichoice 12, 0, 55, 0
+ multichoice 12, 0, MULTI_GAME_CORNER_TMS, 0
switch VAR_RESULT
case 0, MauvilleCity_GameCorner_EventScript_20FF2B
case 1, MauvilleCity_GameCorner_EventScript_20FF3E
@@ -288,7 +288,7 @@ MauvilleCity_GameCorner_EventScript_20FF77:: @ 820FF77
goto MauvilleCity_GameCorner_EventScript_20FF8A
MauvilleCity_GameCorner_EventScript_20FF8A:: @ 820FF8A
- special sub_81398C0
+ special BufferTMHMMoveName
msgbox MauvilleCity_GameCorner_Text_210629, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210118
@@ -413,34 +413,34 @@ MauvilleCity_GameCorner_EventScript_210137:: @ 8210137
end
MauvilleCity_GameCorner_EventScript_21017C:: @ 821017C
- bufferdecorationname 1, 88
- checkdecorspace 88
+ bufferdecorationname 1, DECOR_TREECKO_DOLL
+ checkdecorspace DECOR_TREECKO_DOLL
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_2101FA
msgbox MauvilleCity_GameCorner_Text_21079C, MSGBOX_DEFAULT
- givedecoration_std 88
+ givedecoration_std DECOR_TREECKO_DOLL
setflag FLAG_RECEIVED_STARTER_DOLL
goto MauvilleCity_GameCorner_EventScript_210213
end
MauvilleCity_GameCorner_EventScript_2101A6:: @ 82101A6
- bufferdecorationname 1, 89
- checkdecorspace 89
+ bufferdecorationname 1, DECOR_TORCHIC_DOLL
+ checkdecorspace DECOR_TORCHIC_DOLL
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_2101FA
msgbox MauvilleCity_GameCorner_Text_21079C, MSGBOX_DEFAULT
- givedecoration_std 89
+ givedecoration_std DECOR_TORCHIC_DOLL
setflag FLAG_RECEIVED_STARTER_DOLL
goto MauvilleCity_GameCorner_EventScript_210213
end
MauvilleCity_GameCorner_EventScript_2101D0:: @ 82101D0
- bufferdecorationname 1, 90
- checkdecorspace 90
+ bufferdecorationname 1, DECOR_MUDKIP_DOLL
+ checkdecorspace DECOR_MUDKIP_DOLL
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_2101FA
msgbox MauvilleCity_GameCorner_Text_21079C, MSGBOX_DEFAULT
- givedecoration_std 90
+ givedecoration_std DECOR_MUDKIP_DOLL
setflag FLAG_RECEIVED_STARTER_DOLL
goto MauvilleCity_GameCorner_EventScript_210213
end
diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc
index 8dcc74116..903dc8136 100644
--- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc
+++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc
@@ -300,11 +300,11 @@ MossdeepCity_SpaceCenter_2F_EventScript_224071:: @ 8224071
removeobject 8
removeobject 9
setobjectxy 3, 5, 6
- turnobject 3, 1
+ turnobject 3, DIR_SOUTH
setobjectxy 2, 11, 8
- turnobject 2, 2
+ turnobject 2, DIR_NORTH
setobjectxy 1, 6, 2
- turnobject 1, 2
+ turnobject 1, DIR_NORTH
call MossdeepCity_SpaceCenter_2F_EventScript_224131
fadescreen 0
msgbox MossdeepCity_SpaceCenter_2F_Text_224A4A, MSGBOX_DEFAULT
@@ -331,11 +331,11 @@ MossdeepCity_SpaceCenter_2F_EventScript_224131:: @ 8224131
return
MossdeepCity_SpaceCenter_2F_EventScript_22414D:: @ 822414D
- turnobject 4, 2
+ turnobject 4, DIR_NORTH
return
MossdeepCity_SpaceCenter_2F_EventScript_224152:: @ 8224152
- turnobject 4, 4
+ turnobject 4, DIR_EAST
return
MossdeepCity_SpaceCenter_2F_EventScript_224157:: @ 8224157
diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc
index 69b5a01d4..62ddcf9ca 100644
--- a/data/maps/MossdeepCity_StevensHouse/scripts.inc
+++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc
@@ -85,7 +85,7 @@ MossdeepCity_StevensHouse_EventScript_22285B:: @ 822285B
MossdeepCity_StevensHouse_EventScript_222865:: @ 8222865
setvar VAR_TEMP_1, SPECIES_BELDUM
- givemon SPECIES_BELDUM, 5, ITEM_NONE, 0x0, 0x0, 0
+ givemon SPECIES_BELDUM, 5, ITEM_NONE
compare VAR_RESULT, 0
goto_if_eq MossdeepCity_StevensHouse_EventScript_222895
compare VAR_RESULT, 1
diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc
index 717973eba..c646fc1cf 100644
--- a/data/maps/MtChimney/scripts.inc
+++ b/data/maps/MtChimney/scripts.inc
@@ -104,7 +104,7 @@ MtChimney_EventScript_22EEF3:: @ 822EEF3
msgbox MtChimney_Text_22FE04, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq MtChimney_EventScript_22EF69
- checkmoney 0xc8, 0
+ checkmoney 200, 0
compare VAR_RESULT, 0
goto_if_eq MtChimney_EventScript_22EF76
msgbox MtChimney_Text_22FE4D, MSGBOX_DEFAULT
@@ -129,7 +129,7 @@ MtChimney_EventScript_22EF51:: @ 822EF51
end
MtChimney_EventScript_22EF5E:: @ 822EF5E
- takemoney 0xc8, 0
+ takemoney 200, 0
updatemoneybox 0, 0
return
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/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc
index a64c314a5..749ed18f2 100644
--- a/data/maps/PetalburgCity_Gym/scripts.inc
+++ b/data/maps/PetalburgCity_Gym/scripts.inc
@@ -78,7 +78,7 @@ PetalburgCity_Gym_MapScript2_20498B: @ 820498B
.2byte 0
PetalburgCity_Gym_EventScript_204995:: @ 8204995
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
PetalburgCity_Gym_MapScript2_20499A: @ 820499A
@@ -418,7 +418,7 @@ PetalburgCity_Gym_EventScript_204E3B:: @ 8204E3B
setflag FLAG_DEFEATED_PETALBURG_GYM
setvar VAR_PETALBURG_GYM_STATE, 7
setflag FLAG_BADGE05_GET
- special sub_813B9A0
+ special ResetHealLocationFromDewford
call PetalburgCity_Gym_EventScript_2721F8
setflag FLAG_HIDE_MAUVILLE_GYM_WATTSON
clearflag FLAG_HIDE_MAUVILLE_CITY_WATTSON
diff --git a/data/maps/PetalburgCity_WallysHouse/scripts.inc b/data/maps/PetalburgCity_WallysHouse/scripts.inc
index b285b220c..be2a6280e 100644
--- a/data/maps/PetalburgCity_WallysHouse/scripts.inc
+++ b/data/maps/PetalburgCity_WallysHouse/scripts.inc
@@ -8,8 +8,8 @@ PetalburgCity_WallysHouse_MapScript2_204234: @ 8204234
.2byte 0
PetalburgCity_WallysHouse_EventScript_20423E:: @ 820423E
- turnobject EVENT_OBJ_ID_PLAYER, 4
- turnobject 1, 3
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_EAST
+ turnobject 1, DIR_WEST
end
PetalburgCity_WallysHouse_MapScript2_204247: @ 8204247
diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc
index c2877f0d9..b2baff82b 100644
--- a/data/maps/Route104_MrBrineysHouse/scripts.inc
+++ b/data/maps/Route104_MrBrineysHouse/scripts.inc
@@ -41,11 +41,11 @@ Route104_MrBrineysHouse_EventScript_229D8A:: @ 8229D8A
Route104_MrBrineysHouse_EventScript_229DAE:: @ 8229DAE
message Route104_MrBrineysHouse_Text_22A268
waitmessage
- multichoicedefault 20, 8, 14, 1, 0
+ multichoicedefault 20, 8, MULTI_BRINEY_OFF_DEWFORD, 1, 0
switch VAR_RESULT
case 0, Route104_MrBrineysHouse_EventScript_229E27
case 1, Route104_MrBrineysHouse_EventScript_229E1D
- case 127, Route104_MrBrineysHouse_EventScript_229E1D
+ case MULTI_B_PRESSED, Route104_MrBrineysHouse_EventScript_229E1D
end
Route104_MrBrineysHouse_EventScript_229DE1:: @ 8229DE1
diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc
index 6447b49c5..e4c04f0d2 100644
--- a/data/maps/Route109/scripts.inc
+++ b/data/maps/Route109/scripts.inc
@@ -287,11 +287,11 @@ Route109_EventScript_1EE921:: @ 81EE921
Route109_EventScript_1EE93F:: @ 81EE93F
message Route109_Text_1EEE17
waitmessage
- multichoicedefault 21, 8, 14, 1, 0
+ multichoicedefault 21, 8, MULTI_BRINEY_OFF_DEWFORD, 1, 0
switch VAR_RESULT
case 0, Route109_EventScript_1EE972
case 1, Route109_EventScript_1EE98B
- case 127, Route109_EventScript_1EE98B
+ case MULTI_B_PRESSED, Route109_EventScript_1EE98B
end
Route109_EventScript_1EE972:: @ 81EE972
diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc
index 79d021334..d74b6b671 100644
--- a/data/maps/Route109_SeashoreHouse/scripts.inc
+++ b/data/maps/Route109_SeashoreHouse/scripts.inc
@@ -49,14 +49,14 @@ Route109_SeashoreHouse_EventScript_269460:: @ 8269460
end
Route109_SeashoreHouse_EventScript_269484:: @ 8269484
- checkmoney 0x12c, 0
+ checkmoney 300, 0
compare VAR_RESULT, 0
goto_if_eq Route109_SeashoreHouse_EventScript_2694C8
checkitemspace ITEM_SODA_POP, 1
compare VAR_RESULT, 0
goto_if_eq Route109_SeashoreHouse_EventScript_2694D5
msgbox Route109_SeashoreHouse_Text_2697C8, MSGBOX_DEFAULT
- takemoney 0x12c, 0
+ takemoney 300, 0
updatemoneybox 0, 0
giveitem_std ITEM_SODA_POP
hidemoneybox
diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc
index 52a0f19f5..048e64174 100644
--- a/data/maps/Route110_TrickHouseEnd/scripts.inc
+++ b/data/maps/Route110_TrickHouseEnd/scripts.inc
@@ -23,7 +23,7 @@ Route110_TrickHouseEnd_MapScript2_26ACDE: @ 826ACDE
Route110_TrickHouseEnd_EventScript_26ACE8:: @ 826ACE8
addobject 1
showobjectat 1, MAP_ROUTE110_TRICK_HOUSE_END
- turnobject 1, 4
+ turnobject 1, DIR_EAST
end
Route110_TrickHouseEnd_MapScript2_26ACF5: @ 826ACF5
@@ -176,17 +176,17 @@ Route110_TrickHouseEnd_EventScript_26AF28:: @ 826AF28
end
Route110_TrickHouseEnd_EventScript_26AFA5:: @ 826AFA5
- multichoice 0, 0, 88, 1
+ multichoice 0, 0, MULTI_TENT, 1
switch VAR_RESULT
case 0, Route110_TrickHouseEnd_EventScript_26AFBF
goto Route110_TrickHouseEnd_EventScript_26AFC7
Route110_TrickHouseEnd_EventScript_26AFBF:: @ 826AFBF
- givedecoration_std 31
+ givedecoration_std DECOR_RED_TENT
return
Route110_TrickHouseEnd_EventScript_26AFC7:: @ 826AFC7
- givedecoration_std 32
+ givedecoration_std DECOR_BLUE_TENT
return
Route110_TrickHouseEnd_EventScript_26AFCF:: @ 826AFCF
@@ -233,7 +233,7 @@ Route110_TrickHouseEnd_EventScript_26B036:: @ 826B036
Route110_TrickHouseEnd_EventScript_26B041:: @ 826B041
lockall
- turnobject 1, 3
+ turnobject 1, DIR_WEST
playse SE_PIN
applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
@@ -248,7 +248,7 @@ Route110_TrickHouseEnd_EventScript_26B041:: @ 826B041
applymovement EVENT_OBJ_ID_PLAYER, Route110_TrickHouseEnd_Movement_26B089
waitmovement 0
delay 4
- turnobject 1, 4
+ turnobject 1, DIR_EAST
releaseall
end
diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc
index 9c2fc3aec..0e729d333 100644
--- a/data/maps/Route110_TrickHouseEntrance/scripts.inc
+++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc
@@ -132,8 +132,8 @@ Route110_TrickHouseEntrance_MapScript2_269BD3: @ 8269BD3
Route110_TrickHouseEntrance_EventScript_269C15:: @ 8269C15
addobject 1
showobjectat 1, MAP_ROUTE110_TRICK_HOUSE_ENTRANCE
- turnobject 1, 4
- turnobject EVENT_OBJ_ID_PLAYER, 3
+ turnobject 1, DIR_EAST
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_WEST
end
Route110_TrickHouseEntrance_EventScript_269C26:: @ 8269C26
@@ -189,13 +189,13 @@ Route110_TrickHouseEntrance_EventScript_269CCC:: @ 8269CCC
Route110_TrickHouseEntrance_EventScript_269CD0:: @ 8269CD0
addobject 1
setobjectxy 1, 5, 2
- turnobject 1, 2
+ turnobject 1, DIR_NORTH
end
Route110_TrickHouseEntrance_EventScript_269CDF:: @ 8269CDF
addobject 1
setobjectxy 1, 5, 2
- turnobject 1, 1
+ turnobject 1, DIR_SOUTH
end
Route110_TrickHouseEntrance_MapScript2_269CEE: @ 8269CEE
@@ -451,17 +451,17 @@ Route110_TrickHouseEntrance_EventScript_26A039:: @ 826A039
end
Route110_TrickHouseEntrance_EventScript_26A070:: @ 826A070
- multichoice 0, 0, 88, 1
+ multichoice 0, 0, MULTI_TENT, 1
switch VAR_RESULT
case 0, Route110_TrickHouseEntrance_EventScript_26A08A
goto Route110_TrickHouseEntrance_EventScript_26A092
Route110_TrickHouseEntrance_EventScript_26A08A:: @ 826A08A
- givedecoration_std 31
+ givedecoration_std DECOR_RED_TENT
return
Route110_TrickHouseEntrance_EventScript_26A092:: @ 826A092
- givedecoration_std 32
+ givedecoration_std DECOR_BLUE_TENT
return
Route110_TrickHouseEntrance_EventScript_26A09A:: @ 826A09A
diff --git a/data/maps/Route110_TrickHousePuzzle5/scripts.inc b/data/maps/Route110_TrickHousePuzzle5/scripts.inc
index 9ae8dc759..b678840b6 100644
--- a/data/maps/Route110_TrickHousePuzzle5/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle5/scripts.inc
@@ -327,7 +327,7 @@ Route110_TrickHousePuzzle5_EventScript_26CEF2:: @ 826CEF2
Route110_TrickHousePuzzle5_EventScript_26CF45:: @ 826CF45
msgbox Route110_TrickHousePuzzle5_Text_26D757, MSGBOX_DEFAULT
- multichoice 0, 0, 25, 1
+ multichoice 0, 0, MULTI_MECHADOLL1_Q1, 1
switch VAR_RESULT
case 2, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -335,7 +335,7 @@ Route110_TrickHousePuzzle5_EventScript_26CF45:: @ 826CF45
Route110_TrickHousePuzzle5_EventScript_26CF68:: @ 826CF68
msgbox Route110_TrickHousePuzzle5_Text_26D7AA, MSGBOX_DEFAULT
- multichoice 0, 0, 26, 1
+ multichoice 0, 0, MULTI_MECHADOLL1_Q2, 1
switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -343,7 +343,7 @@ Route110_TrickHousePuzzle5_EventScript_26CF68:: @ 826CF68
Route110_TrickHousePuzzle5_EventScript_26CF8B:: @ 826CF8B
msgbox Route110_TrickHousePuzzle5_Text_26D7FC, MSGBOX_DEFAULT
- multichoice 0, 0, 27, 1
+ multichoice 0, 0, MULTI_MECHADOLL1_Q3, 1
switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -351,7 +351,7 @@ Route110_TrickHousePuzzle5_EventScript_26CF8B:: @ 826CF8B
Route110_TrickHousePuzzle5_EventScript_26CFAE:: @ 826CFAE
msgbox Route110_TrickHousePuzzle5_Text_26D940, MSGBOX_DEFAULT
- multichoice 0, 0, 28, 1
+ multichoice 0, 0, MULTI_MECHADOLL2_Q1, 1
switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -359,7 +359,7 @@ Route110_TrickHousePuzzle5_EventScript_26CFAE:: @ 826CFAE
Route110_TrickHousePuzzle5_EventScript_26CFD1:: @ 826CFD1
msgbox Route110_TrickHousePuzzle5_Text_26D98C, MSGBOX_DEFAULT
- multichoice 0, 0, 29, 1
+ multichoice 0, 0, MULTI_MECHADOLL2_Q2, 1
switch VAR_RESULT
case 2, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -367,7 +367,7 @@ Route110_TrickHousePuzzle5_EventScript_26CFD1:: @ 826CFD1
Route110_TrickHousePuzzle5_EventScript_26CFF4:: @ 826CFF4
msgbox Route110_TrickHousePuzzle5_Text_26D9CE, MSGBOX_DEFAULT
- multichoice 0, 0, 30, 1
+ multichoice 0, 0, MULTI_MECHADOLL2_Q3, 1
switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -375,7 +375,7 @@ Route110_TrickHousePuzzle5_EventScript_26CFF4:: @ 826CFF4
Route110_TrickHousePuzzle5_EventScript_26D017:: @ 826D017
msgbox Route110_TrickHousePuzzle5_Text_26DA64, MSGBOX_DEFAULT
- multichoice 0, 0, 31, 1
+ multichoice 0, 0, MULTI_MECHADOLL3_Q1, 1
switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -383,7 +383,7 @@ Route110_TrickHousePuzzle5_EventScript_26D017:: @ 826D017
Route110_TrickHousePuzzle5_EventScript_26D03A:: @ 826D03A
msgbox Route110_TrickHousePuzzle5_Text_26DAAD, MSGBOX_DEFAULT
- multichoice 0, 0, 32, 1
+ multichoice 0, 0, MULTI_MECHADOLL3_Q2, 1
switch VAR_RESULT
case 2, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -391,7 +391,7 @@ Route110_TrickHousePuzzle5_EventScript_26D03A:: @ 826D03A
Route110_TrickHousePuzzle5_EventScript_26D05D:: @ 826D05D
msgbox Route110_TrickHousePuzzle5_Text_26DAFF, MSGBOX_DEFAULT
- multichoice 0, 0, 33, 1
+ multichoice 0, 0, MULTI_MECHADOLL3_Q3, 1
switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -399,7 +399,7 @@ Route110_TrickHousePuzzle5_EventScript_26D05D:: @ 826D05D
Route110_TrickHousePuzzle5_EventScript_26D080:: @ 826D080
msgbox Route110_TrickHousePuzzle5_Text_26DB94, MSGBOX_DEFAULT
- multichoice 0, 0, 34, 1
+ multichoice 0, 0, MULTI_MECHADOLL4_Q1, 1
switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -407,7 +407,7 @@ Route110_TrickHousePuzzle5_EventScript_26D080:: @ 826D080
Route110_TrickHousePuzzle5_EventScript_26D0A3:: @ 826D0A3
msgbox Route110_TrickHousePuzzle5_Text_26DBD7, MSGBOX_DEFAULT
- multichoice 0, 0, 35, 1
+ multichoice 0, 0, MULTI_MECHADOLL4_Q2, 1
switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -415,7 +415,7 @@ Route110_TrickHousePuzzle5_EventScript_26D0A3:: @ 826D0A3
Route110_TrickHousePuzzle5_EventScript_26D0C6:: @ 826D0C6
msgbox Route110_TrickHousePuzzle5_Text_26DC2A, MSGBOX_DEFAULT
- multichoice 0, 0, 36, 1
+ multichoice 0, 0, MULTI_MECHADOLL4_Q3, 1
switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -423,7 +423,7 @@ Route110_TrickHousePuzzle5_EventScript_26D0C6:: @ 826D0C6
Route110_TrickHousePuzzle5_EventScript_26D0E9:: @ 826D0E9
msgbox Route110_TrickHousePuzzle5_Text_26DCCB, MSGBOX_DEFAULT
- multichoice 0, 0, 37, 1
+ multichoice 0, 0, MULTI_MECHADOLL5_Q1, 1
switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -431,7 +431,7 @@ Route110_TrickHousePuzzle5_EventScript_26D0E9:: @ 826D0E9
Route110_TrickHousePuzzle5_EventScript_26D10C:: @ 826D10C
msgbox Route110_TrickHousePuzzle5_Text_26DD1B, MSGBOX_DEFAULT
- multichoice 0, 0, 38, 1
+ multichoice 0, 0, MULTI_MECHADOLL5_Q2, 1
switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
@@ -439,7 +439,7 @@ Route110_TrickHousePuzzle5_EventScript_26D10C:: @ 826D10C
Route110_TrickHousePuzzle5_EventScript_26D12F:: @ 826D12F
msgbox Route110_TrickHousePuzzle5_Text_26DD5F, MSGBOX_DEFAULT
- multichoice 0, 0, 39, 1
+ multichoice 0, 0, MULTI_MECHADOLL5_Q3, 1
switch VAR_RESULT
case 2, Route110_TrickHousePuzzle5_EventScript_26D1A0
goto Route110_TrickHousePuzzle5_EventScript_26D152
diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc
index c913d7e6e..6e820d426 100644
--- a/data/maps/Route111/scripts.inc
+++ b/data/maps/Route111/scripts.inc
@@ -128,7 +128,7 @@ Route111_EventScript_1F0E60:: @ 81F0E60
showobjectat EVENT_OBJ_ID_PLAYER, MAP_LITTLEROOT_TOWN
removeobject 45
delay 16
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
delay 16
special StartMirageTowerDisintegration
waitstate
diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc
index b685389d9..22acd676d 100644
--- a/data/maps/Route113_GlassWorkshop/scripts.inc
+++ b/data/maps/Route113_GlassWorkshop/scripts.inc
@@ -52,8 +52,8 @@ Route113_GlassWorkshop_EventScript_26ED9D:: @ 826ED9D
Route113_GlassWorkshop_EventScript_26EDA7:: @ 826EDA7
setvar VAR_0x8009, 0
- setvar VAR_0x8004, 1
- special sub_813A128
+ setvar VAR_0x8004, SCROLL_MULTI_GLASS_WORKSHOP_VENDOR
+ special ShowScrollableMultichoice
waitstate
switch VAR_RESULT
case 0, Route113_GlassWorkshop_EventScript_26EE1E
@@ -64,11 +64,11 @@ Route113_GlassWorkshop_EventScript_26EDA7:: @ 826EDA7
case 5, Route113_GlassWorkshop_EventScript_26EF4A
case 6, Route113_GlassWorkshop_EventScript_26EF8B
case 7, Route113_GlassWorkshop_EventScript_26EFCC
- case 127, Route113_GlassWorkshop_EventScript_26EFCC
+ case MULTI_B_PRESSED, Route113_GlassWorkshop_EventScript_26EFCC
end
Route113_GlassWorkshop_EventScript_26EE1E:: @ 826EE1E
- setvar VAR_0x8008, 39
+ setvar VAR_0x8008, ITEM_BLUE_FLUTE
bufferitemname 0, VAR_0x8008
setvar VAR_0x800A, 250
compare VAR_ASH_GATHER_COUNT, 250
@@ -82,7 +82,7 @@ Route113_GlassWorkshop_EventScript_26EE1E:: @ 826EE1E
end
Route113_GlassWorkshop_EventScript_26EE5A:: @ 826EE5A
- setvar VAR_0x8008, 40
+ setvar VAR_0x8008, ITEM_YELLOW_FLUTE
bufferitemname 0, VAR_0x8008
setvar VAR_0x800A, 500
compare VAR_ASH_GATHER_COUNT, 500
@@ -96,7 +96,7 @@ Route113_GlassWorkshop_EventScript_26EE5A:: @ 826EE5A
end
Route113_GlassWorkshop_EventScript_26EE96:: @ 826EE96
- setvar VAR_0x8008, 41
+ setvar VAR_0x8008, ITEM_RED_FLUTE
bufferitemname 0, VAR_0x8008
setvar VAR_0x800A, 500
compare VAR_ASH_GATHER_COUNT, 500
@@ -110,7 +110,7 @@ Route113_GlassWorkshop_EventScript_26EE96:: @ 826EE96
end
Route113_GlassWorkshop_EventScript_26EED2:: @ 826EED2
- setvar VAR_0x8008, 43
+ setvar VAR_0x8008, ITEM_WHITE_FLUTE
bufferitemname 0, VAR_0x8008
setvar VAR_0x800A, 1000
compare VAR_ASH_GATHER_COUNT, 1000
@@ -124,7 +124,7 @@ Route113_GlassWorkshop_EventScript_26EED2:: @ 826EED2
end
Route113_GlassWorkshop_EventScript_26EF0E:: @ 826EF0E
- setvar VAR_0x8008, 42
+ setvar VAR_0x8008, ITEM_BLACK_FLUTE
bufferitemname 0, VAR_0x8008
setvar VAR_0x800A, 1000
compare VAR_ASH_GATHER_COUNT, 1000
@@ -139,7 +139,7 @@ Route113_GlassWorkshop_EventScript_26EF0E:: @ 826EF0E
Route113_GlassWorkshop_EventScript_26EF4A:: @ 826EF4A
setvar VAR_0x8009, 1
- setvar VAR_0x8008, 13
+ setvar VAR_0x8008, DECOR_PRETTY_CHAIR
bufferdecorationname 0, VAR_0x8008
setvar VAR_0x800A, 6000
compare VAR_ASH_GATHER_COUNT, 6000
@@ -154,7 +154,7 @@ Route113_GlassWorkshop_EventScript_26EF4A:: @ 826EF4A
Route113_GlassWorkshop_EventScript_26EF8B:: @ 826EF8B
setvar VAR_0x8009, 1
- setvar VAR_0x8008, 6
+ setvar VAR_0x8008, DECOR_PRETTY_DESK
bufferdecorationname 0, VAR_0x8008
setvar VAR_0x800A, 8000
compare VAR_ASH_GATHER_COUNT, 8000
@@ -174,14 +174,14 @@ Route113_GlassWorkshop_EventScript_26EFCC:: @ 826EFCC
Route113_GlassWorkshop_EventScript_26EFD6:: @ 826EFD6
setvar VAR_0x800A, 250
- subvar VAR_0x800A, 16456
+ subvar VAR_0x800A, VAR_ASH_GATHER_COUNT
buffernumberstring 0, VAR_0x800A
msgbox Route113_GlassWorkshop_Text_26F34E, MSGBOX_DEFAULT
release
end
Route113_GlassWorkshop_EventScript_26EFEE:: @ 826EFEE
- subvar VAR_0x800A, 16456
+ subvar VAR_0x800A, VAR_ASH_GATHER_COUNT
buffernumberstring 1, VAR_0x800A
message Route113_GlassWorkshop_Text_26F543
waitmessage
@@ -247,50 +247,50 @@ Route113_GlassWorkshop_EventScript_26F090:: @ 826F090
Route113_GlassWorkshop_EventScript_26F0E3:: @ 826F0E3
setvar VAR_0x8009, 0
- setvar VAR_0x8008, 39
+ setvar VAR_0x8008, ITEM_BLUE_FLUTE
bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_26F16F
end
Route113_GlassWorkshop_EventScript_26F0F7:: @ 826F0F7
setvar VAR_0x8009, 0
- setvar VAR_0x8008, 40
+ setvar VAR_0x8008, ITEM_YELLOW_FLUTE
bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_26F16F
end
Route113_GlassWorkshop_EventScript_26F10B:: @ 826F10B
setvar VAR_0x8009, 0
- setvar VAR_0x8008, 41
+ setvar VAR_0x8008, ITEM_RED_FLUTE
bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_26F16F
end
Route113_GlassWorkshop_EventScript_26F11F:: @ 826F11F
setvar VAR_0x8009, 0
- setvar VAR_0x8008, 43
+ setvar VAR_0x8008, ITEM_WHITE_FLUTE
bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_26F16F
end
Route113_GlassWorkshop_EventScript_26F133:: @ 826F133
setvar VAR_0x8009, 0
- setvar VAR_0x8008, 42
+ setvar VAR_0x8008, ITEM_BLACK_FLUTE
bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_26F16F
end
Route113_GlassWorkshop_EventScript_26F147:: @ 826F147
setvar VAR_0x8009, 1
- setvar VAR_0x8008, 13
- bufferdecorationname 0, 13
+ setvar VAR_0x8008, DECOR_PRETTY_CHAIR
+ bufferdecorationname 0, DECOR_PRETTY_CHAIR
goto Route113_GlassWorkshop_EventScript_26F16F
end
Route113_GlassWorkshop_EventScript_26F15B:: @ 826F15B
setvar VAR_0x8009, 1
- setvar VAR_0x8008, 6
- bufferdecorationname 0, 6
+ setvar VAR_0x8008, DECOR_PRETTY_DESK
+ bufferdecorationname 0, DECOR_PRETTY_DESK
goto Route113_GlassWorkshop_EventScript_26F16F
end
diff --git a/data/maps/Route114/scripts.inc b/data/maps/Route114/scripts.inc
index 925f693fa..faa79b861 100644
--- a/data/maps/Route114/scripts.inc
+++ b/data/maps/Route114/scripts.inc
@@ -32,7 +32,7 @@ Route114_EventScript_1F2582:: @ 81F2582
msgbox Route114_Text_2A6FCB, MSGBOX_DEFAULT
random 5
addvar VAR_RESULT, 15
- addvar VAR_RESULT, 133
+ addvar VAR_RESULT, FIRST_BERRY_INDEX
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
diff --git a/data/maps/Route114_LanettesHouse/scripts.inc b/data/maps/Route114_LanettesHouse/scripts.inc
index e24f6ce65..85b22724b 100644
--- a/data/maps/Route114_LanettesHouse/scripts.inc
+++ b/data/maps/Route114_LanettesHouse/scripts.inc
@@ -12,7 +12,7 @@ Route114_LanettesHouse_EventScript_22B2D2:: @ 822B2D2
goto_if_set FLAG_RECEIVED_DOLL_LANETTE, Route114_LanettesHouse_EventScript_22B2FF
setflag FLAG_SYS_PC_LANETTE
msgbox Route114_LanettesHouse_Text_22B34E, MSGBOX_DEFAULT
- givedecoration_std 99
+ givedecoration_std DECOR_LOTAD_DOLL
compare VAR_RESULT, 0
goto_if_eq Route114_LanettesHouse_EventScript_272067
setflag FLAG_RECEIVED_DOLL_LANETTE
diff --git a/data/maps/Route117/map.json b/data/maps/Route117/map.json
index b29b58639..12420784c 100644
--- a/data/maps/Route117/map.json
+++ b/data/maps/Route117/map.json
@@ -61,7 +61,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "Route117_EventScript_291C18",
+ "script": "Route117_EventScript_DaycareMan",
"flag": "0"
},
{
diff --git a/data/maps/Route117_PokemonDayCare/map.json b/data/maps/Route117_PokemonDayCare/map.json
index c233701e5..9cb052633 100644
--- a/data/maps/Route117_PokemonDayCare/map.json
+++ b/data/maps/Route117_PokemonDayCare/map.json
@@ -24,7 +24,7 @@
"movement_range_y": 0,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
- "script": "Route117_PokemonDayCare_EventScript_291D11",
+ "script": "Route117_PokemonDayCare_EventScript_DaycareWoman",
"flag": "0"
}
],
diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc
index 9257b3a64..c15673dad 100644
--- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc
+++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc
@@ -84,7 +84,7 @@ Route119_WeatherInstitute_2F_EventScript_26FFC8:: @ 826FFC8
Route119_WeatherInstitute_2F_EventScript_27004D:: @ 827004D
msgbox Route119_WeatherInstitute_2F_Text_270650, MSGBOX_DEFAULT
setvar VAR_TEMP_1, SPECIES_CASTFORM
- givemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER, 0x0, 0x0, 0
+ givemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER
compare VAR_RESULT, 0
goto_if_eq Route119_WeatherInstitute_2F_EventScript_270085
compare VAR_RESULT, 1
diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc
index fdd302fdb..23f9c13e0 100644
--- a/data/maps/Route120/scripts.inc
+++ b/data/maps/Route120/scripts.inc
@@ -120,27 +120,27 @@ Route120_EventScript_1F5527:: @ 81F5527
end
Route120_EventScript_1F55CA:: @ 81F55CA
- setvar VAR_0x8004, 143
+ setvar VAR_0x8004, ITEM_FIGY_BERRY
goto Route120_EventScript_1F5601
end
Route120_EventScript_1F55D5:: @ 81F55D5
- setvar VAR_0x8004, 144
+ setvar VAR_0x8004, ITEM_WIKI_BERRY
goto Route120_EventScript_1F5601
end
Route120_EventScript_1F55E0:: @ 81F55E0
- setvar VAR_0x8004, 145
+ setvar VAR_0x8004, ITEM_MAGO_BERRY
goto Route120_EventScript_1F5601
end
Route120_EventScript_1F55EB:: @ 81F55EB
- setvar VAR_0x8004, 146
+ setvar VAR_0x8004, ITEM_AGUAV_BERRY
goto Route120_EventScript_1F5601
end
Route120_EventScript_1F55F6:: @ 81F55F6
- setvar VAR_0x8004, 147
+ setvar VAR_0x8004, ITEM_IAPAPA_BERRY
goto Route120_EventScript_1F5601
end
diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc
index 85b6c6c36..d0c950cf5 100644
--- a/data/maps/Route121_SafariZoneEntrance/scripts.inc
+++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc
@@ -61,12 +61,12 @@ Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48
compare VAR_RESULT, 0
goto_if_eq Route121_SafariZoneEntrance_EventScript_22BCEA
call Route121_SafariZoneEntrance_EventScript_22BCBF
- checkmoney 0x1f4, 0
+ checkmoney 500, 0
compare VAR_RESULT, 0
goto_if_eq Route121_SafariZoneEntrance_EventScript_22BCF8
playse SE_REGI
msgbox Route121_SafariZoneEntrance_Text_2A501B, MSGBOX_DEFAULT
- takemoney 0x1f4, 0
+ takemoney 500, 0
updatemoneybox 0, 0
msgbox Route121_SafariZoneEntrance_Text_2A5036, MSGBOX_DEFAULT
playfanfare MUS_FANFA4
diff --git a/data/maps/Route123_BerryMastersHouse/scripts.inc b/data/maps/Route123_BerryMastersHouse/scripts.inc
index 939cfed80..979509440 100644
--- a/data/maps/Route123_BerryMastersHouse/scripts.inc
+++ b/data/maps/Route123_BerryMastersHouse/scripts.inc
@@ -14,7 +14,7 @@ Route123_BerryMastersHouse_EventScript_26F845:: @ 826F845
msgbox Route123_BerryMastersHouse_Text_2A7386, MSGBOX_DEFAULT
random 10
addvar VAR_RESULT, 20
- addvar VAR_RESULT, 133
+ addvar VAR_RESULT, FIRST_BERRY_INDEX
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
@@ -22,7 +22,7 @@ Route123_BerryMastersHouse_EventScript_26F845:: @ 826F845
msgbox Route123_BerryMastersHouse_Text_2A7428, MSGBOX_DEFAULT
random 10
addvar VAR_RESULT, 20
- addvar VAR_RESULT, 133
+ addvar VAR_RESULT, FIRST_BERRY_INDEX
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
@@ -75,7 +75,7 @@ Route123_BerryMastersHouse_EventScript_26F909:: @ 826F909
Route123_BerryMastersHouse_EventScript_26F94C:: @ 826F94C
msgbox Route123_BerryMastersHouse_Text_2A75D0, MSGBOX_DEFAULT
random 10
- addvar VAR_RESULT, 133
+ addvar VAR_RESULT, FIRST_BERRY_INDEX
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
index e1fb3d6f8..0fa59783d 100644
--- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
+++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
@@ -86,7 +86,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270ADE:: @ 8270ADE
end
Route124_DivingTreasureHuntersHouse_EventScript_270B8F:: @ 8270B8F
- multichoice 0, 0, 58, 0
+ multichoice 0, 0, MULTI_SHARDS_R, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270F4D
@@ -94,7 +94,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270B8F:: @ 8270B8F
end
Route124_DivingTreasureHuntersHouse_EventScript_270BB5:: @ 8270BB5
- multichoice 0, 0, 59, 0
+ multichoice 0, 0, MULTI_SHARDS_Y, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E93
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270F4D
@@ -102,7 +102,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270BB5:: @ 8270BB5
end
Route124_DivingTreasureHuntersHouse_EventScript_270BDB:: @ 8270BDB
- multichoice 0, 0, 60, 0
+ multichoice 0, 0, MULTI_SHARDS_RY, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270E93
@@ -111,7 +111,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270BDB:: @ 8270BDB
end
Route124_DivingTreasureHuntersHouse_EventScript_270C0C:: @ 8270C0C
- multichoice 0, 0, 61, 0
+ multichoice 0, 0, MULTI_SHARDS_B, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270EA2
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270F4D
@@ -119,7 +119,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270C0C:: @ 8270C0C
end
Route124_DivingTreasureHuntersHouse_EventScript_270C32:: @ 8270C32
- multichoice 0, 0, 62, 0
+ multichoice 0, 0, MULTI_SHARDS_RB, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EA2
@@ -128,7 +128,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270C32:: @ 8270C32
end
Route124_DivingTreasureHuntersHouse_EventScript_270C63:: @ 8270C63
- multichoice 0, 0, 63, 0
+ multichoice 0, 0, MULTI_SHARDS_YB, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E93
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EA2
@@ -137,7 +137,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270C63:: @ 8270C63
end
Route124_DivingTreasureHuntersHouse_EventScript_270C94:: @ 8270C94
- multichoice 0, 0, 64, 0
+ multichoice 0, 0, MULTI_SHARDS_RYB, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270E93
@@ -147,7 +147,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270C94:: @ 8270C94
end
Route124_DivingTreasureHuntersHouse_EventScript_270CD0:: @ 8270CD0
- multichoice 0, 0, 65, 0
+ multichoice 0, 0, MULTI_SHARDS_G, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270EB1
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270F4D
@@ -155,7 +155,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270CD0:: @ 8270CD0
end
Route124_DivingTreasureHuntersHouse_EventScript_270CF6:: @ 8270CF6
- multichoice 0, 0, 66, 0
+ multichoice 0, 0, MULTI_SHARDS_RG, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EB1
@@ -164,7 +164,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270CF6:: @ 8270CF6
end
Route124_DivingTreasureHuntersHouse_EventScript_270D27:: @ 8270D27
- multichoice 0, 0, 67, 0
+ multichoice 0, 0, MULTI_SHARDS_YG, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E93
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EB1
@@ -173,7 +173,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270D27:: @ 8270D27
end
Route124_DivingTreasureHuntersHouse_EventScript_270D58:: @ 8270D58
- multichoice 0, 0, 68, 0
+ multichoice 0, 0, MULTI_SHARDS_RYG, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270E93
@@ -183,7 +183,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270D58:: @ 8270D58
end
Route124_DivingTreasureHuntersHouse_EventScript_270D94:: @ 8270D94
- multichoice 0, 0, 69, 0
+ multichoice 0, 0, MULTI_SHARDS_BG, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270EA2
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EB1
@@ -192,7 +192,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270D94:: @ 8270D94
end
Route124_DivingTreasureHuntersHouse_EventScript_270DC5:: @ 8270DC5
- multichoice 0, 0, 70, 0
+ multichoice 0, 0, MULTI_SHARDS_RBG, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EA2
@@ -202,7 +202,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270DC5:: @ 8270DC5
end
Route124_DivingTreasureHuntersHouse_EventScript_270E01:: @ 8270E01
- multichoice 0, 0, 71, 0
+ multichoice 0, 0, MULTI_SHARDS_YBG, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E93
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270EA2
@@ -212,7 +212,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_270E01:: @ 8270E01
end
Route124_DivingTreasureHuntersHouse_EventScript_270E3D:: @ 8270E3D
- multichoice 0, 0, 72, 0
+ multichoice 0, 0, MULTI_SHARDS_RYBG, 0
switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_270E84
case 1, Route124_DivingTreasureHuntersHouse_EventScript_270E93
@@ -223,23 +223,23 @@ Route124_DivingTreasureHuntersHouse_EventScript_270E3D:: @ 8270E3D
end
Route124_DivingTreasureHuntersHouse_EventScript_270E84:: @ 8270E84
- setvar VAR_0x8008, 48
- setvar VAR_0x8009, 95
+ setvar VAR_0x8008, ITEM_RED_SHARD
+ setvar VAR_0x8009, ITEM_FIRE_STONE
goto Route124_DivingTreasureHuntersHouse_EventScript_270EC0
Route124_DivingTreasureHuntersHouse_EventScript_270E93:: @ 8270E93
- setvar VAR_0x8008, 50
- setvar VAR_0x8009, 96
+ setvar VAR_0x8008, ITEM_YELLOW_SHARD
+ setvar VAR_0x8009, ITEM_THUNDER_STONE
goto Route124_DivingTreasureHuntersHouse_EventScript_270EC0
Route124_DivingTreasureHuntersHouse_EventScript_270EA2:: @ 8270EA2
- setvar VAR_0x8008, 49
- setvar VAR_0x8009, 97
+ setvar VAR_0x8008, ITEM_BLUE_SHARD
+ setvar VAR_0x8009, ITEM_WATER_STONE
goto Route124_DivingTreasureHuntersHouse_EventScript_270EC0
Route124_DivingTreasureHuntersHouse_EventScript_270EB1:: @ 8270EB1
- setvar VAR_0x8008, 51
- setvar VAR_0x8009, 98
+ setvar VAR_0x8008, ITEM_GREEN_SHARD
+ setvar VAR_0x8009, ITEM_LEAF_STONE
goto Route124_DivingTreasureHuntersHouse_EventScript_270EC0
Route124_DivingTreasureHuntersHouse_EventScript_270EC0:: @ 8270EC0
diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc
index 22177c783..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 sp106_CreateStartMenu
+ special ScriptMenu_CreateStartMenuForPokenavTutorial
waitstate
switch VAR_RESULT
case 0, RustboroCity_EventScript_1E07AC
@@ -88,7 +88,7 @@ RustboroCity_EventScript_1E07BD:: @ 81E07BD
case 5, RustboroCity_EventScript_1E07AC
case 6, RustboroCity_EventScript_1E07AC
case 7, RustboroCity_EventScript_1E07AC
- case 127, RustboroCity_EventScript_1E07AC
+ case MULTI_B_PRESSED, RustboroCity_EventScript_1E07AC
special sub_81C72A4
waitstate
delay 20
diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
index e5ac226c5..f920bda55 100644
--- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
+++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
@@ -157,7 +157,7 @@ RustboroCity_DevonCorp_2F_EventScript_211A2C:: @ 8211A2C
RustboroCity_DevonCorp_2F_EventScript_211A3E:: @ 8211A3E
setvar VAR_TEMP_1, SPECIES_LILEEP
- givemon SPECIES_LILEEP, 20, ITEM_NONE, 0x0, 0x0, 0
+ givemon SPECIES_LILEEP, 20, ITEM_NONE
compare VAR_RESULT, 0
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211A6E
compare VAR_RESULT, 1
@@ -206,7 +206,7 @@ RustboroCity_DevonCorp_2F_EventScript_211AD7:: @ 8211AD7
RustboroCity_DevonCorp_2F_EventScript_211AE1:: @ 8211AE1
setvar VAR_TEMP_1, SPECIES_ANORITH
- givemon SPECIES_ANORITH, 20, ITEM_NONE, 0x0, 0x0, 0
+ givemon SPECIES_ANORITH, 20, ITEM_NONE
compare VAR_RESULT, 0
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211B11
compare VAR_RESULT, 1
@@ -256,12 +256,12 @@ RustboroCity_DevonCorp_2F_EventScript_211B7A:: @ 8211B7A
RustboroCity_DevonCorp_2F_EventScript_211B84:: @ 8211B84
message RustboroCity_DevonCorp_2F_Text_212092
waitmessage
- multichoice 17, 6, 93, 0
+ multichoice 17, 6, MULTI_FOSSIL, 0
switch VAR_RESULT
case 0, RustboroCity_DevonCorp_2F_EventScript_211BC1
case 1, RustboroCity_DevonCorp_2F_EventScript_211BC7
case 2, RustboroCity_DevonCorp_2F_EventScript_211BCD
- case 127, RustboroCity_DevonCorp_2F_EventScript_211BCD
+ case MULTI_B_PRESSED, RustboroCity_DevonCorp_2F_EventScript_211BCD
end
RustboroCity_DevonCorp_2F_EventScript_211BC1:: @ 8211BC1
diff --git a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc
index 6b83e195c..3ce08c9f1 100644
--- a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc
+++ b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc
@@ -19,7 +19,7 @@ RustboroCity_DevonCorp_3F_MapScript2_212455: @ 8212455
.2byte 0
RustboroCity_DevonCorp_3F_EventScript_21245F:: @ 821245F
- turnobject EVENT_OBJ_ID_PLAYER, 4
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_EAST
end
RustboroCity_DevonCorp_3F_MapScript2_212464: @ 8212464
diff --git a/data/maps/RustboroCity_Flat1_2F/scripts.inc b/data/maps/RustboroCity_Flat1_2F/scripts.inc
index ec59115ef..e5b6c493a 100644
--- a/data/maps/RustboroCity_Flat1_2F/scripts.inc
+++ b/data/maps/RustboroCity_Flat1_2F/scripts.inc
@@ -73,7 +73,7 @@ RustboroCity_Flat1_2F_EventScript_215221:: @ 8215221
end
RustboroCity_Flat1_2F_EventScript_215238:: @ 8215238
- turnobject 6, 4
+ turnobject 6, DIR_EAST
return
RustboroCity_Flat1_2F_EventScript_21523D:: @ 821523D
diff --git a/data/maps/RustboroCity_PokemonSchool/scripts.inc b/data/maps/RustboroCity_PokemonSchool/scripts.inc
index ff52ee5ac..4d0abc9c3 100644
--- a/data/maps/RustboroCity_PokemonSchool/scripts.inc
+++ b/data/maps/RustboroCity_PokemonSchool/scripts.inc
@@ -10,7 +10,7 @@ RustboroCity_PokemonSchool_EventScript_213EA9:: @ 8213EA9
RustboroCity_PokemonSchool_EventScript_213EB8:: @ 8213EB8
message RustboroCity_PokemonSchool_Text_2140F9
waitmessage
- multichoicegrid 8, 1, 13, 3, 0
+ multichoicegrid 8, 1, MULTI_STATUS_INFO, 3, 0
switch VAR_RESULT
case 0, RustboroCity_PokemonSchool_EventScript_213F17
case 1, RustboroCity_PokemonSchool_EventScript_213F25
@@ -18,7 +18,7 @@ RustboroCity_PokemonSchool_EventScript_213EB8:: @ 8213EB8
case 3, RustboroCity_PokemonSchool_EventScript_213F41
case 4, RustboroCity_PokemonSchool_EventScript_213F4F
case 5, RustboroCity_PokemonSchool_EventScript_213F5D
- case 127, RustboroCity_PokemonSchool_EventScript_213F5D
+ case MULTI_B_PRESSED, RustboroCity_PokemonSchool_EventScript_213F5D
end
RustboroCity_PokemonSchool_EventScript_213F17:: @ 8213F17
diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc
index 0e9b4c3a1..1dae8c867 100644
--- a/data/maps/SkyPillar_Top/scripts.inc
+++ b/data/maps/SkyPillar_Top/scripts.inc
@@ -40,7 +40,7 @@ SkyPillar_Top_MapScript2_239713: @ 8239713
.2byte 0
SkyPillar_Top_EventScript_23971D:: @ 823971D
- turnobject 1, 1
+ turnobject 1, DIR_SOUTH
end
SkyPillar_Top_EventScript_239722:: @ 8239722
@@ -71,7 +71,7 @@ SkyPillar_Top_EventScript_239768:: @ 8239768
end
SkyPillar_Top_EventScript_239771:: @ 8239771
- setvar VAR_0x8004, 406
+ setvar VAR_0x8004, SPECIES_RAYQUAZA
goto SkyPillar_Top_EventScript_239785
end
diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc
index a1ddb122d..d245cdff4 100644
--- a/data/maps/SlateportCity/scripts.inc
+++ b/data/maps/SlateportCity/scripts.inc
@@ -748,8 +748,8 @@ SlateportCity_EventScript_1DD3C0:: @ 81DD3C0
SlateportCity_EventScript_1DD3CA:: @ 81DD3CA
message SlateportCity_Text_1DEE67
waitmessage
- setvar VAR_0x8004, 7
- special sub_813A128
+ setvar VAR_0x8004, SCROLL_MULTI_BERRY_POWDER_VENDOR
+ special ShowScrollableMultichoice
waitstate
switch VAR_RESULT
case 0, SlateportCity_EventScript_1DD46E
@@ -764,82 +764,82 @@ 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
bufferitemname 0, ITEM_ENERGY_POWDER
- setvar VAR_0x8008, 30
+ setvar VAR_0x8008, ITEM_ENERGY_POWDER
setvar VAR_0x8009, 50
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD482:: @ 81DD482
bufferitemname 0, ITEM_ENERGY_ROOT
- setvar VAR_0x8008, 31
+ setvar VAR_0x8008, ITEM_ENERGY_ROOT
setvar VAR_0x8009, 80
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD496:: @ 81DD496
bufferitemname 0, ITEM_HEAL_POWDER
- setvar VAR_0x8008, 32
+ setvar VAR_0x8008, ITEM_HEAL_POWDER
setvar VAR_0x8009, 50
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD4AA:: @ 81DD4AA
bufferitemname 0, ITEM_REVIVAL_HERB
- setvar VAR_0x8008, 33
+ setvar VAR_0x8008, ITEM_REVIVAL_HERB
setvar VAR_0x8009, 300
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD4BE:: @ 81DD4BE
bufferitemname 0, ITEM_PROTEIN
- setvar VAR_0x8008, 64
+ setvar VAR_0x8008, ITEM_PROTEIN
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD4D2:: @ 81DD4D2
bufferitemname 0, ITEM_IRON
- setvar VAR_0x8008, 65
+ setvar VAR_0x8008, ITEM_IRON
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD4E6:: @ 81DD4E6
bufferitemname 0, ITEM_CARBOS
- setvar VAR_0x8008, 66
+ setvar VAR_0x8008, ITEM_CARBOS
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD4FA:: @ 81DD4FA
bufferitemname 0, ITEM_CALCIUM
- setvar VAR_0x8008, 67
+ setvar VAR_0x8008, ITEM_CALCIUM
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD50E:: @ 81DD50E
bufferitemname 0, ITEM_ZINC
- setvar VAR_0x8008, 70
+ setvar VAR_0x8008, ITEM_ZINC
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD522:: @ 81DD522
bufferitemname 0, ITEM_HP_UP
- setvar VAR_0x8008, 63
+ setvar VAR_0x8008, ITEM_HP_UP
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_1DD557
end
SlateportCity_EventScript_1DD536:: @ 81DD536
bufferitemname 0, ITEM_PP_UP
- setvar VAR_0x8008, 69
+ setvar VAR_0x8008, ITEM_PP_UP
setvar VAR_0x8009, 3000
goto SlateportCity_EventScript_1DD557
end
diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc
index 27f7fa3b9..5ab5b78e9 100644
--- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc
+++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc
@@ -12,10 +12,10 @@ SlateportCity_BattleTentCorridor_EventScript_208E3B:: @ 8208E3B
compare VAR_0x8006, 1
goto_if_ne SlateportCity_BattleTentCorridor_EventScript_208E56
setobjectxy 1, 2, 2
- turnobject 1, 1
+ turnobject 1, DIR_SOUTH
SlateportCity_BattleTentCorridor_EventScript_208E56:: @ 8208E56
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
SlateportCity_BattleTentCorridor_MapScript2_208E5B: @ 8208E5B
@@ -75,7 +75,7 @@ SlateportCity_BattleTentCorridor_EventScript_208F0D:: @ 8208F0D
call_if_eq SlateportCity_BattleTentCorridor_EventScript_209014
compare VAR_RESULT, 2
call_if_eq SlateportCity_BattleTentCorridor_EventScript_20901B
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, SlateportCity_BattleTentCorridor_EventScript_208FBB
case 1, SlateportCity_BattleTentCorridor_EventScript_208F5B
@@ -91,11 +91,11 @@ SlateportCity_BattleTentCorridor_EventScript_208F5B:: @ 8208F5B
SlateportCity_BattleTentCorridor_EventScript_208F89:: @ 8208F89
message SlateportCity_BattleTentCorridor_Text_25A37A
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, SlateportCity_BattleTentCorridor_EventScript_208F0D
case 0, SlateportCity_BattleTentCorridor_EventScript_209A1B
- case 127, SlateportCity_BattleTentCorridor_EventScript_208F0D
+ case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208F0D
SlateportCity_BattleTentCorridor_EventScript_208FBB:: @ 8208FBB
setvar VAR_0x8004, 8
@@ -104,7 +104,7 @@ SlateportCity_BattleTentCorridor_EventScript_208FBB:: @ 8208FBB
switch VAR_RESULT
case 0, SlateportCity_BattleTentCorridor_EventScript_208EB4
case 1, SlateportCity_BattleTentCorridor_EventScript_208FF1
- case 127, SlateportCity_BattleTentCorridor_EventScript_208EB4
+ case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208EB4
SlateportCity_BattleTentCorridor_EventScript_208FF1:: @ 8208FF1
fadescreen 1
diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc
index 19416c91b..80545a7f2 100644
--- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc
+++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc
@@ -9,7 +9,7 @@ SlateportCity_BattleTentLobby_MapScript2_20873B: @ 820873B
SlateportCity_BattleTentLobby_EventScript_208745:: @ 8208745
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
SlateportCity_BattleTentLobby_MapScript2_20874F: @ 820874F
@@ -128,12 +128,12 @@ SlateportCity_BattleTentLobby_EventScript_2088AA:: @ 82088AA
SlateportCity_BattleTentLobby_EventScript_2088CA:: @ 82088CA
message SlateportCity_BattleTentLobby_Text_2C586A
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, SlateportCity_BattleTentLobby_EventScript_208906
case 1, SlateportCity_BattleTentLobby_EventScript_208A07
case 2, SlateportCity_BattleTentLobby_EventScript_208A2E
- case 127, SlateportCity_BattleTentLobby_EventScript_208A2E
+ case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_208A2E
SlateportCity_BattleTentLobby_EventScript_208906:: @ 8208906
setvar VAR_FRONTIER_FACILITY, 4
@@ -281,7 +281,7 @@ SlateportCity_BattleTentLobby_EventScript_208A99:: @ 8208A99
SlateportCity_BattleTentLobby_EventScript_208AA8:: @ 8208AA8
message SlateportCity_BattleTentLobby_Text_259743
waitmessage
- multichoice 17, 0, 111, 0
+ multichoice 17, 0, MULTI_SLATEPORT_TENT_RULES, 0
switch VAR_RESULT
case 0, SlateportCity_BattleTentLobby_EventScript_208B06
case 1, SlateportCity_BattleTentLobby_EventScript_208B14
@@ -289,7 +289,7 @@ SlateportCity_BattleTentLobby_EventScript_208AA8:: @ 8208AA8
case 3, SlateportCity_BattleTentLobby_EventScript_208B30
case 4, SlateportCity_BattleTentLobby_EventScript_208B3E
case 5, SlateportCity_BattleTentLobby_EventScript_208B4C
- case 127, SlateportCity_BattleTentLobby_EventScript_208B4C
+ case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_208B4C
end
SlateportCity_BattleTentLobby_EventScript_208B06:: @ 8208B06
diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc
index c46923bb0..b6888ddd5 100644
--- a/data/maps/SlateportCity_Harbor/scripts.inc
+++ b/data/maps/SlateportCity_Harbor/scripts.inc
@@ -175,20 +175,20 @@ SlateportCity_Harbor_EventScript_20CB06:: @ 820CB06
SlateportCity_Harbor_EventScript_20CB1A:: @ 820CB1A
goto_if_set FLAG_MET_SCOTT_ON_SS_TIDAL, SlateportCity_Harbor_EventScript_20CB50
- multichoicedefault 18, 8, 56, 2, 0
+ multichoicedefault 18, 8, MULTI_SSTIDAL_SLATEPORT_NO_BF, 2, 0
switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_20CB92
case 1, SlateportCity_Harbor_EventScript_20CC2D
- case 127, SlateportCity_Harbor_EventScript_20CC2D
+ case MULTI_B_PRESSED, SlateportCity_Harbor_EventScript_20CC2D
end
SlateportCity_Harbor_EventScript_20CB50:: @ 820CB50
- multichoicedefault 17, 6, 52, 2, 0
+ multichoicedefault 17, 6, MULTI_SSTIDAL_SLATEPORT_WITH_BF, 2, 0
switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_20CB92
case 1, SlateportCity_Harbor_EventScript_20CBBA
case 2, SlateportCity_Harbor_EventScript_20CC2D
- case 127, SlateportCity_Harbor_EventScript_20CC2D
+ case MULTI_B_PRESSED, SlateportCity_Harbor_EventScript_20CC2D
end
SlateportCity_Harbor_EventScript_20CB88:: @ 820CB88
@@ -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
@@ -344,12 +344,12 @@ SlateportCity_Harbor_EventScript_20CD38:: @ 820CD38
end
SlateportCity_Harbor_EventScript_20CD44:: @ 820CD44
- multichoice 0, 0, 46, 0
+ multichoice 0, 0, MULTI_STERN_DEEPSEA, 0
switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_20CD7B
case 1, SlateportCity_Harbor_EventScript_20CDBB
case 2, SlateportCity_Harbor_EventScript_20CDFB
- case 127, SlateportCity_Harbor_EventScript_20CDFB
+ case MULTI_B_PRESSED, SlateportCity_Harbor_EventScript_20CDFB
end
SlateportCity_Harbor_EventScript_20CD7B:: @ 820CD7B
diff --git a/data/maps/SlateportCity_House1/scripts.inc b/data/maps/SlateportCity_House1/scripts.inc
index 0a5808820..b1d07c5bb 100644
--- a/data/maps/SlateportCity_House1/scripts.inc
+++ b/data/maps/SlateportCity_House1/scripts.inc
@@ -28,7 +28,7 @@ SlateportCity_House1_EventScript_209AE9:: @ 8209AE9
SlateportCity_House1_EventScript_209AF3:: @ 8209AF3
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
- compare VAR_RESULT, 412
+ compare VAR_RESULT, SPECIES_EGG
goto_if_eq SlateportCity_House1_EventScript_209B46
special TV_CopyNicknameToStringVar1AndEnsureTerminated
special TV_CheckMonOTIDEqualsPlayerID
diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
index 90d42ccae..0516db1fc 100644
--- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
+++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
@@ -34,11 +34,11 @@ SlateportCity_OceanicMuseum_1F_EventScript_20ADC1:: @ 820ADC1
end
SlateportCity_OceanicMuseum_1F_EventScript_20ADE8:: @ 820ADE8
- checkmoney 0x32, 0
+ checkmoney 50, 0
compare VAR_RESULT, 0
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20AE18
playse SE_REGI
- takemoney 0x32, 0
+ takemoney 50, 0
updatemoneybox 0, 0
msgbox SlateportCity_OceanicMuseum_1F_Text_20B026, MSGBOX_DEFAULT
setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1
diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc
index 2f3ef0434..d481924a2 100644
--- a/data/maps/SootopolisCity/scripts.inc
+++ b/data/maps/SootopolisCity/scripts.inc
@@ -179,11 +179,11 @@ SootopolisCity_EventScript_1E58E5:: @ 81E58E5
end
SootopolisCity_EventScript_1E58FC:: @ 81E58FC
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
return
SootopolisCity_EventScript_1E5901:: @ 81E5901
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
setvar VAR_SKY_PILLAR_STATE, 3
return
@@ -217,7 +217,7 @@ SootopolisCity_EventScript_1E5946:: @ 81E5946
setweather WEATHER_ALTERNATING
doweather
setvar VAR_0x8004, 0
- special sub_813B7D8
+ special Script_DoRayquazaScene
waitstate
applymovement 10, Common_Movement_WalkInPlaceLeft
applymovement 9, Common_Movement_WalkInPlaceRight
@@ -317,7 +317,7 @@ SootopolisCity_EventScript_1E5A82:: @ 81E5A82
setweather WEATHER_ALTERNATING
doweather
setvar VAR_0x8004, 0
- special sub_813B7D8
+ special Script_DoRayquazaScene
waitstate
applymovement 10, Common_Movement_WalkInPlaceLeft
applymovement 9, Common_Movement_WalkInPlaceRight
@@ -509,7 +509,7 @@ SootopolisCity_EventScript_1E5C1E:: @ 81E5C1E
removeobject 10
addobject 11
setvar VAR_0x8004, 1
- special sub_813B7D8
+ special Script_DoRayquazaScene
waitstate
playse SE_T_KAMI
special SpawnCameraObject
@@ -562,7 +562,7 @@ SootopolisCity_EventScript_1E5CCE:: @ 81E5CCE
removeobject 10
addobject 11
setvar VAR_0x8004, 1
- special sub_813B7D8
+ special Script_DoRayquazaScene
waitstate
special SpawnCameraObject
applymovement EVENT_OBJ_ID_CAMERA, SootopolisCity_Movement_1E5E63
@@ -748,7 +748,7 @@ SootopolisCity_EventScript_1E5F1B:: @ 81E5F1B
msgbox SootopolisCity_Text_2A7BB0, MSGBOX_DEFAULT
random 10
addvar VAR_RESULT, 20
- addvar VAR_RESULT, 133
+ addvar VAR_RESULT, FIRST_BERRY_INDEX
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
goto_if_eq Common_EventScript_ShowBagIsFull
diff --git a/data/maps/SootopolisCity_House6/scripts.inc b/data/maps/SootopolisCity_House6/scripts.inc
index 0f175478a..bd9c8fe51 100644
--- a/data/maps/SootopolisCity_House6/scripts.inc
+++ b/data/maps/SootopolisCity_House6/scripts.inc
@@ -9,7 +9,7 @@ SootopolisCity_House6_EventScript_226F5C:: @ 8226F5C
compare VAR_RESULT, 0
call_if_eq SootopolisCity_House6_EventScript_226F99
msgbox SootopolisCity_House6_Text_227034, MSGBOX_DEFAULT
- givedecoration_std 117
+ givedecoration_std DECOR_WAILMER_DOLL
compare VAR_RESULT, 0
goto_if_eq SootopolisCity_House6_EventScript_226FAD
setflag FLAG_RECEIVED_WAILMER_DOLL
@@ -27,7 +27,7 @@ SootopolisCity_House6_EventScript_226FA3:: @ 8226FA3
end
SootopolisCity_House6_EventScript_226FAD:: @ 8226FAD
- bufferdecorationname 1, 117
+ bufferdecorationname 1, DECOR_WAILMER_DOLL
msgbox gText_NoRoomLeftForAnother, MSGBOX_DEFAULT
msgbox SootopolisCity_House6_Text_22704A, MSGBOX_DEFAULT
release
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 a87b59079..a9b8c5e0c 100644
--- a/data/maps/SouthernIsland_Interior/scripts.inc
+++ b/data/maps/SouthernIsland_Interior/scripts.inc
@@ -24,12 +24,12 @@ SouthernIsland_Interior_OnTransition: @ 8242A6E
SouthernIsland_Interior_EventScript_242A8A:: @ 8242A8A
setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LATIOS
- setvar VAR_TEMP_4, 408
+ setvar VAR_TEMP_4, SPECIES_LATIOS
return
SouthernIsland_Interior_EventScript_242A95:: @ 8242A95
setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LATIAS
- setvar VAR_TEMP_4, 407
+ setvar VAR_TEMP_4, SPECIES_LATIAS
return
SouthernIsland_Interior_EventScript_242AA0:: @ 8242AA0
@@ -108,21 +108,21 @@ 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
SouthernIsland_Interior_EventScript_242BA4:: @ 8242BA4
- setvar VAR_0x8004, 408
+ setvar VAR_0x8004, SPECIES_LATIOS
setvar VAR_0x8005, 50
- setvar VAR_0x8006, 191
+ setvar VAR_0x8006, ITEM_SOUL_DEW
special CreateObedientEnemyMon
return
SouthernIsland_Interior_EventScript_242BB7:: @ 8242BB7
- setvar VAR_0x8004, 407
+ setvar VAR_0x8004, SPECIES_LATIAS
setvar VAR_0x8005, 50
- setvar VAR_0x8006, 191
+ setvar VAR_0x8006, ITEM_SOUL_DEW
special CreateObedientEnemyMon
return
diff --git a/data/maps/TrainerHill_Elevator/scripts.inc b/data/maps/TrainerHill_Elevator/scripts.inc
index ecc48a9e9..bf3d0f9f7 100644
--- a/data/maps/TrainerHill_Elevator/scripts.inc
+++ b/data/maps/TrainerHill_Elevator/scripts.inc
@@ -39,18 +39,20 @@ TrainerHill_Elevator_EventScript_269375:: @ 8269375
waitstate
end
+@ Unused
TrainerHill_Elevator_EventScript_2693CE:: @ 82693CE
goto TrainerHill_Elevator_EventScript_2693D4
end
+@ Functionally unused
TrainerHill_Elevator_EventScript_2693D4:: @ 82693D4
- special sub_8139C10
+ special CloseDeptStoreElevatorWindow
releaseall
end
TrainerHill_Elevator_EventScript_2693D9:: @ 82693D9
waitse
- special ShakeScreenInElevator
+ special MoveElevator
waitstate
return
diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc
index 5be00aa9d..d09768f2b 100644
--- a/data/maps/TrainerHill_Entrance/scripts.inc
+++ b/data/maps/TrainerHill_Entrance/scripts.inc
@@ -150,12 +150,12 @@ TrainerHill_Entrance_EventScript_268275:: @ 8268275
TrainerHill_Entrance_EventScript_26827D:: @ 826827D
message TrainerHill_Entrance_Text_2685F8
waitmessage
- multichoice 15, 6, 17, 0
+ multichoice 15, 6, MULTI_YESNOINFO, 0
switch VAR_RESULT
case 0, TrainerHill_Entrance_EventScript_2682C8
case 1, TrainerHill_Entrance_EventScript_268314
case 2, TrainerHill_Entrance_EventScript_2682BA
- case 127, TrainerHill_Entrance_EventScript_268314
+ case MULTI_B_PRESSED, TrainerHill_Entrance_EventScript_268314
end
TrainerHill_Entrance_EventScript_2682BA:: @ 82682BA
@@ -164,10 +164,10 @@ TrainerHill_Entrance_EventScript_2682BA:: @ 82682BA
end
TrainerHill_Entrance_EventScript_2682C8:: @ 82682C8
- multichoice 13, 2, 113, 0
+ multichoice 13, 2, MULTI_TAG_MATCH_TYPE, 0
switch VAR_RESULT
case 4, TrainerHill_Entrance_EventScript_268314
- case 127, TrainerHill_Entrance_EventScript_268314
+ case MULTI_B_PRESSED, TrainerHill_Entrance_EventScript_268314
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_TAG
copyvar VAR_0x8005, VAR_RESULT
special CallTrainerHillFunction
diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc
index b43bc6077..fd8c05546 100644
--- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc
@@ -98,7 +98,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_20243C:: @ 820243C
call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_202565
compare VAR_RESULT, 2
call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_20256C
- multichoice 20, 6, 104, 1
+ multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
switch VAR_RESULT
case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_2024EA
case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_20248A
@@ -114,11 +114,11 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_20248A:: @ 820248A
VerdanturfTown_BattleTentBattleRoom_EventScript_2024B8:: @ 82024B8
message VerdanturfTown_BattleTentBattleRoom_Text_25005A
waitmessage
- multichoicedefault 20, 8, 94, 1, 0
+ multichoicedefault 20, 8, MULTI_YESNO, 1, 0
switch VAR_RESULT
case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C
case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_2023AA
- case 127, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C
+ case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C
VerdanturfTown_BattleTentBattleRoom_EventScript_2024EA:: @ 82024EA
applymovement 3, Common_Movement_WalkInPlaceRight
diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
index daaaaea1b..5bc309663 100644
--- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
@@ -9,7 +9,7 @@ VerdanturfTown_BattleTentLobby_MapScript2_2016DB: @ 82016DB
VerdanturfTown_BattleTentLobby_EventScript_2016E5:: @ 82016E5
setvar VAR_TEMP_1, 1
- turnobject EVENT_OBJ_ID_PLAYER, 2
+ turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
VerdanturfTown_BattleTentLobby_MapScript2_2016EF: @ 82016EF
@@ -141,12 +141,12 @@ VerdanturfTown_BattleTentLobby_EventScript_201873:: @ 8201873
VerdanturfTown_BattleTentLobby_EventScript_201893:: @ 8201893
message VerdanturfTown_BattleTentLobby_Text_2C5129
waitmessage
- multichoice 17, 6, 23, 0
+ multichoice 17, 6, MULTI_CHALLENGEINFO, 0
switch VAR_RESULT
case 0, VerdanturfTown_BattleTentLobby_EventScript_2018CF
case 1, VerdanturfTown_BattleTentLobby_EventScript_2019DB
case 2, VerdanturfTown_BattleTentLobby_EventScript_201A37
- case 127, VerdanturfTown_BattleTentLobby_EventScript_201A37
+ case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_201A37
VerdanturfTown_BattleTentLobby_EventScript_2018CF:: @ 82018CF
setvar VAR_FRONTIER_FACILITY, 2
@@ -332,8 +332,8 @@ VerdanturfTown_BattleTentLobby_EventScript_201B02:: @ 8201B02
VerdanturfTown_BattleTentLobby_EventScript_201B11:: @ 8201B11
message VerdanturfTown_BattleTentLobby_Text_24EF88
waitmessage
- setvar VAR_0x8004, 12
- special sub_813A128
+ setvar VAR_0x8004, SCROLL_MULTI_BATTLE_TENT_RULES
+ special ShowScrollableMultichoice
waitstate
switch VAR_RESULT
case 0, VerdanturfTown_BattleTentLobby_EventScript_201B7E
@@ -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/mystery_event_msg.s b/data/mystery_event_msg.s
index dd1f8e681..33af5269c 100644
--- a/data/mystery_event_msg.s
+++ b/data/mystery_event_msg.s
@@ -2,6 +2,7 @@
#include "constants/items.h"
#include "constants/map_scripts.h"
#include "constants/moves.h"
+#include "constants/region_map_sections.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/vars.h"
@@ -19,7 +20,7 @@ MysteryEventScript_StampCard:: @ 8674CB0
specialvar VAR_0x8008, sub_813986C
setorcopyvar VAR_RESULT, 0
specialvar VAR_0x8009, sub_813986C
- subvar VAR_0x8008, 32777
+ subvar VAR_0x8008, VAR_0x8009
buffernumberstring 0, VAR_0x8008
lock
faceplayer
@@ -66,7 +67,7 @@ SurfPichu_FullParty: @ 8674D73
SurfPichu_GiveEgg: @ 8674D7E
giveegg SPECIES_PICHU
setmonobedient VAR_EVENT_PICHU_SLOT
- setmonmetlocation VAR_EVENT_PICHU_SLOT, 255
+ setmonmetlocation VAR_EVENT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER
compare_var_to_value VAR_EVENT_PICHU_SLOT, 1
vgoto_if 1, SurfPichu_Slot1
compare_var_to_value VAR_EVENT_PICHU_SLOT, 2
diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc
index eeecf2d75..8e49c982f 100644
--- a/data/scripts/cable_club.inc
+++ b/data/scripts/cable_club.inc
@@ -99,7 +99,7 @@ MossdeepCity_GameCorner_1F_EventScript_276BAE:: @ 8276BAE
OldaleTown_PokemonCenter_2F_EventScript_276BAE:: @ 8276BAE
compare VAR_0x8007, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276BBD
- turnobject VAR_0x8007, 3
+ turnobject VAR_0x8007, DIR_WEST
OldaleTown_PokemonCenter_2F_EventScript_276BBD:: @ 8276BBD
end
@@ -344,22 +344,22 @@ OldaleTown_PokemonCenter_2F_EventScript_276E22:: @ 8276E22
OldaleTown_PokemonCenter_2F_EventScript_276E30:: @ 8276E30
setvar VAR_0x8004, 0
goto_if_set FLAG_VISITED_MAUVILLE_CITY, OldaleTown_PokemonCenter_2F_EventScript_276E75
- multichoice 0, 0, 74, 0
+ multichoice 0, 0, MULTI_CABLE_CLUB_NO_RECORD_MIX, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_2770B2
case 1, OldaleTown_PokemonCenter_2F_EventScript_276EB7
case 2, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_276E75:: @ 8276E75
- multichoice 0, 0, 76, 0
+ multichoice 0, 0, MULTI_CABLE_CLUB_WITH_RECORD_MIX, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_2770B2
case 1, OldaleTown_PokemonCenter_2F_EventScript_276EB7
case 2, OldaleTown_PokemonCenter_2F_EventScript_2771DB
case 3, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_276EB7:: @ 8276EB7
@@ -370,14 +370,14 @@ OldaleTown_PokemonCenter_2F_EventScript_276EB7:: @ 8276EB7
OldaleTown_PokemonCenter_2F_EventScript_276EC2:: @ 8276EC2
message OldaleTown_PokemonCenter_2F_Text_2790BE
waitmessage
- multichoice 0, 0, 18, 0
+ multichoice 0, 0, MULTI_BATTLE_MODE, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_276F23
case 1, OldaleTown_PokemonCenter_2F_EventScript_276F2E
case 2, OldaleTown_PokemonCenter_2F_EventScript_276F55
case 3, OldaleTown_PokemonCenter_2F_EventScript_276F15
case 4, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_276F15:: @ 8276F15
@@ -392,7 +392,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276F23:: @ 8276F23
OldaleTown_PokemonCenter_2F_EventScript_276F2E:: @ 8276F2E
special HasEnoughMonsForDoubleBattle
- compare VAR_RESULT, 0
+ compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
goto_if_ne OldaleTown_PokemonCenter_2F_EventScript_276F47
setvar VAR_0x8004, 2
goto OldaleTown_PokemonCenter_2F_EventScript_276F60
@@ -978,7 +978,7 @@ OldaleTown_PokemonCenter_2F_EventScript_27751B:: @ 827751B
faceplayer
setvar VAR_FRONTIER_FACILITY, 8
goto_if_unset FLAG_SYS_POKEDEX_GET, OldaleTown_PokemonCenter_2F_EventScript_277335
- specialvar VAR_RESULT, sub_813990C
+ specialvar VAR_RESULT, IsBadEggInParty
compare VAR_RESULT, 1
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_27731B
copyvar VAR_0x8007, VAR_LAST_TALKED
@@ -991,12 +991,12 @@ OldaleTown_PokemonCenter_2F_EventScript_27751B:: @ 827751B
end
OldaleTown_PokemonCenter_2F_EventScript_27755C:: @ 827755C
- multichoice 17, 6, 17, 0
+ multichoice 17, 6, MULTI_YESNOINFO, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_27759F
case 1, OldaleTown_PokemonCenter_2F_EventScript_2772EC
case 2, OldaleTown_PokemonCenter_2F_EventScript_277593
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_277593:: @ 8277593
@@ -1086,7 +1086,7 @@ OldaleTown_PokemonCenter_2F_EventScript_2776A4:: @ 82776A4
faceplayer
setvar VAR_FRONTIER_FACILITY, 9
goto_if_unset FLAG_SYS_POKEDEX_GET, OldaleTown_PokemonCenter_2F_EventScript_277335
- specialvar VAR_RESULT, sub_813990C
+ specialvar VAR_RESULT, IsBadEggInParty
compare VAR_RESULT, 1
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_27731B
specialvar VAR_RESULT, IsWirelessAdapterConnected
@@ -1103,44 +1103,44 @@ OldaleTown_PokemonCenter_2F_EventScript_2776E3:: @ 82776E3
compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_27778B
goto_if_set FLAG_VISITED_MAUVILLE_CITY, OldaleTown_PokemonCenter_2F_EventScript_27773E
- multichoice 0, 0, 78, 0
+ multichoice 0, 0, MULTI_WIRELESS_NO_RECORD, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_27780D
case 1, OldaleTown_PokemonCenter_2F_EventScript_27783B
case 2, OldaleTown_PokemonCenter_2F_EventScript_2778F7
case 3, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_27773E:: @ 827773E
- multichoice 0, 0, 79, 0
+ multichoice 0, 0, MULTI_WIRELESS_ALL_SERVICES, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_27780D
case 1, OldaleTown_PokemonCenter_2F_EventScript_27783B
case 2, OldaleTown_PokemonCenter_2F_EventScript_2778D9
case 3, OldaleTown_PokemonCenter_2F_EventScript_2778F7
case 4, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_27778B:: @ 827778B
goto_if_set FLAG_VISITED_MAUVILLE_CITY, OldaleTown_PokemonCenter_2F_EventScript_2777CB
- multichoice 0, 0, 75, 0
+ multichoice 0, 0, MULTI_WIRELESS_NO_RECORD_BERRY, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_27780D
case 1, OldaleTown_PokemonCenter_2F_EventScript_27783B
case 2, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_2777CB:: @ 82777CB
- multichoice 0, 0, 77, 0
+ multichoice 0, 0, MULTI_WIRELESS_NO_BERRY, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_27780D
case 1, OldaleTown_PokemonCenter_2F_EventScript_27783B
case 2, OldaleTown_PokemonCenter_2F_EventScript_2778D9
case 3, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_27780D:: @ 827780D
@@ -1157,14 +1157,14 @@ OldaleTown_PokemonCenter_2F_EventScript_27780D:: @ 827780D
OldaleTown_PokemonCenter_2F_EventScript_27783B:: @ 827783B
message OldaleTown_PokemonCenter_2F_Text_2790BE
waitmessage
- multichoice 0, 0, 18, 0
+ multichoice 0, 0, MULTI_BATTLE_MODE, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_27788E
case 1, OldaleTown_PokemonCenter_2F_EventScript_277899
case 2, OldaleTown_PokemonCenter_2F_EventScript_2778C0
case 3, OldaleTown_PokemonCenter_2F_EventScript_2778CB
case 4, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_27788E:: @ 827788E
@@ -1174,7 +1174,7 @@ OldaleTown_PokemonCenter_2F_EventScript_27788E:: @ 827788E
OldaleTown_PokemonCenter_2F_EventScript_277899:: @ 8277899
special HasEnoughMonsForDoubleBattle
- compare VAR_RESULT, 0
+ compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
goto_if_ne OldaleTown_PokemonCenter_2F_EventScript_2778B2
setvar VAR_0x8004, 1
goto OldaleTown_PokemonCenter_2F_EventScript_277931
@@ -1235,12 +1235,12 @@ OldaleTown_PokemonCenter_2F_EventScript_277931:: @ 8277931
OldaleTown_PokemonCenter_2F_EventScript_277989:: @ 8277989
message OldaleTown_PokemonCenter_2F_Text_2792CD
waitmessage
- multichoice 16, 6, 81, 0
+ multichoice 16, 6, MULTI_LINK_LEADER, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_2779EE
case 1, OldaleTown_PokemonCenter_2F_EventScript_2779C6
case 2, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_2779C6:: @ 82779C6
@@ -1268,12 +1268,12 @@ OldaleTown_PokemonCenter_2F_EventScript_2779EE:: @ 82779EE
OldaleTown_PokemonCenter_2F_EventScript_277A16:: @ 8277A16
message OldaleTown_PokemonCenter_2F_Text_279334
waitmessage
- multichoice 16, 6, 81, 0
+ multichoice 16, 6, MULTI_LINK_LEADER, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_277A7B
case 1, OldaleTown_PokemonCenter_2F_EventScript_277A53
case 2, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_277A53:: @ 8277A53
@@ -1301,12 +1301,12 @@ OldaleTown_PokemonCenter_2F_EventScript_277A7B:: @ 8277A7B
OldaleTown_PokemonCenter_2F_EventScript_277AA3:: @ 8277AA3
message OldaleTown_PokemonCenter_2F_Text_2793A3
waitmessage
- multichoice 16, 6, 81, 0
+ multichoice 16, 6, MULTI_LINK_LEADER, 0
switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_277B08
case 1, OldaleTown_PokemonCenter_2F_EventScript_277AE0
case 2, OldaleTown_PokemonCenter_2F_EventScript_2772EC
- case 127, OldaleTown_PokemonCenter_2F_EventScript_2772EC
+ case MULTI_B_PRESSED, OldaleTown_PokemonCenter_2F_EventScript_2772EC
end
OldaleTown_PokemonCenter_2F_EventScript_277AE0:: @ 8277AE0
@@ -1445,12 +1445,12 @@ MossdeepCity_GameCorner_1F_EventScript_277C34:: @ 8277C34
faceplayer
message MossdeepCity_GameCorner_1F_Text_278A7D
waitmessage
- multichoice 0, 0, 80, 0
+ multichoice 0, 0, MULTI_WIRELESS_MINIGAME, 0
switch VAR_RESULT
case 0, MossdeepCity_GameCorner_1F_EventScript_277C73
case 1, MossdeepCity_GameCorner_1F_EventScript_277C7D
case 2, MossdeepCity_GameCorner_1F_EventScript_277C87
- case 127, MossdeepCity_GameCorner_1F_EventScript_277C87
+ case MULTI_B_PRESSED, MossdeepCity_GameCorner_1F_EventScript_277C87
end
MossdeepCity_GameCorner_1F_EventScript_277C73:: @ 8277C73
@@ -1479,12 +1479,12 @@ MossdeepCity_GameCorner_1F_EventScript_277C91:: @ 8277C91
delay 60
message MossdeepCity_GameCorner_1F_Text_278DAD
waitmessage
- multichoice 0, 0, 80, 0
+ multichoice 0, 0, MULTI_WIRELESS_MINIGAME, 0
switch VAR_RESULT
case 0, MossdeepCity_GameCorner_1F_EventScript_277CE9
case 1, MossdeepCity_GameCorner_1F_EventScript_277D35
case 2, MossdeepCity_GameCorner_1F_EventScript_2772F9
- case 127, MossdeepCity_GameCorner_1F_EventScript_2772F9
+ case MULTI_B_PRESSED, MossdeepCity_GameCorner_1F_EventScript_2772F9
end
MossdeepCity_GameCorner_1F_EventScript_277CE9:: @ 8277CE9
@@ -1528,12 +1528,12 @@ MossdeepCity_GameCorner_1F_EventScript_277D35:: @ 8277D35
MossdeepCity_GameCorner_1F_EventScript_277D81:: @ 8277D81
message MossdeepCity_GameCorner_1F_Text_2793A3
waitmessage
- multichoice 16, 6, 81, 0
+ multichoice 16, 6, MULTI_LINK_LEADER, 0
switch VAR_RESULT
case 0, MossdeepCity_GameCorner_1F_EventScript_277DE6
case 1, MossdeepCity_GameCorner_1F_EventScript_277DBE
case 2, MossdeepCity_GameCorner_1F_EventScript_2772F9
- case 127, MossdeepCity_GameCorner_1F_EventScript_2772F9
+ case MULTI_B_PRESSED, MossdeepCity_GameCorner_1F_EventScript_2772F9
end
MossdeepCity_GameCorner_1F_EventScript_277DBE:: @ 8277DBE
@@ -1626,15 +1626,15 @@ OldaleTown_PokemonCenter_2F_Text_277EF1: @ 8277EF1
.string "Which of our services do you wish\n"
.string "to use?$"
-OldaleTown_PokemonCenter_2F_Text_277F1B:: @ 8277F1B
+CableClub_Text_TradeUsingLinkCable:: @ 8277F1B
.string "Trade POKéMON with another player\n"
.string "using a GBA Game Link cable.$"
-OldaleTown_PokemonCenter_2F_Text_277F5A:: @ 8277F5A
+CableClub_Text_BattleUsingLinkCable:: @ 8277F5A
.string "You may battle another TRAINER\n"
.string "using a GBA Game Link cable.$"
-OldaleTown_PokemonCenter_2F_Text_277F96:: @ 8277F96
+CableClub_Text_RecordCornerUsingLinkCable:: @ 8277F96
.string "You can use the RECORD CORNER with\n"
.string "others using a GBA Game Link cable.$"
@@ -1804,19 +1804,19 @@ OldaleTown_PokemonCenter_2F_Text_27878B: @ 827878B
OldaleTown_PokemonCenter_2F_Text_278792: @ 8278792
.string "Please wait.$"
-OldaleTown_PokemonCenter_2F_Text_27879F:: @ 827879F
+CableClub_Text_YouMayTradeHere:: @ 827879F
.string "You may trade your POKéMON here\n"
.string "with another TRAINER.$"
-OldaleTown_PokemonCenter_2F_Text_2787D5:: @ 82787D5
+CableClub_Text_YouMayBattleHere:: @ 82787D5
.string "You may battle with your friends\n"
.string "here.$"
-OldaleTown_PokemonCenter_2F_Text_2787FC:: @ 82787FC
+CableClub_Text_CanMakeBerryPowder:: @ 82787FC
.string "Two to five TRAINERS can make\n"
.string "BERRY POWDER together.$"
-OldaleTown_PokemonCenter_2F_Text_278831:: @ 8278831
+CableClub_Text_CanMixRecords:: @ 8278831
.string "The records of two to four players\n"
.string "can be mixed together.$"
@@ -1824,7 +1824,7 @@ OldaleTown_PokemonCenter_2F_Text_27886B: @ 827886B
.string "A guide to the WIRELESS CLUB's\n"
.string "various services.$"
-OldaleTown_PokemonCenter_2F_Text_27889C:: @ 827889C
+CableClub_Text_CancelSelectedItem:: @ 827889C
.string "Cancels the selected MENU item.$"
OldaleTown_PokemonCenter_2F_Text_2788BC: @ 82788BC
diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc
index 6c19cdc0c..03863eb40 100644
--- a/data/scripts/contest_hall.inc
+++ b/data/scripts/contest_hall.inc
@@ -43,24 +43,24 @@ LilycoveCity_ContestLobby_EventScript_279D4B:: @ 8279D4B
LilycoveCity_ContestLobby_EventScript_279D5A:: @ 8279D5A
message LilycoveCity_ContestLobby_Text_27AF28
waitmessage
- multichoice 0, 0, 2, 0
+ multichoice 0, 0, MULTI_ENTERINFO, 0
switch VAR_RESULT
case 0, LilycoveCity_ContestLobby_EventScript_279E62
case 1, LilycoveCity_ContestLobby_EventScript_279D97
case 2, LilycoveCity_ContestLobby_EventScript_279E09
- case 127, LilycoveCity_ContestLobby_EventScript_279E09
+ case MULTI_B_PRESSED, LilycoveCity_ContestLobby_EventScript_279E09
end
LilycoveCity_ContestLobby_EventScript_279D97:: @ 8279D97
message LilycoveCity_ContestLobby_Text_27AF5E
waitmessage
- multichoice 0, 0, 3, 0
+ multichoice 0, 0, MULTI_CONTEST_INFO, 0
switch VAR_RESULT
case 0, LilycoveCity_ContestLobby_EventScript_279DDF
case 1, LilycoveCity_ContestLobby_EventScript_279DED
case 2, LilycoveCity_ContestLobby_EventScript_279DFB
case 3, LilycoveCity_ContestLobby_EventScript_279D5A
- case 127, LilycoveCity_ContestLobby_EventScript_279D5A
+ case MULTI_B_PRESSED, LilycoveCity_ContestLobby_EventScript_279D5A
end
LilycoveCity_ContestLobby_EventScript_279DDF:: @ 8279DDF
@@ -104,14 +104,14 @@ LilycoveCity_ContestLobby_EventScript_279E13:: @ 8279E13
LilycoveCity_ContestLobby_EventScript_279E62:: @ 8279E62
message LilycoveCity_ContestLobby_Text_27B3FF
waitmessage
- multichoice 0, 0, 82, 0
+ multichoice 0, 0, MULTI_CONTEST_RANK, 0
switch VAR_RESULT
case 0, LilycoveCity_ContestLobby_EventScript_279EB5
case 1, LilycoveCity_ContestLobby_EventScript_279EC0
case 2, LilycoveCity_ContestLobby_EventScript_279ECB
case 3, LilycoveCity_ContestLobby_EventScript_279ED6
case 4, LilycoveCity_ContestLobby_EventScript_279E09
- case 127, LilycoveCity_ContestLobby_EventScript_279E09
+ case MULTI_B_PRESSED, LilycoveCity_ContestLobby_EventScript_279E09
end
LilycoveCity_ContestLobby_EventScript_279EB5:: @ 8279EB5
@@ -137,10 +137,10 @@ LilycoveCity_ContestLobby_EventScript_279ED6:: @ 8279ED6
LilycoveCity_ContestLobby_EventScript_279EE1:: @ 8279EE1
message LilycoveCity_ContestLobby_Text_27B423
waitmessage
- multichoice 0, 0, 4, 0
+ multichoice 0, 0, MULTI_CONTEST_TYPE, 0
switch VAR_RESULT
case 5, LilycoveCity_ContestLobby_EventScript_279E09
- case 127, LilycoveCity_ContestLobby_EventScript_279E09
+ case MULTI_B_PRESSED, LilycoveCity_ContestLobby_EventScript_279E09
copyvar VAR_CONTEST_CATEGORY, VAR_RESULT
goto LilycoveCity_ContestLobby_EventScript_279E13
end
@@ -216,19 +216,19 @@ LinkContestRoom1_EventScript_279FF2:: @ 8279FF2
return
LinkContestRoom1_EventScript_27A024:: @ 827A024
- setvar VAR_0x8009, 5
+ setvar VAR_0x8009, STDSTRING_NORMAL
return
LinkContestRoom1_EventScript_27A02A:: @ 827A02A
- setvar VAR_0x8009, 6
+ setvar VAR_0x8009, STDSTRING_SUPER
return
LinkContestRoom1_EventScript_27A030:: @ 827A030
- setvar VAR_0x8009, 7
+ setvar VAR_0x8009, STDSTRING_HYPER
return
LinkContestRoom1_EventScript_27A036:: @ 827A036
- setvar VAR_0x8009, 8
+ setvar VAR_0x8009, STDSTRING_MASTER
return
LinkContestRoom1_EventScript_27A03C:: @ 827A03C
@@ -241,27 +241,27 @@ LinkContestRoom1_EventScript_27A03C:: @ 827A03C
return
LinkContestRoom1_EventScript_27A079:: @ 827A079
- setvar VAR_0x8008, 0
+ setvar VAR_0x8008, CONTEST_CATEGORY_COOL
return
LinkContestRoom1_EventScript_27A07F:: @ 827A07F
- setvar VAR_0x8008, 1
+ setvar VAR_0x8008, CONTEST_CATEGORY_BEAUTY
return
LinkContestRoom1_EventScript_27A085:: @ 827A085
- setvar VAR_0x8008, 2
+ setvar VAR_0x8008, CONTEST_CATEGORY_CUTE
return
LinkContestRoom1_EventScript_27A08B:: @ 827A08B
- setvar VAR_0x8008, 3
+ setvar VAR_0x8008, CONTEST_CATEGORY_SMART
return
LinkContestRoom1_EventScript_27A091:: @ 827A091
- setvar VAR_0x8008, 4
+ setvar VAR_0x8008, CONTEST_CATEGORY_TOUGH
return
LinkContestRoom1_EventScript_27A097:: @ 827A097
- buffercontesttypestring 1, 32776
+ buffercontesttypestring 1, VAR_0x8008
bufferstdstring 2, VAR_0x8009
call LinkContestRoom1_EventScript_27A0B1
lockall
@@ -1012,71 +1012,71 @@ LinkContestRoom1_EventScript_27AA1B:: @ 827AA1B
return
LinkContestRoom1_EventScript_27AA6F:: @ 827AA6F
- turnvobject 0, 1
- turnvobject 2, 1
- turnvobject 4, 4
- turnvobject 6, 1
- turnvobject 8, 1
- turnvobject 10, 1
- turnvobject 12, 1
- turnvobject 14, 1
- turnvobject 16, 1
- turnvobject 18, 1
- turnvobject 20, 4
- turnvobject 22, 4
- turnvobject 25, 4
- turnvobject 27, 3
- turnvobject 28, 4
+ turnvobject 0, DIR_SOUTH
+ turnvobject 2, DIR_SOUTH
+ turnvobject 4, DIR_EAST
+ turnvobject 6, DIR_SOUTH
+ turnvobject 8, DIR_SOUTH
+ turnvobject 10, DIR_SOUTH
+ turnvobject 12, DIR_SOUTH
+ turnvobject 14, DIR_SOUTH
+ turnvobject 16, DIR_SOUTH
+ turnvobject 18, DIR_SOUTH
+ turnvobject 20, DIR_EAST
+ turnvobject 22, DIR_EAST
+ turnvobject 25, DIR_EAST
+ turnvobject 27, DIR_WEST
+ turnvobject 28, DIR_EAST
delay 10
- turnvobject 0, 4
- turnvobject 2, 4
- turnvobject 4, 4
- turnvobject 6, 4
- turnvobject 8, 4
- turnvobject 10, 3
- turnvobject 12, 3
- turnvobject 14, 3
- turnvobject 16, 3
- turnvobject 18, 3
- turnvobject 20, 1
- turnvobject 22, 1
- turnvobject 25, 2
- turnvobject 27, 2
- turnvobject 28, 2
+ turnvobject 0, DIR_EAST
+ turnvobject 2, DIR_EAST
+ turnvobject 4, DIR_EAST
+ turnvobject 6, DIR_EAST
+ turnvobject 8, DIR_EAST
+ turnvobject 10, DIR_WEST
+ turnvobject 12, DIR_WEST
+ turnvobject 14, DIR_WEST
+ turnvobject 16, DIR_WEST
+ turnvobject 18, DIR_WEST
+ turnvobject 20, DIR_SOUTH
+ turnvobject 22, DIR_SOUTH
+ turnvobject 25, DIR_NORTH
+ turnvobject 27, DIR_NORTH
+ turnvobject 28, DIR_NORTH
delay 10
- turnvobject 1, 2
- turnvobject 3, 2
- turnvobject 5, 2
- turnvobject 7, 2
- turnvobject 9, 4
- turnvobject 11, 2
- turnvobject 15, 2
- turnvobject 13, 2
- turnvobject 17, 2
- turnvobject 19, 2
- turnvobject 21, 3
- turnvobject 23, 3
- turnvobject 24, 3
- turnvobject 26, 4
- turnvobject 29, 3
- turnvobject 30, 3
+ turnvobject 1, DIR_NORTH
+ turnvobject 3, DIR_NORTH
+ turnvobject 5, DIR_NORTH
+ turnvobject 7, DIR_NORTH
+ turnvobject 9, DIR_EAST
+ turnvobject 11, DIR_NORTH
+ turnvobject 15, DIR_NORTH
+ turnvobject 13, DIR_NORTH
+ turnvobject 17, DIR_NORTH
+ turnvobject 19, DIR_NORTH
+ turnvobject 21, DIR_WEST
+ turnvobject 23, DIR_WEST
+ turnvobject 24, DIR_WEST
+ turnvobject 26, DIR_EAST
+ turnvobject 29, DIR_WEST
+ turnvobject 30, DIR_WEST
delay 10
- turnvobject 1, 4
- turnvobject 3, 4
- turnvobject 5, 4
- turnvobject 7, 4
- turnvobject 9, 4
- turnvobject 11, 3
- turnvobject 15, 3
- turnvobject 13, 3
- turnvobject 17, 3
- turnvobject 19, 3
- turnvobject 21, 1
- turnvobject 23, 1
- turnvobject 24, 1
- turnvobject 26, 2
- turnvobject 29, 2
- turnvobject 30, 2
+ turnvobject 1, DIR_EAST
+ turnvobject 3, DIR_EAST
+ turnvobject 5, DIR_EAST
+ turnvobject 7, DIR_EAST
+ turnvobject 9, DIR_EAST
+ turnvobject 11, DIR_WEST
+ turnvobject 15, DIR_WEST
+ turnvobject 13, DIR_WEST
+ turnvobject 17, DIR_WEST
+ turnvobject 19, DIR_WEST
+ turnvobject 21, DIR_SOUTH
+ turnvobject 23, DIR_SOUTH
+ turnvobject 24, DIR_SOUTH
+ turnvobject 26, DIR_NORTH
+ turnvobject 29, DIR_NORTH
+ turnvobject 30, DIR_NORTH
delay 10
return
diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc
index 057a2fa07..062fd9f5a 100644
--- a/data/scripts/day_care.inc
+++ b/data/scripts/day_care.inc
@@ -1,245 +1,245 @@
-Route117_EventScript_291C18:: @ 8291C18
+Route117_EventScript_DaycareMan:: @ 8291C18
lock
faceplayer
special GetDaycareMonNicknames
specialvar VAR_RESULT, GetDaycareState
- compare VAR_RESULT, 1
- goto_if_eq Route117_EventScript_291C4D
- compare VAR_RESULT, 2
- goto_if_eq Route117_EventScript_291CD1
- compare VAR_RESULT, 3
- goto_if_eq Route117_EventScript_291CE8
- msgbox Route117_Text_291FCF, MSGBOX_DEFAULT
+ compare VAR_RESULT, DAYCARE_EGG_WAITING
+ goto_if_eq Route117_EventScript_DaycareEggWaiting
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq Route117_EventScript_CheckOnOneMon
+ compare VAR_RESULT, DAYCARE_TWO_MONS
+ goto_if_eq Route117_EventScript_CheckOnTwoMons
+ msgbox Route117_Text_SeeWifeIfYoudLikeMeToRaiseMon, MSGBOX_DEFAULT
release
end
-Route117_EventScript_291C4D:: @ 8291C4D
- msgbox Route117_Text_29205D, MSGBOX_YESNO
+Route117_EventScript_DaycareEggWaiting:: @ 8291C4D
+ msgbox Route117_Text_DoYouWantEgg, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq Route117_EventScript_291C83
- msgbox Route117_Text_2922C6, MSGBOX_YESNO
+ goto_if_eq Route117_EventScript_DaycareAcceptEgg
+ msgbox Route117_Text_IWillKeepDoYouWantIt, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq Route117_EventScript_291C83
- msgbox Route117_Text_292149, MSGBOX_DEFAULT
+ goto_if_eq Route117_EventScript_DaycareAcceptEgg
+ msgbox Route117_Text_IllKeepIt, MSGBOX_DEFAULT
clearflag FLAG_PENDING_DAYCARE_EGG
special RejectEggFromDayCare
release
end
-Route117_EventScript_291C83:: @ 8291C83
+Route117_EventScript_DaycareAcceptEgg:: @ 8291C83
specialvar VAR_RESULT, CalculatePlayerPartyCount
- compare VAR_RESULT, 6
- goto_if_ne Route117_EventScript_291C9D
- msgbox Route117_Text_29216A, MSGBOX_DEFAULT
+ compare VAR_RESULT, PARTY_SIZE
+ goto_if_ne Route117_EventScript_DaycareReceiveEgg
+ msgbox Route117_Text_YouHaveNoRoomForIt, MSGBOX_DEFAULT
release
end
-Route117_EventScript_291C9D:: @ 8291C9D
- message Route117_Text_2921A4
+Route117_EventScript_DaycareReceiveEgg:: @ 8291C9D
+ message Route117_Text_ReceivedEgg
playfanfare MUS_FANFA1
waitfanfare
waitbuttonpress
- msgbox Route117_Text_2921CF, MSGBOX_DEFAULT
+ msgbox Route117_Text_TakeGoodCareOfIt, MSGBOX_DEFAULT
special GiveEggFromDaycare
clearflag FLAG_PENDING_DAYCARE_EGG
release
end
-Route117_EventScript_291CB7:: @ 8291CB7
- specialvar VAR_RESULT, sub_8071614
+Route117_EventScript_CheckMonReceivedMail:: @ 8291CB7
+ specialvar VAR_RESULT, CheckDaycareMonReceivedMail
compare VAR_RESULT, 1
- call_if_eq Route117_EventScript_291CC8
+ call_if_eq Route117_EventScript_MonReceivedMail
return
-Route117_EventScript_291CC8:: @ 8291CC8
- msgbox Route117_Text_2921E5, MSGBOX_DEFAULT
+Route117_EventScript_MonReceivedMail:: @ 8291CC8
+ msgbox Route117_Text_FriendlyWithOtherTrainersMon, MSGBOX_DEFAULT
return
-Route117_EventScript_291CD1:: @ 8291CD1
+Route117_EventScript_CheckOnOneMon:: @ 8291CD1
special GetDaycareMonNicknames
- msgbox Route117_Text_292114, MSGBOX_DEFAULT
+ msgbox Route117_Text_YourMonIsDoingFine, MSGBOX_DEFAULT
setvar VAR_0x8004, 0
- call Route117_EventScript_291CB7
+ call Route117_EventScript_CheckMonReceivedMail
release
end
-Route117_EventScript_291CE8:: @ 8291CE8
+Route117_EventScript_CheckOnTwoMons:: @ 8291CE8
special GetDaycareMonNicknames
- msgbox Route117_Text_292299, MSGBOX_DEFAULT
+ msgbox Route117_Text_YourMonsAreDoingFine, MSGBOX_DEFAULT
special SetDaycareCompatibilityString
special ShowFieldMessageStringVar4
waitmessage
waitbuttonpress
setvar VAR_0x8004, 0
- call Route117_EventScript_291CB7
+ call Route117_EventScript_CheckMonReceivedMail
setvar VAR_0x8004, 1
- call Route117_EventScript_291CB7
+ call Route117_EventScript_CheckMonReceivedMail
release
end
-Route117_PokemonDayCare_EventScript_291D11:: @ 8291D11
+Route117_PokemonDayCare_EventScript_DaycareWoman:: @ 8291D11
lock
faceplayer
specialvar VAR_RESULT, GetDaycareState
+ compare VAR_RESULT, DAYCARE_EGG_WAITING
+ goto_if_eq Route117_PokemonDayCare_EventScript_EggWaiting
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq Route117_PokemonDayCare_EventScript_OneMonInDaycare
+ compare VAR_RESULT, DAYCARE_TWO_MONS
+ goto_if_eq Route117_PokemonDayCare_EventScript_TwoMonsInDaycare
+ msgbox Route117_PokemonDayCare_Text_WouldYouLikeUsToRaiseAMon, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291E0B
- compare VAR_RESULT, 2
- goto_if_eq Route117_PokemonDayCare_EventScript_291E2F
- compare VAR_RESULT, 3
- goto_if_eq Route117_PokemonDayCare_EventScript_291F5C
- msgbox Route117_PokemonDayCare_Text_2922F4, MSGBOX_YESNO
- compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291D56
+ goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise
msgbox Route117_PokemonDayCare_Text_292416, MSGBOX_DEFAULT
release
end
-Route117_PokemonDayCare_EventScript_291D56:: @ 8291D56
+Route117_PokemonDayCare_EventScript_GiveMonToRaise:: @ 8291D56
specialvar VAR_RESULT, CountPartyNonEggMons
compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291DED
- specialvar VAR_RESULT, sub_80722E0
+ goto_if_eq Route117_PokemonDayCare_EventScript_OnlyOneMon
+ specialvar VAR_RESULT, CountPartyAliveNonEggMons
compare VAR_RESULT, 2
- goto_if_eq Route117_PokemonDayCare_EventScript_291E01
- msgbox Route117_PokemonDayCare_Text_292349, MSGBOX_DEFAULT
+ goto_if_eq Route117_PokemonDayCare_EventScript_OnlyTwoAliveMons
+ msgbox Route117_PokemonDayCare_Text_WhichMonShouldWeRaise, MSGBOX_DEFAULT
fadescreen 1
special ChooseSendDaycareMon
waitstate
compare VAR_0x8004, 255
- goto_if_eq Route117_PokemonDayCare_EventScript_291DCA
+ goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain
specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
compare VAR_RESULT, 0
- goto_if_eq Route117_PokemonDayCare_EventScript_291DF7
- specialvar VAR_0x8005, GetSelectedMonNickAndSpecies
+ goto_if_eq Route117_PokemonDayCare_EventScript_OnlyOneAliveMon
+ specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies
waitse
playmoncry VAR_0x8005, 0
- msgbox Route117_PokemonDayCare_Text_292370, MSGBOX_DEFAULT
+ msgbox Route117_PokemonDayCare_Text_WellRaiseYourMon, MSGBOX_DEFAULT
waitmoncry
special StoreSelectedPokemonInDaycare
- incrementgamestat 47
+ incrementgamestat GAME_STAT_USED_DAYCARE
specialvar VAR_RESULT, GetDaycareState
- compare VAR_RESULT, 2
- goto_if_eq Route117_PokemonDayCare_EventScript_291DD4
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq Route117_PokemonDayCare_EventScript_CanRaiseOneMore
release
end
-Route117_PokemonDayCare_EventScript_291DCA:: @ 8291DCA
- msgbox Route117_PokemonDayCare_Text_292476, MSGBOX_DEFAULT
+Route117_PokemonDayCare_EventScript_ComeAgain:: @ 8291DCA
+ msgbox Route117_PokemonDayCare_Text_ComeAgain, MSGBOX_DEFAULT
release
end
-Route117_PokemonDayCare_EventScript_291DD4:: @ 8291DD4
- msgbox Route117_PokemonDayCare_Text_2923AF, MSGBOX_YESNO
+Route117_PokemonDayCare_EventScript_CanRaiseOneMore:: @ 8291DD4
+ msgbox Route117_PokemonDayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291D56
- goto Route117_PokemonDayCare_EventScript_291DCA
+ goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise
+ goto Route117_PokemonDayCare_EventScript_ComeAgain
end
-Route117_PokemonDayCare_EventScript_291DED:: @ 8291DED
- msgbox Route117_PokemonDayCare_Text_2925BB, MSGBOX_DEFAULT
+Route117_PokemonDayCare_EventScript_OnlyOneMon:: @ 8291DED
+ msgbox Route117_PokemonDayCare_Text_YouHaveJustOneMon, MSGBOX_DEFAULT
release
end
-Route117_PokemonDayCare_EventScript_291DF7:: @ 8291DF7
- msgbox Route117_PokemonDayCare_Text_292617, MSGBOX_DEFAULT
+Route117_PokemonDayCare_EventScript_OnlyOneAliveMon:: @ 8291DF7
+ msgbox Route117_PokemonDayCare_Text_WhatWillYouBattleWith, MSGBOX_DEFAULT
release
end
-Route117_PokemonDayCare_EventScript_291E01:: @ 8291E01
- msgbox Route117_PokemonDayCare_Text_29266D, MSGBOX_DEFAULT
+Route117_PokemonDayCare_EventScript_OnlyTwoAliveMons:: @ 8291E01
+ msgbox Route117_PokemonDayCare_Text_YoullBeLeftWithJustOne, MSGBOX_DEFAULT
release
end
-Route117_PokemonDayCare_EventScript_291E0B:: @ 8291E0B
- msgbox Route117_PokemonDayCare_Text_2923F6, MSGBOX_DEFAULT
+Route117_PokemonDayCare_EventScript_EggWaiting:: @ 8291E0B
+ msgbox Route117_PokemonDayCare_Text_HusbandWasLookingForYou, MSGBOX_DEFAULT
release
end
-Route117_PokemonDayCare_EventScript_291E15:: @ 8291E15
- msgbox Route117_PokemonDayCare_Text_2924CC, MSGBOX_DEFAULT
+Route117_PokemonDayCare_EventScript_YourMonHasGrownXLevels:: @ 8291E15
+ msgbox Route117_PokemonDayCare_Text_YourMonHasGrownXLevels, MSGBOX_DEFAULT
return
-Route117_PokemonDayCare_EventScript_291E1E:: @ 8291E1E
+Route117_PokemonDayCare_EventScript_DisplayLevelsGained:: @ 8291E1E
specialvar VAR_RESULT, GetNumLevelsGainedFromDaycare
compare VAR_RESULT, 0
- call_if_ne Route117_PokemonDayCare_EventScript_291E15
+ call_if_ne Route117_PokemonDayCare_EventScript_YourMonHasGrownXLevels
return
-Route117_PokemonDayCare_EventScript_291E2F:: @ 8291E2F
- msgbox Route117_PokemonDayCare_Text_292488, MSGBOX_DEFAULT
+Route117_PokemonDayCare_EventScript_OneMonInDaycare:: @ 8291E2F
+ msgbox Route117_PokemonDayCare_Text_GoodToSeeYou, MSGBOX_DEFAULT
setvar VAR_0x8004, 0
- call Route117_PokemonDayCare_EventScript_291E1E
- msgbox Route117_PokemonDayCare_Text_2923AF, MSGBOX_YESNO
+ call Route117_PokemonDayCare_EventScript_DisplayLevelsGained
+ msgbox Route117_PokemonDayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291D56
- msgbox Route117_PokemonDayCare_Text_2925F6, MSGBOX_YESNO
+ goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise
+ msgbox Route117_PokemonDayCare_Text_TakeYourMonBack, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291E6D
- goto Route117_PokemonDayCare_EventScript_291DCA
+ goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon
+ goto Route117_PokemonDayCare_EventScript_ComeAgain
end
-Route117_PokemonDayCare_EventScript_291E6D:: @ 8291E6D
+Route117_PokemonDayCare_EventScript_TryRetrieveMon:: @ 8291E6D
specialvar VAR_RESULT, CalculatePlayerPartyCount
- compare VAR_RESULT, 6
- goto_if_eq Route117_PokemonDayCare_EventScript_291F3D
+ compare VAR_RESULT, PARTY_SIZE
+ goto_if_eq Route117_PokemonDayCare_EventScript_NoRoom
specialvar VAR_RESULT, GetDaycareState
setvar VAR_0x8004, 0
- compare VAR_RESULT, 2
- goto_if_eq Route117_PokemonDayCare_EventScript_291EAC
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq Route117_PokemonDayCare_EventScript_CostPrompt
special ShowDaycareLevelMenu
waitstate
copyvar VAR_0x8004, VAR_RESULT
- compare VAR_RESULT, 2
- goto_if_eq Route117_PokemonDayCare_EventScript_291DCA
- goto Route117_PokemonDayCare_EventScript_291EAC
+ compare VAR_RESULT, DAYCARE_EXITED_LEVEL_MENU
+ goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain
+ goto Route117_PokemonDayCare_EventScript_CostPrompt
end
-Route117_PokemonDayCare_EventScript_291EAC:: @ 8291EAC
+Route117_PokemonDayCare_EventScript_CostPrompt:: @ 8291EAC
special GetDaycareCost
- msgbox Route117_PokemonDayCare_Text_292549, MSGBOX_YESNO
+ msgbox Route117_PokemonDayCare_Text_ItWillCostX, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291EC8
- goto Route117_PokemonDayCare_EventScript_291DCA
+ goto_if_eq Route117_PokemonDayCare_EventScript_CheckEnoughMoney
+ goto Route117_PokemonDayCare_EventScript_ComeAgain
end
-Route117_PokemonDayCare_EventScript_291EC8:: @ 8291EC8
+Route117_PokemonDayCare_EventScript_CheckEnoughMoney:: @ 8291EC8
specialvar VAR_RESULT, IsEnoughForCostInVar0x8005
compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291EE2
- msgbox Route117_PokemonDayCare_Text_292432, MSGBOX_DEFAULT
+ goto_if_eq Route117_PokemonDayCare_EventScript_RetrieveMon
+ msgbox Route117_PokemonDayCare_Text_NotEnoughMoney, MSGBOX_DEFAULT
release
end
-Route117_PokemonDayCare_EventScript_291EE2:: @ 8291EE2
- applymovement 1, Route117_PokemonDayCare_Movement_291F47
+Route117_PokemonDayCare_EventScript_RetrieveMon:: @ 8291EE2
+ applymovement 1, Route117_PokemonDayCare_Movement_RetrieveDaycareMon
waitmovement 0
specialvar VAR_RESULT, TakePokemonFromDaycare
special SubtractMoneyFromVar0x8005
playse SE_REGI
- msgbox Route117_PokemonDayCare_Text_292575, MSGBOX_DEFAULT
+ msgbox Route117_PokemonDayCare_Text_HeresYourMon, MSGBOX_DEFAULT
waitse
playmoncry VAR_RESULT, 0
- msgbox Route117_PokemonDayCare_Text_292593, MSGBOX_DEFAULT
+ msgbox Route117_PokemonDayCare_Text_TookBackMon, MSGBOX_DEFAULT
waitmoncry
specialvar VAR_RESULT, GetDaycareState
- compare VAR_RESULT, 2
- goto_if_eq Route117_PokemonDayCare_EventScript_291F24
- goto Route117_PokemonDayCare_EventScript_291DCA
+ compare VAR_RESULT, DAYCARE_ONE_MON
+ goto_if_eq Route117_PokemonDayCare_EventScript_AskRetrieveOtherMon
+ goto Route117_PokemonDayCare_EventScript_ComeAgain
end
-Route117_PokemonDayCare_EventScript_291F24:: @ 8291F24
- msgbox Route117_PokemonDayCare_Text_29244F, MSGBOX_YESNO
+Route117_PokemonDayCare_EventScript_AskRetrieveOtherMon:: @ 8291F24
+ msgbox Route117_PokemonDayCare_Text_TakeOtherOneBackToo, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291E6D
- goto Route117_PokemonDayCare_EventScript_291DCA
+ goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon
+ goto Route117_PokemonDayCare_EventScript_ComeAgain
end
-Route117_PokemonDayCare_EventScript_291F3D:: @ 8291F3D
- msgbox Route117_PokemonDayCare_Text_2924EF, MSGBOX_DEFAULT
+Route117_PokemonDayCare_EventScript_NoRoom:: @ 8291F3D
+ msgbox Route117_PokemonDayCare_Text_YourTeamIsFull, MSGBOX_DEFAULT
release
end
-Route117_PokemonDayCare_Movement_291F47: @ 8291F47
+Route117_PokemonDayCare_Movement_RetrieveDaycareMon: @ 8291F47
delay_16
delay_16
face_left
@@ -261,50 +261,52 @@ Route117_PokemonDayCare_Movement_291F47: @ 8291F47
walk_slow_down
step_end
+@ Unused. Possibly a commented script, or a typo end added to the above Movement script
Route117_PokemonDayCare_EventScript_291F5B:: @ 8291F5B
end
-Route117_PokemonDayCare_EventScript_291F5C:: @ 8291F5C
- msgbox Route117_PokemonDayCare_Text_292488, MSGBOX_DEFAULT
+Route117_PokemonDayCare_EventScript_TwoMonsInDaycare:: @ 8291F5C
+ msgbox Route117_PokemonDayCare_Text_GoodToSeeYou, MSGBOX_DEFAULT
setvar VAR_0x8004, 0
- call Route117_PokemonDayCare_EventScript_291E1E
+ call Route117_PokemonDayCare_EventScript_DisplayLevelsGained
setvar VAR_0x8004, 1
- call Route117_PokemonDayCare_EventScript_291E1E
- msgbox Route117_PokemonDayCare_Text_2925F6, MSGBOX_YESNO
+ call Route117_PokemonDayCare_EventScript_DisplayLevelsGained
+ msgbox Route117_PokemonDayCare_Text_TakeYourMonBack, MSGBOX_YESNO
compare VAR_RESULT, 1
- goto_if_eq Route117_PokemonDayCare_EventScript_291E6D
- msgbox Route117_PokemonDayCare_Text_292476, MSGBOX_DEFAULT
+ goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon
+ msgbox Route117_PokemonDayCare_Text_ComeAgain, MSGBOX_DEFAULT
release
end
+@ Unused
Route117_PokemonDayCare_EventScript_291F95:: @ 8291F95
special ShowDaycareLevelMenu
waitstate
compare VAR_RESULT, 2
- goto_if_eq Route117_PokemonDayCare_EventScript_291DCA
+ goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain
copyvar VAR_0x8004, VAR_RESULT
specialvar VAR_RESULT, TakePokemonFromDaycare
- msgbox Route117_PokemonDayCare_Text_292575, MSGBOX_DEFAULT
- msgbox Route117_PokemonDayCare_Text_292476, MSGBOX_DEFAULT
+ msgbox Route117_PokemonDayCare_Text_HeresYourMon, MSGBOX_DEFAULT
+ msgbox Route117_PokemonDayCare_Text_ComeAgain, MSGBOX_DEFAULT
release
end
EventScript_EggHatch:: @ 8291FC0
lockall
- msgbox Text_292668, MSGBOX_DEFAULT
+ msgbox Text_EggHatchHuh, MSGBOX_DEFAULT
special EggHatch
waitstate
releaseall
end
-Route117_Text_291FCF: @ 8291FCF
+Route117_Text_SeeWifeIfYoudLikeMeToRaiseMon: @ 8291FCF
.string "I'm the DAY-CARE MAN.\p"
.string "I help take care of the precious\n"
.string "POKéMON of TRAINERS.\p"
.string "If you'd like me to raise your POKéMON,\n"
.string "have a word with my wife.$"
-Route117_Text_29205D: @ 829205D
+Route117_Text_DoYouWantEgg: @ 829205D
.string "Ah, it's you!\p"
.string "We were raising your POKéMON,\n"
.string "and my goodness, were we surprised!\p"
@@ -313,124 +315,125 @@ Route117_Text_29205D: @ 829205D
.string "but your POKéMON had it.\p"
.string "You do want it, yes?$"
-Route117_Text_292114: @ 8292114
+Route117_Text_YourMonIsDoingFine: @ 8292114
.string "Ah, it's you! Good to see you.\n"
.string "Your {STR_VAR_1}'s doing fine.$"
-Route117_Text_292149: @ 8292149
+Route117_Text_IllKeepIt: @ 8292149
.string "Well then, I'll keep it.\n"
.string "Thanks!$"
-Route117_Text_29216A: @ 829216A
+Route117_Text_YouHaveNoRoomForIt: @ 829216A
.string "You have no room for it…\n"
.string "Come back when you've made room.$"
-Route117_Text_2921A4: @ 82921A4
+Route117_Text_ReceivedEgg: @ 82921A4
.string "{PLAYER} received the EGG from\n"
.string "the DAY-CARE MAN.$"
-Route117_Text_2921CF: @ 82921CF
+Route117_Text_TakeGoodCareOfIt: @ 82921CF
.string "Take good care of it.$"
-Route117_Text_2921E5: @ 82921E5
+Route117_Text_FriendlyWithOtherTrainersMon: @ 82921E5
.string "By the way, about your {STR_VAR_1},\n"
.string "it seemed to be friendly with\l"
.string "{STR_VAR_2}'s {STR_VAR_3}.\p"
.string "I may even have seen it receiving\n"
.string "a piece of MAIL.$"
-Route117_Text_29225A: @ 829225A
+@ Unused
+Route117_Text_SeeWifeIfYouWantToPickUpMon: @ 829225A
.string "If you want to pick up your POKéMON,\n"
.string "have a word with my wife.$"
-Route117_Text_292299: @ 8292299
+Route117_Text_YourMonsAreDoingFine: @ 8292299
.string "Ah, it's you! Your {STR_VAR_1} and\n"
.string "{STR_VAR_2} are doing fine.$"
-Route117_Text_2922C6: @ 82922C6
+Route117_Text_IWillKeepDoYouWantIt: @ 82922C6
.string "I really will keep it.\n"
.string "You do want this, yes?$"
-Route117_PokemonDayCare_Text_2922F4: @ 82922F4
+Route117_PokemonDayCare_Text_WouldYouLikeUsToRaiseAMon: @ 82922F4
.string "I'm the DAY-CARE LADY.\p"
.string "We can raise POKéMON for you.\p"
.string "Would you like us to raise one?$"
-Route117_PokemonDayCare_Text_292349: @ 8292349
+Route117_PokemonDayCare_Text_WhichMonShouldWeRaise: @ 8292349
.string "Which POKéMON should we raise for\n"
.string "you?$"
-Route117_PokemonDayCare_Text_292370: @ 8292370
+Route117_PokemonDayCare_Text_WellRaiseYourMon: @ 8292370
.string "Fine, we'll raise your {STR_VAR_1}\n"
.string "for a while.\p"
.string "Come back for it later.$"
-Route117_PokemonDayCare_Text_2923AF: @ 82923AF
+Route117_PokemonDayCare_Text_WeCanRaiseOneMore: @ 82923AF
.string "We can raise two of your POKéMON.\n"
.string "Would you like us to raise one more?$"
-Route117_PokemonDayCare_Text_2923F6: @ 82923F6
+Route117_PokemonDayCare_Text_HusbandWasLookingForYou: @ 82923F6
.string "My husband was looking for you.$"
Route117_PokemonDayCare_Text_292416: @ 8292416
.string "Oh, fine, then.\n"
.string "Come again.$"
-Route117_PokemonDayCare_Text_292432: @ 8292432
+Route117_PokemonDayCare_Text_NotEnoughMoney: @ 8292432
.string "You don't have enough money…$"
-Route117_PokemonDayCare_Text_29244F: @ 829244F
+Route117_PokemonDayCare_Text_TakeOtherOneBackToo: @ 829244F
.string "Will you take back the other one,\n"
.string "too?$"
-Route117_PokemonDayCare_Text_292476: @ 8292476
+Route117_PokemonDayCare_Text_ComeAgain: @ 8292476
.string "Fine.\n"
.string "Come again.$"
-Route117_PokemonDayCare_Text_292488: @ 8292488
+Route117_PokemonDayCare_Text_GoodToSeeYou: @ 8292488
.string "Ah, it's you! Good to see you.\n"
.string "Your POKéMON can only be doing good!$"
-Route117_PokemonDayCare_Text_2924CC: @ 82924CC
+Route117_PokemonDayCare_Text_YourMonHasGrownXLevels: @ 82924CC
.string "By level, your {STR_VAR_1} has\n"
.string "grown by {STR_VAR_2}.$"
-Route117_PokemonDayCare_Text_2924EF: @ 82924EF
+Route117_PokemonDayCare_Text_YourTeamIsFull: @ 82924EF
.string "Your POKéMON team is full.\n"
.string "Make room, then come see me.$"
Route117_PokemonDayCare_Text_292527: @ 8292527
.string "Which POKéMON will you take back?$"
-Route117_PokemonDayCare_Text_292549: @ 8292549
+Route117_PokemonDayCare_Text_ItWillCostX: @ 8292549
.string "If you want your {STR_VAR_1} back,\n"
.string "it will cost ¥{STR_VAR_2}.$"
-Route117_PokemonDayCare_Text_292575: @ 8292575
+Route117_PokemonDayCare_Text_HeresYourMon: @ 8292575
.string "Perfect!\n"
.string "Here's your POKéMON.$"
-Route117_PokemonDayCare_Text_292593: @ 8292593
+Route117_PokemonDayCare_Text_TookBackMon: @ 8292593
.string "{PLAYER} took back {STR_VAR_1} from\n"
.string "the DAY-CARE LADY.$"
-Route117_PokemonDayCare_Text_2925BB: @ 82925BB
+Route117_PokemonDayCare_Text_YouHaveJustOneMon: @ 82925BB
.string "Oh? But you have just one\n"
.string "POKéMON.\p"
.string "Come back another time.$"
-Route117_PokemonDayCare_Text_2925F6: @ 82925F6
+Route117_PokemonDayCare_Text_TakeYourMonBack: @ 82925F6
.string "Will you take your POKéMON back?$"
-Route117_PokemonDayCare_Text_292617: @ 8292617
+Route117_PokemonDayCare_Text_WhatWillYouBattleWith: @ 8292617
.string "If you leave me that POKéMON,\n"
.string "what will you battle with?\p"
.string "Come back another time.$"
-Text_292668: @ 8292668
+Text_EggHatchHuh: @ 8292668
.string "Huh?$"
-Route117_PokemonDayCare_Text_29266D: @ 829266D
+Route117_PokemonDayCare_Text_YoullBeLeftWithJustOne: @ 829266D
.string "Huh?\n"
.string "Now, now.\p"
.string "If you leave that POKéMON with\n"
diff --git a/data/scripts/mystery_event_club.inc b/data/scripts/mystery_event_club.inc
index cc189a96b..c8cb84107 100644
--- a/data/scripts/mystery_event_club.inc
+++ b/data/scripts/mystery_event_club.inc
@@ -8,12 +8,12 @@ PetalburgCity_PokemonCenter_1F_EventScript_291539:: @ 8291539
PetalburgCity_PokemonCenter_1F_EventScript_291552:: @ 8291552
msgbox PetalburgCity_PokemonCenter_1F_Text_2916FF, MSGBOX_DEFAULT
- multichoice 17, 6, 20, 0
+ multichoice 17, 6, MULTI_YESNOINFO_2, 0
switch VAR_RESULT
case 0, PetalburgCity_PokemonCenter_1F_EventScript_29159F
case 1, PetalburgCity_PokemonCenter_1F_EventScript_2915EB
case 2, PetalburgCity_PokemonCenter_1F_EventScript_291591
- case 127, PetalburgCity_PokemonCenter_1F_EventScript_2915EB
+ case MULTI_B_PRESSED, PetalburgCity_PokemonCenter_1F_EventScript_2915EB
end
PetalburgCity_PokemonCenter_1F_EventScript_291591:: @ 8291591
@@ -60,12 +60,12 @@ PetalburgCity_PokemonCenter_1F_EventScript_2915F5:: @ 82915F5
PetalburgCity_PokemonCenter_1F_EventScript_291603:: @ 8291603
msgbox PetalburgCity_PokemonCenter_1F_Text_291A4F, MSGBOX_DEFAULT
- multichoice 17, 6, 20, 0
+ multichoice 17, 6, MULTI_YESNOINFO_2, 0
switch VAR_RESULT
case 0, PetalburgCity_PokemonCenter_1F_EventScript_291650
case 1, PetalburgCity_PokemonCenter_1F_EventScript_29167C
case 2, PetalburgCity_PokemonCenter_1F_EventScript_291642
- case 127, PetalburgCity_PokemonCenter_1F_EventScript_29167C
+ case MULTI_B_PRESSED, PetalburgCity_PokemonCenter_1F_EventScript_29167C
end
PetalburgCity_PokemonCenter_1F_EventScript_291642:: @ 8291642
diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc
index c4a5ffe86..855c5eac2 100644
--- a/data/scripts/players_house.inc
+++ b/data/scripts/players_house.inc
@@ -507,7 +507,7 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2
compare VAR_0x8008, 1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D9D
msgbox LittlerootTown_BrendansHouse_1F_Text_1F8351, MSGBOX_DEFAULT
- multichoice 22, 8, 108, 1
+ multichoice 22, 8, MULTI_TV_LATI, 1
copyvar VAR_0x8004, VAR_RESULT
special InitRoamer
copyvar VAR_ROAMER_POKEMON, VAR_RESULT
diff --git a/data/scripts/pokeblocks.inc b/data/scripts/pokeblocks.inc
index a26ecb4c9..7b3932341 100644
--- a/data/scripts/pokeblocks.inc
+++ b/data/scripts/pokeblocks.inc
@@ -714,12 +714,12 @@ LilycoveCity_ContestLobby_EventScript_2941ED: @ 82941ED
EventScript_PblocLink_DecideLeader: @ 82941F8
message Text_DecideLinkLeader
waitmessage
- multichoice 16, 6, 81, 0
+ multichoice 16, 6, MULTI_LINK_LEADER, 0
switch VAR_RESULT
case 0, EventScript_PblocLink_TryJoinGroup
case 1, EventScript_PblocLink_TryBecomeLeader
case 2, EventScript_PblocLink_CloseLink
- case 127, EventScript_PblocLink_CloseLink
+ case MULTI_B_PRESSED, EventScript_PblocLink_CloseLink
end
EventScript_PblocLink_TryBecomeLeader: @ 8294235
diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc
index c205a9d22..21ba0d6d3 100644
--- a/data/scripts/trainer_battle.inc
+++ b/data/scripts/trainer_battle.inc
@@ -26,7 +26,7 @@ EventScript_TryDoDoubleTrainerBattle:: @ 827138A
compare VAR_RESULT, 0
goto_if_ne EventScript_NoDoubleTrainerBattle
special HasEnoughMonsForDoubleBattle
- compare VAR_RESULT, 0
+ compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
goto_if_ne EventScript_NotEnoughMonsForDoubleBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
@@ -69,7 +69,7 @@ EventScript_TryDoDoubleRematchBattle:: @ 82713F8
compare VAR_RESULT, 0
goto_if_eq EventScript_NoDoubleRematchTrainerBattle
special HasEnoughMonsForDoubleBattle
- compare VAR_RESULT, 0
+ compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
goto_if_ne EventScript_NotEnoughMonsForDoubleRematchBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
diff --git a/data/specials.inc b/data/specials.inc
index ba93b098d..096a3b33d 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -197,7 +197,7 @@ gSpecials:: @ 81DBA64
def_special RejectEggFromDayCare
def_special GiveEggFromDaycare
def_special SetDaycareCompatibilityString
- def_special GetSelectedMonNickAndSpecies
+ def_special GetSelectedMonNicknameAndSpecies
def_special StoreSelectedPokemonInDaycare
def_special ChooseSendDaycareMon
def_special ShowDaycareLevelMenu
@@ -206,7 +206,7 @@ gSpecials:: @ 81DBA64
def_special TakePokemonFromDaycare
def_special ScriptHatchMon
def_special EggHatch
- def_special sub_8071614
+ def_special CheckDaycareMonReceivedMail
def_special ShowLinkBattleRecords
def_special IsEnoughForCostInVar0x8005
def_special SubtractMoneyFromVar0x8005
@@ -227,7 +227,7 @@ gSpecials:: @ 81DBA64
def_special ShowPokedexRatingMessage
def_special DoPCTurnOnEffect
def_special DoPCTurnOffEffect
- def_special SetDepartmentStoreFloorVar
+ def_special SetDeptStoreFloor
def_special DoLotteryCornerComputerEffect
def_special EndLotteryCornerComputerEffect
def_special sub_81B951C
@@ -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
@@ -284,8 +284,8 @@ gSpecials:: @ 81DBA64
def_special sub_80FB7A4
def_special DoSoftReset
def_special GameClear
- def_special ShakeScreenInElevator
- def_special nullsub_55
+ def_special MoveElevator
+ def_special ShowGlassWorkshopMenu
def_special SpawnCameraObject
def_special RemoveCameraObject
def_special GetPokeblockNameByMonNature
@@ -316,7 +316,7 @@ gSpecials:: @ 81DBA64
def_special CopyCurSecretBaseOwnerName_StrVar1
def_special ScriptCheckFreePokemonStorageSpace
def_special DoSealedChamberShakingEffect1
- def_special sub_8139B60
+ def_special ShowDeptStoreElevatorFloorSelect
def_special GetShieldToyTVDecorationInfo
def_special IsPokerusInParty
def_special SetSootopolisGymCrackedIceMetatiles
@@ -339,7 +339,7 @@ gSpecials:: @ 81DBA64
def_special ScriptGetMultiplayerId
def_special ScriptGetPartyMonSpecies
def_special sub_81B98DC
- def_special nullsub_54
+ def_special TryInitBattleTowerAwardManEventObject
def_special MoveOutOfSecretBaseFromOutside
def_special LoadPlayerBag
def_special sub_80B05B4
@@ -356,7 +356,7 @@ gSpecials:: @ 81DBA64
def_special sub_80EE2CC
def_special sub_80EE72C
def_special sub_80EE7C0
- def_special nullsub_55
+ def_special ShowGlassWorkshopMenu
def_special PutFanClubSpecialOnTheAir
def_special sub_80EED10
def_special sub_80EED34
@@ -422,7 +422,7 @@ gSpecials:: @ 81DBA64
def_special DoMirageTowerCeilingCrumble
def_special SetMirageTowerVisibility
def_special StartPlayerDescendMirageTower
- def_special sub_81398C0
+ def_special BufferTMHMMoveName
def_special IsWirelessAdapterConnected
def_special BerryBlenderLinkBecomeLeader
def_special BerryBlenderLinkJoinGroup
@@ -433,7 +433,7 @@ gSpecials:: @ 81DBA64
def_special sub_801DC20
def_special sub_81B8958
def_special sub_8018090
- def_special sub_813990C
+ def_special IsBadEggInParty
def_special ValidateReceivedWonderCard
def_special HasAtLeastOneBerry
def_special sub_802C920
@@ -441,8 +441,8 @@ gSpecials:: @ 81DBA64
def_special sub_8027A5C
def_special sub_8027AAC
def_special sub_8139980
- def_special sub_81399F4
- def_special sub_8139D98
+ def_special GetDeptStoreDefaultFloorChoice
+ def_special BufferVarsForIVRater
def_special sub_80F905C
def_special sub_800B518
def_special sub_80F90DC
@@ -450,43 +450,43 @@ gSpecials:: @ 81DBA64
def_special sub_80F9160
def_special ShowRankingHallRecordsWindow
def_special ScrollRankingHallRecordsWindow
- def_special sub_8139F20
+ def_special ShowFrontierManiacMessage
def_special sub_80F9134
def_special sub_80F9154
def_special sub_80B3028
- def_special sub_813A128
+ def_special ShowScrollableMultichoice
def_special sub_813A630
- def_special sub_813A080
+ def_special BufferBattleTowerElevatorFloors
def_special sub_81C6A94
def_special sub_81C4F24
def_special sub_81B95E0
def_special sub_81B9620
- def_special sub_813A76C
- def_special sub_813A7B8
- def_special sub_813A958
- def_special sub_813A8FC
- def_special sub_813A988
- def_special sub_813A9D0
- def_special sub_813A9A4
- def_special sub_813AA04
- def_special sub_813AA18
- def_special sub_813AA44
+ def_special SetBattleTowerLinkPlayerGfx
+ def_special ShowNatureGirlMessage
+ def_special ShowBattlePointsWindow
+ def_special UpdateBattlePointsWindow
+ def_special CloseBattlePointsWindow
+ def_special GiveFrontierBattlePoints
+ def_special TakeFrontierBattlePoints
+ def_special GetFrontierBattlePoints
+ def_special ShowFrontierExchangeCornerItemIconWindow
+ def_special CloseFrontierExchangeCornerItemIconWindow
def_special DisplayBerryPowderVendorMenu
def_special RemoveBerryPowderVendorMenu
def_special HasEnoughBerryPowder
def_special TakeBerryPowder
def_special PrintPlayerBerryPowderAmount
- def_special sub_813A820
- def_special sub_813A854
- def_special sub_813B7D8
+ def_special ShowFrontierGamblerLookingMessage
+ def_special ShowFrontierGamblerGoMessage
+ def_special Script_DoRayquazaScene
def_special sub_81C72A4
- def_special sp106_CreateStartMenu
+ def_special ScriptMenu_CreateStartMenuForPokenavTutorial
def_special CountPlayerTrainerStars
- def_special sub_813AC7C
- def_special sub_813ADB8
+ def_special BufferBattleFrontierTutorMoveName
+ def_special CloseBattleFrontierTutorWindow
def_special sub_813ADD4
def_special sub_81B892C
- def_special sub_813AEB4
+ def_special GetBattleFrontierTutorMoveIndex
def_special sub_813AF48
def_special DoDeoxysRockInteraction
def_special sub_813B1D0
@@ -495,28 +495,28 @@ gSpecials:: @ 81DBA64
def_special StartMirageTowerShake
def_special StartMirageTowerFossilFallAndSink
def_special ChangeBoxPokemonNickname
- def_special get_unknown_box_id
- def_special sub_813B21C
+ def_special GetPCBoxToSendMon
+ def_special ShouldShowBoxWasFullMessage
def_special SetMatchCallRegisteredFlag
def_special sub_8175280
def_special CreateUnusualWeatherEvent
def_special GetUnusualWeatherMapNameAndType
- def_special sub_813B490
+ def_special GetMartEmployeeObjectEventId
def_special sub_80A08CC
def_special Unused_SetWeatherSunny
def_special sub_81AFDA0
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
def_special sub_813B568
def_special sub_813B534
def_special CallTrainerHillFunction
- def_special sub_813B7D8
+ def_special Script_DoRayquazaScene @ Listed twice
def_special sub_813B80C
def_special sub_81D4BEC
def_special sub_80224D0
@@ -524,14 +524,14 @@ gSpecials:: @ 81DBA64
def_special DoWaldaNamingScreen
def_special TryGetWallpaperWithWaldaPhrase
def_special sub_8139ED0
- def_special sub_813B968
+ def_special GetBattlePyramidHint
def_special sub_80F8B94
def_special ShowTrainerHillRecords
def_special sub_80B4808
- def_special sub_813B9A0
+ def_special ResetHealLocationFromDewford
def_special sub_81B9918
- def_special sub_80722E0
+ def_special CountPartyAliveNonEggMons
def_special TryPrepareSecondApproachingTrainer
def_special RemoveRecordsWindow
- def_special sub_8139C10
+ def_special CloseDeptStoreElevatorWindow
def_special sub_80B3BC4
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/gflib/bg.c b/gflib/bg.c
index 1678f4023..ab4e8b60d 100644
--- a/gflib/bg.c
+++ b/gflib/bg.c
@@ -1174,78 +1174,29 @@ u32 GetTileMapIndexFromCoords(s32 x, s32 y, s32 screenSize, u32 screenWidth, u32
return (y * 0x20) + x;
}
-#ifdef NONMATCHING // This one has some weird switch statement cases that refuse to cooperate
void CopyTileMapEntry(const u16 *src, u16 *dest, s32 palette1, s32 tileOffset, s32 palette2)
{
u16 var;
+
+ if (palette1 == 16)
+ goto CASE_16;
switch (palette1)
{
case 0 ... 16:
- if (palette1 != 16)
- var = ((*src + tileOffset) & 0xFFF) + ((palette1 + palette2) << 12);
- else
- var = ((*dest & 0xFC00) + (palette2 << 12)) | ((*src + tileOffset) & 0x3FF);
+ var = ((*src + tileOffset) & 0xFFF) + ((palette1 + palette2) << 12);
+ break;
+ CASE_16:
+ var = *dest;
+ var &= 0xFC00;
+ var += palette2 << 12;
+ var |= (*src + tileOffset) & 0x3FF;
break;
default:
var = *src + tileOffset + (palette2 << 12);
break;
}
-
*dest = var;
}
-#else
-NAKED
-void CopyTileMapEntry(const u16 *src, u16 *dest, s32 palette1, s32 tileOffset, s32 palette2)
-{
- asm("push {r4-r6,lr}\n\
- add r4, r0, #0\n\
- add r6, r1, #0\n\
- ldr r5, [sp, #0x10]\n\
- cmp r2, #0x10\n\
- beq _08002B14\n\
- cmp r2, #0x10\n\
- bgt _08002B34\n\
- cmp r2, #0\n\
- blt _08002B34\n\
- ldrh r0, [r4]\n\
- add r0, r3\n\
- ldr r3, =0x00000fff\n\
- add r1, r3, #0\n\
- and r0, r1\n\
- add r1, r2, r5\n\
- lsl r1, #12\n\
- b _08002B3A\n\
- .pool\n\
-_08002B14:\n\
- ldrh r1, [r6]\n\
- mov r0, #0xFC\n\
- lsl r0, #8\n\
- and r1, r0\n\
- lsl r2, r5, #12\n\
- add r2, r1, r2\n\
- ldrh r0, [r4]\n\
- add r0, r3\n\
- ldr r3, =0x000003ff\n\
- add r1, r3, #0\n\
- and r0, r1\n\
- orr r0, r2\n\
- b _08002B3C\n\
- .pool\n\
-_08002B34:\n\
- ldrh r0, [r4]\n\
- add r0, r3\n\
- lsl r1, r5, #12\n\
-_08002B3A:\n\
- add r0, r1\n\
-_08002B3C:\n\
- lsl r0, #16\n\
- lsr r1, r0, #16\n\
- strh r1, [r6]\n\
- pop {r4-r6}\n\
- pop {r0}\n\
- bx r0\n");
-}
-#endif // NONMATCHING
u32 GetBgType(u8 bg)
{
diff --git a/gflib/string_util.c b/gflib/string_util.c
index 39d235ab8..bce299057 100644
--- a/gflib/string_util.c
+++ b/gflib/string_util.c
@@ -505,20 +505,20 @@ const u8 *GetExpandedPlaceholder(u32 id)
static const ExpandPlaceholderFunc funcs[] =
{
- ExpandPlaceholder_UnknownStringVar,
- ExpandPlaceholder_PlayerName,
- ExpandPlaceholder_StringVar1,
- ExpandPlaceholder_StringVar2,
- ExpandPlaceholder_StringVar3,
- ExpandPlaceholder_KunChan,
- ExpandPlaceholder_RivalName,
- ExpandPlaceholder_Version,
- ExpandPlaceholder_Aqua,
- ExpandPlaceholder_Magma,
- ExpandPlaceholder_Archie,
- ExpandPlaceholder_Maxie,
- ExpandPlaceholder_Kyogre,
- ExpandPlaceholder_Groudon,
+ [PLACEHOLDER_ID_UNKNOWN] = ExpandPlaceholder_UnknownStringVar,
+ [PLACEHOLDER_ID_PLAYER] = ExpandPlaceholder_PlayerName,
+ [PLACEHOLDER_ID_STRING_VAR_1] = ExpandPlaceholder_StringVar1,
+ [PLACEHOLDER_ID_STRING_VAR_2] = ExpandPlaceholder_StringVar2,
+ [PLACEHOLDER_ID_STRING_VAR_3] = ExpandPlaceholder_StringVar3,
+ [PLACEHOLDER_ID_KUN] = ExpandPlaceholder_KunChan,
+ [PLACEHOLDER_ID_RIVAL] = ExpandPlaceholder_RivalName,
+ [PLACEHOLDER_ID_VERSION] = ExpandPlaceholder_Version,
+ [PLACEHOLDER_ID_AQUA] = ExpandPlaceholder_Aqua,
+ [PLACEHOLDER_ID_MAGMA] = ExpandPlaceholder_Magma,
+ [PLACEHOLDER_ID_ARCHIE] = ExpandPlaceholder_Archie,
+ [PLACEHOLDER_ID_MAXIE] = ExpandPlaceholder_Maxie,
+ [PLACEHOLDER_ID_KYOGRE] = ExpandPlaceholder_Kyogre,
+ [PLACEHOLDER_ID_GROUDON] = ExpandPlaceholder_Groudon,
};
if (id >= ARRAY_COUNT(funcs))
diff --git a/gflib/text.h b/gflib/text.h
index d3ff663bb..e37773475 100644
--- a/gflib/text.h
+++ b/gflib/text.h
@@ -114,6 +114,21 @@
// 0x7
#define TEXT_COLOR_BLUE 0x8
+#define PLACEHOLDER_ID_UNKNOWN 0x0
+#define PLACEHOLDER_ID_PLAYER 0x1
+#define PLACEHOLDER_ID_STRING_VAR_1 0x2
+#define PLACEHOLDER_ID_STRING_VAR_2 0x3
+#define PLACEHOLDER_ID_STRING_VAR_3 0x4
+#define PLACEHOLDER_ID_KUN 0x5
+#define PLACEHOLDER_ID_RIVAL 0x6
+#define PLACEHOLDER_ID_VERSION 0x7
+#define PLACEHOLDER_ID_AQUA 0x8
+#define PLACEHOLDER_ID_MAGMA 0x9
+#define PLACEHOLDER_ID_ARCHIE 0xA
+#define PLACEHOLDER_ID_MAXIE 0xB
+#define PLACEHOLDER_ID_KYOGRE 0xC
+#define PLACEHOLDER_ID_GROUDON 0xD
+
// battle placeholders are located in battle_message.h
#define NUM_TEXT_PRINTERS 32
diff --git a/include/battle.h b/include/battle.h
index 0f4087c90..32eabc6de 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -37,7 +37,6 @@
#define B_ACTION_NONE 0xFF
#define MAX_TRAINER_ITEMS 4
-#define MAX_MON_MOVES 4
// array entries for battle communication
#define MULTIUSE_STATE 0x0
@@ -180,19 +179,19 @@ struct AI_ThinkingStruct
u8 aiState;
u8 movesetIndex;
u16 moveConsidered;
- s8 score[4];
+ s8 score[MAX_MON_MOVES];
u32 funcResult;
u32 aiFlags;
u8 aiAction;
u8 aiLogicId;
u8 filler12[6];
- u8 simulatedRNG[4];
+ u8 simulatedRNG[MAX_MON_MOVES];
};
struct UsedMoves
{
- u16 moves[MAX_BATTLERS_COUNT];
- u16 unknown[MAX_BATTLERS_COUNT];
+ u16 moves[MAX_MON_MOVES];
+ u16 unknown[MAX_MON_MOVES];
};
struct BattleHistory
diff --git a/include/battle_controllers.h b/include/battle_controllers.h
index 9449f1986..365229fda 100644
--- a/include/battle_controllers.h
+++ b/include/battle_controllers.h
@@ -97,16 +97,16 @@ struct HpAndStatus
struct MovePpInfo
{
- u16 moves[4];
- u8 pp[4];
+ u16 moves[MAX_MON_MOVES];
+ u8 pp[MAX_MON_MOVES];
u8 ppBonuses;
};
struct ChooseMoveStruct
{
- u16 moves[4];
- u8 currentPp[4];
- u8 maxPp[4];
+ u16 moves[MAX_MON_MOVES];
+ u8 currentPp[MAX_MON_MOVES];
+ u8 maxPp[MAX_MON_MOVES];
u16 species;
u8 monType1;
u8 monType2;
diff --git a/include/battle_tower.h b/include/battle_tower.h
index 12d6d2e9e..8bc6e6554 100644
--- a/include/battle_tower.h
+++ b/include/battle_tower.h
@@ -7,7 +7,7 @@ struct RSBattleTowerRecord
/*0x01*/ u8 facilityClass;
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
- /*0x0C*/ u8 trainerId[4];
+ /*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
/*0x10*/ u16 greeting[6];
/*0x1C*/ struct BattleTowerPokemon party[3];
/*0xA0*/ u32 checksum;
@@ -27,7 +27,7 @@ struct BattleFrontierTrainer
struct FacilityMon
{
u16 species;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u8 itemTableId;
u8 evSpread;
u8 nature;
diff --git a/include/berry.h b/include/berry.h
index 9ff18e198..ebe1e9a38 100644
--- a/include/berry.h
+++ b/include/berry.h
@@ -1,39 +1,6 @@
#ifndef GUARD_BERRY_H
#define GUARD_BERRY_H
-#define BERRY_NONE 0
-
-enum
-{
- BERRY_FIRMNESS_UNKNOWN,
- BERRY_FIRMNESS_VERY_SOFT,
- BERRY_FIRMNESS_SOFT,
- BERRY_FIRMNESS_HARD,
- BERRY_FIRMNESS_VERY_HARD,
- BERRY_FIRMNESS_SUPER_HARD,
-};
-
-enum
-{
- FLAVOR_SPICY,
- FLAVOR_DRY,
- FLAVOR_SWEET,
- FLAVOR_BITTER,
- FLAVOR_SOUR,
- FLAVOR_COUNT
-};
-
-enum
-{
- BERRY_STAGE_NO_BERRY, // there is no tree planted and the soil is completely flat.
- BERRY_STAGE_PLANTED,
- BERRY_STAGE_SPROUTED,
- BERRY_STAGE_TALLER,
- BERRY_STAGE_FLOWERING,
- BERRY_STAGE_BERRIES,
- BERRY_STAGE_SPARKLING = 0xFF,
-};
-
void ClearEnigmaBerries(void);
void SetEnigmaBerry(u8 *src);
bool32 IsEnigmaBerryValid(void);
diff --git a/include/constants/battle_frontier.h b/include/constants/battle_frontier.h
index 1224c0f31..d287dd2db 100644
--- a/include/constants/battle_frontier.h
+++ b/include/constants/battle_frontier.h
@@ -1,6 +1,8 @@
#ifndef GUARD_CONSTANTS_BATTLE_FRONTIER_H
#define GUARD_CONSTANTS_BATTLE_FRONTIER_H
+#define FRONTIER_CHALLENGE(facility, mode) ((facility << 8) + mode)
+
// Battle Frontier facility ids.
#define FRONTIER_FACILITY_TOWER 0
#define FRONTIER_FACILITY_DOME 1
@@ -41,6 +43,36 @@
#define SPECIAL_BATTLE_PIKE_DOUBLE 9
#define SPECIAL_BATTLE_PYRAMID 10
+#define MAX_BATTLE_FRONTIER_POINTS 9999
+
+// Frontier Maniac
+#define FRONTIER_MANIAC_BATTLE_TOWER_SINGLES 0
+#define FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES 1
+#define FRONTIER_MANIAC_BATTLE_TOWER_MULTIS 2
+#define FRONTIER_MANIAC_BATTLE_TOWER_LINK_MULTIS 3
+#define FRONTIER_MANIAC_BATTLE_DOME 4
+#define FRONTIER_MANIAC_BATTLE_FACTORY 5
+#define FRONTIER_MANIAC_BATTLE_PALACE 6
+#define FRONTIER_MANIAC_BATTLE_ARENA 7
+#define FRONTIER_MANIAC_BATTLE_PIKE 8
+#define FRONTIER_MANIAC_BATTLE_PYRAMID 9
+#define FRONTIER_MANIAC_FACILITY_COUNT 10
+
+#define FRONTIER_MANIAC_MESSAGE_COUNT 3
+
+// Frontier Gambler
+#define FRONTIER_GAMBLER_WAITING 0
+#define FRONTIER_GAMBLER_PLACED_BET 1
+#define FRONTIER_GAMBLER_WON 2
+#define FRONTIER_GAMBLER_LOST 3
+
+#define FRONTIER_GAMBLER_BET_5 0
+#define FRONTIER_GAMBLER_BET_10 1
+#define FRONTIER_GAMBLER_BET_15 2
+#define FRONTIER_GAMBLER_BET_CANCEL 3
+
+#define FRONTIER_GAMBLER_CHALLENGE_COUNT 12
+
// For 'ShowFacilityResultsWindow' function which is a part of the 'CallFrontierUtilFunc' special.
#define RESULTS_LINK_CONTEST 7
diff --git a/include/constants/berry.h b/include/constants/berry.h
new file mode 100644
index 000000000..d413b9947
--- /dev/null
+++ b/include/constants/berry.h
@@ -0,0 +1,28 @@
+#ifndef GUARD_CONSTANTS_BERRY_H
+#define GUARD_CONSTANTS_BERRY_H
+
+#define BERRY_NONE 0
+
+#define BERRY_FIRMNESS_UNKNOWN 0
+#define BERRY_FIRMNESS_VERY_SOFT 1
+#define BERRY_FIRMNESS_SOFT 2
+#define BERRY_FIRMNESS_HARD 3
+#define BERRY_FIRMNESS_VERY_HARD 4
+#define BERRY_FIRMNESS_SUPER_HARD 5
+
+#define FLAVOR_SPICY 0
+#define FLAVOR_DRY 1
+#define FLAVOR_SWEET 2
+#define FLAVOR_BITTER 3
+#define FLAVOR_SOUR 4
+#define FLAVOR_COUNT 5
+
+#define BERRY_STAGE_NO_BERRY 0 // there is no tree planted and the soil is completely flat.
+#define BERRY_STAGE_PLANTED 1
+#define BERRY_STAGE_SPROUTED 2
+#define BERRY_STAGE_TALLER 3
+#define BERRY_STAGE_FLOWERING 4
+#define BERRY_STAGE_BERRIES 5
+#define BERRY_STAGE_SPARKLING 255
+
+#endif // GUARD_CONSTANTS_BERRY_H
diff --git a/include/constants/daycare.h b/include/constants/daycare.h
new file mode 100644
index 000000000..103f920f2
--- /dev/null
+++ b/include/constants/daycare.h
@@ -0,0 +1,27 @@
+#ifndef GUARD_DAYCARE_CONSTANTS_H
+#define GUARD_DAYCARE_CONSTANTS_H
+
+// Parent compatability scores
+#define PARENTS_INCOMPATIBLE 0
+#define PARENTS_LOW_COMPATIBILITY 20
+#define PARENTS_MED_COMPATABILITY 50
+#define PARENTS_MAX_COMPATABILITY 70
+
+// Daycare state
+#define DAYCARE_NO_MONS 0
+#define DAYCARE_EGG_WAITING 1
+#define DAYCARE_ONE_MON 2
+#define DAYCARE_TWO_MONS 3
+
+#define INHERITED_IV_COUNT 3
+#define EGG_HATCH_LEVEL 5
+#define EGG_GENDER_MALE 0x8000 // used to create a male egg from a female-only parent species (e.g. Nidoran)
+
+#define DAYCARE_LEVEL_MENU_EXIT 5
+#define DAYCARE_EXITED_LEVEL_MENU 2 // would be redundant with above if GF had used the same value
+
+// Array buffers
+#define EGG_MOVES_ARRAY_COUNT 10
+#define EGG_LVL_UP_MOVES_ARRAY_COUNT 50
+
+#endif //GUARD_DAYCARE_CONSTANTS_H
diff --git a/include/constants/field_specials.h b/include/constants/field_specials.h
new file mode 100644
index 000000000..5ec38d1d4
--- /dev/null
+++ b/include/constants/field_specials.h
@@ -0,0 +1,52 @@
+#ifndef GUARD_CONSTANTS_FIELD_SPECIALS_H
+#define GUARD_CONSTANTS_FIELD_SPECIALS_H
+
+// PC Locations
+#define PC_LOCATION_OTHER 0
+#define PC_LOCATION_BRENDANS_HOUSE 1
+#define PC_LOCATION_MAYS_HOUSE 2
+
+// SS Tidal Locations
+#define SS_TIDAL_LOCATION_OTHER 0
+#define SS_TIDAL_LOCATION_SLATEPORT 1
+#define SS_TIDAL_LOCATION_LILYCOVE 2
+#define SS_TIDAL_LOCATION_ROUTE124 3
+#define SS_TIDAL_LOCATION_ROUTE131 4
+
+// Scrollable Multichoice Menus
+#define SCROLL_MULTI_NONE 0
+#define SCROLL_MULTI_GLASS_WORKSHOP_VENDOR 1
+#define SCROLL_MULTI_POKEMON_FAN_CLUB_RATER 2
+#define SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1 3
+#define SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2 4
+#define SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR 5
+#define SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR 6
+#define SCROLL_MULTI_BERRY_POWDER_VENDOR 7
+#define SCROLL_MULTI_BF_RECEPTIONIST 8
+#define SCROLL_MULTI_BF_MOVE_TUTOR_1 9
+#define SCROLL_MULTI_BF_MOVE_TUTOR_2 10
+#define SCROLL_MULTI_SS_TIDAL_DESTINATION 11
+#define SCROLL_MULTI_BATTLE_TENT_RULES 12
+
+#define MAX_SCROLL_MULTI_ON_SCREEN 6
+#define MAX_SCROLL_MULTI_LENGTH 16
+
+// Dept Store Floor Numbers
+#define DEPT_STORE_FLOORNUM_B4F 0
+#define DEPT_STORE_FLOORNUM_B3F 1
+#define DEPT_STORE_FLOORNUM_B2F 2
+#define DEPT_STORE_FLOORNUM_B1F 3
+#define DEPT_STORE_FLOORNUM_1F 4
+#define DEPT_STORE_FLOORNUM_2F 5
+#define DEPT_STORE_FLOORNUM_3F 6
+#define DEPT_STORE_FLOORNUM_4F 7
+#define DEPT_STORE_FLOORNUM_5F 8
+#define DEPT_STORE_FLOORNUM_6F 9
+#define DEPT_STORE_FLOORNUM_7F 10
+#define DEPT_STORE_FLOORNUM_8F 11
+#define DEPT_STORE_FLOORNUM_9F 12
+#define DEPT_STORE_FLOORNUM_10F 13
+#define DEPT_STORE_FLOORNUM_11F 14
+#define DEPT_STORE_FLOORNUM_ROOFTOP 15
+
+#endif // GUARD_CONSTANTS_FIELD_SPECIALS_H
diff --git a/include/constants/flags.h b/include/constants/flags.h
index 7aa5c3ed3..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
@@ -1400,7 +1400,7 @@
#define FLAG_ENABLE_SHIP_BIRTH_ISLAND (SYSTEM_FLAGS + 0x75)
#define FLAG_ENABLE_SHIP_FARAWAY_ISLAND (SYSTEM_FLAGS + 0x76)
-#define FLAG_SYS_STORAGE_UNKNOWN_FLAG (SYSTEM_FLAGS + 0x77)
+#define FLAG_SHOWN_BOX_WAS_FULL_MESSAGE (SYSTEM_FLAGS + 0x77)
#define FLAG_ARRIVED_ON_FARAWAY_ISLAND (SYSTEM_FLAGS + 0x78)
#define FLAG_ARRIVED_AT_MARINE_CAVE_EMERGE_SPOT (SYSTEM_FLAGS + 0x79)
diff --git a/include/constants/global.h b/include/constants/global.h
index a862ecad2..7e0b5cfa4 100644
--- a/include/constants/global.h
+++ b/include/constants/global.h
@@ -51,6 +51,8 @@
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
#define TRAINER_ID_LENGTH 4
+#define PARTY_SIZE 6
+#define MAX_MON_MOVES 4
// string lengths
#define ITEM_NAME_LENGTH 14
@@ -61,6 +63,7 @@
#define MALE 0
#define FEMALE 1
+#define GENDER_COUNT 2
#define OPTIONS_BUTTON_MODE_NORMAL 0
#define OPTIONS_BUTTON_MODE_LR 1
diff --git a/include/constants/item.h b/include/constants/item.h
new file mode 100644
index 000000000..a5c34418d
--- /dev/null
+++ b/include/constants/item.h
@@ -0,0 +1,20 @@
+#ifndef GUARD_ITEM_CONSTANTS_H
+#define GUARD_ITEM_CONSTANTS_H
+
+// These constants are used in gItems
+#define POCKET_NONE 0
+#define POCKET_ITEMS 1
+#define POCKET_POKE_BALLS 2
+#define POCKET_TM_HM 3
+#define POCKET_BERRIES 4
+#define POCKET_KEY_ITEMS 5
+
+#define ITEMS_POCKET 0
+#define BALLS_POCKET 1
+#define TMHM_POCKET 2
+#define BERRIES_POCKET 3
+#define KEYITEMS_POCKET 4
+#define POCKETS_COUNT 5
+
+
+#endif // GUARD_ITEM_CONSTANTS_H
diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h
index 5d0e562bc..52a4f0254 100644
--- a/include/constants/pokemon.h
+++ b/include/constants/pokemon.h
@@ -2,81 +2,82 @@
#define GUARD_CONSTANTS_POKEMON_H
// Pokemon types
-#define TYPE_NONE 0xFF
-#define TYPE_NORMAL 0x00
-#define TYPE_FIGHTING 0x01
-#define TYPE_FLYING 0x02
-#define TYPE_POISON 0x03
-#define TYPE_GROUND 0x04
-#define TYPE_ROCK 0x05
-#define TYPE_BUG 0x06
-#define TYPE_GHOST 0x07
-#define TYPE_STEEL 0x08
-#define TYPE_MYSTERY 0x09
-#define TYPE_FIRE 0x0a
-#define TYPE_WATER 0x0b
-#define TYPE_GRASS 0x0c
-#define TYPE_ELECTRIC 0x0d
-#define TYPE_PSYCHIC 0x0e
-#define TYPE_ICE 0x0f
-#define TYPE_DRAGON 0x10
-#define TYPE_DARK 0x11
-#define NUMBER_OF_MON_TYPES 0x12
-
+#define TYPE_NONE 255
+#define TYPE_NORMAL 0
+#define TYPE_FIGHTING 1
+#define TYPE_FLYING 2
+#define TYPE_POISON 3
+#define TYPE_GROUND 4
+#define TYPE_ROCK 5
+#define TYPE_BUG 6
+#define TYPE_GHOST 7
+#define TYPE_STEEL 8
+#define TYPE_MYSTERY 9
+#define TYPE_FIRE 10
+#define TYPE_WATER 11
+#define TYPE_GRASS 12
+#define TYPE_ELECTRIC 13
+#define TYPE_PSYCHIC 14
+#define TYPE_ICE 15
+#define TYPE_DRAGON 16
+#define TYPE_DARK 17
+#define NUMBER_OF_MON_TYPES 18
// Pokemon egg groups
-#define EGG_GROUP_NONE 0
-#define EGG_GROUP_MONSTER 1
-#define EGG_GROUP_WATER_1 2
-#define EGG_GROUP_BUG 3
-#define EGG_GROUP_FLYING 4
-#define EGG_GROUP_FIELD 5
-#define EGG_GROUP_FAIRY 6
-#define EGG_GROUP_GRASS 7
-#define EGG_GROUP_HUMAN_LIKE 8
-#define EGG_GROUP_WATER_3 9
-#define EGG_GROUP_MINERAL 10
-#define EGG_GROUP_AMORPHOUS 11
-#define EGG_GROUP_WATER_2 12
-#define EGG_GROUP_DITTO 13
-#define EGG_GROUP_DRAGON 14
-#define EGG_GROUP_UNDISCOVERED 15
+#define EGG_GROUP_NONE 0
+#define EGG_GROUP_MONSTER 1
+#define EGG_GROUP_WATER_1 2
+#define EGG_GROUP_BUG 3
+#define EGG_GROUP_FLYING 4
+#define EGG_GROUP_FIELD 5
+#define EGG_GROUP_FAIRY 6
+#define EGG_GROUP_GRASS 7
+#define EGG_GROUP_HUMAN_LIKE 8
+#define EGG_GROUP_WATER_3 9
+#define EGG_GROUP_MINERAL 10
+#define EGG_GROUP_AMORPHOUS 11
+#define EGG_GROUP_WATER_2 12
+#define EGG_GROUP_DITTO 13
+#define EGG_GROUP_DRAGON 14
+#define EGG_GROUP_UNDISCOVERED 15
+
+#define EGG_GROUPS_PER_MON 2
// Pokemon natures
-#define NATURE_HARDY 0
-#define NATURE_LONELY 1
-#define NATURE_BRAVE 2
-#define NATURE_ADAMANT 3
-#define NATURE_NAUGHTY 4
-#define NATURE_BOLD 5
-#define NATURE_DOCILE 6
-#define NATURE_RELAXED 7
-#define NATURE_IMPISH 8
-#define NATURE_LAX 9
-#define NATURE_TIMID 10
-#define NATURE_HASTY 11
-#define NATURE_SERIOUS 12
-#define NATURE_JOLLY 13
-#define NATURE_NAIVE 14
-#define NATURE_MODEST 15
-#define NATURE_MILD 16
-#define NATURE_QUIET 17
-#define NATURE_BASHFUL 18
-#define NATURE_RASH 19
-#define NATURE_CALM 20
-#define NATURE_GENTLE 21
-#define NATURE_SASSY 22
-#define NATURE_CAREFUL 23
-#define NATURE_QUIRKY 24
+#define NATURE_HARDY 0
+#define NATURE_LONELY 1
+#define NATURE_BRAVE 2
+#define NATURE_ADAMANT 3
+#define NATURE_NAUGHTY 4
+#define NATURE_BOLD 5
+#define NATURE_DOCILE 6
+#define NATURE_RELAXED 7
+#define NATURE_IMPISH 8
+#define NATURE_LAX 9
+#define NATURE_TIMID 10
+#define NATURE_HASTY 11
+#define NATURE_SERIOUS 12
+#define NATURE_JOLLY 13
+#define NATURE_NAIVE 14
+#define NATURE_MODEST 15
+#define NATURE_MILD 16
+#define NATURE_QUIET 17
+#define NATURE_BASHFUL 18
+#define NATURE_RASH 19
+#define NATURE_CALM 20
+#define NATURE_GENTLE 21
+#define NATURE_SASSY 22
+#define NATURE_CAREFUL 23
+#define NATURE_QUIRKY 24
// Pokemon Stats
-#define STAT_HP 0
-#define STAT_ATK 1
-#define STAT_DEF 2
-#define STAT_SPEED 3
-#define STAT_SPATK 4
-#define STAT_SPDEF 5
-#define STAT_ACC 6 // Only in battles.
+#define STAT_HP 0
+#define STAT_ATK 1
+#define STAT_DEF 2
+#define STAT_SPEED 3
+#define STAT_SPATK 4
+#define STAT_SPDEF 5
+#define STAT_ACC 6 // Only in battles.
#define STAT_EVASION 7 // Only in battles.
#define NUM_STATS 6
@@ -85,4 +86,187 @@
// Shiny odds
#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536
+// Flags for Get(Box)MonData / Set(Box)MonData
+#define MON_DATA_PERSONALITY 0
+#define MON_DATA_OT_ID 1
+#define MON_DATA_NICKNAME 2
+#define MON_DATA_LANGUAGE 3
+#define MON_DATA_SANITY_IS_BAD_EGG 4
+#define MON_DATA_SANITY_HAS_SPECIES 5
+#define MON_DATA_SANITY_IS_EGG 6
+#define MON_DATA_OT_NAME 7
+#define MON_DATA_MARKINGS 8
+#define MON_DATA_CHECKSUM 9
+#define MON_DATA_ENCRYPT_SEPARATOR 10
+#define MON_DATA_SPECIES 11
+#define MON_DATA_HELD_ITEM 12
+#define MON_DATA_MOVE1 13
+#define MON_DATA_MOVE2 14
+#define MON_DATA_MOVE3 15
+#define MON_DATA_MOVE4 16
+#define MON_DATA_PP1 17
+#define MON_DATA_PP2 18
+#define MON_DATA_PP3 19
+#define MON_DATA_PP4 20
+#define MON_DATA_PP_BONUSES 21
+#define MON_DATA_COOL 22
+#define MON_DATA_BEAUTY 23
+#define MON_DATA_CUTE 24
+#define MON_DATA_EXP 25
+#define MON_DATA_HP_EV 26
+#define MON_DATA_ATK_EV 27
+#define MON_DATA_DEF_EV 28
+#define MON_DATA_SPEED_EV 29
+#define MON_DATA_SPATK_EV 30
+#define MON_DATA_SPDEF_EV 31
+#define MON_DATA_FRIENDSHIP 32
+#define MON_DATA_SMART 33
+#define MON_DATA_POKERUS 34
+#define MON_DATA_MET_LOCATION 35
+#define MON_DATA_MET_LEVEL 36
+#define MON_DATA_MET_GAME 37
+#define MON_DATA_POKEBALL 38
+#define MON_DATA_HP_IV 39
+#define MON_DATA_ATK_IV 40
+#define MON_DATA_DEF_IV 41
+#define MON_DATA_SPEED_IV 42
+#define MON_DATA_SPATK_IV 43
+#define MON_DATA_SPDEF_IV 44
+#define MON_DATA_IS_EGG 45
+#define MON_DATA_ABILITY_NUM 46
+#define MON_DATA_TOUGH 47
+#define MON_DATA_SHEEN 48
+#define MON_DATA_OT_GENDER 49
+#define MON_DATA_COOL_RIBBON 50
+#define MON_DATA_BEAUTY_RIBBON 51
+#define MON_DATA_CUTE_RIBBON 52
+#define MON_DATA_SMART_RIBBON 53
+#define MON_DATA_TOUGH_RIBBON 54
+#define MON_DATA_STATUS 55
+#define MON_DATA_LEVEL 56
+#define MON_DATA_HP 57
+#define MON_DATA_MAX_HP 58
+#define MON_DATA_ATK 59
+#define MON_DATA_DEF 60
+#define MON_DATA_SPEED 61
+#define MON_DATA_SPATK 62
+#define MON_DATA_SPDEF 63
+#define MON_DATA_MAIL 64
+#define MON_DATA_SPECIES2 65
+#define MON_DATA_IVS 66
+#define MON_DATA_CHAMPION_RIBBON 67
+#define MON_DATA_WINNING_RIBBON 68
+#define MON_DATA_VICTORY_RIBBON 69
+#define MON_DATA_ARTIST_RIBBON 70
+#define MON_DATA_EFFORT_RIBBON 71
+#define MON_DATA_GIFT_RIBBON_1 72
+#define MON_DATA_GIFT_RIBBON_2 73
+#define MON_DATA_GIFT_RIBBON_3 74
+#define MON_DATA_GIFT_RIBBON_4 75
+#define MON_DATA_GIFT_RIBBON_5 76
+#define MON_DATA_GIFT_RIBBON_6 77
+#define MON_DATA_GIFT_RIBBON_7 78
+#define MON_DATA_FATEFUL_ENCOUNTER 79
+#define MON_DATA_OBEDIENCE 80
+#define MON_DATA_KNOWN_MOVES 81
+#define MON_DATA_RIBBON_COUNT 82
+#define MON_DATA_RIBBONS 83
+#define MON_DATA_ATK2 84
+#define MON_DATA_DEF2 85
+#define MON_DATA_SPEED2 86
+#define MON_DATA_SPATK2 87
+#define MON_DATA_SPDEF2 88
+
+#define MAX_LEVEL 100
+
+#define OT_ID_PLAYER_ID 0
+#define OT_ID_PRESET 1
+#define OT_ID_RANDOM_NO_SHINY 2
+
+
+#define MON_GIVEN_TO_PARTY 0
+#define MON_GIVEN_TO_PC 1
+#define MON_CANT_GIVE 2
+
+#define PLAYER_HAS_TWO_USABLE_MONS 0
+#define PLAYER_HAS_ONE_MON 1
+#define PLAYER_HAS_ONE_USABLE_MON 2
+
+#define MON_MALE 0x00
+#define MON_FEMALE 0xFE
+#define MON_GENDERLESS 0xFF
+
+#define FRIENDSHIP_EVENT_GROW_LEVEL 0
+#define FRIENDSHIP_EVENT_VITAMIN 1 // unused
+#define FRIENDSHIP_EVENT_BATTLE_ITEM 2 // unused
+#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 3
+#define FRIENDSHIP_EVENT_LEARN_TMHM 4
+#define FRIENDSHIP_EVENT_WALKING 5
+#define FRIENDSHIP_EVENT_FAINT_SMALL 6
+#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 7
+#define FRIENDSHIP_EVENT_FAINT_LARGE 8
+
+#define STATUS_PRIMARY_NONE 0
+#define STATUS_PRIMARY_POISON 1
+#define STATUS_PRIMARY_PARALYSIS 2
+#define STATUS_PRIMARY_SLEEP 3
+#define STATUS_PRIMARY_FREEZE 4
+#define STATUS_PRIMARY_BURN 5
+#define STATUS_PRIMARY_POKERUS 6
+#define STATUS_PRIMARY_FAINTED 7
+
+#define MAX_TOTAL_EVS 510
+#define EV_ITEM_RAISE_LIMIT 100
+
+#define UNOWN_FORM_COUNT 28
+
+// Battle move flags
+#define FLAG_MAKES_CONTACT 0x1
+#define FLAG_PROTECT_AFFECTED 0x2
+#define FLAG_MAGICCOAT_AFFECTED 0x4
+#define FLAG_SNATCH_AFFECTED 0x8
+#define FLAG_MIRROR_MOVE_AFFECTED 0x10
+#define FLAG_KINGSROCK_AFFECTED 0x20
+
+// Growth rates
+#define GROWTH_MEDIUM_FAST 0
+#define GROWTH_ERRATIC 1
+#define GROWTH_FLUCTUATING 2
+#define GROWTH_MEDIUM_SLOW 3
+#define GROWTH_FAST 4
+#define GROWTH_SLOW 5
+
+// Body colors for pokedex search
+#define BODY_COLOR_RED 0
+#define BODY_COLOR_BLUE 1
+#define BODY_COLOR_YELLOW 2
+#define BODY_COLOR_GREEN 3
+#define BODY_COLOR_BLACK 4
+#define BODY_COLOR_BROWN 5
+#define BODY_COLOR_PURPLE 6
+#define BODY_COLOR_GRAY 7
+#define BODY_COLOR_WHITE 8
+#define BODY_COLOR_PINK 9
+
+#define F_SUMMARY_SCREEN_FLIP_SPRITE 0x80
+
+// Evolution type flags
+#define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220
+#define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220
+#define EVO_FRIENDSHIP_NIGHT 0x0003 // Pokémon levels up at night with friendship ≥ 220
+#define EVO_LEVEL 0x0004 // Pokémon reaches the specified level
+#define EVO_TRADE 0x0005 // Pokémon is traded
+#define EVO_TRADE_ITEM 0x0006 // Pokémon is traded while it's holding the specified item
+#define EVO_ITEM 0x0007 // specified item is used on Pokémon
+#define EVO_LEVEL_ATK_GT_DEF 0x0008 // Pokémon reaches the specified level with attack > defense
+#define EVO_LEVEL_ATK_EQ_DEF 0x0009 // Pokémon reaches the specified level with attack = defense
+#define EVO_LEVEL_ATK_LT_DEF 0x000a // Pokémon reaches the specified level with attack < defense
+#define EVO_LEVEL_SILCOON 0x000b // Pokémon reaches the specified level with a Silcoon personality value
+#define EVO_LEVEL_CASCOON 0x000c // Pokémon reaches the specified level with a Cascoon personality value
+#define EVO_LEVEL_NINJASK 0x000d // Pokémon reaches the specified level (special value for Ninjask)
+#define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja)
+#define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value
+
+#define EVOS_PER_MON 5
+
#endif // GUARD_CONSTANTS_POKEMON_H
diff --git a/include/constants/script_menu.h b/include/constants/script_menu.h
new file mode 100644
index 000000000..b7ec908c1
--- /dev/null
+++ b/include/constants/script_menu.h
@@ -0,0 +1,168 @@
+#ifndef GUARD_SCRIPT_MENU_CONSTANTS_H
+#define GUARD_SCRIPT_MENU_CONSTANTS_H
+
+#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_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_WITH_BF 52
+#define MULTI_SSTIDAL_BATTLE_FRONTIER 53
+#define MULTI_RIGHTLEFT 54
+#define MULTI_GAME_CORNER_TMS 55
+#define MULTI_SSTIDAL_SLATEPORT_NO_BF 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_CABLE_CLUB_NO_RECORD_MIX 74
+#define MULTI_WIRELESS_NO_RECORD_BERRY 75
+#define MULTI_CABLE_CLUB_WITH_RECORD_MIX 76
+#define MULTI_WIRELESS_NO_BERRY 77
+#define MULTI_WIRELESS_NO_RECORD 78
+#define MULTI_WIRELESS_ALL_SERVICES 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
+#define STDSTRING_BEAUTY 1
+#define STDSTRING_CUTE 2
+#define STDSTRING_SMART 3
+#define STDSTRING_TOUGH 4
+#define STDSTRING_NORMAL 5
+#define STDSTRING_SUPER 6
+#define STDSTRING_HYPER 7
+#define STDSTRING_MASTER 8
+#define STDSTRING_COOL2 9
+#define STDSTRING_BEAUTY2 10
+#define STDSTRING_CUTE2 11
+#define STDSTRING_SMART2 12
+#define STDSTRING_TOUGH2 13
+#define STDSTRING_ITEMS 14
+#define STDSTRING_KEYITEMS 15
+#define STDSTRING_POKEBALLS 16
+#define STDSTRING_TMHMS 17
+#define STDSTRING_BERRIES 18
+#define STDSTRING_SINGLE 19
+#define STDSTRING_DOUBLE 20
+#define STDSTRING_MULTI 21
+#define STDSTRING_MULTI_LINK 22
+#define STDSTRING_BATTLE_TOWER 23
+#define STDSTRING_BATTLE_DOME 24
+#define STDSTRING_BATTLE_FACTORY 25
+#define STDSTRING_BATTLE_PALACE 26
+#define STDSTRING_BATTLE_ARENA 27
+#define STDSTRING_BATTLE_PIKE 28
+#define STDSTRING_BATTLE_PYRAMID 29
+
+#endif //GUARD_SCRIPT_MENU_CONSTANTS_H
diff --git a/include/constants/vars.h b/include/constants/vars.h
index 6b213c8cc..72b15654e 100644
--- a/include/constants/vars.h
+++ b/include/constants/vars.h
@@ -61,14 +61,14 @@
#define VAR_0x402E 0x402E
#define VAR_FRONTIER_MANIAC_FACILITY 0x402F
-#define VAR_FRONTIER_GAMBLER_FACILITY 0x4030
-#define VAR_FRONTIER_GAMBLER_SET_FACILITY_F 0x4031
+#define VAR_FRONTIER_GAMBLER_CHALLENGE 0x4030
+#define VAR_FRONTIER_GAMBLER_SET_CHALLENGE 0x4031
#define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032
-#define VAR_FRONTIER_GAMBLER_PLACED_BET_F 0x4033
+#define VAR_FRONTIER_GAMBLER_STATE 0x4033
#define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034
#define VAR_DEOXYS_ROCK_LEVEL 0x4035
-#define VAR_STORAGE_UNKNOWN 0x4036
+#define VAR_PC_BOX_TO_SEND_MON 0x4036
#define VAR_UNUSUAL_WEATHER_LOCATION 0x4037
#define VAR_UNUSUAL_WEATHER_STEP_COUNTER 0x4038
#define VAR_SHOULD_END_UNUSUAL_WEATHER 0x4039
diff --git a/include/contest.h b/include/contest.h
index 8ef208aea..2b1b95af5 100644
--- a/include/contest.h
+++ b/include/contest.h
@@ -227,7 +227,7 @@ struct ContestPokemon
u8 aiPool_Cute:1; // 0x10
u8 aiPool_Smart:1; // 0x20
u8 aiPool_Tough:1; // 0x40
- /*0x1E*/ u16 moves[4]; // moves
+ /*0x1E*/ u16 moves[MAX_MON_MOVES]; // moves
/*0x26*/ u8 cool; // cool
/*0x27*/ u8 beauty; // beauty
/*0x28*/ u8 cute; // cute
diff --git a/include/data.h b/include/data.h
index f1a4caa6a..49b98663a 100644
--- a/include/data.h
+++ b/include/data.h
@@ -34,7 +34,7 @@ struct TrainerMonNoItemCustomMoves
u16 iv;
u8 lvl;
u16 species;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
};
struct TrainerMonItemCustomMoves
@@ -43,7 +43,7 @@ struct TrainerMonItemCustomMoves
u8 lvl;
u16 species;
u16 heldItem;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
};
union TrainerMonPtr
diff --git a/include/daycare.h b/include/daycare.h
index ecd875865..7d6f2fb19 100644
--- a/include/daycare.h
+++ b/include/daycare.h
@@ -1,10 +1,10 @@
#ifndef GUARD_DAYCARE_H
#define GUARD_DAYCARE_H
-#define EGG_HATCH_LEVEL 5
+#include "constants/daycare.h"
-u8 *GetMonNick(struct Pokemon *mon, u8 *dest);
-u8 *GetBoxMonNick(struct BoxPokemon *mon, u8 *dest);
+u8 *GetMonNickname2(struct Pokemon *mon, u8 *dest);
+u8 *GetBoxMonNickname(struct BoxPokemon *mon, u8 *dest);
u8 CountPokemonInDaycare(struct DayCare *daycare);
void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDayCareMail *daycareMail);
void StoreSelectedPokemonInDaycare(void);
@@ -16,7 +16,7 @@ void RejectEggFromDayCare(void);
void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation);
void GiveEggFromDaycare(void);
bool8 ShouldEggHatch(void);
-u16 GetSelectedMonNickAndSpecies(void);
+u16 GetSelectedMonNicknameAndSpecies(void);
void GetDaycareMonNicknames(void);
u8 GetDaycareState(void);
void SetDaycareCompatibilityString(void);
diff --git a/include/egg_hatch.h b/include/egg_hatch.h
index 862d33947..64d07c813 100644
--- a/include/egg_hatch.h
+++ b/include/egg_hatch.h
@@ -2,9 +2,9 @@
#define GUARD_EGG_HATCH_H
void ScriptHatchMon(void);
-bool8 sub_8071614(void);
+bool8 CheckDaycareMonReceivedMail(void);
void EggHatch(void);
u8 GetEggStepsToSubtract(void);
-u16 sub_80722E0(void);
+u16 CountPartyAliveNonEggMons(void);
#endif // GUARD_EGG_HATCH_H
diff --git a/include/field_specials.h b/include/field_specials.h
index b1a50c811..952081e93 100644
--- a/include/field_specials.h
+++ b/include/field_specials.h
@@ -5,8 +5,8 @@ extern bool8 gBikeCyclingChallenge;
extern u8 gBikeCollisions;
u8 GetLeadMonIndex(void);
-u8 sub_813B260(void);
-u16 get_unknown_box_id(void);
+u8 IsDestinationBoxFull(void);
+u16 GetPCBoxToSendMon(void);
bool8 InMultiBattleRoom(void);
void sub_813BF10(void);
void IncrementBirthIslandRockStepCount(void);
@@ -19,17 +19,17 @@ bool32 ShouldDoRoxanneCall(void);
bool32 ShouldDoRivalRayquazaCall(void);
bool32 CountSSTidalStep(u16 delta);
u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y);
-void sub_813A128(void);
-void sub_813A878(u8 a0);
+void ShowScrollableMultichoice(void);
+void FrontierGamblerSetWonOrLost(bool8 won);
u8 sub_813BADC(u8 a0);
-bool8 sub_813B9C0(void);
-void SetShoalItemFlag(u16 v0);
-void UpdateFrontierManiac(u16 a0);
-void UpdateFrontierGambler(u16 a0);
+bool8 InPokemonCenter(void);
+void SetShoalItemFlag(u16 unused);
+void UpdateFrontierManiac(u16 daysSince);
+void UpdateFrontierGambler(u16 daysSince);
void ResetCyclingRoadChallengeData(void);
-bool8 warp0_in_pokecenter(void);
+bool8 UsedPokemonCenterWarp(void);
void ResetFanClub(void);
-bool8 sub_813B21C(void);
-void set_unknown_box_id(u8 id);
+bool8 ShouldShowBoxWasFullMessage(void);
+void SetPCBoxToSendMon(u8 boxId);
#endif // GUARD_FIELD_SPECIALS_H
diff --git a/include/global.h b/include/global.h
index 1fbc70e23..44a4d0164 100644
--- a/include/global.h
+++ b/include/global.h
@@ -63,8 +63,6 @@
// Converts a Q24.8 fixed-point format number to a regular integer
#define Q_24_8_TO_INT(n) ((int)((n) >> 8))
-#define PARTY_SIZE 6
-
#define POKEMON_SLOTS_NUMBER 412
#define min(a, b) ((a) < (b) ? (a) : (b))
@@ -212,7 +210,7 @@ struct BerryCrush
struct ApprenticeMon
{
u16 species;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u16 item;
};
@@ -234,7 +232,7 @@ struct BattleTowerPokemon
{
u16 species;
u16 heldItem;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u8 level;
u8 ppBonuses;
u8 hpEV;
@@ -290,7 +288,7 @@ struct BattleTowerEReaderTrainer
struct FrontierMonData
{
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u8 evs[6];
u8 nature;
};
@@ -946,7 +944,7 @@ struct SaveBlock1
/*0x2B94*/ u8 outbreakPokemonLevel;
/*0x2B95*/ u8 outbreakUnk1;
/*0x2B96*/ u16 outbreakUnk2;
- /*0x2B98*/ u16 outbreakPokemonMoves[4];
+ /*0x2B98*/ u16 outbreakPokemonMoves[MAX_MON_MOVES];
/*0x2BA0*/ u8 outbreakUnk4;
/*0x2BA1*/ u8 outbreakPokemonProbability;
/*0x2BA2*/ u16 outbreakDaysLeft;
diff --git a/include/global.tv.h b/include/global.tv.h
index aa151a75c..1cef057ae 100644
--- a/include/global.tv.h
+++ b/include/global.tv.h
@@ -4,8 +4,7 @@
enum
{
TVSHOW_OFF_AIR,
-
- TVSHOW_FAN_CLUB_LETTER = 1,
+ TVSHOW_FAN_CLUB_LETTER,
TVSHOW_RECENT_HAPPENINGS,
TVSHOW_PKMN_FAN_CLUB_OPINIONS,
TVSHOW_UNKN_SHOWTYPE_04,
@@ -482,7 +481,7 @@ typedef union // size = 0x24
/*0x01*/ bool8 active;
/*0x02*/ u8 var02;
/*0x03*/ u8 var03;
- /*0x04*/ u16 moves[4];
+ /*0x04*/ u16 moves[MAX_MON_MOVES];
/*0x0C*/ u16 species;
/*0x0E*/ u16 var0E;
/*0x10*/ u8 locationMapNum;
diff --git a/include/graphics.h b/include/graphics.h
index d1d99cc8f..5f5c579d2 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -3093,90 +3093,93 @@ extern const u32 gPokeblock_Gfx[];
extern const u32 gItemIcon_QuestionMark[];
extern const u32 gItemIconPalette_QuestionMark[];
-extern const u32 gUnknown_08DB7AA0[];
-extern const u32 gUnknown_08DB7B34[];
-extern const u32 gUnknown_08DB7B5C[];
-extern const u32 gUnknown_08DB7BEC[];
-extern const u32 gUnknown_08DB7C08[];
-extern const u32 gUnknown_08DB7CE8[];
-extern const u32 gUnknown_08DB7D08[];
-extern const u32 gUnknown_08DB7DCC[];
-extern const u32 gUnknown_08DB7DF4[];
-extern const u32 gUnknown_08DB7EA0[];
-extern const u32 gUnknown_08DB7EC4[];
-extern const u32 gUnknown_08DB7F60[];
-extern const u32 gUnknown_08DB7F7C[];
-extern const u32 gUnknown_08DB8070[];
-extern const u32 gUnknown_08DB808C[];
-extern const u32 gUnknown_08DB8138[];
-extern const u32 gUnknown_08DB8160[];
-extern const u32 gUnknown_08DB8218[];
-extern const u32 gUnknown_08DB823C[];
-extern const u32 gUnknown_08DB8300[];
-extern const u32 gUnknown_08DB8328[];
-extern const u32 gUnknown_08DB8430[];
-extern const u32 gUnknown_08DB8458[];
-extern const u32 gUnknown_08DB8528[];
-extern const u32 gUnknown_08DB854C[];
-extern const u32 gUnknown_08DB862C[];
-extern const u32 gUnknown_08DB8654[];
-extern const u32 gUnknown_08DB86C4[];
-extern const u32 gUnknown_08DB86E0[];
-extern const u32 gUnknown_08DB8750[];
-extern const u32 gUnknown_08DB876C[];
-extern const u32 gUnknown_08DB87DC[];
-extern const u32 gUnknown_08DB87F8[];
-extern const u32 gUnknown_08DB88D8[];
-extern const u32 gUnknown_08DB8900[];
-extern const u32 gUnknown_08DB89E0[];
-extern const u32 gUnknown_08DB8A08[];
-extern const u32 gUnknown_08DB8A68[];
-extern const u32 gUnknown_08DB8A84[];
-extern const u32 gUnknown_08DB8B40[];
-extern const u32 gUnknown_08DB8B68[];
-extern const u32 gUnknown_08DB8C40[];
-extern const u32 gUnknown_08DB8C5C[];
-extern const u32 gUnknown_08DB8CF4[];
-extern const u32 gUnknown_08DB8D18[];
-extern const u32 gUnknown_08DB8DB0[];
-extern const u32 gUnknown_08DB8DD4[];
-extern const u32 gUnknown_08DB8E80[];
-extern const u32 gUnknown_08DB8EA0[];
-extern const u32 gUnknown_08DB8F58[];
-extern const u32 gUnknown_08DB8F7C[];
-extern const u32 gUnknown_08DB9038[];
-extern const u32 gUnknown_08DB9058[];
-extern const u32 gUnknown_08DB9130[];
-extern const u32 gUnknown_08DB9154[];
-extern const u32 gUnknown_08DB9218[];
-extern const u32 gUnknown_08DB9234[];
-extern const u32 gUnknown_08DB92FC[];
-extern const u32 gUnknown_08DB931C[];
-extern const u32 gUnknown_08DB93E8[];
-extern const u32 gUnknown_08DB940C[];
-extern const u32 gUnknown_08DB94CC[];
-extern const u32 gUnknown_08DB94E8[];
-extern const u32 gUnknown_08DB95AC[];
-extern const u32 gUnknown_08DB95D0[];
-extern const u32 gUnknown_08DB96C4[];
-extern const u32 gUnknown_08DB96EC[];
-extern const u32 gUnknown_08DB97F4[];
-extern const u32 gUnknown_08DB981C[];
-extern const u32 gUnknown_08DB9908[];
-extern const u32 gUnknown_08DB9930[];
-extern const u32 gUnknown_08DB9A54[];
-extern const u32 gUnknown_08DB9A7C[];
-extern const u32 gUnknown_08DB9B7C[];
-extern const u32 gUnknown_08DB9BA4[];
-extern const u32 gUnknown_08DB9CB0[];
-extern const u32 gUnknown_08DB9CD8[];
-extern const u32 gUnknown_08DB9DAC[];
-extern const u32 gUnknown_08DB9DD4[];
-extern const u32 gUnknown_08DB9EE4[];
-extern const u32 gUnknown_08DB9F08[];
-extern const u32 gUnknown_08DB9FFC[];
-extern const u32 gUnknown_08DBA020[];
-extern const u32 gUnknown_08DBA12C[];
+
+// Decorations
+extern const u32 gDecorIcon_HeavyDesk[];
+extern const u32 gDecorIconPalette_HeavyDesk[];
+extern const u32 gDecorIcon_RaggedDesk[];
+extern const u32 gDecorIconPalette_RaggedDesk[];
+extern const u32 gDecorIcon_ComfortDesk[];
+extern const u32 gDecorIconPalette_ComfortDesk[];
+extern const u32 gDecorIcon_PrettyDesk[];
+extern const u32 gDecorIconPalette_PrettyDesk[];
+extern const u32 gDecorIcon_BrickDesk[];
+extern const u32 gDecorIconPalette_BrickDesk[];
+extern const u32 gDecorIcon_CampDesk[];
+extern const u32 gDecorIconPalette_CampDesk[];
+extern const u32 gDecorIcon_HardDesk[];
+extern const u32 gDecorIconPalette_HardDesk[];
+extern const u32 gDecorIcon_RedPlant[];
+extern const u32 gDecorIconPalette_RedPlant[];
+extern const u32 gDecorIcon_TropicalPlant[];
+extern const u32 gDecorIconPalette_TropicalPlant[];
+extern const u32 gDecorIcon_PrettyFlowers[];
+extern const u32 gDecorIconPalette_PrettyFlowers[];
+extern const u32 gDecorIcon_ColorfulPlant[];
+extern const u32 gDecorIconPalette_ColorfulPlant[];
+extern const u32 gDecorIcon_BigPlant[];
+extern const u32 gDecorIconPalette_BigPlant[];
+extern const u32 gDecorIcon_GorgeousPlant[];
+extern const u32 gDecorIconPalette_GorgeousPlant[];
+extern const u32 gDecorIcon_RedBrick[];
+extern const u32 gDecorIconPalette_RedBrick[];
+extern const u32 gDecorIcon_YellowBrick[];
+extern const u32 gDecorIconPalette_YellowBrick[];
+extern const u32 gDecorIcon_BlueBrick[];
+extern const u32 gDecorIconPalette_BlueBrick[];
+extern const u32 gDecorIcon_RedTent[];
+extern const u32 gDecorIconPalette_RedTent[];
+extern const u32 gDecorIcon_BlueTent[];
+extern const u32 gDecorIconPalette_BlueTent[];
+extern const u32 gDecorIcon_SolidBoard[];
+extern const u32 gDecorIconPalette_SolidBoard[];
+extern const u32 gDecorIcon_Slide[];
+extern const u32 gDecorIconPalette_Slide[];
+extern const u32 gDecorIcon_Tire[];
+extern const u32 gDecorIconPalette_Tire[];
+extern const u32 gDecorIcon_Stand[];
+extern const u32 gDecorIconPalette_Stand[];
+extern const u32 gDecorIcon_BreakableDoor[];
+extern const u32 gDecorIconPalette_BreakableDoor[];
+extern const u32 gDecorIcon_SandOrnament[];
+extern const u32 gDecorIconPalette_SandOrnament[];
+extern const u32 gDecorIcon_GlassOrnament[];
+extern const u32 gDecorIconPalette_GlassOrnament[];
+extern const u32 gDecorIcon_SurfMat[];
+extern const u32 gDecorIconPalette_SurfMat[];
+extern const u32 gDecorIcon_ThunderMat[];
+extern const u32 gDecorIconPalette_ThunderMat[];
+extern const u32 gDecorIcon_FireBlastMat[];
+extern const u32 gDecorIconPalette_FireBlastMat[];
+extern const u32 gDecorIcon_PowderSnowMat[];
+extern const u32 gDecorIconPalette_PowderSnowMat[];
+extern const u32 gDecorIcon_AttractMat[];
+extern const u32 gDecorIconPalette_AttractMat[];
+extern const u32 gDecorIcon_FissureMat[];
+extern const u32 gDecorIconPalette_FissureMat[];
+extern const u32 gDecorIcon_SpikesMat[];
+extern const u32 gDecorIconPalette_SpikesMat[];
+extern const u32 gDecorIcon_SnorlaxDoll[];
+extern const u32 gDecorIconPalette_SnorlaxDoll[];
+extern const u32 gDecorIcon_RhydonDoll[];
+extern const u32 gDecorIconPalette_RhydonDoll[];
+extern const u32 gDecorIcon_LaprasDoll[];
+extern const u32 gDecorIconPalette_LaprasDoll[];
+extern const u32 gDecorIcon_VenusaurDoll[];
+extern const u32 gDecorIconPalette_VenusaurDoll[];
+extern const u32 gDecorIcon_CharizardDoll[];
+extern const u32 gDecorIconPalette_CharizardDoll[];
+extern const u32 gDecorIcon_BlastoiseDoll[];
+extern const u32 gDecorIconPalette_BlastoiseDoll[];
+extern const u32 gDecorIcon_WailmerDoll[];
+extern const u32 gDecorIconPalette_WailmerDoll[];
+extern const u32 gDecorIcon_RegirockDoll[];
+extern const u32 gDecorIconPalette_RegirockDoll[];
+extern const u32 gDecorIcon_RegiceDoll[];
+extern const u32 gDecorIconPalette_RegiceDoll[];
+extern const u32 gDecorIcon_RegisteelDoll[];
+extern const u32 gDecorIconPalette_RegisteelDoll[];
+
extern const u32 gWallclock_Gfx[];
extern const u16 gWallclockMale_Pal[];
extern const u16 gWallclockFemale_Pal[];
diff --git a/include/item.h b/include/item.h
index 881d3a3d4..87ff57bc7 100644
--- a/include/item.h
+++ b/include/item.h
@@ -1,26 +1,7 @@
#ifndef GUARD_ITEM_H
#define GUARD_ITEM_H
-// These constants are used in gItems
-enum
-{
- POCKET_NONE,
- POCKET_ITEMS,
- POCKET_POKE_BALLS,
- POCKET_TM_HM,
- POCKET_BERRIES,
- POCKET_KEY_ITEMS,
-};
-
-enum
-{
- ITEMS_POCKET,
- BALLS_POCKET,
- TMHM_POCKET,
- BERRIES_POCKET,
- KEYITEMS_POCKET,
- POCKETS_COUNT
-};
+#include "constants/item.h"
typedef void (*ItemUseFunc)(u8);
diff --git a/include/mon_markings.h b/include/mon_markings.h
index 8e4ec58bd..241b31e01 100644
--- a/include/mon_markings.h
+++ b/include/mon_markings.h
@@ -1,17 +1,19 @@
#ifndef POKEEMERALD_MON_MARKINGS_H
#define POKEEMERALD_MON_MARKINGS_H
+#define NUM_MON_MARKINGS 4
+
struct PokemonMarkMenu
{
/*0x0000*/ u16 baseTileTag;
/*0x0002*/ u16 basePaletteTag;
/*0x0004*/ u8 markings; // bit flags
/*0x0005*/ s8 cursorPos;
- /*0x0006*/ bool8 markingsArray[4];
+ /*0x0006*/ bool8 markingsArray[NUM_MON_MARKINGS];
/*0x000A*/ u8 cursorBaseY;
/*0x000B*/ bool8 spriteSheetLoadRequired;
/*0x000C*/ struct Sprite *menuWindowSprites[2]; // upper and lower halves of menu window
- /*0x0014*/ struct Sprite *menuMarkingSprites[4];
+ /*0x0014*/ struct Sprite *menuMarkingSprites[NUM_MON_MARKINGS];
/*0x0024*/ struct Sprite *unkSprite;
/*0x0028*/ struct Sprite *menuTextSprite;
/*0x002C*/ const u8 *frameTiles;
diff --git a/include/party_menu.h b/include/party_menu.h
index c9843e484..d76e50788 100644
--- a/include/party_menu.h
+++ b/include/party_menu.h
@@ -26,6 +26,41 @@ enum
PARTY_GIVE_ITEM,
};
+enum
+{
+ TUTOR_MOVE_MEGA_PUNCH,
+ TUTOR_MOVE_SWORDS_DANCE,
+ TUTOR_MOVE_MEGA_KICK,
+ TUTOR_MOVE_BODY_SLAM,
+ TUTOR_MOVE_DOUBLE_EDGE,
+ TUTOR_MOVE_COUNTER,
+ TUTOR_MOVE_SEISMIC_TOSS,
+ TUTOR_MOVE_MIMIC,
+ TUTOR_MOVE_METRONOME,
+ TUTOR_MOVE_SOFT_BOILED,
+ TUTOR_MOVE_DREAM_EATER,
+ TUTOR_MOVE_THUNDER_WAVE,
+ TUTOR_MOVE_EXPLOSION,
+ TUTOR_MOVE_ROCK_SLIDE,
+ TUTOR_MOVE_SUBSTITUTE,
+ TUTOR_MOVE_DYNAMIC_PUNCH,
+ TUTOR_MOVE_ROLLOUT,
+ TUTOR_MOVE_PSYCH_UP,
+ TUTOR_MOVE_SNORE,
+ TUTOR_MOVE_ICY_WIND,
+ TUTOR_MOVE_ENDURE,
+ TUTOR_MOVE_MUD_SLAP,
+ TUTOR_MOVE_ICE_PUNCH,
+ TUTOR_MOVE_SWAGGER,
+ TUTOR_MOVE_SLEEP_TALK,
+ TUTOR_MOVE_SWIFT,
+ TUTOR_MOVE_DEFENSE_CURL,
+ TUTOR_MOVE_THUNDER_PUNCH,
+ TUTOR_MOVE_FIRE_PUNCH,
+ TUTOR_MOVE_FURY_CUTTER,
+ TUTOR_MOVE_COUNT
+};
+
struct Struct203CEC8
{
MainCallback exitCallback;
diff --git a/include/pokemon.h b/include/pokemon.h
index ec125573c..6a34e3cda 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -4,136 +4,6 @@
#include "constants/pokemon.h"
#include "sprite.h"
-#define MON_DATA_PERSONALITY 0
-#define MON_DATA_OT_ID 1
-#define MON_DATA_NICKNAME 2
-#define MON_DATA_LANGUAGE 3
-#define MON_DATA_SANITY_IS_BAD_EGG 4
-#define MON_DATA_SANITY_HAS_SPECIES 5
-#define MON_DATA_SANITY_IS_EGG 6
-#define MON_DATA_OT_NAME 7
-#define MON_DATA_MARKINGS 8
-#define MON_DATA_CHECKSUM 9
-#define MON_DATA_ENCRYPT_SEPARATOR 10
-#define MON_DATA_SPECIES 11
-#define MON_DATA_HELD_ITEM 12
-#define MON_DATA_MOVE1 13
-#define MON_DATA_MOVE2 14
-#define MON_DATA_MOVE3 15
-#define MON_DATA_MOVE4 16
-#define MON_DATA_PP1 17
-#define MON_DATA_PP2 18
-#define MON_DATA_PP3 19
-#define MON_DATA_PP4 20
-#define MON_DATA_PP_BONUSES 21
-#define MON_DATA_COOL 22
-#define MON_DATA_BEAUTY 23
-#define MON_DATA_CUTE 24
-#define MON_DATA_EXP 25
-#define MON_DATA_HP_EV 26
-#define MON_DATA_ATK_EV 27
-#define MON_DATA_DEF_EV 28
-#define MON_DATA_SPEED_EV 29
-#define MON_DATA_SPATK_EV 30
-#define MON_DATA_SPDEF_EV 31
-#define MON_DATA_FRIENDSHIP 32
-#define MON_DATA_SMART 33
-#define MON_DATA_POKERUS 34
-#define MON_DATA_MET_LOCATION 35
-#define MON_DATA_MET_LEVEL 36
-#define MON_DATA_MET_GAME 37
-#define MON_DATA_POKEBALL 38
-#define MON_DATA_HP_IV 39
-#define MON_DATA_ATK_IV 40
-#define MON_DATA_DEF_IV 41
-#define MON_DATA_SPEED_IV 42
-#define MON_DATA_SPATK_IV 43
-#define MON_DATA_SPDEF_IV 44
-#define MON_DATA_IS_EGG 45
-#define MON_DATA_ABILITY_NUM 46
-#define MON_DATA_TOUGH 47
-#define MON_DATA_SHEEN 48
-#define MON_DATA_OT_GENDER 49
-#define MON_DATA_COOL_RIBBON 50
-#define MON_DATA_BEAUTY_RIBBON 51
-#define MON_DATA_CUTE_RIBBON 52
-#define MON_DATA_SMART_RIBBON 53
-#define MON_DATA_TOUGH_RIBBON 54
-#define MON_DATA_STATUS 55
-#define MON_DATA_LEVEL 56
-#define MON_DATA_HP 57
-#define MON_DATA_MAX_HP 58
-#define MON_DATA_ATK 59
-#define MON_DATA_DEF 60
-#define MON_DATA_SPEED 61
-#define MON_DATA_SPATK 62
-#define MON_DATA_SPDEF 63
-#define MON_DATA_MAIL 64
-#define MON_DATA_SPECIES2 65
-#define MON_DATA_IVS 66
-#define MON_DATA_CHAMPION_RIBBON 67
-#define MON_DATA_WINNING_RIBBON 68
-#define MON_DATA_VICTORY_RIBBON 69
-#define MON_DATA_ARTIST_RIBBON 70
-#define MON_DATA_EFFORT_RIBBON 71
-#define MON_DATA_GIFT_RIBBON_1 72
-#define MON_DATA_GIFT_RIBBON_2 73
-#define MON_DATA_GIFT_RIBBON_3 74
-#define MON_DATA_GIFT_RIBBON_4 75
-#define MON_DATA_GIFT_RIBBON_5 76
-#define MON_DATA_GIFT_RIBBON_6 77
-#define MON_DATA_GIFT_RIBBON_7 78
-#define MON_DATA_FATEFUL_ENCOUNTER 79
-#define MON_DATA_OBEDIENCE 80
-#define MON_DATA_KNOWN_MOVES 81
-#define MON_DATA_RIBBON_COUNT 82
-#define MON_DATA_RIBBONS 83
-#define MON_DATA_ATK2 84
-#define MON_DATA_DEF2 85
-#define MON_DATA_SPEED2 86
-#define MON_DATA_SPATK2 87
-#define MON_DATA_SPDEF2 88
-
-#define MAX_LEVEL 100
-
-#define OT_ID_RANDOM_NO_SHINY 2
-#define OT_ID_PRESET 1
-#define OT_ID_PLAYER_ID 0
-
-#define MON_GIVEN_TO_PARTY 0x0
-#define MON_GIVEN_TO_PC 0x1
-#define MON_CANT_GIVE 0x2
-
-#define PLAYER_HAS_TWO_USABLE_MONS 0x0
-#define PLAYER_HAS_ONE_MON 0x1
-#define PLAYER_HAS_ONE_USABLE_MON 0x2
-
-#define MON_MALE 0x00
-#define MON_FEMALE 0xFE
-#define MON_GENDERLESS 0xFF
-
-#define FRIENDSHIP_EVENT_GROW_LEVEL 0x0
-#define FRIENDSHIP_EVENT_VITAMIN 0x1 // unused
-#define FRIENDSHIP_EVENT_BATTLE_ITEM 0x2 // unused
-#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 0x3
-#define FRIENDSHIP_EVENT_LEARN_TMHM 0x4
-#define FRIENDSHIP_EVENT_WALKING 0x5
-#define FRIENDSHIP_EVENT_FAINT_SMALL 0x6
-#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 0x7
-#define FRIENDSHIP_EVENT_FAINT_LARGE 0x8
-
-#define STATUS_PRIMARY_NONE 0x0
-#define STATUS_PRIMARY_POISON 0x1
-#define STATUS_PRIMARY_PARALYSIS 0x2
-#define STATUS_PRIMARY_SLEEP 0x3
-#define STATUS_PRIMARY_FREEZE 0x4
-#define STATUS_PRIMARY_BURN 0x5
-#define STATUS_PRIMARY_POKERUS 0x6
-#define STATUS_PRIMARY_FAINTED 0x7
-
-#define MAX_TOTAL_EVS 510
-#define UNOWN_FORM_COUNT 28
-
struct PokemonSubstruct0
{
u16 species;
@@ -145,8 +15,8 @@ struct PokemonSubstruct0
struct PokemonSubstruct1
{
- u16 moves[4];
- u8 pp[4];
+ u16 moves[MAX_MON_MOVES];
+ u8 pp[MAX_MON_MOVES];
};
struct PokemonSubstruct2
@@ -273,7 +143,7 @@ struct BattlePokemon
/*0x06*/ u16 speed;
/*0x08*/ u16 spAttack;
/*0x0A*/ u16 spDefense;
- /*0x0C*/ u16 moves[4];
+ /*0x0C*/ u16 moves[MAX_MON_MOVES];
/*0x14*/ u32 hpIV:5;
/*0x14*/ u32 attackIV:5;
/*0x15*/ u32 defenseIV:5;
@@ -287,7 +157,7 @@ struct BattlePokemon
/*0x21*/ u8 type1;
/*0x22*/ u8 type2;
/*0x23*/ u8 unknown;
- /*0x24*/ u8 pp[4];
+ /*0x24*/ u8 pp[MAX_MON_MOVES];
/*0x28*/ u16 hp;
/*0x2A*/ u8 level;
/*0x2B*/ u8 friendship;
@@ -348,13 +218,6 @@ struct BattleMove
u8 flags;
};
-#define FLAG_MAKES_CONTACT 0x1
-#define FLAG_PROTECT_AFFECTED 0x2
-#define FLAG_MAGICCOAT_AFFECTED 0x4
-#define FLAG_SNATCH_AFFECTED 0x8
-#define FLAG_MIRROR_MOVE_AFFECTED 0x10
-#define FLAG_KINGSROCK_AFFECTED 0x20
-
struct SpindaSpot
{
u8 x, y;
@@ -367,46 +230,6 @@ struct __attribute__((packed)) LevelUpMove
u16 level:7;
};
-enum
-{
- GROWTH_MEDIUM_FAST,
- GROWTH_ERRATIC,
- GROWTH_FLUCTUATING,
- GROWTH_MEDIUM_SLOW,
- GROWTH_FAST,
- GROWTH_SLOW
-};
-
-enum
-{
- BODY_COLOR_RED,
- BODY_COLOR_BLUE,
- BODY_COLOR_YELLOW,
- BODY_COLOR_GREEN,
- BODY_COLOR_BLACK,
- BODY_COLOR_BROWN,
- BODY_COLOR_PURPLE,
- BODY_COLOR_GRAY,
- BODY_COLOR_WHITE,
- BODY_COLOR_PINK
-};
-
-#define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220
-#define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220
-#define EVO_FRIENDSHIP_NIGHT 0x0003 // Pokémon levels up at night with friendship ≥ 220
-#define EVO_LEVEL 0x0004 // Pokémon reaches the specified level
-#define EVO_TRADE 0x0005 // Pokémon is traded
-#define EVO_TRADE_ITEM 0x0006 // Pokémon is traded while it's holding the specified item
-#define EVO_ITEM 0x0007 // specified item is used on Pokémon
-#define EVO_LEVEL_ATK_GT_DEF 0x0008 // Pokémon reaches the specified level with attack > defense
-#define EVO_LEVEL_ATK_EQ_DEF 0x0009 // Pokémon reaches the specified level with attack = defense
-#define EVO_LEVEL_ATK_LT_DEF 0x000a // Pokémon reaches the specified level with attack < defense
-#define EVO_LEVEL_SILCOON 0x000b // Pokémon reaches the specified level with a Silcoon personality value
-#define EVO_LEVEL_CASCOON 0x000c // Pokémon reaches the specified level with a Cascoon personality value
-#define EVO_LEVEL_NINJASK 0x000d // Pokémon reaches the specified level (special value for Ninjask)
-#define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja)
-#define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value
-
struct Evolution
{
u16 method;
@@ -414,8 +237,6 @@ struct Evolution
u16 targetSpecies;
};
-#define EVOS_PER_MON 5
-
extern u8 gPlayerPartyCount;
extern struct Pokemon gPlayerParty[PARTY_SIZE];
extern u8 gEnemyPartyCount;
diff --git a/include/script_menu.h b/include/script_menu.h
index efb51870b..086ad147f 100644
--- a/include/script_menu.h
+++ b/include/script_menu.h
@@ -1,20 +1,20 @@
#ifndef GUARD_SCRIPT_MENU_H
#define GUARD_SCRIPT_MENU_H
-extern const u8 *const gUnknown_0858BAF0[];
+extern const u8 *const gStdStrings[];
-bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 var3, u8 var4);
-bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 var3, u8 var4, u8 var5);
-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_Multichoice(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress);
+bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 defaultChoice);
+bool8 ScriptMenu_YesNo(u8 left, u8 top);
+bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 columnCount);
+bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y);
bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void);
-int convert_pixel_width_to_tile_width(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 ConvertPixelWidthToTileWidth(int width);
+u8 CreateWindowFromRect(u8 x, u8 y, u8 width, u8 height);
+void ClearToTransparentAndRemoveWindow(u8 windowId);
+int DisplayTextAndGetWidth(const u8* str, int width);
+int ScriptMenu_AdjustLeftCoordFromWidth(int left, int width);
+bool16 ScriptMenu_CreatePCMultichoice(void);
void ScriptMenu_DisplayPCStartupPrompt(void);
#endif //GUARD_SCRIPT_MENU_H
diff --git a/include/script_movement.h b/include/script_movement.h
index 4c3fa6002..f9a97cf46 100644
--- a/include/script_movement.h
+++ b/include/script_movement.h
@@ -1,8 +1,8 @@
#ifndef GUARD_SCRIPT_MOVEMENT_H
#define GUARD_SCRIPT_MOVEMENT_H
-bool8 ScriptMovement_StartObjectMovementScript(u8, u8, u8, const u8 *);
-bool8 ScriptMovement_IsObjectMovementFinished(u8, u8, u8);
-void sub_80D338C(void);
+bool8 ScriptMovement_StartObjectMovementScript(u8 localId, u8 mapNum, u8 mapGroup, const u8 *movementScript);
+bool8 ScriptMovement_IsObjectMovementFinished(u8 localId, u8 mapNum, u8 mapGroup);
+void ScriptMovement_UnfreezeEventObjects(void);
#endif // GUARD_SCRIPT_MOVEMENT_H
diff --git a/include/slot_machine.h b/include/slot_machine.h
index d441b7411..1b22e165f 100644
--- a/include/slot_machine.h
+++ b/include/slot_machine.h
@@ -4,6 +4,7 @@
#define NUM_REELS 3
#define REEL_NUM_TAGS 21
#define REEL_TAG_HEIGHT 24
+#define SLOT_MACHINE_COUNT 12
// Lucky Flags
#define LUCKY_BIAS_REPLAY (1 << 0)
diff --git a/include/strings.h b/include/strings.h
index e31a97761..c1414269a 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -758,31 +758,29 @@ extern const u8 BattleFrontier_Lounge2_Text_26174D[];
extern const u8 BattleFrontier_Lounge2_Text_2617F9[];
extern const u8 BattleFrontier_Lounge2_Text_2618C4[];
-extern const u8 BattleFrontier_Lounge5_Text_26468D[];
-extern const u8 BattleFrontier_Lounge5_Text_2646E5[];
-extern const u8 BattleFrontier_Lounge5_Text_264741[];
-extern const u8 BattleFrontier_Lounge5_Text_2647A4[];
-extern const u8 BattleFrontier_Lounge5_Text_2647FC[];
-extern const u8 BattleFrontier_Lounge5_Text_264858[];
-extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
-extern const u8 BattleFrontier_Lounge5_Text_264916[];
-extern const u8 BattleFrontier_Lounge5_Text_264972[];
-extern const u8 BattleFrontier_Lounge5_Text_2649D5[];
-extern const u8 BattleFrontier_Lounge5_Text_264A3F[];
-extern const u8 BattleFrontier_Lounge5_Text_264A9B[];
-extern const u8 BattleFrontier_Lounge5_Text_264AF3[];
-extern const u8 BattleFrontier_Lounge5_Text_264B5D[];
-extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
-extern const u8 BattleFrontier_Lounge5_Text_264BC3[];
-extern const u8 BattleFrontier_Lounge5_Text_264C36[];
-extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
-extern const u8 BattleFrontier_Lounge5_Text_264C95[];
-extern const u8 BattleFrontier_Lounge5_Text_264D01[];
-extern const u8 BattleFrontier_Lounge5_Text_264D6B[];
-extern const u8 BattleFrontier_Lounge5_Text_264DD7[];
-extern const u8 BattleFrontier_Lounge5_Text_264E33[];
-extern const u8 BattleFrontier_Lounge5_Text_264E8F[];
-extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
+// Battle Frontier Nature Girl
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlHardy[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlLonely[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlBrave[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlAdamant[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlNaughty[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlBold[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlDocileNaiveQuietQuirky[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlRelaxed[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlImpish[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlLax[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlTimid[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlHasty[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlSerious[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlJolly[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlModest[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlMild[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlBashful[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlRash[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlCalm[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlGentle[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlSassy[];
+extern const u8 BattleFrontier_Lounge5_Text_NatureGirlCareful[];
extern const u8 BattleFrontier_Lounge3_Text_262261[];
extern const u8 BattleFrontier_Lounge3_Text_26230D[];
@@ -1024,36 +1022,31 @@ extern const u8 gText_PokenavRibbons_RibbonListButtons[];
extern const u8 gText_PokenavRibbons_RibbonCheckButtons[];
extern const u8 gText_Number2[];
-extern const u8 gUnknown_085EAD37[];
-extern const u8 gUnknown_085EAD41[];
-extern const u8 gUnknown_085EAD67[];
-extern const u8 gUnknown_085EAD6D[];
-extern const u8 gUnknown_085EAD72[];
-extern const u8 gUnknown_085EAD84[];
-extern const u8 gUnknown_085EAD96[];
-extern const u8 gUnknown_085EADA4[];
-extern const u8 gUnknown_085EADB5[];
-extern const u8 gUnknown_085EADC4[];
-extern const u8 gUnknown_085EADD5[];
-extern const u8 gUnknown_085EADE7[];
-extern const u8 gUnknown_085EADF9[];
-extern const u8 gUnknown_085EAE04[];
-extern const u8 gUnknown_085EAE12[];
-extern const u8 gUnknown_085EAE1B[];
-extern const u8 gUnknown_085EAE27[];
-extern const u8 gUnknown_085EAE2C[];
-extern const u8 gUnknown_085EAE31[];
-extern const u8 gUnknown_085EAE35[];
-extern const u8 gUnknown_085EAE39[];
-extern const u8 gUnknown_085EAE3D[];
-extern const u8 gUnknown_085EAE41[];
-extern const u8 gUnknown_085EAD5F[];
-extern const u8 gUnknown_085EAE53[];
-extern const u8 gUnknown_085EAE5A[];
+extern const u8 gText_Petalburg[];
+extern const u8 gText_Slateport[];
+extern const u8 gText_Enter2[];
+extern const u8 gText_Info2[];
+extern const u8 gText_WhatsAContest[];
+extern const u8 gText_TypesOfContests[];
+extern const u8 gText_Ranks[];
+extern const u8 gText_Decoration2[];
+extern const u8 gText_PackUp[];
+extern const u8 gText_Registry[];
+extern const u8 gText_Information[];
+extern const u8 gText_Mach[];
+extern const u8 gText_Acro[];
+extern const u8 gText_Psn[];
+extern const u8 gText_Par[];
+extern const u8 gText_Slp[];
+extern const u8 gText_Brn[];
+extern const u8 gText_Frz[];
+extern const u8 gText_Dewford[];
+extern const u8 gText_SawIt[];
+extern const u8 gText_NotYet[];
extern const u8 gText_Yes[];
extern const u8 gText_No[];
-extern const u8 gUnknown_085EAEA2[];
-extern const u8 gUnknown_085EAEAC[];
+extern const u8 gText_Challenge[];
+extern const u8 gText_Info3[];
extern const u8 gTrickHouse_Mechadoll_Oddish[];
extern const u8 gTrickHouse_Mechadoll_Poochyena[];
extern const u8 gTrickHouse_Mechadoll_Taillow[];
@@ -1149,65 +1142,64 @@ extern const u8 gText_DexEmptyString[];
extern const u8 gText_DexSearchDontSpecify[];
extern const u8 gText_DexSearchTypeNone[];
-extern const u8 gUnknown_085EAEC3[];
-extern const u8 gUnknown_085EAED6[];
-extern const u8 gUnknown_085EAEE6[];
-extern const u8 gUnknown_085EAEF6[];
-extern const u8 gUnknown_085EAF02[];
-extern const u8 gUnknown_085EAF0E[];
-extern const u8 gUnknown_085EAF1B[];
-extern const u8 gUnknown_085EAF24[];
-extern const u8 gUnknown_085EAF2F[];
-extern const u8 gUnknown_085EAF34[];
-extern const u8 gUnknown_085EAF3E[];
-extern const u8 gUnknown_085EAF4B[];
-extern const u8 gUnknown_085EAF58[];
-extern const u8 gUnknown_085EAF65[];
-extern const u8 gUnknown_085EAF70[];
-extern const u8 gUnknown_085EAF7D[];
-extern const u8 gUnknown_085EAF87[];
-extern const u8 gUnknown_085EAF93[];
-extern const u8 gUnknown_085EAF9F[];
-extern const u8 gUnknown_085EAFAB[];
-extern const u8 gUnknown_085EAFB6[];
-extern const u8 gUnknown_085EAFCF[];
-extern const u8 gUnknown_085EAFE8[];
-extern const u8 gUnknown_085EB089[];
-extern const u8 gUnknown_085EB09C[];
-extern const u8 gUnknown_085EB0AF[];
-extern const u8 gUnknown_085EB0C2[];
-extern const u8 gUnknown_085EB0D5[];
-extern const u8 gUnknown_085EB002[];
-extern const u8 gUnknown_085EB017[];
-extern const u8 gUnknown_085EB02A[];
-extern const u8 gUnknown_085EB034[];
+extern const u8 gText_FreshWaterAndPrice[];
+extern const u8 gText_SodaPopAndPrice[];
+extern const u8 gText_LemonadeAndPrice[];
+extern const u8 gText_HowToRide[];
+extern const u8 gText_HowToTurn[];
+extern const u8 gText_SandySlopes[];
+extern const u8 gText_Wheelies[];
+extern const u8 gText_BunnyHops[];
+extern const u8 gText_Jump[];
+extern const u8 gText_Satisfied[];
+extern const u8 gText_Dissatisfied[];
+extern const u8 gText_DeepSeaTooth[];
+extern const u8 gText_DeepSeaScale[];
+extern const u8 gText_BlueFlute2[];
+extern const u8 gText_YellowFlute2[];
+extern const u8 gText_RedFlute2[];
+extern const u8 gText_WhiteFlute2[];
+extern const u8 gText_BlackFlute2[];
+extern const u8 gText_GlassChair[];
+extern const u8 gText_GlassDesk[];
+extern const u8 gText_TreeckoDollAndPrice[];
+extern const u8 gText_TorchicDollAndPrice[];
+extern const u8 gText_MudkipDollAndPrice[];
+extern const u8 gText_TM32AndPrice[];
+extern const u8 gText_TM29AndPrice[];
+extern const u8 gText_TM35AndPrice[];
+extern const u8 gText_TM24AndPrice[];
+extern const u8 gText_TM13AndPrice[];
+extern const u8 gText_50CoinsAndPrice[];
+extern const u8 gText_500CoinsAndPrice[];
+extern const u8 gText_Excellent2[];
+extern const u8 gText_NotSoGood[];
extern const u8 gText_LilycoveCity[];
-extern const u8 gUnknown_085EB07E[];
-extern const u8 gUnknown_085EB084[];
-extern const u8 gUnknown_085EB040[];
-extern const u8 gUnknown_085EB04A[];
-extern const u8 gUnknown_085EB057[];
-extern const u8 gUnknown_085EB062[];
+extern const u8 gText_Right[];
+extern const u8 gText_Left[];
+extern const u8 gText_RedShard[];
+extern const u8 gText_YellowShard[];
+extern const u8 gText_BlueShard[];
+extern const u8 gText_GreenShard[];
extern const u8 gText_Opponent[];
extern const u8 gText_Tourney_Tree[];
extern const u8 gText_ReadyToStart[];
-extern const u8 gUnknown_085EB5BC[];
-extern const u8 gUnknown_085EB5C3[];
-extern const u8 gUnknown_085EB5C8[];
-extern const u8 gUnknown_085EB29A[];
-extern const u8 gUnknown_085EB2A3[];
-extern const u8 gUnknown_085EB372[];
-extern const u8 gUnknown_085EB37F[];
-extern const u8 gUnknown_085EB389[];
-extern const u8 gUnknown_085EAE6E[];
-extern const u8 gUnknown_085EAE7C[];
-extern const u8 gUnknown_085EAE8A[];
-extern const u8 gUnknown_085EAD6D[];
-extern const u8 gUnknown_085EB397[];
-extern const u8 gUnknown_085EB3A4[];
-extern const u8 gUnknown_085EB3B1[];
-extern const u8 gUnknown_085EB3D4[];
-extern const u8 gUnknown_085EB3C6[];
+extern const u8 gText_Record2[];
+extern const u8 gText_Rest[];
+extern const u8 gText_Retire[];
+extern const u8 gText_RedTent[];
+extern const u8 gText_BlueTent[];
+extern const u8 gText_TradeCenter[];
+extern const u8 gText_Colosseum[];
+extern const u8 gText_RecordCorner[];
+extern const u8 gText_SingleBattle[];
+extern const u8 gText_DoubleBattle[];
+extern const u8 gText_MultiBattle[];
+extern const u8 gText_BerryCrush3[];
+extern const u8 gText_PokemonJump[];
+extern const u8 gText_DodrioBerryPicking[];
+extern const u8 gText_JoinGroup[];
+extern const u8 gText_BecomeLeader[];
extern const u8 gText_NormalRank[];
extern const u8 gText_SuperRank[];
extern const u8 gText_HyperRank[];
@@ -1219,56 +1211,56 @@ extern const u8 gText_AboutE_Mode[];
extern const u8 gText_AboutG_Mode[];
extern const u8 gText_E_Mode[];
extern const u8 gText_G_Mode[];
-extern const u8 gUnknown_085EB278[];
-extern const u8 gUnknown_085EB28A[];
-extern const u8 gUnknown_085EB290[];
-extern const u8 gUnknown_085EB295[];
-extern const u8 gUnknown_085EB2E4[];
-extern const u8 gUnknown_085EB2F0[];
-extern const u8 gUnknown_085EB2FC[];
-extern const u8 gUnknown_085EB3DF[];
-extern const u8 gUnknown_085EB3EA[];
-extern const u8 gUnknown_085EB3F1[];
-extern const u8 gUnknown_085EB3FC[];
-extern const u8 gUnknown_085EB40A[];
-extern const u8 gUnknown_085EB415[];
-extern const u8 gUnknown_085EB41D[];
-extern const u8 gUnknown_085EB424[];
-extern const u8 gUnknown_085EB45C[];
-extern const u8 gUnknown_085EB469[];
-extern const u8 gUnknown_085EB475[];
-extern const u8 gUnknown_085EB482[];
-extern const u8 gUnknown_085EB42F[];
-extern const u8 gUnknown_085EB43A[];
-extern const u8 gUnknown_085EB444[];
-extern const u8 gUnknown_085EB451[];
-extern const u8 gUnknown_085EB48E[];
-extern const u8 gUnknown_085EB496[];
-extern const u8 gUnknown_085EB4A3[];
-extern const u8 gUnknown_085EB4AD[];
-extern const u8 gUnknown_085EB4B9[];
-extern const u8 gUnknown_085EB4C7[];
-extern const u8 gUnknown_085EB4D4[];
-extern const u8 gUnknown_085EB4E0[];
-extern const u8 gUnknown_085EB532[];
-extern const u8 gUnknown_085EB543[];
-extern const u8 gUnknown_085EB555[];
-extern const u8 gUnknown_085EB563[];
-extern const u8 gUnknown_085EB56E[];
-extern const u8 gUnknown_085EB57E[];
-extern const u8 gUnknown_085EB589[];
-extern const u8 gUnknown_085EB5B6[];
-extern const u8 gUnknown_085EE14B[];
-extern const u8 gUnknown_085EE14F[];
-extern const u8 gUnknown_085EB2FF[];
-extern const u8 gUnknown_085EB310[];
-extern const u8 gUnknown_085EB317[];
-extern const u8 gUnknown_085EB31F[];
+extern const u8 gText_Blank[];
+extern const u8 gText_5BP[];
+extern const u8 gText_10BP[];
+extern const u8 gText_15BP[];
+extern const u8 gText_ClawFossil[];
+extern const u8 gText_RootFossil[];
+extern const u8 gText_No4[];
+extern const u8 gText_TwoStyles[];
+extern const u8 gText_Lv50_3[];
+extern const u8 gText_OpenLevel2[];
+extern const u8 gText_MonTypeAndNo[];
+extern const u8 gText_HoldItems[];
+extern const u8 gText_Symbols2[];
+extern const u8 gText_Record3[];
+extern const u8 gText_BattlePts[];
+extern const u8 gText_BattleRules[];
+extern const u8 gText_JudgeMind[];
+extern const u8 gText_JudgeSkill[];
+extern const u8 gText_JudgeBody[];
+extern const u8 gText_TowerInfo[];
+extern const u8 gText_BattleMon[];
+extern const u8 gText_BattleSalon[];
+extern const u8 gText_MultiLink2[];
+extern const u8 gText_Matchup[];
+extern const u8 gText_TourneyTree[];
+extern const u8 gText_DoubleKO[];
+extern const u8 gText_BasicRules[];
+extern const u8 gText_SwapPartners[];
+extern const u8 gText_SwapNumber[];
+extern const u8 gText_SwapNotes[];
+extern const u8 gText_OpenLevel3[];
+extern const u8 gText_PyramidPokemon[];
+extern const u8 gText_PyramidTrainers[];
+extern const u8 gText_PyramidMaze[];
+extern const u8 gText_BattleBag2[];
+extern const u8 gText_PokenavAndBag[];
+extern const u8 gText_HeldItems[];
+extern const u8 gText_PokemonOrder[];
+extern const u8 gText_GoOn[];
+extern const u8 gText_Red[];
+extern const u8 gText_Blue[];
+extern const u8 gText_IllBattleNow[];
+extern const u8 gText_IWon[];
+extern const u8 gText_ILost[];
+extern const u8 gText_IWontTell[];
extern const u8 gText_CaveOfOrigin[];
extern const u8 gText_MtPyre[];
extern const u8 gText_SkyPillar[];
extern const u8 gText_DontRemember[];
-extern const u8 gUnknown_085EB597[];
+extern const u8 gText_BattlePokemon[];
extern const u8 gText_NormalTagMatch[];
extern const u8 gText_VarietyTagMatch[];
extern const u8 gText_UniqueTagMatch[];
@@ -1281,29 +1273,15 @@ extern const u8 gText_TrainerHill2F[];
extern const u8 gText_TrainerHill3F[];
extern const u8 gText_TrainerHill4F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F1B[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F5A[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F96[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27879F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787D5[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_278831[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27879F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787D5[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787FC[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27879F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787D5[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_278831[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787FC[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F1B[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_277F5A[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27879F[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_2787D5[];
-extern const u8 OldaleTown_PokemonCenter_2F_Text_27889C[];
+// Cable Club multichoice text
+extern const u8 CableClub_Text_TradeUsingLinkCable[];
+extern const u8 CableClub_Text_BattleUsingLinkCable[];
+extern const u8 CableClub_Text_RecordCornerUsingLinkCable[];
+extern const u8 CableClub_Text_CancelSelectedItem[];
+extern const u8 CableClub_Text_YouMayTradeHere[];
+extern const u8 CableClub_Text_YouMayBattleHere[];
+extern const u8 CableClub_Text_CanMixRecords[];
+extern const u8 CableClub_Text_CanMakeBerryPowder[];
// Frontier records.
extern const u8 gText_WinStreak[];
diff --git a/include/task.h b/include/task.h
index 4852571b4..d0ca34f7f 100644
--- a/include/task.h
+++ b/include/task.h
@@ -5,6 +5,7 @@
#define TAIL_SENTINEL 0xFF
#define NUM_TASKS 16
+#define NUM_TASK_DATA 16
typedef void (*TaskFunc)(u8 taskId);
@@ -15,7 +16,7 @@ struct Task
u8 prev;
u8 next;
u8 priority;
- s16 data[16];
+ s16 data[NUM_TASK_DATA];
};
extern struct Task gTasks[];
diff --git a/src/apprentice.c b/src/apprentice.c
index 6c4ac86aa..189647991 100644
--- a/src/apprentice.c
+++ b/src/apprentice.c
@@ -1100,7 +1100,7 @@ void ResetAllApprenticeData(void)
gSaveBlock2Ptr->apprentices[i].lvlMode = 0;
gSaveBlock2Ptr->apprentices[i].number = 0;
gSaveBlock2Ptr->apprentices[i].field_1 = 0;
- for (j = 0; j < 4; j++)
+ for (j = 0; j < TRAINER_ID_LENGTH; j++)
gSaveBlock2Ptr->apprentices[i].playerId[j] = 0;
gSaveBlock2Ptr->apprentices[i].language = gGameLanguage;
gSaveBlock2Ptr->apprentices[i].checksum = 0;
@@ -1410,7 +1410,7 @@ static void GetLatestLearnedMoves(u16 species, u16 *moves)
static u16 sub_81A0284(u8 arg0, u8 speciesTableId, u8 arg2)
{
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u8 i, count;
if (PLAYER_APPRENTICE.field_B1_1 < 3)
@@ -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);
@@ -2063,7 +2063,7 @@ static void sub_81A1370(void)
r10 = 0xFFFF;
r9 = -1;
- for (i = 1; i < 4; i++)
+ for (i = 1; i < TRAINER_ID_LENGTH; i++)
{
if (GetTrainerId(gSaveBlock2Ptr->apprentices[i].playerId) == GetTrainerId(gSaveBlock2Ptr->playerTrainerId)
&& gSaveBlock2Ptr->apprentices[i].number < r10)
@@ -2092,7 +2092,7 @@ static void sub_81A1438(void)
gSaveBlock2Ptr->apprentices[0].number++;
sub_81A0390(gSaveBlock2Ptr->apprentices[0].field_1);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < TRAINER_ID_LENGTH; i++)
gSaveBlock2Ptr->apprentices[0].playerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
StringCopy(gSaveBlock2Ptr->apprentices[0].playerName, gSaveBlock2Ptr->playerName);
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c
index 3c07cc227..b581a8bbc 100644
--- a/src/battle_ai_script_commands.c
+++ b/src/battle_ai_script_commands.c
@@ -298,7 +298,7 @@ void BattleAI_HandleItemUseBeforeAISetup(u8 defaultScoreMoves)
)
)
{
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_TRAINER_ITEMS; i++)
{
if (gTrainers[gTrainerBattleOpponent_A].items[i] != 0)
{
@@ -397,8 +397,8 @@ u8 BattleAI_ChooseMoveOrAction(void)
static u8 ChooseMoveOrAction_Singles(void)
{
- u8 currentMoveArray[4];
- u8 consideredMoveArray[4];
+ u8 currentMoveArray[MAX_MON_MOVES];
+ u8 consideredMoveArray[MAX_MON_MOVES];
u8 numOfBestMoves;
s32 i;
@@ -452,11 +452,11 @@ static u8 ChooseMoveOrAction_Doubles(void)
s32 i;
s32 j;
s32 scriptsToRun;
- s16 bestMovePointsForTarget[4];
- s8 mostViableTargetsArray[4];
- u8 actionOrMoveIndex[4];
- u8 mostViableMovesScores[4];
- u8 mostViableMovesIndices[4];
+ s16 bestMovePointsForTarget[MAX_BATTLERS_COUNT];
+ s8 mostViableTargetsArray[MAX_BATTLERS_COUNT];
+ u8 actionOrMoveIndex[MAX_BATTLERS_COUNT];
+ u8 mostViableMovesScores[MAX_MON_MOVES];
+ u8 mostViableMovesIndices[MAX_MON_MOVES];
s32 mostViableTargetsNo;
s32 mostViableMovesNo;
s16 mostMovePoints;
@@ -543,7 +543,7 @@ static u8 ChooseMoveOrAction_Doubles(void)
mostViableTargetsArray[0] = 0;
mostViableTargetsNo = 1;
- for (i = 1; i < MAX_MON_MOVES; i++)
+ for (i = 1; i < MAX_BATTLERS_COUNT; i++)
{
if (mostMovePoints == bestMovePointsForTarget[i])
{
@@ -1167,7 +1167,7 @@ static void BattleAICmd_get_considered_move_power(void)
static void BattleAICmd_get_how_powerful_move_is(void)
{
s32 i, checkedMove;
- s32 moveDmgs[4];
+ s32 moveDmgs[MAX_MON_MOVES];
for (i = 0; sDiscouragedPowerfulMoveEffects[i] != 0xFFFF; i++)
{
diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c
index cd31293f8..6ef359150 100644
--- a/src/battle_ai_switch_items.c
+++ b/src/battle_ai_switch_items.c
@@ -820,7 +820,7 @@ static bool8 ShouldUseItem(void)
}
}
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_TRAINER_ITEMS; i++)
{
u16 item;
const u8 *itemEffects;
diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c
index b73bfc36f..1be5def47 100644
--- a/src/battle_controller_player.c
+++ b/src/battle_controller_player.c
@@ -664,7 +664,7 @@ u32 sub_8057FBC(void) // unused
static void HandleMoveSwitching(void)
{
- u8 perMovePPBonuses[4];
+ u8 perMovePPBonuses[MAX_MON_MOVES];
struct ChooseMoveStruct moveStruct;
u8 totalPPBonuses;
diff --git a/src/battle_main.c b/src/battle_main.c
index c8b2d17cc..26e9e91ae 100644
--- a/src/battle_main.c
+++ b/src/battle_main.c
@@ -1790,9 +1790,9 @@ static void CB2_HandleStartMultiBattle(void)
gBattleCommunication[SPRITES_INIT_STATE2] = 0;
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
{
- for (id = 0; id < 4 && (gLinkPlayers[id].version & 0xFF) == 3; id++);
+ for (id = 0; id < MAX_LINK_PLAYERS && (gLinkPlayers[id].version & 0xFF) == VERSION_EMERALD; id++);
- if (id == 4)
+ if (id == MAX_LINK_PLAYERS)
gBattleCommunication[MULTIUSE_STATE] = 8;
else
gBattleCommunication[MULTIUSE_STATE] = 10;
@@ -4244,7 +4244,7 @@ static void HandleTurnActionSelectionState(void)
moveInfo.monType1 = gBattleMons[gActiveBattler].type1;
moveInfo.monType2 = gBattleMons[gActiveBattler].type2;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
moveInfo.moves[i] = gBattleMons[gActiveBattler].moves[i];
moveInfo.currentPp[i] = gBattleMons[gActiveBattler].pp[i];
diff --git a/src/battle_pike.c b/src/battle_pike.c
index 7d1257fb3..bfb87f679 100644
--- a/src/battle_pike.c
+++ b/src/battle_pike.c
@@ -49,7 +49,7 @@ struct PikeWildMon
{
u16 species;
u8 levelDelta;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
};
// IWRAM bss
diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c
index e0a00d28c..6bcf00748 100644
--- a/src/battle_pyramid.c
+++ b/src/battle_pyramid.c
@@ -77,7 +77,7 @@ struct PyramidWildMon
u16 species;
u8 lvl;
u8 abilityNum;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
};
struct PyramidFloorTemplate
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 5016a3a58..35d47fa82 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -1681,29 +1681,22 @@ static void atk07_adjustnormaldamage(void)
RecordItemEffectBattle(gBattlerTarget, holdEffect);
gSpecialStatuses[gBattlerTarget].focusBanded = 1;
}
- if (gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
- goto END;
- if (gBattleMoves[gCurrentMove].effect != EFFECT_FALSE_SWIPE && !gProtectStructs[gBattlerTarget].endured
- && !gSpecialStatuses[gBattlerTarget].focusBanded)
- goto END;
-
- if (gBattleMons[gBattlerTarget].hp > gBattleMoveDamage)
- goto END;
-
- gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - 1;
-
- if (gProtectStructs[gBattlerTarget].endured)
+ if (!(gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
+ && (gBattleMoves[gCurrentMove].effect == EFFECT_FALSE_SWIPE || gProtectStructs[gBattlerTarget].endured || gSpecialStatuses[gBattlerTarget].focusBanded)
+ && gBattleMons[gBattlerTarget].hp <= gBattleMoveDamage)
{
- gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED;
- }
- else if (gSpecialStatuses[gBattlerTarget].focusBanded)
- {
- gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON;
- gLastUsedItem = gBattleMons[gBattlerTarget].item;
+ gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - 1;
+ if (gProtectStructs[gBattlerTarget].endured)
+ {
+ gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED;
+ }
+ else if (gSpecialStatuses[gBattlerTarget].focusBanded)
+ {
+ gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON;
+ gLastUsedItem = gBattleMons[gBattlerTarget].item;
+ }
}
-
- END:
- gBattlescriptCurrInstr++;
+ gBattlescriptCurrInstr++;
}
static void atk08_adjustnormaldamage2(void) // The same as 0x7 except it doesn't check for false swipe move effect.
@@ -1730,27 +1723,22 @@ static void atk08_adjustnormaldamage2(void) // The same as 0x7 except it doesn't
RecordItemEffectBattle(gBattlerTarget, holdEffect);
gSpecialStatuses[gBattlerTarget].focusBanded = 1;
}
- if (gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
- goto END;
- if (!gProtectStructs[gBattlerTarget].endured && !gSpecialStatuses[gBattlerTarget].focusBanded)
- goto END;
- if (gBattleMons[gBattlerTarget].hp > gBattleMoveDamage)
- goto END;
-
- gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - 1;
-
- if (gProtectStructs[gBattlerTarget].endured)
- {
- gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED;
- }
- else if (gSpecialStatuses[gBattlerTarget].focusBanded)
+ if (!(gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
+ && (gProtectStructs[gBattlerTarget].endured || gSpecialStatuses[gBattlerTarget].focusBanded)
+ && gBattleMons[gBattlerTarget].hp <= gBattleMoveDamage)
{
- gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON;
- gLastUsedItem = gBattleMons[gBattlerTarget].item;
+ gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - 1;
+ if (gProtectStructs[gBattlerTarget].endured)
+ {
+ gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED;
+ }
+ else if (gSpecialStatuses[gBattlerTarget].focusBanded)
+ {
+ gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON;
+ gLastUsedItem = gBattleMons[gBattlerTarget].item;
+ }
}
-
- END:
- gBattlescriptCurrInstr++;
+ gBattlescriptCurrInstr++;
}
static void atk09_attackanimation(void)
@@ -4564,27 +4552,26 @@ static void atk49_moveend(void)
gBattleScripting.atk49_state++;
break;
case ATK49_CHOICE_MOVE: // update choice band move
- if (!(gHitMarker & HITMARKER_OBEYS) || holdEffectAtk != HOLD_EFFECT_CHOICE_BAND
- || gChosenMove == MOVE_STRUGGLE || (*choicedMoveAtk != 0 && *choicedMoveAtk != 0xFFFF))
- goto LOOP;
- if (gChosenMove == MOVE_BATON_PASS && !(gMoveResultFlags & MOVE_RESULT_FAILED))
+ if (gHitMarker & HITMARKER_OBEYS
+ && holdEffectAtk == HOLD_EFFECT_CHOICE_BAND
+ && gChosenMove != MOVE_STRUGGLE
+ && (*choicedMoveAtk == 0 || *choicedMoveAtk == 0xFFFF))
{
- gBattleScripting.atk49_state++;
- break;
- }
- *choicedMoveAtk = gChosenMove;
- LOOP:
- {
- for (i = 0; i < MAX_MON_MOVES; i++)
+ if (gChosenMove == MOVE_BATON_PASS && !(gMoveResultFlags & MOVE_RESULT_FAILED))
{
- if (gBattleMons[gBattlerAttacker].moves[i] == *choicedMoveAtk)
- break;
+ ++gBattleScripting.atk49_state;
+ break;
}
- if (i == MAX_MON_MOVES)
- *choicedMoveAtk = 0;
-
- gBattleScripting.atk49_state++;
+ *choicedMoveAtk = gChosenMove;
+ }
+ for (i = 0; i < MAX_MON_MOVES; ++i)
+ {
+ if (gBattleMons[gBattlerAttacker].moves[i] == *choicedMoveAtk)
+ break;
}
+ if (i == MAX_MON_MOVES)
+ *choicedMoveAtk = 0;
+ ++gBattleScripting.atk49_state;
break;
case ATK49_CHANGED_ITEMS: // changed held items
for (i = 0; i < gBattlersCount; i++)
@@ -6152,29 +6139,22 @@ static void atk69_adjustsetdamage(void) // The same as 0x7, except there's no ra
RecordItemEffectBattle(gBattlerTarget, holdEffect);
gSpecialStatuses[gBattlerTarget].focusBanded = 1;
}
- if (gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
- goto END;
- if (gBattleMoves[gCurrentMove].effect != EFFECT_FALSE_SWIPE && !gProtectStructs[gBattlerTarget].endured
- && !gSpecialStatuses[gBattlerTarget].focusBanded)
- goto END;
-
- if (gBattleMons[gBattlerTarget].hp > gBattleMoveDamage)
- goto END;
-
- gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - 1;
-
- if (gProtectStructs[gBattlerTarget].endured)
- {
- gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED;
- }
- else if (gSpecialStatuses[gBattlerTarget].focusBanded)
+ if (!(gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
+ && (gBattleMoves[gCurrentMove].effect == EFFECT_FALSE_SWIPE || gProtectStructs[gBattlerTarget].endured || gSpecialStatuses[gBattlerTarget].focusBanded)
+ && gBattleMons[gBattlerTarget].hp <= gBattleMoveDamage)
{
- gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON;
- gLastUsedItem = gBattleMons[gBattlerTarget].item;
+ gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - 1;
+ if (gProtectStructs[gBattlerTarget].endured)
+ {
+ gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED;
+ }
+ else if (gSpecialStatuses[gBattlerTarget].focusBanded)
+ {
+ gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON;
+ gLastUsedItem = gBattleMons[gBattlerTarget].item;
+ }
}
-
- END:
- gBattlescriptCurrInstr++;
+ gBattlescriptCurrInstr++;
}
static void atk6A_removeitem(void)
@@ -10184,7 +10164,7 @@ static void atkEF_handleballthrow(void)
gBattlescriptCurrInstr = BattleScript_SuccessBallThrow;
SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem);
- if (CalculatePlayerPartyCount() == 6)
+ if (CalculatePlayerPartyCount() == PARTY_SIZE)
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
else
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
@@ -10196,7 +10176,7 @@ static void atkEF_handleballthrow(void)
odds = Sqrt(Sqrt(16711680 / odds));
odds = 1048560 / odds;
- for (shakes = 0; shakes < 4 && Random() < odds; shakes++);
+ for (shakes = 0; shakes < BALL_3_SHAKES_SUCCESS && Random() < odds; shakes++);
if (gLastUsedItem == ITEM_MASTER_BALL)
shakes = BALL_3_SHAKES_SUCCESS; // why calculate the shakes before that check?
@@ -10209,7 +10189,7 @@ static void atkEF_handleballthrow(void)
gBattlescriptCurrInstr = BattleScript_SuccessBallThrow;
SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem);
- if (CalculatePlayerPartyCount() == 6)
+ if (CalculatePlayerPartyCount() == PARTY_SIZE)
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
else
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
@@ -10227,17 +10207,17 @@ static void atkF0_givecaughtmon(void)
{
if (GiveMonToPlayer(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]]) != MON_GIVEN_TO_PARTY)
{
- if (!sub_813B21C())
+ if (!ShouldShowBoxWasFullMessage())
{
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
- StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_STORAGE_UNKNOWN)));
+ StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON)));
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2);
}
else
{
- StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_STORAGE_UNKNOWN)));
+ StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON))); // box the mon was sent to
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2);
- StringCopy(gStringVar3, GetBoxNamePtr(get_unknown_box_id()));
+ StringCopy(gStringVar3, GetBoxNamePtr(GetPCBoxToSendMon())); //box the mon was going to be sent to
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
}
diff --git a/src/battle_tower.c b/src/battle_tower.c
index 8ef848e39..c55180965 100644
--- a/src/battle_tower.c
+++ b/src/battle_tower.c
@@ -1019,7 +1019,7 @@ struct
u8 level;
u8 nature;
u8 evs[6];
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
} const sStevenMons[3] =
{
{
@@ -1561,7 +1561,7 @@ void PutNewBattleTowerRecord(struct EmeraldBattleTowerRecord *newRecordEm)
for (i = 0; i < 5; i++)
{
k = 0;
- for (j = 0; j < 4; j++)
+ for (j = 0; j < TRAINER_ID_LENGTH; j++)
{
if (gSaveBlock2Ptr->frontier.towerRecords[i].trainerId[j] != newRecord->trainerId[j])
break;
@@ -3308,7 +3308,7 @@ bool32 RubyBattleTowerRecordToEmerald(struct RSBattleTowerRecord *src, struct Em
for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++)
dst->name[i] = src->name[i];
- for (i = 0; i < 4; i++)
+ for (i = 0; i < TRAINER_ID_LENGTH; i++)
dst->trainerId[i] = src->trainerId[i];
for (i = 0; i < 6; i++)
dst->greeting[i] = src->greeting[i];
@@ -3357,7 +3357,7 @@ bool32 EmeraldBattleTowerRecordToRuby(struct EmeraldBattleTowerRecord *src, stru
for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++)
dst->name[i] = src->name[i];
- for (i = 0; i < 4; i++)
+ for (i = 0; i < TRAINER_ID_LENGTH; i++)
dst->trainerId[i] = src->trainerId[i];
for (i = 0; i < 6; i++)
dst->greeting[i] = src->greeting[i];
diff --git a/src/battle_transition.c b/src/battle_transition.c
index ae6c28711..c34419048 100644
--- a/src/battle_transition.c
+++ b/src/battle_transition.c
@@ -1961,9 +1961,10 @@ static bool8 Phase2_Ripple_Func2(struct Task *task)
for (i = 0; i < 160; i++, r4 += r8)
{
- // todo: fix the asm
s16 var = r4 >> 8;
- asm("");
+
+ var++;
+ var--;
gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_16 + Sin(var, r3);
}
diff --git a/src/battle_util.c b/src/battle_util.c
index 03f1482da..4d3ad3c7c 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -1,30 +1,30 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
-#include "constants/battle_script_commands.h"
-#include "constants/abilities.h"
-#include "constants/moves.h"
-#include "constants/hold_effects.h"
-#include "constants/battle_anim.h"
#include "pokemon.h"
-#include "constants/species.h"
#include "item.h"
-#include "constants/items.h"
#include "util.h"
-#include "constants/battle_move_effects.h"
#include "battle_scripts.h"
#include "random.h"
#include "text.h"
#include "string_util.h"
#include "battle_message.h"
-#include "constants/battle_string_ids.h"
-#include "constants/weather.h"
#include "battle_ai_script_commands.h"
#include "battle_controllers.h"
#include "event_data.h"
#include "link.h"
-#include "berry.h"
#include "field_weather.h"
+#include "constants/abilities.h"
+#include "constants/battle_anim.h"
+#include "constants/battle_move_effects.h"
+#include "constants/battle_script_commands.h"
+#include "constants/battle_string_ids.h"
+#include "constants/berry.h"
+#include "constants/hold_effects.h"
+#include "constants/items.h"
+#include "constants/moves.h"
+#include "constants/species.h"
+#include "constants/weather.h"
// rom const data
static const u16 sSoundMovesTable[] =
diff --git a/src/berry.c b/src/berry.c
index 49acb7d10..bbaa2b03b 100644
--- a/src/berry.c
+++ b/src/berry.c
@@ -11,6 +11,7 @@
#include "random.h"
#include "string_util.h"
#include "text.h"
+#include "constants/berry.h"
#include "constants/event_object_movement_constants.h"
#include "constants/items.h"
diff --git a/src/berry_blender.c b/src/berry_blender.c
index 3c58ca1b4..6c8d9c812 100644
--- a/src/berry_blender.c
+++ b/src/berry_blender.c
@@ -36,6 +36,7 @@
#include "new_game.h"
#include "save.h"
#include "link.h"
+#include "constants/berry.h"
#include "constants/rgb.h"
#define BLENDER_SCORE_BEST 0
diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c
index 8c9cde7d3..07daafd52 100644
--- a/src/berry_tag_screen.c
+++ b/src/berry_tag_screen.c
@@ -4,7 +4,6 @@
#include "decompress.h"
#include "event_object_movement.h"
#include "item_menu.h"
-#include "constants/items.h"
#include "item.h"
#include "item_use.h"
#include "main.h"
@@ -15,7 +14,6 @@
#include "menu_helpers.h"
#include "palette.h"
#include "overworld.h"
-#include "constants/songs.h"
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
@@ -28,7 +26,10 @@
#include "item_menu_icons.h"
#include "decompress.h"
#include "international_string_util.h"
+#include "constants/berry.h"
+#include "constants/items.h"
#include "constants/rgb.h"
+#include "constants/songs.h"
// There are 4 windows used in berry tag screen.
enum
diff --git a/src/clock.c b/src/clock.c
index 1e7c5f83e..125d403bb 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -25,7 +25,7 @@ static void InitTimeBasedEvents(void)
void DoTimeBasedEvents(void)
{
- if (FlagGet(FLAG_SYS_CLOCK_SET) && !sub_813B9C0())
+ if (FlagGet(FLAG_SYS_CLOCK_SET) && !InPokemonCenter())
{
RtcCalcLocalTime();
UpdatePerDay(&gLocalTime);
diff --git a/src/data/battle_frontier/battle_frontier_exchange_corner.h b/src/data/battle_frontier/battle_frontier_exchange_corner.h
new file mode 100644
index 000000000..bcb3cdd62
--- /dev/null
+++ b/src/data/battle_frontier/battle_frontier_exchange_corner.h
@@ -0,0 +1,99 @@
+static const u16 sFrontierExchangeCorner_Decor1[] =
+{
+ DECOR_KISS_POSTER,
+ DECOR_KISS_CUSHION,
+ DECOR_SMOOCHUM_DOLL,
+ DECOR_TOGEPI_DOLL,
+ DECOR_MEOWTH_DOLL,
+ DECOR_CLEFAIRY_DOLL,
+ DECOR_DITTO_DOLL,
+ DECOR_CYNDAQUIL_DOLL,
+ DECOR_CHIKORITA_DOLL,
+ DECOR_TOTODILE_DOLL,
+ 0xFFFF
+};
+
+static const u16 sFrontierExchangeCorner_Decor2[] =
+{
+ DECOR_LAPRAS_DOLL,
+ DECOR_SNORLAX_DOLL,
+ DECOR_VENUSAUR_DOLL,
+ DECOR_CHARIZARD_DOLL,
+ DECOR_BLASTOISE_DOLL,
+ 0xFFFF
+};
+
+static const u16 sFrontierExchangeCorner_Vitamins[] =
+{
+ ITEM_PROTEIN,
+ ITEM_CALCIUM,
+ ITEM_IRON,
+ ITEM_ZINC,
+ ITEM_CARBOS,
+ ITEM_HP_UP,
+ 0xFFFF
+};
+
+static const u16 sFrontierExchangeCorner_HoldItems[] =
+{
+ ITEM_LEFTOVERS,
+ ITEM_WHITE_HERB,
+ ITEM_QUICK_CLAW,
+ ITEM_MENTAL_HERB,
+ ITEM_BRIGHT_POWDER,
+ ITEM_CHOICE_BAND,
+ ITEM_KINGS_ROCK,
+ ITEM_FOCUS_BAND,
+ ITEM_SCOPE_LENS,
+ 0xFFFF
+};
+
+static const u8 *const sFrontierExchangeCorner_Decor1Descriptions[] =
+{
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2601AA,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2601D0,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260201,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26022F,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26025B,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260287,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2602B5,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2602E0,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26030F,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26033E,
+ gText_Exit,
+};
+
+static const u8 *const sFrontierExchangeCorner_Decor2Descriptions[] =
+{
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ gText_Exit
+};
+
+static const u8 *const sFrontierExchangeCorner_VitaminsDescriptions[] =
+{
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260397,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2603BE,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2603E6,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26040E,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260436,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26045C,
+ gText_Exit
+};
+
+static const u8 *const sFrontierExchangeCorner_HoldItemsDescriptions[] =
+{
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26047A,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2604AC,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2604D8,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26050F,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260542,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260575,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2605A8,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2605E2,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260613,
+ gText_Exit
+};
diff --git a/src/data/decoration/icon.h b/src/data/decoration/icon.h
index 58d9cea7b..b29dab20f 100644
--- a/src/data/decoration/icon.h
+++ b/src/data/decoration/icon.h
@@ -1,123 +1,124 @@
-const u32 *const gUnknown_085A6BE8[][2] = {
- {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark},
- {NULL, NULL},
- {NULL, NULL},
- {gUnknown_08DB7AA0, gUnknown_08DB7B34},
- {gUnknown_08DB7B5C, gUnknown_08DB7BEC},
- {gUnknown_08DB7C08, gUnknown_08DB7CE8},
- {gUnknown_08DB7D08, gUnknown_08DB7DCC},
- {gUnknown_08DB7DF4, gUnknown_08DB7EA0},
- {gUnknown_08DB7EC4, gUnknown_08DB7F60},
- {gUnknown_08DB7F7C, gUnknown_08DB8070},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {gUnknown_08DB808C, gUnknown_08DB8138},
- {gUnknown_08DB8160, gUnknown_08DB8218},
- {gUnknown_08DB823C, gUnknown_08DB8300},
- {gUnknown_08DB8328, gUnknown_08DB8430},
- {gUnknown_08DB8458, gUnknown_08DB8528},
- {gUnknown_08DB854C, gUnknown_08DB862C},
- {gUnknown_08DB8654, gUnknown_08DB86C4},
- {gUnknown_08DB86E0, gUnknown_08DB8750},
- {gUnknown_08DB876C, gUnknown_08DB87DC},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {gUnknown_08DB87F8, gUnknown_08DB88D8},
- {gUnknown_08DB8900, gUnknown_08DB89E0},
- {gUnknown_08DB8A08, gUnknown_08DB8A68},
- {gUnknown_08DB8A84, gUnknown_08DB8B40},
- {NULL, NULL},
- {NULL, NULL},
- {gUnknown_08DB8B68, gUnknown_08DB8C40},
- {gUnknown_08DB8C5C, gUnknown_08DB8CF4},
- {NULL, NULL},
- {gUnknown_08DB8D18, gUnknown_08DB8DB0},
- {gUnknown_08DB8DD4, gUnknown_08DB8E80},
- {NULL, NULL},
- {NULL, NULL},
- {gUnknown_08DB8EA0, gUnknown_08DB8F58},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {gUnknown_08DB8F7C, gUnknown_08DB9038},
- {gUnknown_08DB9058, gUnknown_08DB9130},
- {gUnknown_08DB9154, gUnknown_08DB9218},
- {gUnknown_08DB9234, gUnknown_08DB92FC},
- {gUnknown_08DB931C, gUnknown_08DB93E8},
- {gUnknown_08DB940C, gUnknown_08DB94CC},
- {gUnknown_08DB94E8, gUnknown_08DB95AC},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {gUnknown_08DB95D0, gUnknown_08DB96C4},
- {gUnknown_08DB96EC, gUnknown_08DB97F4},
- {gUnknown_08DB981C, gUnknown_08DB9908},
- {gUnknown_08DB9930, gUnknown_08DB9A54},
- {gUnknown_08DB9A7C, gUnknown_08DB9B7C},
- {gUnknown_08DB9BA4, gUnknown_08DB9CB0},
- {gUnknown_08DB9CD8, gUnknown_08DB9DAC},
- {gUnknown_08DB9F08, gUnknown_08DB9FFC},
- {gUnknown_08DB9DD4, gUnknown_08DB9EE4},
- {gUnknown_08DBA020, gUnknown_08DBA12C}
+const u32 *const gDecorIconTable[][2] =
+{
+ [DECOR_NONE] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark},
+ [DECOR_SMALL_DESK] = {NULL, NULL},
+ [DECOR_POKEMON_DESK] = {NULL, NULL},
+ [DECOR_HEAVY_DESK] = {gDecorIcon_HeavyDesk, gDecorIconPalette_HeavyDesk},
+ [DECOR_RAGGED_DESK] = {gDecorIcon_RaggedDesk, gDecorIconPalette_RaggedDesk},
+ [DECOR_COMFORT_DESK] = {gDecorIcon_ComfortDesk, gDecorIconPalette_ComfortDesk},
+ [DECOR_PRETTY_DESK] = {gDecorIcon_PrettyDesk, gDecorIconPalette_PrettyDesk},
+ [DECOR_BRICK_DESK] = {gDecorIcon_BrickDesk, gDecorIconPalette_BrickDesk},
+ [DECOR_CAMP_DESK] = {gDecorIcon_CampDesk, gDecorIconPalette_CampDesk},
+ [DECOR_HARD_DESK] = {gDecorIcon_HardDesk, gDecorIconPalette_HardDesk},
+ [DECOR_SMALL_CHAIR] = {NULL, NULL},
+ [DECOR_POKEMON_CHAIR] = {NULL, NULL},
+ [DECOR_HEAVY_CHAIR] = {NULL, NULL},
+ [DECOR_PRETTY_CHAIR] = {NULL, NULL},
+ [DECOR_COMFORT_CHAIR] = {NULL, NULL},
+ [DECOR_RAGGED_CHAIR] = {NULL, NULL},
+ [DECOR_BRICK_CHAIR] = {NULL, NULL},
+ [DECOR_CAMP_CHAIR] = {NULL, NULL},
+ [DECOR_HARD_CHAIR] = {NULL, NULL},
+ [DECOR_RED_PLANT] = {gDecorIcon_RedPlant, gDecorIconPalette_RedPlant},
+ [DECOR_TROPICAL_PLANT] = {gDecorIcon_TropicalPlant, gDecorIconPalette_TropicalPlant},
+ [DECOR_PRETTY_FLOWERS] = {gDecorIcon_PrettyFlowers, gDecorIconPalette_PrettyFlowers},
+ [DECOR_COLORFUL_PLANT] = {gDecorIcon_ColorfulPlant, gDecorIconPalette_ColorfulPlant},
+ [DECOR_BIG_PLANT] = {gDecorIcon_BigPlant, gDecorIconPalette_BigPlant},
+ [DECOR_GORGEOUS_PLANT] = {gDecorIcon_GorgeousPlant, gDecorIconPalette_GorgeousPlant},
+ [DECOR_RED_BRICK] = {gDecorIcon_RedBrick, gDecorIconPalette_RedBrick},
+ [DECOR_YELLOW_BRICK] = {gDecorIcon_YellowBrick, gDecorIconPalette_YellowBrick},
+ [DECOR_BLUE_BRICK] = {gDecorIcon_BlueBrick, gDecorIconPalette_BlueBrick},
+ [DECOR_RED_BALLOON] = {NULL, NULL},
+ [DECOR_BLUE_BALLOON] = {NULL, NULL},
+ [DECOR_YELLOW_BALLOON] = {NULL, NULL},
+ [DECOR_RED_TENT] = {gDecorIcon_RedTent, gDecorIconPalette_RedTent},
+ [DECOR_BLUE_TENT] = {gDecorIcon_BlueTent, gDecorIconPalette_BlueTent},
+ [DECOR_SOLID_BOARD] = {gDecorIcon_SolidBoard, gDecorIconPalette_SolidBoard},
+ [DECOR_SLIDE] = {gDecorIcon_Slide, gDecorIconPalette_Slide},
+ [DECOR_FENCE_LENGTH] = {NULL, NULL},
+ [DECOR_FENCE_WIDTH] = {NULL, NULL},
+ [DECOR_TIRE] = {gDecorIcon_Tire, gDecorIconPalette_Tire},
+ [DECOR_STAND] = {gDecorIcon_Stand, gDecorIconPalette_Stand},
+ [DECOR_MUD_BALL] = {NULL, NULL},
+ [DECOR_BREAKABLE_DOOR] = {gDecorIcon_BreakableDoor, gDecorIconPalette_BreakableDoor},
+ [DECOR_SAND_ORNAMENT] = {gDecorIcon_SandOrnament, gDecorIconPalette_SandOrnament},
+ [DECOR_SILVER_SHIELD] = {NULL, NULL},
+ [DECOR_GOLD_SHIELD] = {NULL, NULL},
+ [DECOR_GLASS_ORNAMENT] = {gDecorIcon_GlassOrnament, gDecorIconPalette_GlassOrnament},
+ [DECOR_TV] = {NULL, NULL},
+ [DECOR_ROUND_TV] = {NULL, NULL},
+ [DECOR_CUTE_TV] = {NULL, NULL},
+ [DECOR_GLITTER_MAT] = {NULL, NULL},
+ [DECOR_JUMP_MAT] = {NULL, NULL},
+ [DECOR_SPIN_MAT] = {NULL, NULL},
+ [DECOR_C_LOW_NOTE_MAT] = {NULL, NULL},
+ [DECOR_D_NOTE_MAT] = {NULL, NULL},
+ [DECOR_E_NOTE_MAT] = {NULL, NULL},
+ [DECOR_F_NOTE_MAT] = {NULL, NULL},
+ [DECOR_G_NOTE_MAT] = {NULL, NULL},
+ [DECOR_A_NOTE_MAT] = {NULL, NULL},
+ [DECOR_B_NOTE_MAT] = {NULL, NULL},
+ [DECOR_C_HIGH_NOTE_MAT] = {NULL, NULL},
+ [DECOR_SURF_MAT] = {gDecorIcon_SurfMat, gDecorIconPalette_SurfMat},
+ [DECOR_THUNDER_MAT] = {gDecorIcon_ThunderMat, gDecorIconPalette_ThunderMat},
+ [DECOR_FIRE_BLAST_MAT] = {gDecorIcon_FireBlastMat, gDecorIconPalette_FireBlastMat},
+ [DECOR_POWDER_SNOW_MAT] = {gDecorIcon_PowderSnowMat, gDecorIconPalette_PowderSnowMat},
+ [DECOR_ATTRACT_MAT] = {gDecorIcon_AttractMat, gDecorIconPalette_AttractMat},
+ [DECOR_FISSURE_MAT] = {gDecorIcon_FissureMat, gDecorIconPalette_FissureMat},
+ [DECOR_SPIKES_MAT] = {gDecorIcon_SpikesMat, gDecorIconPalette_SpikesMat},
+ [DECOR_BALL_POSTER] = {NULL, NULL},
+ [DECOR_GREEN_POSTER] = {NULL, NULL},
+ [DECOR_RED_POSTER] = {NULL, NULL},
+ [DECOR_BLUE_POSTER] = {NULL, NULL},
+ [DECOR_CUTE_POSTER] = {NULL, NULL},
+ [DECOR_PIKA_POSTER] = {NULL, NULL},
+ [DECOR_LONG_POSTER] = {NULL, NULL},
+ [DECOR_SEA_POSTER] = {NULL, NULL},
+ [DECOR_SKY_POSTER] = {NULL, NULL},
+ [DECOR_KISS_POSTER] = {NULL, NULL},
+ [DECOR_PICHU_DOLL] = {NULL, NULL},
+ [DECOR_PIKACHU_DOLL] = {NULL, NULL},
+ [DECOR_MARILL_DOLL] = {NULL, NULL},
+ [DECOR_TOGEPI_DOLL] = {NULL, NULL},
+ [DECOR_CYNDAQUIL_DOLL] = {NULL, NULL},
+ [DECOR_CHIKORITA_DOLL] = {NULL, NULL},
+ [DECOR_TOTODILE_DOLL] = {NULL, NULL},
+ [DECOR_JIGGLYPUFF_DOLL] = {NULL, NULL},
+ [DECOR_MEOWTH_DOLL] = {NULL, NULL},
+ [DECOR_CLEFAIRY_DOLL] = {NULL, NULL},
+ [DECOR_DITTO_DOLL] = {NULL, NULL},
+ [DECOR_SMOOCHUM_DOLL] = {NULL, NULL},
+ [DECOR_TREECKO_DOLL] = {NULL, NULL},
+ [DECOR_TORCHIC_DOLL] = {NULL, NULL},
+ [DECOR_MUDKIP_DOLL] = {NULL, NULL},
+ [DECOR_DUSKULL_DOLL] = {NULL, NULL},
+ [DECOR_WYNAUT_DOLL] = {NULL, NULL},
+ [DECOR_BALTOY_DOLL] = {NULL, NULL},
+ [DECOR_KECLEON_DOLL] = {NULL, NULL},
+ [DECOR_AZURILL_DOLL] = {NULL, NULL},
+ [DECOR_SKITTY_DOLL] = {NULL, NULL},
+ [DECOR_SWABLU_DOLL] = {NULL, NULL},
+ [DECOR_GULPIN_DOLL] = {NULL, NULL},
+ [DECOR_LOTAD_DOLL] = {NULL, NULL},
+ [DECOR_SEEDOT_DOLL] = {NULL, NULL},
+ [DECOR_PIKA_CUSHION] = {NULL, NULL},
+ [DECOR_ROUND_CUSHION] = {NULL, NULL},
+ [DECOR_KISS_CUSHION] = {NULL, NULL},
+ [DECOR_ZIGZAG_CUSHION] = {NULL, NULL},
+ [DECOR_SPIN_CUSHION] = {NULL, NULL},
+ [DECOR_DIAMOND_CUSHION] = {NULL, NULL},
+ [DECOR_BALL_CUSHION] = {NULL, NULL},
+ [DECOR_GRASS_CUSHION] = {NULL, NULL},
+ [DECOR_FIRE_CUSHION] = {NULL, NULL},
+ [DECOR_WATER_CUSHION] = {NULL, NULL},
+ [DECOR_SNORLAX_DOLL] = {gDecorIcon_SnorlaxDoll, gDecorIconPalette_SnorlaxDoll},
+ [DECOR_RHYDON_DOLL] = {gDecorIcon_RhydonDoll, gDecorIconPalette_RhydonDoll},
+ [DECOR_LAPRAS_DOLL] = {gDecorIcon_LaprasDoll, gDecorIconPalette_LaprasDoll},
+ [DECOR_VENUSAUR_DOLL] = {gDecorIcon_VenusaurDoll, gDecorIconPalette_VenusaurDoll},
+ [DECOR_CHARIZARD_DOLL] = {gDecorIcon_CharizardDoll, gDecorIconPalette_CharizardDoll},
+ [DECOR_BLASTOISE_DOLL] = {gDecorIcon_BlastoiseDoll, gDecorIconPalette_BlastoiseDoll},
+ [DECOR_WAILMER_DOLL] = {gDecorIcon_WailmerDoll, gDecorIconPalette_WailmerDoll},
+ [DECOR_REGIROCK_DOLL] = {gDecorIcon_RegirockDoll, gDecorIconPalette_RegirockDoll},
+ [DECOR_REGICE_DOLL] = {gDecorIcon_RegiceDoll, gDecorIconPalette_RegiceDoll},
+ [DECOR_REGISTEEL_DOLL] = {gDecorIcon_RegisteelDoll, gDecorIconPalette_RegisteelDoll}
};
diff --git a/src/data/graphics/decorations.h b/src/data/graphics/decorations.h
index 62d86d48e..d8b865fcf 100644
--- a/src/data/graphics/decorations.h
+++ b/src/data/graphics/decorations.h
@@ -1,125 +1,125 @@
-const u32 gUnknown_08DB7AA0[] = INCBIN_U32("graphics/decorations/decor_heavy_desk.4bpp.lz");
-const u32 gUnknown_08DB7B34[] = INCBIN_U32("graphics/decorations/decor_heavy_desk.gbapal.lz");
+const u32 gDecorIcon_HeavyDesk[] = INCBIN_U32("graphics/decorations/decor_heavy_desk.4bpp.lz");
+const u32 gDecorIconPalette_HeavyDesk[] = INCBIN_U32("graphics/decorations/decor_heavy_desk.gbapal.lz");
-const u32 gUnknown_08DB7B5C[] = INCBIN_U32("graphics/decorations/decor_ragged_desk.4bpp.lz");
-const u32 gUnknown_08DB7BEC[] = INCBIN_U32("graphics/decorations/decor_ragged_desk.gbapal.lz");
+const u32 gDecorIcon_RaggedDesk[] = INCBIN_U32("graphics/decorations/decor_ragged_desk.4bpp.lz");
+const u32 gDecorIconPalette_RaggedDesk[] = INCBIN_U32("graphics/decorations/decor_ragged_desk.gbapal.lz");
-const u32 gUnknown_08DB7C08[] = INCBIN_U32("graphics/decorations/decor_comfort_desk.4bpp.lz");
-const u32 gUnknown_08DB7CE8[] = INCBIN_U32("graphics/decorations/decor_comfort_desk.gbapal.lz");
+const u32 gDecorIcon_ComfortDesk[] = INCBIN_U32("graphics/decorations/decor_comfort_desk.4bpp.lz");
+const u32 gDecorIconPalette_ComfortDesk[] = INCBIN_U32("graphics/decorations/decor_comfort_desk.gbapal.lz");
-const u32 gUnknown_08DB7D08[] = INCBIN_U32("graphics/decorations/decor_pretty_desk.4bpp.lz");
-const u32 gUnknown_08DB7DCC[] = INCBIN_U32("graphics/decorations/decor_pretty_desk.gbapal.lz");
+const u32 gDecorIcon_PrettyDesk[] = INCBIN_U32("graphics/decorations/decor_pretty_desk.4bpp.lz");
+const u32 gDecorIconPalette_PrettyDesk[] = INCBIN_U32("graphics/decorations/decor_pretty_desk.gbapal.lz");
-const u32 gUnknown_08DB7DF4[] = INCBIN_U32("graphics/decorations/decor_brick_desk.4bpp.lz");
-const u32 gUnknown_08DB7EA0[] = INCBIN_U32("graphics/decorations/decor_brick_desk.gbapal.lz");
+const u32 gDecorIcon_BrickDesk[] = INCBIN_U32("graphics/decorations/decor_brick_desk.4bpp.lz");
+const u32 gDecorIconPalette_BrickDesk[] = INCBIN_U32("graphics/decorations/decor_brick_desk.gbapal.lz");
-const u32 gUnknown_08DB7EC4[] = INCBIN_U32("graphics/decorations/decor_camp_desk.4bpp.lz");
-const u32 gUnknown_08DB7F60[] = INCBIN_U32("graphics/decorations/decor_camp_desk.gbapal.lz");
+const u32 gDecorIcon_CampDesk[] = INCBIN_U32("graphics/decorations/decor_camp_desk.4bpp.lz");
+const u32 gDecorIconPalette_CampDesk[] = INCBIN_U32("graphics/decorations/decor_camp_desk.gbapal.lz");
-const u32 gUnknown_08DB7F7C[] = INCBIN_U32("graphics/decorations/decor_hard_desk.4bpp.lz");
-const u32 gUnknown_08DB8070[] = INCBIN_U32("graphics/decorations/decor_hard_desk.gbapal.lz");
+const u32 gDecorIcon_HardDesk[] = INCBIN_U32("graphics/decorations/decor_hard_desk.4bpp.lz");
+const u32 gDecorIconPalette_HardDesk[] = INCBIN_U32("graphics/decorations/decor_hard_desk.gbapal.lz");
-const u32 gUnknown_08DB808C[] = INCBIN_U32("graphics/decorations/decor_red_plant.4bpp.lz");
-const u32 gUnknown_08DB8138[] = INCBIN_U32("graphics/decorations/decor_red_plant.gbapal.lz");
+const u32 gDecorIcon_RedPlant[] = INCBIN_U32("graphics/decorations/decor_red_plant.4bpp.lz");
+const u32 gDecorIconPalette_RedPlant[] = INCBIN_U32("graphics/decorations/decor_red_plant.gbapal.lz");
-const u32 gUnknown_08DB8160[] = INCBIN_U32("graphics/decorations/decor_tropical_plant.4bpp.lz");
-const u32 gUnknown_08DB8218[] = INCBIN_U32("graphics/decorations/decor_tropical_plant.gbapal.lz");
+const u32 gDecorIcon_TropicalPlant[] = INCBIN_U32("graphics/decorations/decor_tropical_plant.4bpp.lz");
+const u32 gDecorIconPalette_TropicalPlant[] = INCBIN_U32("graphics/decorations/decor_tropical_plant.gbapal.lz");
-const u32 gUnknown_08DB823C[] = INCBIN_U32("graphics/decorations/decor_pretty_flowers.4bpp.lz");
-const u32 gUnknown_08DB8300[] = INCBIN_U32("graphics/decorations/decor_pretty_flowers.gbapal.lz");
+const u32 gDecorIcon_PrettyFlowers[] = INCBIN_U32("graphics/decorations/decor_pretty_flowers.4bpp.lz");
+const u32 gDecorIconPalette_PrettyFlowers[] = INCBIN_U32("graphics/decorations/decor_pretty_flowers.gbapal.lz");
-const u32 gUnknown_08DB8328[] = INCBIN_U32("graphics/decorations/decor_colorful_plant.4bpp.lz");
-const u32 gUnknown_08DB8430[] = INCBIN_U32("graphics/decorations/decor_colorful_plant.gbapal.lz");
+const u32 gDecorIcon_ColorfulPlant[] = INCBIN_U32("graphics/decorations/decor_colorful_plant.4bpp.lz");
+const u32 gDecorIconPalette_ColorfulPlant[] = INCBIN_U32("graphics/decorations/decor_colorful_plant.gbapal.lz");
-const u32 gUnknown_08DB8458[] = INCBIN_U32("graphics/decorations/decor_big_plant.4bpp.lz");
-const u32 gUnknown_08DB8528[] = INCBIN_U32("graphics/decorations/decor_big_plant.gbapal.lz");
+const u32 gDecorIcon_BigPlant[] = INCBIN_U32("graphics/decorations/decor_big_plant.4bpp.lz");
+const u32 gDecorIconPalette_BigPlant[] = INCBIN_U32("graphics/decorations/decor_big_plant.gbapal.lz");
-const u32 gUnknown_08DB854C[] = INCBIN_U32("graphics/decorations/decor_gorgeous_plant.4bpp.lz");
-const u32 gUnknown_08DB862C[] = INCBIN_U32("graphics/decorations/decor_gorgeous_plant.gbapal.lz");
+const u32 gDecorIcon_GorgeousPlant[] = INCBIN_U32("graphics/decorations/decor_gorgeous_plant.4bpp.lz");
+const u32 gDecorIconPalette_GorgeousPlant[] = INCBIN_U32("graphics/decorations/decor_gorgeous_plant.gbapal.lz");
-const u32 gUnknown_08DB8654[] = INCBIN_U32("graphics/decorations/decor_red_brick.4bpp.lz");
-const u32 gUnknown_08DB86C4[] = INCBIN_U32("graphics/decorations/decor_red_brick.gbapal.lz");
+const u32 gDecorIcon_RedBrick[] = INCBIN_U32("graphics/decorations/decor_red_brick.4bpp.lz");
+const u32 gDecorIconPalette_RedBrick[] = INCBIN_U32("graphics/decorations/decor_red_brick.gbapal.lz");
-const u32 gUnknown_08DB86E0[] = INCBIN_U32("graphics/decorations/decor_yellow_brick.4bpp.lz");
-const u32 gUnknown_08DB8750[] = INCBIN_U32("graphics/decorations/decor_yellow_brick.gbapal.lz");
+const u32 gDecorIcon_YellowBrick[] = INCBIN_U32("graphics/decorations/decor_yellow_brick.4bpp.lz");
+const u32 gDecorIconPalette_YellowBrick[] = INCBIN_U32("graphics/decorations/decor_yellow_brick.gbapal.lz");
-const u32 gUnknown_08DB876C[] = INCBIN_U32("graphics/decorations/decor_blue_brick.4bpp.lz");
-const u32 gUnknown_08DB87DC[] = INCBIN_U32("graphics/decorations/decor_blue_brick.gbapal.lz");
+const u32 gDecorIcon_BlueBrick[] = INCBIN_U32("graphics/decorations/decor_blue_brick.4bpp.lz");
+const u32 gDecorIconPalette_BlueBrick[] = INCBIN_U32("graphics/decorations/decor_blue_brick.gbapal.lz");
-const u32 gUnknown_08DB87F8[] = INCBIN_U32("graphics/decorations/decor_red_tent.4bpp.lz");
-const u32 gUnknown_08DB88D8[] = INCBIN_U32("graphics/decorations/decor_red_tent.gbapal.lz");
+const u32 gDecorIcon_RedTent[] = INCBIN_U32("graphics/decorations/decor_red_tent.4bpp.lz");
+const u32 gDecorIconPalette_RedTent[] = INCBIN_U32("graphics/decorations/decor_red_tent.gbapal.lz");
-const u32 gUnknown_08DB8900[] = INCBIN_U32("graphics/decorations/decor_blue_tent.4bpp.lz");
-const u32 gUnknown_08DB89E0[] = INCBIN_U32("graphics/decorations/decor_blue_tent.gbapal.lz");
+const u32 gDecorIcon_BlueTent[] = INCBIN_U32("graphics/decorations/decor_blue_tent.4bpp.lz");
+const u32 gDecorIconPalette_BlueTent[] = INCBIN_U32("graphics/decorations/decor_blue_tent.gbapal.lz");
-const u32 gUnknown_08DB8A08[] = INCBIN_U32("graphics/decorations/decor_solid_board.4bpp.lz");
-const u32 gUnknown_08DB8A68[] = INCBIN_U32("graphics/decorations/decor_solid_board.gbapal.lz");
+const u32 gDecorIcon_SolidBoard[] = INCBIN_U32("graphics/decorations/decor_solid_board.4bpp.lz");
+const u32 gDecorIconPalette_SolidBoard[] = INCBIN_U32("graphics/decorations/decor_solid_board.gbapal.lz");
-const u32 gUnknown_08DB8A84[] = INCBIN_U32("graphics/decorations/decor_slide.4bpp.lz");
-const u32 gUnknown_08DB8B40[] = INCBIN_U32("graphics/decorations/decor_slide.gbapal.lz");
+const u32 gDecorIcon_Slide[] = INCBIN_U32("graphics/decorations/decor_slide.4bpp.lz");
+const u32 gDecorIconPalette_Slide[] = INCBIN_U32("graphics/decorations/decor_slide.gbapal.lz");
-const u32 gUnknown_08DB8B68[] = INCBIN_U32("graphics/decorations/decor_tire.4bpp.lz");
-const u32 gUnknown_08DB8C40[] = INCBIN_U32("graphics/decorations/decor_tire.gbapal.lz");
+const u32 gDecorIcon_Tire[] = INCBIN_U32("graphics/decorations/decor_tire.4bpp.lz");
+const u32 gDecorIconPalette_Tire[] = INCBIN_U32("graphics/decorations/decor_tire.gbapal.lz");
-const u32 gUnknown_08DB8C5C[] = INCBIN_U32("graphics/decorations/decor_stand.4bpp.lz");
-const u32 gUnknown_08DB8CF4[] = INCBIN_U32("graphics/decorations/decor_stand.gbapal.lz");
+const u32 gDecorIcon_Stand[] = INCBIN_U32("graphics/decorations/decor_stand.4bpp.lz");
+const u32 gDecorIconPalette_Stand[] = INCBIN_U32("graphics/decorations/decor_stand.gbapal.lz");
-const u32 gUnknown_08DB8D18[] = INCBIN_U32("graphics/decorations/decor_breakable_door.4bpp.lz");
-const u32 gUnknown_08DB8DB0[] = INCBIN_U32("graphics/decorations/decor_breakable_door.gbapal.lz");
+const u32 gDecorIcon_BreakableDoor[] = INCBIN_U32("graphics/decorations/decor_breakable_door.4bpp.lz");
+const u32 gDecorIconPalette_BreakableDoor[] = INCBIN_U32("graphics/decorations/decor_breakable_door.gbapal.lz");
-const u32 gUnknown_08DB8DD4[] = INCBIN_U32("graphics/decorations/decor_sand_ornament.4bpp.lz");
-const u32 gUnknown_08DB8E80[] = INCBIN_U32("graphics/decorations/decor_sand_ornament.gbapal.lz");
+const u32 gDecorIcon_SandOrnament[] = INCBIN_U32("graphics/decorations/decor_sand_ornament.4bpp.lz");
+const u32 gDecorIconPalette_SandOrnament[] = INCBIN_U32("graphics/decorations/decor_sand_ornament.gbapal.lz");
-const u32 gUnknown_08DB8EA0[] = INCBIN_U32("graphics/decorations/decor_glass_ornament.4bpp.lz");
-const u32 gUnknown_08DB8F58[] = INCBIN_U32("graphics/decorations/decor_glass_ornament.gbapal.lz");
+const u32 gDecorIcon_GlassOrnament[] = INCBIN_U32("graphics/decorations/decor_glass_ornament.4bpp.lz");
+const u32 gDecorIconPalette_GlassOrnament[] = INCBIN_U32("graphics/decorations/decor_glass_ornament.gbapal.lz");
-const u32 gUnknown_08DB8F7C[] = INCBIN_U32("graphics/decorations/decor_surf_mat.4bpp.lz");
-const u32 gUnknown_08DB9038[] = INCBIN_U32("graphics/decorations/decor_surf_mat.gbapal.lz");
+const u32 gDecorIcon_SurfMat[] = INCBIN_U32("graphics/decorations/decor_surf_mat.4bpp.lz");
+const u32 gDecorIconPalette_SurfMat[] = INCBIN_U32("graphics/decorations/decor_surf_mat.gbapal.lz");
-const u32 gUnknown_08DB9058[] = INCBIN_U32("graphics/decorations/decor_thunder_mat.4bpp.lz");
-const u32 gUnknown_08DB9130[] = INCBIN_U32("graphics/decorations/decor_thunder_mat.gbapal.lz");
+const u32 gDecorIcon_ThunderMat[] = INCBIN_U32("graphics/decorations/decor_thunder_mat.4bpp.lz");
+const u32 gDecorIconPalette_ThunderMat[] = INCBIN_U32("graphics/decorations/decor_thunder_mat.gbapal.lz");
-const u32 gUnknown_08DB9154[] = INCBIN_U32("graphics/decorations/decor_fire_blast_mat.4bpp.lz");
-const u32 gUnknown_08DB9218[] = INCBIN_U32("graphics/decorations/decor_fire_blast_mat.gbapal.lz");
+const u32 gDecorIcon_FireBlastMat[] = INCBIN_U32("graphics/decorations/decor_fire_blast_mat.4bpp.lz");
+const u32 gDecorIconPalette_FireBlastMat[] = INCBIN_U32("graphics/decorations/decor_fire_blast_mat.gbapal.lz");
-const u32 gUnknown_08DB9234[] = INCBIN_U32("graphics/decorations/decor_powder_snow_mat.4bpp.lz");
-const u32 gUnknown_08DB92FC[] = INCBIN_U32("graphics/decorations/decor_powder_snow_mat.gbapal.lz");
+const u32 gDecorIcon_PowderSnowMat[] = INCBIN_U32("graphics/decorations/decor_powder_snow_mat.4bpp.lz");
+const u32 gDecorIconPalette_PowderSnowMat[] = INCBIN_U32("graphics/decorations/decor_powder_snow_mat.gbapal.lz");
-const u32 gUnknown_08DB931C[] = INCBIN_U32("graphics/decorations/decor_attract_mat.4bpp.lz");
-const u32 gUnknown_08DB93E8[] = INCBIN_U32("graphics/decorations/decor_attract_mat.gbapal.lz");
+const u32 gDecorIcon_AttractMat[] = INCBIN_U32("graphics/decorations/decor_attract_mat.4bpp.lz");
+const u32 gDecorIconPalette_AttractMat[] = INCBIN_U32("graphics/decorations/decor_attract_mat.gbapal.lz");
-const u32 gUnknown_08DB940C[] = INCBIN_U32("graphics/decorations/decor_fissure_mat.4bpp.lz");
-const u32 gUnknown_08DB94CC[] = INCBIN_U32("graphics/decorations/decor_fissure_mat.gbapal.lz");
+const u32 gDecorIcon_FissureMat[] = INCBIN_U32("graphics/decorations/decor_fissure_mat.4bpp.lz");
+const u32 gDecorIconPalette_FissureMat[] = INCBIN_U32("graphics/decorations/decor_fissure_mat.gbapal.lz");
-const u32 gUnknown_08DB94E8[] = INCBIN_U32("graphics/decorations/decor_spikes_mat.4bpp.lz");
-const u32 gUnknown_08DB95AC[] = INCBIN_U32("graphics/decorations/decor_spikes_mat.gbapal.lz");
+const u32 gDecorIcon_SpikesMat[] = INCBIN_U32("graphics/decorations/decor_spikes_mat.4bpp.lz");
+const u32 gDecorIconPalette_SpikesMat[] = INCBIN_U32("graphics/decorations/decor_spikes_mat.gbapal.lz");
-const u32 gUnknown_08DB95D0[] = INCBIN_U32("graphics/decorations/decor_snorlax_doll.4bpp.lz");
-const u32 gUnknown_08DB96C4[] = INCBIN_U32("graphics/decorations/decor_snorlax_doll.gbapal.lz");
+const u32 gDecorIcon_SnorlaxDoll[] = INCBIN_U32("graphics/decorations/decor_snorlax_doll.4bpp.lz");
+const u32 gDecorIconPalette_SnorlaxDoll[] = INCBIN_U32("graphics/decorations/decor_snorlax_doll.gbapal.lz");
-const u32 gUnknown_08DB96EC[] = INCBIN_U32("graphics/decorations/decor_rhydon_doll.4bpp.lz");
-const u32 gUnknown_08DB97F4[] = INCBIN_U32("graphics/decorations/decor_rhydon_doll.gbapal.lz");
+const u32 gDecorIcon_RhydonDoll[] = INCBIN_U32("graphics/decorations/decor_rhydon_doll.4bpp.lz");
+const u32 gDecorIconPalette_RhydonDoll[] = INCBIN_U32("graphics/decorations/decor_rhydon_doll.gbapal.lz");
-const u32 gUnknown_08DB981C[] = INCBIN_U32("graphics/decorations/decor_lapras_doll.4bpp.lz");
-const u32 gUnknown_08DB9908[] = INCBIN_U32("graphics/decorations/decor_lapras_doll.gbapal.lz");
+const u32 gDecorIcon_LaprasDoll[] = INCBIN_U32("graphics/decorations/decor_lapras_doll.4bpp.lz");
+const u32 gDecorIconPalette_LaprasDoll[] = INCBIN_U32("graphics/decorations/decor_lapras_doll.gbapal.lz");
-const u32 gUnknown_08DB9930[] = INCBIN_U32("graphics/decorations/decor_venusaur_doll.4bpp.lz");
-const u32 gUnknown_08DB9A54[] = INCBIN_U32("graphics/decorations/decor_venusaur_doll.gbapal.lz");
+const u32 gDecorIcon_VenusaurDoll[] = INCBIN_U32("graphics/decorations/decor_venusaur_doll.4bpp.lz");
+const u32 gDecorIconPalette_VenusaurDoll[] = INCBIN_U32("graphics/decorations/decor_venusaur_doll.gbapal.lz");
-const u32 gUnknown_08DB9A7C[] = INCBIN_U32("graphics/decorations/decor_charizard_doll.4bpp.lz");
-const u32 gUnknown_08DB9B7C[] = INCBIN_U32("graphics/decorations/decor_charizard_doll.gbapal.lz");
+const u32 gDecorIcon_CharizardDoll[] = INCBIN_U32("graphics/decorations/decor_charizard_doll.4bpp.lz");
+const u32 gDecorIconPalette_CharizardDoll[] = INCBIN_U32("graphics/decorations/decor_charizard_doll.gbapal.lz");
-const u32 gUnknown_08DB9BA4[] = INCBIN_U32("graphics/decorations/decor_blastoise_doll.4bpp.lz");
-const u32 gUnknown_08DB9CB0[] = INCBIN_U32("graphics/decorations/decor_blastoise_doll.gbapal.lz");
+const u32 gDecorIcon_BlastoiseDoll[] = INCBIN_U32("graphics/decorations/decor_blastoise_doll.4bpp.lz");
+const u32 gDecorIconPalette_BlastoiseDoll[] = INCBIN_U32("graphics/decorations/decor_blastoise_doll.gbapal.lz");
-const u32 gUnknown_08DB9CD8[] = INCBIN_U32("graphics/decorations/decor_wailmer_doll.4bpp.lz");
-const u32 gUnknown_08DB9DAC[] = INCBIN_U32("graphics/decorations/decor_wailmer_doll.gbapal.lz");
+const u32 gDecorIcon_WailmerDoll[] = INCBIN_U32("graphics/decorations/decor_wailmer_doll.4bpp.lz");
+const u32 gDecorIconPalette_WailmerDoll[] = INCBIN_U32("graphics/decorations/decor_wailmer_doll.gbapal.lz");
-const u32 gUnknown_08DB9DD4[] = INCBIN_U32("graphics/decorations/decor_regice_doll.4bpp.lz");
-const u32 gUnknown_08DB9EE4[] = INCBIN_U32("graphics/decorations/decor_regice_doll.gbapal.lz");
+const u32 gDecorIcon_RegiceDoll[] = INCBIN_U32("graphics/decorations/decor_regice_doll.4bpp.lz");
+const u32 gDecorIconPalette_RegiceDoll[] = INCBIN_U32("graphics/decorations/decor_regice_doll.gbapal.lz");
-const u32 gUnknown_08DB9F08[] = INCBIN_U32("graphics/decorations/decor_regirock_doll.4bpp.lz");
-const u32 gUnknown_08DB9FFC[] = INCBIN_U32("graphics/decorations/decor_regirock_doll.gbapal.lz");
+const u32 gDecorIcon_RegirockDoll[] = INCBIN_U32("graphics/decorations/decor_regirock_doll.4bpp.lz");
+const u32 gDecorIconPalette_RegirockDoll[] = INCBIN_U32("graphics/decorations/decor_regirock_doll.gbapal.lz");
-const u32 gUnknown_08DBA020[] = INCBIN_U32("graphics/decorations/decor_registeel_doll.4bpp.lz");
-const u32 gUnknown_08DBA12C[] = INCBIN_U32("graphics/decorations/decor_registeel_doll.gbapal.lz");
+const u32 gDecorIcon_RegisteelDoll[] = INCBIN_U32("graphics/decorations/decor_registeel_doll.4bpp.lz");
+const u32 gDecorIconPalette_RegisteelDoll[] = INCBIN_U32("graphics/decorations/decor_registeel_doll.gbapal.lz");
diff --git a/src/data/pokemon/tutor_learnsets.h b/src/data/pokemon/tutor_learnsets.h
index 0a930e993..2c8c3b362 100644
--- a/src/data/pokemon/tutor_learnsets.h
+++ b/src/data/pokemon/tutor_learnsets.h
@@ -1,35 +1,4 @@
-#define TUTOR_MOVE_MEGA_PUNCH 0
-#define TUTOR_MOVE_SWORDS_DANCE 1
-#define TUTOR_MOVE_MEGA_KICK 2
-#define TUTOR_MOVE_BODY_SLAM 3
-#define TUTOR_MOVE_DOUBLE_EDGE 4
-#define TUTOR_MOVE_COUNTER 5
-#define TUTOR_MOVE_SEISMIC_TOSS 6
-#define TUTOR_MOVE_MIMIC 7
-#define TUTOR_MOVE_METRONOME 8
-#define TUTOR_MOVE_SOFT_BOILED 9
-#define TUTOR_MOVE_DREAM_EATER 10
-#define TUTOR_MOVE_THUNDER_WAVE 11
-#define TUTOR_MOVE_EXPLOSION 12
-#define TUTOR_MOVE_ROCK_SLIDE 13
-#define TUTOR_MOVE_SUBSTITUTE 14
-#define TUTOR_MOVE_DYNAMIC_PUNCH 15
-#define TUTOR_MOVE_ROLLOUT 16
-#define TUTOR_MOVE_PSYCH_UP 17
-#define TUTOR_MOVE_SNORE 18
-#define TUTOR_MOVE_ICY_WIND 19
-#define TUTOR_MOVE_ENDURE 20
-#define TUTOR_MOVE_MUD_SLAP 21
-#define TUTOR_MOVE_ICE_PUNCH 22
-#define TUTOR_MOVE_SWAGGER 23
-#define TUTOR_MOVE_SLEEP_TALK 24
-#define TUTOR_MOVE_SWIFT 25
-#define TUTOR_MOVE_DEFENSE_CURL 26
-#define TUTOR_MOVE_THUNDER_PUNCH 27
-#define TUTOR_MOVE_FIRE_PUNCH 28
-#define TUTOR_MOVE_FURY_CUTTER 29
-
-const u16 gTutorMoves[] =
+const u16 gTutorMoves[TUTOR_MOVE_COUNT] =
{
[TUTOR_MOVE_MEGA_PUNCH] = MOVE_MEGA_PUNCH,
[TUTOR_MOVE_SWORDS_DANCE] = MOVE_SWORDS_DANCE,
diff --git a/src/data/script_menu.h b/src/data/script_menu.h
new file mode 100644
index 000000000..b64146a5d
--- /dev/null
+++ b/src/data/script_menu.h
@@ -0,0 +1,1006 @@
+// multichoice lists
+static const struct MenuAction MultichoiceList_BrineyOnDewford[] =
+{
+ {gText_Petalburg},
+ {gText_Slateport},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_EnterInfo[] =
+{
+ {gText_Enter2},
+ {gText_Info2},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ContestInfo[] =
+{
+ {gText_WhatsAContest},
+ {gText_TypesOfContests},
+ {gText_Ranks},
+ {gText_Cancel2},
+};
+
+static const struct MenuAction MultichoiceList_ContestType[] =
+{
+ {gText_CoolnessContest},
+ {gText_BeautyContest},
+ {gText_CutenessContest},
+ {gText_SmartnessContest},
+ {gText_ToughnessContest},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_DecorRegistry[] =
+{
+ {gText_Decoration2},
+ {gText_PackUp},
+ {gText_Registry},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_DecorNoRegistry[] =
+{
+ {gText_Decoration2},
+ {gText_PackUp},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_RegisterMenu[] =
+{
+ {gMenuText_Register},
+ {gText_Registry},
+ {gText_Information},
+ {gText_Cancel2},
+};
+
+static const struct MenuAction MultichoiceList_Bike[] =
+{
+ {gText_Mach},
+ {gText_Acro},
+};
+
+static const struct MenuAction MultichoiceList_StatusInfo[] =
+{
+ {gText_Psn},
+ {gText_Par},
+ {gText_Slp},
+ {gText_Brn},
+ {gText_Frz},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_BrineyOffDewford[] =
+{
+ {gText_Dewford},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ViewedPaintings[] =
+{
+ {gText_SawIt},
+ {gText_NotYet},
+};
+
+static const struct MenuAction MultichoiceList_YesNoInfo2[] =
+{
+ {gText_Yes},
+ {gText_No},
+ {gText_Info2},
+};
+
+static const struct MenuAction MultichoiceList_ChallengeInfo[] =
+{
+ {gText_Challenge},
+ {gText_Info3},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_LevelMode[] =
+{
+ {gText_Lv50},
+ {gText_OpenLevel},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll1_Q1[] =
+{
+ {gTrickHouse_Mechadoll_Oddish},
+ {gTrickHouse_Mechadoll_Poochyena},
+ {gTrickHouse_Mechadoll_Taillow},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll1_Q2[] =
+{
+ {gTrickHouse_Mechadoll_Azurill},
+ {gTrickHouse_Mechadoll_Lotad},
+ {gTrickHouse_Mechadoll_Wingull},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll1_Q3[] =
+{
+ {gTrickHouse_Mechadoll_Dustox},
+ {gTrickHouse_Mechadoll_Zubat},
+ {gTrickHouse_Mechadoll_Nincada},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll2_Q1[] =
+{
+ {gTrickHouse_Mechadoll_Ralts},
+ {gTrickHouse_Mechadoll_Zigzagoon},
+ {gTrickHouse_Mechadoll_Slakoth},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll2_Q2[] =
+{
+ {gTrickHouse_Mechadoll_Poochyena2},
+ {gTrickHouse_Mechadoll_Shroomish},
+ {gTrickHouse_Mechadoll_Zigzagoon2},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll2_Q3[] =
+{
+ {gTrickHouse_Mechadoll_Poochyena3},
+ {gTrickHouse_Mechadoll_Zubat2},
+ {gTrickHouse_Mechadoll_Carvanha},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll3_Q1[] =
+{
+ {gTrickHouse_Mechadoll_BurnHeal},
+ {gTrickHouse_Mechadoll_HarborMail},
+ {gTrickHouse_Mechadoll_SamePrice},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll3_Q2[] =
+{
+ {gTrickHouse_Mechadoll_60Yen},
+ {gTrickHouse_Mechadoll_55Yen},
+ {gTrickHouse_Mechadoll_Nothing},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll3_Q3[] =
+{
+ {gTrickHouse_Mechadoll_CostMore},
+ {gTrickHouse_Mechadoll_CostLess},
+ {gTrickHouse_Mechadoll_SamePrice2},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll4_Q1[] =
+{
+ {gTrickHouse_Mechadoll_Male},
+ {gTrickHouse_Mechadoll_Female},
+ {gTrickHouse_Mechadoll_Neither},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll4_Q2[] =
+{
+ {gTrickHouse_Mechadoll_ElderlyMen},
+ {gTrickHouse_Mechadoll_ElderlyLadies},
+ {gTrickHouse_Mechadoll_SameNumber},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll4_Q3[] =
+{
+ {gTrickHouse_Mechadoll_None},
+ {gTrickHouse_Mechadoll_One},
+ {gTrickHouse_Mechadoll_Two},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll5_Q1[] =
+{
+ {gTrickHouse_Mechadoll_Two2},
+ {gTrickHouse_Mechadoll_Three},
+ {gTrickHouse_Mechadoll_Four},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll5_Q2[] =
+{
+ {gTrickHouse_Mechadoll_Six},
+ {gTrickHouse_Mechadoll_Seven},
+ {gTrickHouse_Mechadoll_Eight},
+};
+
+static const struct MenuAction MultichoiceList_Mechadoll5_Q3[] =
+{
+ {gTrickHouse_Mechadoll_Six2},
+ {gTrickHouse_Mechadoll_Seven2},
+ {gTrickHouse_Mechadoll_Eight2},
+};
+
+static const struct MenuAction MultichoiceList_VendingMachine[] =
+{
+ {gText_FreshWaterAndPrice},
+ {gText_SodaPopAndPrice},
+ {gText_LemonadeAndPrice},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_MachBikeInfo[] =
+{
+ {gText_HowToRide},
+ {gText_HowToTurn},
+ {gText_SandySlopes},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_AcroBikeInfo[] =
+{
+ {gText_Wheelies},
+ {gText_BunnyHops},
+ {gText_Jump},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_Satisfaction[] =
+{
+ {gText_Satisfied},
+ {gText_Dissatisfied},
+};
+
+static const struct MenuAction MultichoiceList_SternDeepSea[] =
+{
+ {gText_DeepSeaTooth},
+ {gText_DeepSeaScale},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_UnusedAshVendor[] =
+{
+ {gText_BlueFlute2},
+ {gText_YellowFlute2},
+ {gText_RedFlute2},
+ {gText_WhiteFlute2},
+ {gText_BlackFlute2},
+ {gText_GlassChair},
+ {gText_GlassDesk},
+ {gText_Cancel2},
+};
+
+static const struct MenuAction MultichoiceList_GameCornerDolls[] =
+{
+ {gText_TreeckoDollAndPrice},
+ {gText_TorchicDollAndPrice},
+ {gText_MudkipDollAndPrice},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_GameCornerTMs[] =
+{
+ {gText_TM32AndPrice},
+ {gText_TM29AndPrice},
+ {gText_TM35AndPrice},
+ {gText_TM24AndPrice},
+ {gText_TM13AndPrice},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_GameCornerCoins[] =
+{
+ {gText_50CoinsAndPrice},
+ {gText_500CoinsAndPrice},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_HowsFishing[] =
+{
+ {gText_Excellent2},
+ {gText_NotSoGood},
+};
+
+static const struct MenuAction MultichoiceList_SSTidalSlateportWithBF[] =
+{
+ {gText_LilycoveCity},
+ {gText_BattleFrontier},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_SSTidalBattleFrontier[] =
+{
+ {gText_SlateportCity},
+ {gText_LilycoveCity},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_RightLeft[] =
+{
+ {gText_Right},
+ {gText_Left},
+};
+
+static const struct MenuAction MultichoiceList_SSTidalSlateportNoBF[] =
+{
+ {gText_LilycoveCity},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_Floors[] =
+{
+ {gText_5F},
+ {gText_4F},
+ {gText_3F},
+ {gText_2F},
+ {gText_1F},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsR[] =
+{
+ {gText_RedShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsY[] =
+{
+ {gText_YellowShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsRY[] =
+{
+ {gText_RedShard},
+ {gText_YellowShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsB[] =
+{
+ {gText_BlueShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsRB[] =
+{
+ {gText_RedShard},
+ {gText_BlueShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsYB[] =
+{
+ {gText_YellowShard},
+ {gText_BlueShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsRYB[] =
+{
+ {gText_RedShard},
+ {gText_YellowShard},
+ {gText_BlueShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsG[] =
+{
+ {gText_GreenShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsRG[] =
+{
+ {gText_RedShard},
+ {gText_GreenShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsYG[] =
+{
+ {gText_YellowShard},
+ {gText_GreenShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsRYG[] =
+{
+ {gText_RedShard},
+ {gText_YellowShard},
+ {gText_GreenShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsBG[] =
+{
+ {gText_BlueShard},
+ {gText_GreenShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsRBG[] =
+{
+ {gText_RedShard},
+ {gText_BlueShard},
+ {gText_GreenShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsYBG[] =
+{
+ {gText_YellowShard},
+ {gText_BlueShard},
+ {gText_GreenShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ShardsRYBG[] =
+{
+ {gText_RedShard},
+ {gText_YellowShard},
+ {gText_BlueShard},
+ {gText_GreenShard},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_TourneyWithRecord[] =
+{
+ {gText_Opponent},
+ {gText_Tourney_Tree},
+ {gText_ReadyToStart},
+ {gText_Record2},
+ {gText_Rest},
+ {gText_Retire},
+};
+
+static const struct MenuAction MultichoiceList_TourneyNoRecord[] =
+{
+ {gText_Opponent},
+ {gText_Tourney_Tree},
+ {gText_ReadyToStart},
+ {gText_Rest},
+ {gText_Retire},
+};
+
+static const struct MenuAction MultichoiceList_Tent[] =
+{
+ {gText_RedTent},
+ {gText_BlueTent},
+};
+
+static const struct MenuAction MultichoiceList_LinkServicesNoBerry[] =
+{
+ {gText_TradeCenter},
+ {gText_Colosseum},
+ {gText_RecordCorner},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_YesNoInfo[] =
+{
+ {gText_Yes},
+ {gText_No},
+ {gText_Info2},
+};
+
+static const struct MenuAction MultichoiceList_BattleMode[] =
+{
+ {gText_SingleBattle},
+ {gText_DoubleBattle},
+ {gText_MultiBattle},
+ {gText_Info2},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_LinkServicesNoRecord[] =
+{
+ {gText_TradeCenter},
+ {gText_Colosseum},
+ {gText_BerryCrush3},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_LinkServicesAll[] =
+{
+ {gText_TradeCenter},
+ {gText_Colosseum},
+ {gText_RecordCorner},
+ {gText_BerryCrush3},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_LinkServicesNoRecordBerry[] =
+{
+ {gText_TradeCenter},
+ {gText_Colosseum},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_WirelessMinigame[] =
+{
+ {gText_PokemonJump},
+ {gText_DodrioBerryPicking},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_LinkLeader[] =
+{
+ {gText_JoinGroup},
+ {gText_BecomeLeader},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ContestRank[] =
+{
+ {gText_NormalRank},
+ {gText_SuperRank},
+ {gText_HyperRank},
+ {gText_MasterRank},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_FrontierItemChoose[] =
+{
+ {gText_BattleBag},
+ {gText_HeldItem},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_LinkContestInfo[] =
+{
+ {gText_LinkContest},
+ {gText_AboutE_Mode},
+ {gText_AboutG_Mode},
+ {gText_Cancel2},
+};
+
+static const struct MenuAction MultichoiceList_LinkContestMode[] =
+{
+ {gText_E_Mode},
+ {gText_G_Mode},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_ForcedStartMenu[] =
+{
+ {gText_MenuOptionPokedex},
+ {gText_MenuOptionPokemon},
+ {gText_MenuOptionBag},
+ {gText_MenuOptionPokenav},
+ {gText_Blank}, // blank because it's filled by the player's name
+ {gText_MenuOptionSave},
+ {gText_MenuOptionOption},
+ {gText_MenuOptionExit},
+};
+
+static const struct MenuAction MultichoiceList_FrontierGamblerBet[] =
+{
+ {gText_5BP},
+ {gText_10BP},
+ {gText_15BP},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_UnusedSSTidal1[] =
+{
+ {gText_SouthernIsland},
+ {gText_BirthIsland},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_UnusedSSTidal2[] =
+{
+ {gText_SouthernIsland},
+ {gText_FarawayIsland},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_UnusedSSTidal3[] =
+{
+ {gText_BirthIsland},
+ {gText_FarawayIsland},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_UnusedSSTidal4[] =
+{
+ {gText_SouthernIsland},
+ {gText_BirthIsland},
+ {gText_FarawayIsland},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_Fossil[] =
+{
+ {gText_ClawFossil},
+ {gText_RootFossil},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_YesNo[] =
+{
+ {gText_Yes},
+ {gText_No4},
+};
+
+static const struct MenuAction MultichoiceList_FrontierRules[] =
+{
+ {gText_TwoStyles},
+ {gText_Lv50_3},
+ {gText_OpenLevel2},
+ {gText_MonTypeAndNo},
+ {gText_HoldItems},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_FrontierPassInfo[] =
+{
+ {gText_Symbols2},
+ {gText_Record3},
+ {gText_BattlePts},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_BattleArenaRules[] =
+{
+ {gText_BattleRules},
+ {gText_JudgeMind},
+ {gText_JudgeSkill},
+ {gText_JudgeBody},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_BattleTowerRules[] =
+{
+ {gText_TowerInfo},
+ {gText_BattleMon},
+ {gText_BattleSalon},
+ {gText_MultiLink2},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_BattleDomeRules[] =
+{
+ {gText_Matchup},
+ {gText_TourneyTree},
+ {gText_DoubleKO},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_BattleFactoryRules[] =
+{
+ {gText_BasicRules},
+ {gText_SwapPartners},
+ {gText_SwapNumber},
+ {gText_SwapNotes},
+ {gText_OpenLevel3},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_BattlePalaceRules[] =
+{
+ {gText_BattleBasics},
+ {gText_PokemonNature},
+ {gText_PokemonMoves},
+ {gText_Underpowered},
+ {gText_WhenInDanger},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_BattlePyramidRules[] =
+{
+ {gText_PyramidPokemon},
+ {gText_PyramidTrainers},
+ {gText_PyramidMaze},
+ {gText_BattleBag2},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_BattlePikeRules[] =
+{
+ {gText_PokenavAndBag},
+ {gText_HeldItems},
+ {gText_PokemonOrder},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_GoOnRecordRestRetire[] =
+{
+ {gText_GoOn},
+ {gText_Record2},
+ {gText_Rest},
+ {gText_Retire},
+};
+
+static const struct MenuAction MultichoiceList_GoOnRestRetire[] =
+{
+ {gText_GoOn},
+ {gText_Rest},
+ {gText_Retire},
+};
+
+static const struct MenuAction MultichoiceList_GoOnRecordRetire[] =
+{
+ {gText_GoOn},
+ {gText_Record2},
+ {gText_Retire},
+};
+
+static const struct MenuAction MultichoiceList_GoOnRetire[] =
+{
+ {gText_GoOn},
+ {gText_Retire},
+};
+
+static const struct MenuAction MultichoiceList_TVLati[] =
+{
+ {gText_Red},
+ {gText_Blue},
+};
+
+static const struct MenuAction MultichoiceList_BattleTowerFeelings[] =
+{
+ {gText_IllBattleNow},
+ {gText_IWon},
+ {gText_ILost},
+ {gText_IWontTell},
+};
+
+static const struct MenuAction MultichoiceList_WheresRayquaza[] =
+{
+ {gText_CaveOfOrigin},
+ {gText_MtPyre},
+ {gText_SkyPillar},
+ {gText_DontRemember},
+};
+
+static const struct MenuAction MultichoiceList_SlateportTentRules[] =
+{
+ {gText_BasicRules},
+ {gText_SwapPartners},
+ {gText_SwapNumber},
+ {gText_SwapNotes},
+ {gText_BattlePokemon},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_FallarborTentRules[] =
+{
+ {gText_BattleTrainers},
+ {gText_BattleRules},
+ {gText_JudgeMind},
+ {gText_JudgeSkill},
+ {gText_JudgeBody},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_TagMatchType[] =
+{
+ {gText_NormalTagMatch},
+ {gText_VarietyTagMatch},
+ {gText_UniqueTagMatch},
+ {gText_ExpertTagMatch},
+ {gText_Exit},
+};
+
+static const struct MenuAction MultichoiceList_Exit[] =
+{
+ {gText_Exit},
+};
+
+struct MultichoiceListStruct
+{
+ const struct MenuAction *list;
+ u8 count;
+};
+
+static const struct MultichoiceListStruct sMultichoiceLists[] =
+{
+ [MULTI_BRINEY_ON_DEWFORD] = MULTICHOICE(MultichoiceList_BrineyOnDewford),
+ [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_SSTIDAL_LILYCOVE] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_UNUSED_9] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_UNUSED_10] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_FRONTIER_PASS_INFO] = MULTICHOICE(MultichoiceList_FrontierPassInfo),
+ [MULTI_BIKE] = MULTICHOICE(MultichoiceList_Bike),
+ [MULTI_STATUS_INFO] = MULTICHOICE(MultichoiceList_StatusInfo),
+ [MULTI_BRINEY_OFF_DEWFORD] = MULTICHOICE(MultichoiceList_BrineyOffDewford),
+ [MULTI_UNUSED_15] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_VIEWED_PAINTINGS] = MULTICHOICE(MultichoiceList_ViewedPaintings),
+ [MULTI_YESNOINFO] = MULTICHOICE(MultichoiceList_YesNoInfo),
+ [MULTI_BATTLE_MODE] = MULTICHOICE(MultichoiceList_BattleMode),
+ [MULTI_UNUSED_19] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_YESNOINFO_2] = MULTICHOICE(MultichoiceList_YesNoInfo2),
+ [MULTI_UNUSED_21] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_UNUSED_22] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_CHALLENGEINFO] = MULTICHOICE(MultichoiceList_ChallengeInfo),
+ [MULTI_LEVEL_MODE] = MULTICHOICE(MultichoiceList_LevelMode),
+ [MULTI_MECHADOLL1_Q1] = MULTICHOICE(MultichoiceList_Mechadoll1_Q1),
+ [MULTI_MECHADOLL1_Q2] = MULTICHOICE(MultichoiceList_Mechadoll1_Q2),
+ [MULTI_MECHADOLL1_Q3] = MULTICHOICE(MultichoiceList_Mechadoll1_Q3),
+ [MULTI_MECHADOLL2_Q1] = MULTICHOICE(MultichoiceList_Mechadoll2_Q1),
+ [MULTI_MECHADOLL2_Q2] = MULTICHOICE(MultichoiceList_Mechadoll2_Q2),
+ [MULTI_MECHADOLL2_Q3] = MULTICHOICE(MultichoiceList_Mechadoll2_Q3),
+ [MULTI_MECHADOLL3_Q1] = MULTICHOICE(MultichoiceList_Mechadoll3_Q1),
+ [MULTI_MECHADOLL3_Q2] = MULTICHOICE(MultichoiceList_Mechadoll3_Q2),
+ [MULTI_MECHADOLL3_Q3] = MULTICHOICE(MultichoiceList_Mechadoll3_Q3),
+ [MULTI_MECHADOLL4_Q1] = MULTICHOICE(MultichoiceList_Mechadoll4_Q1),
+ [MULTI_MECHADOLL4_Q2] = MULTICHOICE(MultichoiceList_Mechadoll4_Q2),
+ [MULTI_MECHADOLL4_Q3] = MULTICHOICE(MultichoiceList_Mechadoll4_Q3),
+ [MULTI_MECHADOLL5_Q1] = MULTICHOICE(MultichoiceList_Mechadoll5_Q1),
+ [MULTI_MECHADOLL5_Q2] = MULTICHOICE(MultichoiceList_Mechadoll5_Q2),
+ [MULTI_MECHADOLL5_Q3] = MULTICHOICE(MultichoiceList_Mechadoll5_Q3),
+ [MULTI_UNUSED_40] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_UNUSED_41] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_VENDING_MACHINE] = MULTICHOICE(MultichoiceList_VendingMachine),
+ [MULTI_MACH_BIKE_INFO] = MULTICHOICE(MultichoiceList_MachBikeInfo),
+ [MULTI_ACRO_BIKE_INFO] = MULTICHOICE(MultichoiceList_AcroBikeInfo),
+ [MULTI_SATISFACTION] = MULTICHOICE(MultichoiceList_Satisfaction),
+ [MULTI_STERN_DEEPSEA] = MULTICHOICE(MultichoiceList_SternDeepSea),
+ [MULTI_UNUSED_ASH_VENDOR] = MULTICHOICE(MultichoiceList_UnusedAshVendor),
+ [MULTI_GAME_CORNER_DOLLS] = MULTICHOICE(MultichoiceList_GameCornerDolls),
+ [MULTI_GAME_CORNER_COINS] = MULTICHOICE(MultichoiceList_GameCornerCoins),
+ [MULTI_HOWS_FISHING] = MULTICHOICE(MultichoiceList_HowsFishing),
+ [MULTI_UNUSED_51] = MULTICHOICE(MultichoiceList_Exit),
+ [MULTI_SSTIDAL_SLATEPORT_WITH_BF] = MULTICHOICE(MultichoiceList_SSTidalSlateportWithBF),
+ [MULTI_SSTIDAL_BATTLE_FRONTIER] = MULTICHOICE(MultichoiceList_SSTidalBattleFrontier),
+ [MULTI_RIGHTLEFT] = MULTICHOICE(MultichoiceList_RightLeft),
+ [MULTI_GAME_CORNER_TMS] = MULTICHOICE(MultichoiceList_GameCornerTMs),
+ [MULTI_SSTIDAL_SLATEPORT_NO_BF] = MULTICHOICE(MultichoiceList_SSTidalSlateportNoBF),
+ [MULTI_FLOORS] = MULTICHOICE(MultichoiceList_Floors),
+ [MULTI_SHARDS_R] = MULTICHOICE(MultichoiceList_ShardsR),
+ [MULTI_SHARDS_Y] = MULTICHOICE(MultichoiceList_ShardsY),
+ [MULTI_SHARDS_RY] = MULTICHOICE(MultichoiceList_ShardsRY),
+ [MULTI_SHARDS_B] = MULTICHOICE(MultichoiceList_ShardsB),
+ [MULTI_SHARDS_RB] = MULTICHOICE(MultichoiceList_ShardsRB),
+ [MULTI_SHARDS_YB] = MULTICHOICE(MultichoiceList_ShardsYB),
+ [MULTI_SHARDS_RYB] = MULTICHOICE(MultichoiceList_ShardsRYB),
+ [MULTI_SHARDS_G] = MULTICHOICE(MultichoiceList_ShardsG),
+ [MULTI_SHARDS_RG] = MULTICHOICE(MultichoiceList_ShardsRG),
+ [MULTI_SHARDS_YG] = MULTICHOICE(MultichoiceList_ShardsYG),
+ [MULTI_SHARDS_RYG] = MULTICHOICE(MultichoiceList_ShardsRYG),
+ [MULTI_SHARDS_BG] = MULTICHOICE(MultichoiceList_ShardsBG),
+ [MULTI_SHARDS_RBG] = MULTICHOICE(MultichoiceList_ShardsRBG),
+ [MULTI_SHARDS_YBG] = MULTICHOICE(MultichoiceList_ShardsYBG),
+ [MULTI_SHARDS_RYBG] = MULTICHOICE(MultichoiceList_ShardsRYBG),
+ [MULTI_TOURNEY_WITH_RECORD] = MULTICHOICE(MultichoiceList_TourneyWithRecord),
+ [MULTI_CABLE_CLUB_NO_RECORD_MIX] = MULTICHOICE(MultichoiceList_LinkServicesNoRecordBerry),
+ [MULTI_WIRELESS_NO_RECORD_BERRY] = MULTICHOICE(MultichoiceList_LinkServicesNoRecordBerry),
+ [MULTI_CABLE_CLUB_WITH_RECORD_MIX] = MULTICHOICE(MultichoiceList_LinkServicesNoBerry),
+ [MULTI_WIRELESS_NO_BERRY] = MULTICHOICE(MultichoiceList_LinkServicesNoBerry),
+ [MULTI_WIRELESS_NO_RECORD] = MULTICHOICE(MultichoiceList_LinkServicesNoRecord),
+ [MULTI_WIRELESS_ALL_SERVICES] = MULTICHOICE(MultichoiceList_LinkServicesAll),
+ [MULTI_WIRELESS_MINIGAME] = MULTICHOICE(MultichoiceList_WirelessMinigame),
+ [MULTI_LINK_LEADER] = MULTICHOICE(MultichoiceList_LinkLeader),
+ [MULTI_CONTEST_RANK] = MULTICHOICE(MultichoiceList_ContestRank),
+ [MULTI_FRONTIER_ITEM_CHOOSE] = MULTICHOICE(MultichoiceList_FrontierItemChoose),
+ [MULTI_LINK_CONTEST_INFO] = MULTICHOICE(MultichoiceList_LinkContestInfo),
+ [MULTI_LINK_CONTEST_MODE] = MULTICHOICE(MultichoiceList_LinkContestMode),
+ [MULTI_FORCED_START_MENU] = MULTICHOICE(MultichoiceList_ForcedStartMenu),
+ [MULTI_FRONTIER_GAMBLER_BET] = MULTICHOICE(MultichoiceList_FrontierGamblerBet),
+ [MULTI_TENT] = MULTICHOICE(MultichoiceList_Tent),
+ [MULTI_UNUSED_SSTIDAL_1] = MULTICHOICE(MultichoiceList_UnusedSSTidal1),
+ [MULTI_UNUSED_SSTIDAL_2] = MULTICHOICE(MultichoiceList_UnusedSSTidal2),
+ [MULTI_UNUSED_SSTIDAL_3] = MULTICHOICE(MultichoiceList_UnusedSSTidal3),
+ [MULTI_UNUSED_SSTIDAL_4] = MULTICHOICE(MultichoiceList_UnusedSSTidal4),
+ [MULTI_FOSSIL] = MULTICHOICE(MultichoiceList_Fossil),
+ [MULTI_YESNO] = MULTICHOICE(MultichoiceList_YesNo),
+ [MULTI_FRONTIER_RULES] = MULTICHOICE(MultichoiceList_FrontierRules),
+ [MULTI_BATTLE_ARENA_RULES] = MULTICHOICE(MultichoiceList_BattleArenaRules),
+ [MULTI_BATTLE_TOWER_RULES] = MULTICHOICE(MultichoiceList_BattleTowerRules),
+ [MULTI_BATTLE_DOME_RULES] = MULTICHOICE(MultichoiceList_BattleDomeRules),
+ [MULTI_BATTLE_FACTORY_RULES] = MULTICHOICE(MultichoiceList_BattleFactoryRules),
+ [MULTI_BATTLE_PALACE_RULES] = MULTICHOICE(MultichoiceList_BattlePalaceRules),
+ [MULTI_BATTLE_PYRAMID_RULES] = MULTICHOICE(MultichoiceList_BattlePyramidRules),
+ [MULTI_BATTLE_PIKE_RULES] = MULTICHOICE(MultichoiceList_BattlePikeRules),
+ [MULTI_GO_ON_RECORD_REST_RETIRE] = MULTICHOICE(MultichoiceList_GoOnRecordRestRetire),
+ [MULTI_GO_ON_REST_RETIRE] = MULTICHOICE(MultichoiceList_GoOnRestRetire),
+ [MULTI_GO_ON_RECORD_RETIRE] = MULTICHOICE(MultichoiceList_GoOnRecordRetire),
+ [MULTI_GO_ON_RETIRE] = MULTICHOICE(MultichoiceList_GoOnRetire),
+ [MULTI_TOURNEY_NO_RECORD] = MULTICHOICE(MultichoiceList_TourneyNoRecord),
+ [MULTI_TV_LATI] = MULTICHOICE(MultichoiceList_TVLati),
+ [MULTI_BATTLE_TOWER_FEELINGS] = MULTICHOICE(MultichoiceList_BattleTowerFeelings),
+ [MULTI_WHERES_RAYQUAZA] = MULTICHOICE(MultichoiceList_WheresRayquaza),
+ [MULTI_SLATEPORT_TENT_RULES] = MULTICHOICE(MultichoiceList_SlateportTentRules),
+ [MULTI_FALLARBOR_TENT_RULES] = MULTICHOICE(MultichoiceList_FallarborTentRules),
+ [MULTI_TAG_MATCH_TYPE] = MULTICHOICE(MultichoiceList_TagMatchType),
+};
+
+const u8 *const gStdStrings[] =
+{
+ [STDSTRING_COOL] = gText_Cool,
+ [STDSTRING_BEAUTY] = gText_Beauty,
+ [STDSTRING_CUTE] = gText_Cute,
+ [STDSTRING_SMART] = gText_Smart,
+ [STDSTRING_TOUGH] = gText_Tough,
+ [STDSTRING_NORMAL] = gText_Normal,
+ [STDSTRING_SUPER] = gText_Super,
+ [STDSTRING_HYPER] = gText_Hyper,
+ [STDSTRING_MASTER] = gText_Master,
+ [STDSTRING_COOL2] = gText_Cool2,
+ [STDSTRING_BEAUTY2] = gText_Beauty2,
+ [STDSTRING_CUTE2] = gText_Cute2,
+ [STDSTRING_SMART2] = gText_Smart2,
+ [STDSTRING_TOUGH2] = gText_Tough2,
+ [STDSTRING_ITEMS] = gText_Items,
+ [STDSTRING_KEYITEMS] = gText_Key_Items,
+ [STDSTRING_POKEBALLS] = gText_Poke_Balls,
+ [STDSTRING_TMHMS] = gText_TMs_Hms,
+ [STDSTRING_BERRIES] = gText_Berries2,
+ [STDSTRING_SINGLE] = gText_Single2,
+ [STDSTRING_DOUBLE] = gText_Double2,
+ [STDSTRING_MULTI] = gText_Multi,
+ [STDSTRING_MULTI_LINK] = gText_MultiLink,
+ [STDSTRING_BATTLE_TOWER] = gText_BattleTower2,
+ [STDSTRING_BATTLE_DOME] = gText_BattleDome,
+ [STDSTRING_BATTLE_FACTORY] = gText_BattleFactory,
+ [STDSTRING_BATTLE_PALACE] = gText_BattlePalace,
+ [STDSTRING_BATTLE_ARENA] = gText_BattleArena,
+ [STDSTRING_BATTLE_PIKE] = gText_BattlePike,
+ [STDSTRING_BATTLE_PYRAMID] = gText_BattlePyramid,
+};
+
+static const u8 sLinkServicesMultichoiceIds[] =
+{
+ MULTI_CABLE_CLUB_NO_RECORD_MIX,
+ MULTI_WIRELESS_NO_RECORD_BERRY,
+ MULTI_CABLE_CLUB_WITH_RECORD_MIX,
+ MULTI_WIRELESS_NO_BERRY,
+ MULTI_WIRELESS_NO_RECORD,
+ MULTI_WIRELESS_ALL_SERVICES
+};
+
+static const u8 *const sPCNameStrings[] =
+{
+ gText_SomeonesPC,
+ gText_LanettesPC,
+ gText_PlayersPC,
+ gText_LogOff,
+};
+
+static const u8 *const sLilycoveSSTidalDestinations[SSTIDAL_SELECTION_COUNT] =
+{
+ [SSTIDAL_SELECTION_SLATEPORT] = gText_SlateportCity,
+ [SSTIDAL_SELECTION_BATTLE_FRONTIER] = gText_BattleFrontier,
+ [SSTIDAL_SELECTION_SOUTHERN_ISLAND] = gText_SouthernIsland,
+ [SSTIDAL_SELECTION_NAVEL_ROCK] = gText_NavelRock,
+ [SSTIDAL_SELECTION_BIRTH_ISLAND] = gText_BirthIsland,
+ [SSTIDAL_SELECTION_FARAWAY_ISLAND] = gText_FarawayIsland,
+ [SSTIDAL_SELECTION_EXIT] = gText_Exit,
+};
+
+static const u8 *const sCableClubOptions_WithRecordMix[] =
+{
+ CableClub_Text_TradeUsingLinkCable,
+ CableClub_Text_BattleUsingLinkCable,
+ CableClub_Text_RecordCornerUsingLinkCable,
+ CableClub_Text_CancelSelectedItem,
+};
+static const u8 *const sWirelessOptionsNoBerryCrush[] =
+{
+ CableClub_Text_YouMayTradeHere,
+ CableClub_Text_YouMayBattleHere,
+ CableClub_Text_CanMixRecords,
+ CableClub_Text_CancelSelectedItem,
+};
+static const u8 *const sWirelessOptions_NoRecordMix[] =
+{
+ CableClub_Text_YouMayTradeHere,
+ CableClub_Text_YouMayBattleHere,
+ CableClub_Text_CanMakeBerryPowder,
+ CableClub_Text_CancelSelectedItem,
+};
+static const u8 *const sWirelessOptions_AllServices[] =
+{
+ CableClub_Text_YouMayTradeHere,
+ CableClub_Text_YouMayBattleHere,
+ CableClub_Text_CanMixRecords,
+ CableClub_Text_CanMakeBerryPowder,
+ CableClub_Text_CancelSelectedItem,
+};
+static const u8 *const sCableClubOptions_NoRecordMix[] =
+{
+ CableClub_Text_TradeUsingLinkCable,
+ CableClub_Text_BattleUsingLinkCable,
+ CableClub_Text_CancelSelectedItem,
+};
+static const u8 *const sWirelessOptions_NoRecordMixBerryCrush[] =
+{
+ CableClub_Text_YouMayTradeHere,
+ CableClub_Text_YouMayBattleHere,
+ CableClub_Text_CancelSelectedItem,
+};
diff --git a/src/daycare.c b/src/daycare.c
index 2d05035d7..e5445ee21 100644
--- a/src/daycare.c
+++ b/src/daycare.c
@@ -3,14 +3,11 @@
#include "battle.h"
#include "daycare.h"
#include "string_util.h"
-#include "constants/species.h"
-#include "constants/items.h"
#include "mail.h"
#include "pokemon_storage_system.h"
#include "event_data.h"
#include "random.h"
#include "main.h"
-#include "constants/moves.h"
#include "egg_hatch.h"
#include "text.h"
#include "menu.h"
@@ -22,9 +19,10 @@
#include "party_menu.h"
#include "list_menu.h"
#include "overworld.h"
-
-#define EGG_MOVES_ARRAY_COUNT 10
-#define EGG_LVL_UP_MOVES_ARRAY_COUNT 50
+#include "constants/items.h"
+#include "constants/moves.h"
+#include "constants/region_map_sections.h"
+#include "constants/species.h"
// this file's functions
static void ClearDaycareMonMail(struct DayCareMail *mail);
@@ -34,10 +32,10 @@ static void DaycarePrintMonInfo(u8 windowId, s32 daycareSlotId, u8 y);
// RAM buffers used to assist with BuildEggMoveset()
EWRAM_DATA static u16 sHatchedEggLevelUpMoves[EGG_LVL_UP_MOVES_ARRAY_COUNT] = {0};
-EWRAM_DATA static u16 sHatchedEggFatherMoves[4] = {0};
-EWRAM_DATA static u16 sHatchedEggFinalMoves[4] = {0};
+EWRAM_DATA static u16 sHatchedEggFatherMoves[MAX_MON_MOVES] = {0};
+EWRAM_DATA static u16 sHatchedEggFinalMoves[MAX_MON_MOVES] = {0};
EWRAM_DATA static u16 sHatchedEggEggMoves[EGG_MOVES_ARRAY_COUNT] = {0};
-EWRAM_DATA static u16 sHatchedEggMotherMoves[4] = {0};
+EWRAM_DATA static u16 sHatchedEggMotherMoves[MAX_MON_MOVES] = {0};
#include "data/pokemon/egg_moves.h"
@@ -52,11 +50,13 @@ static const struct WindowTemplate sDaycareLevelMenuWindowTemplate =
.baseBlock = 8
};
+// Indices here are assigned by Task_HandleDaycareLevelMenuInput to VAR_RESULT,
+// which is copied to VAR_0x8004 and used as an index for GetDaycareCost
static const struct ListMenuItem sLevelMenuItems[] =
{
{gExpandedPlaceholder_Empty, 0},
{gExpandedPlaceholder_Empty, 1},
- {gText_Exit, 5}
+ {gText_Exit, DAYCARE_LEVEL_MENU_EXIT}
};
static const struct ListMenuTemplate sDaycareListMenuLevelTemplate =
@@ -91,7 +91,7 @@ static const u8 *const sCompatibilityMessages[] =
static const u8 sJapaneseEggNickname[] = _("タマゴ"); // "tamago" ("egg" in Japanese)
-u8 *GetMonNick(struct Pokemon *mon, u8 *dest)
+u8 *GetMonNickname2(struct Pokemon *mon, u8 *dest)
{
u8 nickname[POKEMON_NAME_LENGTH * 2];
@@ -99,7 +99,7 @@ u8 *GetMonNick(struct Pokemon *mon, u8 *dest)
return StringCopy10(dest, nickname);
}
-u8 *GetBoxMonNick(struct BoxPokemon *mon, u8 *dest)
+u8 *GetBoxMonNickname(struct BoxPokemon *mon, u8 *dest)
{
u8 nickname[POKEMON_NAME_LENGTH * 2];
@@ -169,7 +169,7 @@ static void StorePokemonInDaycare(struct Pokemon *mon, struct DaycareMon *daycar
u8 mailId;
StringCopy(daycareMon->mail.OT_name, gSaveBlock2Ptr->playerName);
- GetMonNick(mon, daycareMon->mail.monName);
+ GetMonNickname2(mon, daycareMon->mail.monName);
StripExtCtrlCodes(daycareMon->mail.monName);
daycareMon->mail.gameLanguage = LANGUAGE_ENGLISH;
daycareMon->mail.monLanguage = GetMonData(mon, MON_DATA_LANGUAGE);
@@ -202,8 +202,8 @@ void StoreSelectedPokemonInDaycare(void)
static void ShiftDaycareSlots(struct DayCare *daycare)
{
// This condition is only satisfied when the player takes out the first pokemon from the daycare.
- if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != 0
- && GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) == 0)
+ if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != SPECIES_NONE
+ && GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) == SPECIES_NONE)
{
daycare->mons[0].mon = daycare->mons[1].mon;
ZeroBoxMonData(&daycare->mons[1].mon);
@@ -254,7 +254,7 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
u32 experience;
struct Pokemon pokemon;
- GetBoxMonNick(&daycareMon->mon, gStringVar1);
+ GetBoxMonNickname(&daycareMon->mon, gStringVar1);
species = GetBoxMonData(&daycareMon->mon, MON_DATA_SPECIES);
BoxMonToMon(&daycareMon->mon, &pokemon);
@@ -314,7 +314,7 @@ static u8 GetNumLevelsGainedForDaycareMon(struct DaycareMon *daycareMon)
{
u8 numLevelsGained = GetNumLevelsGainedFromSteps(daycareMon);
ConvertIntToDecimalStringN(gStringVar2, numLevelsGained, STR_CONV_MODE_LEFT_ALIGN, 2);
- GetBoxMonNick(&daycareMon->mon, gStringVar1);
+ GetBoxMonNickname(&daycareMon->mon, gStringVar1);
return numLevelsGained;
}
@@ -323,7 +323,7 @@ static u32 GetDaycareCostForSelectedMon(struct DaycareMon *daycareMon)
u32 cost;
u8 numLevelsGained = GetNumLevelsGainedFromSteps(daycareMon);
- GetBoxMonNick(&daycareMon->mon, gStringVar1);
+ GetBoxMonNickname(&daycareMon->mon, gStringVar1);
cost = 100 + 100 * numLevelsGained;
ConvertIntToDecimalStringN(gStringVar2, cost, STR_CONV_MODE_LEFT_ALIGN, 5);
return cost;
@@ -419,18 +419,18 @@ static u16 GetEggSpecies(u16 species)
return species;
}
-static s32 GetSlotToInheritNature(struct DayCare *daycare)
+static s32 GetParentToInheritNature(struct DayCare *daycare)
{
u32 species[DAYCARE_MON_COUNT];
s32 i;
s32 dittoCount;
- s32 slot = -1;
+ s32 parent = -1;
// search for female gender
for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
if (GetBoxMonGender(&daycare->mons[i].mon) == MON_FEMALE)
- slot = i;
+ parent = i;
}
// search for ditto
@@ -438,50 +438,52 @@ static s32 GetSlotToInheritNature(struct DayCare *daycare)
{
species[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_SPECIES);
if (species[i] == SPECIES_DITTO)
- dittoCount++, slot = i;
+ dittoCount++, parent = i;
}
// coin flip on ...two Dittos
- if (dittoCount == 2)
+ if (dittoCount == DAYCARE_MON_COUNT)
{
if (Random() >= USHRT_MAX / 2)
- slot = 0;
+ parent = 0;
else
- slot = 1;
+ parent = 1;
}
- // nature inheritance only if holds everstone
- if (GetBoxMonData(&daycare->mons[slot].mon, MON_DATA_HELD_ITEM) != ITEM_EVERSTONE
+ // Don't inherit nature if not holding Everstone
+ if (GetBoxMonData(&daycare->mons[parent].mon, MON_DATA_HELD_ITEM) != ITEM_EVERSTONE
|| Random() >= USHRT_MAX / 2)
{
return -1;
}
- return slot;
+ return parent;
}
static void _TriggerPendingDaycareEgg(struct DayCare *daycare)
{
- s32 natureSlot;
+ s32 parent;
s32 natureTries = 0;
SeedRng2(gMain.vblankCounter2);
- natureSlot = GetSlotToInheritNature(daycare);
+ parent = GetParentToInheritNature(daycare);
- if (natureSlot < 0)
+ // don't inherit nature
+ if (parent < 0)
{
- daycare->offspringPersonality = (Random2() << 0x10) | ((Random() % 0xfffe) + 1);
+ daycare->offspringPersonality = (Random2() << 16) | ((Random() % 0xfffe) + 1);
}
+ // inherit nature
else
{
- u8 wantedNature = GetNatureFromPersonality(GetBoxMonData(&daycare->mons[natureSlot].mon, MON_DATA_PERSONALITY, NULL));
+ u8 wantedNature = GetNatureFromPersonality(GetBoxMonData(&daycare->mons[parent].mon, MON_DATA_PERSONALITY, NULL));
u32 personality;
do
{
- personality = (Random2() << 0x10) | (Random());
+ personality = (Random2() << 16) | (Random());
if (wantedNature == GetNatureFromPersonality(personality) && personality != 0)
- break; // we found a personality with the same nature
+ break; // found a personality with the same nature
natureTries++;
} while (natureTries <= 2400);
@@ -492,9 +494,10 @@ static void _TriggerPendingDaycareEgg(struct DayCare *daycare)
FlagSet(FLAG_PENDING_DAYCARE_EGG);
}
+// Functionally unused
static void _TriggerPendingDaycareMaleEgg(struct DayCare *daycare)
{
- daycare->offspringPersonality = (Random()) | (0x8000);
+ daycare->offspringPersonality = (Random()) | (EGG_GENDER_MALE);
FlagSet(FLAG_PENDING_DAYCARE_EGG);
}
@@ -503,6 +506,7 @@ void TriggerPendingDaycareEgg(void)
_TriggerPendingDaycareEgg(&gSaveBlock1Ptr->daycare);
}
+// Unused
static void TriggerPendingDaycareMaleEgg(void)
{
_TriggerPendingDaycareMaleEgg(&gSaveBlock1Ptr->daycare);
@@ -532,9 +536,9 @@ static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv)
static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare)
{
u8 i;
- u8 selectedIvs[3];
+ u8 selectedIvs[INHERITED_IV_COUNT];
u8 availableIVs[NUM_STATS];
- u8 whichParent[ARRAY_COUNT(selectedIvs)];
+ u8 whichParents[INHERITED_IV_COUNT];
u8 iv;
// Initialize a list of IV indices.
@@ -544,48 +548,46 @@ static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare)
}
// Select the 3 IVs that will be inherited.
- for (i = 0; i < ARRAY_COUNT(selectedIvs); i++)
+ for (i = 0; i < INHERITED_IV_COUNT; i++)
{
- // Randomly pick an IV from the available list.
+ // Randomly pick an IV from the available list and stop from being chosen again.
selectedIvs[i] = availableIVs[Random() % (NUM_STATS - i)];
-
- // Remove the selected IV index from the available IV indices.
RemoveIVIndexFromList(availableIVs, i);
}
// Determine which parent each of the selected IVs should inherit from.
- for (i = 0; i < ARRAY_COUNT(selectedIvs); i++)
+ for (i = 0; i < INHERITED_IV_COUNT; i++)
{
- whichParent[i] = Random() % 2;
+ whichParents[i] = Random() % DAYCARE_MON_COUNT;
}
// Set each of inherited IVs on the egg mon.
- for (i = 0; i < ARRAY_COUNT(selectedIvs); i++)
+ for (i = 0; i < INHERITED_IV_COUNT; i++)
{
switch (selectedIvs[i])
{
case 0:
- iv = GetBoxMonData(&daycare->mons[whichParent[i]].mon, MON_DATA_HP_IV);
+ iv = GetBoxMonData(&daycare->mons[whichParents[i]].mon, MON_DATA_HP_IV);
SetMonData(egg, MON_DATA_HP_IV, &iv);
break;
case 1:
- iv = GetBoxMonData(&daycare->mons[whichParent[i]].mon, MON_DATA_ATK_IV);
+ iv = GetBoxMonData(&daycare->mons[whichParents[i]].mon, MON_DATA_ATK_IV);
SetMonData(egg, MON_DATA_ATK_IV, &iv);
break;
case 2:
- iv = GetBoxMonData(&daycare->mons[whichParent[i]].mon, MON_DATA_DEF_IV);
+ iv = GetBoxMonData(&daycare->mons[whichParents[i]].mon, MON_DATA_DEF_IV);
SetMonData(egg, MON_DATA_DEF_IV, &iv);
break;
case 3:
- iv = GetBoxMonData(&daycare->mons[whichParent[i]].mon, MON_DATA_SPEED_IV);
+ iv = GetBoxMonData(&daycare->mons[whichParents[i]].mon, MON_DATA_SPEED_IV);
SetMonData(egg, MON_DATA_SPEED_IV, &iv);
break;
case 4:
- iv = GetBoxMonData(&daycare->mons[whichParent[i]].mon, MON_DATA_SPATK_IV);
+ iv = GetBoxMonData(&daycare->mons[whichParents[i]].mon, MON_DATA_SPATK_IV);
SetMonData(egg, MON_DATA_SPATK_IV, &iv);
break;
case 5:
- iv = GetBoxMonData(&daycare->mons[whichParent[i]].mon, MON_DATA_SPDEF_IV);
+ iv = GetBoxMonData(&daycare->mons[whichParents[i]].mon, MON_DATA_SPDEF_IV);
SetMonData(egg, MON_DATA_SPDEF_IV, &iv);
break;
}
@@ -638,14 +640,14 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
numSharedParentMoves = 0;
for (i = 0; i < MAX_MON_MOVES; i++)
{
- sHatchedEggMotherMoves[i] = 0;
- sHatchedEggFatherMoves[i] = 0;
- sHatchedEggFinalMoves[i] = 0;
+ sHatchedEggMotherMoves[i] = MOVE_NONE;
+ sHatchedEggFatherMoves[i] = MOVE_NONE;
+ sHatchedEggFinalMoves[i] = MOVE_NONE;
}
for (i = 0; i < EGG_MOVES_ARRAY_COUNT; i++)
- sHatchedEggEggMoves[i] = 0;
+ sHatchedEggEggMoves[i] = MOVE_NONE;
for (i = 0; i < EGG_LVL_UP_MOVES_ARRAY_COUNT; i++)
- sHatchedEggLevelUpMoves[i] = 0;
+ sHatchedEggLevelUpMoves[i] = MOVE_NONE;
numLevelUpMoves = GetLevelUpMovesBySpecies(GetMonData(egg, MON_DATA_SPECIES), sHatchedEggLevelUpMoves);
for (i = 0; i < MAX_MON_MOVES; i++)
@@ -761,13 +763,10 @@ static void GiveVoltTackleIfLightBall(struct Pokemon *mon, struct DayCare *dayca
static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parentSlots)
{
u16 i;
- u16 species[2];
+ u16 species[DAYCARE_MON_COUNT];
u16 eggSpecies;
- // Determine which of the daycare mons is the mother and father of the egg.
- // The 0th index of the parentSlots array is considered the mother slot, and the
- // 1st index is the father slot.
- for (i = 0; i < 2; i++)
+ for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
species[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_SPECIES);
if (species[i] == SPECIES_DITTO)
@@ -783,11 +782,11 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
}
eggSpecies = GetEggSpecies(species[parentSlots[0]]);
- if (eggSpecies == SPECIES_NIDORAN_F && daycare->offspringPersonality & 0x8000)
+ if (eggSpecies == SPECIES_NIDORAN_F && daycare->offspringPersonality & EGG_GENDER_MALE)
{
eggSpecies = SPECIES_NIDORAN_M;
}
- if (eggSpecies == SPECIES_ILLUMISE && daycare->offspringPersonality & 0x8000)
+ if (eggSpecies == SPECIES_ILLUMISE && daycare->offspringPersonality & EGG_GENDER_MALE)
{
eggSpecies = SPECIES_VOLBEAT;
}
@@ -795,19 +794,19 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
// Make Ditto the "mother" slot if the other daycare mon is male.
if (species[parentSlots[1]] == SPECIES_DITTO && GetBoxMonGender(&daycare->mons[parentSlots[0]].mon) != MON_FEMALE)
{
- u8 temp = parentSlots[1];
+ u8 ditto = parentSlots[1];
parentSlots[1] = parentSlots[0];
- parentSlots[0] = temp;
+ parentSlots[0] = ditto;
}
return eggSpecies;
}
-static void _GiveEggFromDaycare(struct DayCare *daycare) // give_egg
+static void _GiveEggFromDaycare(struct DayCare *daycare)
{
struct Pokemon egg;
u16 species;
- u8 parentSlots[2]; // 0th index is "mother" daycare slot, 1st is "father"
+ u8 parentSlots[DAYCARE_MON_COUNT];
bool8 isEgg;
species = DetermineEggSpeciesAndParentSlots(daycare, parentSlots);
@@ -835,7 +834,7 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
u8 metLocation;
u8 isEgg;
- CreateMon(mon, species, EGG_HATCH_LEVEL, 0x20, FALSE, 0, OT_ID_PLAYER_ID, 0);
+ CreateMon(mon, species, EGG_HATCH_LEVEL, 32, FALSE, 0, OT_ID_PLAYER_ID, 0);
metLevel = 0;
ball = ITEM_POKE_BALL;
language = LANGUAGE_JAPANESE;
@@ -846,7 +845,7 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
SetMonData(mon, MON_DATA_LANGUAGE, &language);
if (setHotSpringsLocation)
{
- metLocation = 253; // hot springs; see PokemonSummaryScreen_PrintEggTrainerMemo
+ metLocation = METLOC_SPECIAL_EGG;
SetMonData(mon, MON_DATA_MET_LOCATION, &metLocation);
}
@@ -862,7 +861,7 @@ static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *
u8 language;
personality = daycare->offspringPersonality;
- CreateMon(mon, species, EGG_HATCH_LEVEL, 0x20, TRUE, personality, OT_ID_PLAYER_ID, 0);
+ CreateMon(mon, species, EGG_HATCH_LEVEL, 32, TRUE, personality, OT_ID_PLAYER_ID, 0);
metLevel = 0;
ball = ITEM_POKE_BALL;
language = LANGUAGE_JAPANESE;
@@ -878,7 +877,7 @@ void GiveEggFromDaycare(void)
_GiveEggFromDaycare(&gSaveBlock1Ptr->daycare);
}
-static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
+static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
{
u32 i, validEggs = 0;
@@ -888,15 +887,16 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
daycare->mons[i].steps++, validEggs++;
}
- // try to trigger poke sex
- if (daycare->offspringPersonality == 0 && validEggs == 2 && (daycare->mons[1].steps & 0xFF) == 0xFF)
+ // Check if an egg should be produced
+ if (daycare->offspringPersonality == 0 && validEggs == DAYCARE_MON_COUNT && (daycare->mons[1].steps & 0xFF) == 0xFF)
{
- u8 loveScore = GetDaycareCompatibilityScore(daycare);
- if (loveScore > (Random() * 100u) / USHRT_MAX)
+ u8 compatability = GetDaycareCompatibilityScore(daycare);
+ if (compatability > (Random() * 100u) / USHRT_MAX)
TriggerPendingDaycareEgg();
}
- if (++daycare->stepCounter == 255) // hatch an egg
+ // Hatch Egg
+ if (++daycare->stepCounter == 255)
{
u32 steps;
u8 toSub = GetEggStepsToSubtract();
@@ -909,7 +909,7 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
continue;
steps = GetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP);
- if (steps != 0) // subtract needed steps
+ if (steps != 0)
{
if (steps >= toSub)
steps -= toSub;
@@ -918,7 +918,7 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &steps);
}
- else // hatch the egg
+ else
{
gSpecialVar_0x8004 = i;
return TRUE;
@@ -926,12 +926,12 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
}
}
- return FALSE; // no hatching
+ return FALSE;
}
bool8 ShouldEggHatch(void)
{
- return _DoEggActions_CheckHatch(&gSaveBlock1Ptr->daycare);
+ return TryProduceOrHatchEgg(&gSaveBlock1Ptr->daycare);
}
static bool8 IsEggPending(struct DayCare *daycare)
@@ -947,20 +947,20 @@ static void _GetDaycareMonNicknames(struct DayCare *daycare)
u8 text[12];
if (GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) != 0)
{
- GetBoxMonNick(&daycare->mons[0].mon, gStringVar1);
+ GetBoxMonNickname(&daycare->mons[0].mon, gStringVar1);
GetBoxMonData(&daycare->mons[0].mon, MON_DATA_OT_NAME, text);
StringCopy(gStringVar3, text);
}
if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != 0)
{
- GetBoxMonNick(&daycare->mons[1].mon, gStringVar2);
+ GetBoxMonNickname(&daycare->mons[1].mon, gStringVar2);
}
}
-u16 GetSelectedMonNickAndSpecies(void)
+u16 GetSelectedMonNicknameAndSpecies(void)
{
- GetBoxMonNick(&gPlayerParty[GetCursorSelectionMonId()].box, gStringVar1);
+ GetBoxMonNickname(&gPlayerParty[GetCursorSelectionMonId()].box, gStringVar1);
return GetBoxMonData(&gPlayerParty[GetCursorSelectionMonId()].box, MON_DATA_SPECIES);
}
@@ -971,26 +971,19 @@ void GetDaycareMonNicknames(void)
u8 GetDaycareState(void)
{
- // The daycare can be in 4 possible states:
- // 0: default state--no deposited mons, no egg
- // 1: there is an egg waiting for the player to pick it up
- // 2: there is a single pokemon in the daycare
- // 3: there are two pokemon in the daycare, no egg
-
u8 numMons;
if (IsEggPending(&gSaveBlock1Ptr->daycare))
{
- // There is an Egg waiting for the player.
- return 1;
+ return DAYCARE_EGG_WAITING;
}
numMons = CountPokemonInDaycare(&gSaveBlock1Ptr->daycare);
if (numMons != 0)
{
- return numMons + 1;
+ return numMons + 1; // DAYCARE_ONE_MON or DAYCARE_TWO_MONS
}
- return 0;
+ return DAYCARE_NO_MONS;
}
static u8 GetDaycarePokemonCount(void)
@@ -1002,15 +995,15 @@ static u8 GetDaycarePokemonCount(void)
return 0;
}
+// Determine if the two given egg group lists contain any of the
+// same egg groups.
static bool8 EggGroupsOverlap(u16 *eggGroups1, u16 *eggGroups2)
{
- // Determine if the two given egg group lists contain any of the
- // same egg groups.
s32 i, j;
- for (i = 0; i < 2; i++)
+ for (i = 0; i < EGG_GROUPS_PER_MON; i++)
{
- for (j = 0; j < 2; j++)
+ for (j = 0; j < EGG_GROUPS_PER_MON; j++)
{
if (eggGroups1[i] == eggGroups2[j])
return TRUE;
@@ -1023,12 +1016,12 @@ static bool8 EggGroupsOverlap(u16 *eggGroups1, u16 *eggGroups2)
static u8 GetDaycareCompatibilityScore(struct DayCare *daycare)
{
u32 i;
- u16 eggGroups[2][2];
- u16 species[2];
- u32 trainerIds[2];
- u32 genders[2];
+ u16 eggGroups[DAYCARE_MON_COUNT][EGG_GROUPS_PER_MON];
+ u16 species[DAYCARE_MON_COUNT];
+ u32 trainerIds[DAYCARE_MON_COUNT];
+ u32 genders[DAYCARE_MON_COUNT];
- for (i = 0; i < 2; i++)
+ for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
u32 personality;
@@ -1042,41 +1035,42 @@ static u8 GetDaycareCompatibilityScore(struct DayCare *daycare)
// check unbreedable egg group
if (eggGroups[0][0] == EGG_GROUP_UNDISCOVERED || eggGroups[1][0] == EGG_GROUP_UNDISCOVERED)
- return 0;
+ return PARENTS_INCOMPATIBLE;
// two Ditto can't breed
if (eggGroups[0][0] == EGG_GROUP_DITTO && eggGroups[1][0] == EGG_GROUP_DITTO)
- return 0;
+ return PARENTS_INCOMPATIBLE;
- // now that we checked, one ditto can breed with any other mon
+ // one parent is Ditto
if (eggGroups[0][0] == EGG_GROUP_DITTO || eggGroups[1][0] == EGG_GROUP_DITTO)
{
- if (trainerIds[0] == trainerIds[1]) // same trainer
- return 20;
+ if (trainerIds[0] == trainerIds[1])
+ return PARENTS_LOW_COMPATIBILITY;
- return 50; // different trainers, more chance of poke sex
+ return PARENTS_MED_COMPATABILITY;
}
+ // neither parent is Ditto
else
{
- if (genders[0] == genders[1]) // no homo
- return 0;
+ if (genders[0] == genders[1])
+ return PARENTS_INCOMPATIBLE;
if (genders[0] == MON_GENDERLESS || genders[1] == MON_GENDERLESS)
- return 0;
- if (!EggGroupsOverlap(eggGroups[0], eggGroups[1])) // not compatible with each other
- return 0;
+ return PARENTS_INCOMPATIBLE;
+ if (!EggGroupsOverlap(eggGroups[0], eggGroups[1]))
+ return PARENTS_INCOMPATIBLE;
- if (species[0] == species[1]) // same species
+ if (species[0] == species[1])
{
- if (trainerIds[0] == trainerIds[1]) // same species and trainer
- return 50;
+ if (trainerIds[0] == trainerIds[1])
+ return PARENTS_MED_COMPATABILITY; // same species, same trainer
- return 70; // different trainers, same species
+ return PARENTS_MAX_COMPATABILITY; // same species, different trainers
}
else
{
- if (trainerIds[0] != trainerIds[1]) // different trainers, different species
- return 50;
+ if (trainerIds[0] != trainerIds[1])
+ return PARENTS_MED_COMPATABILITY; // different species, different trainers
- return 20; // different species, same trainer
+ return PARENTS_LOW_COMPATIBILITY; // different species, same trainer
}
}
}
@@ -1093,13 +1087,13 @@ void SetDaycareCompatibilityString(void)
relationshipScore = GetDaycareCompatibilityScoreFromSave();
whichString = 0;
- if (relationshipScore == 0)
+ if (relationshipScore == PARENTS_INCOMPATIBLE)
whichString = 3;
- if (relationshipScore == 20)
+ if (relationshipScore == PARENTS_LOW_COMPATIBILITY)
whichString = 2;
- if (relationshipScore == 50)
+ if (relationshipScore == PARENTS_MED_COMPATABILITY)
whichString = 1;
- if (relationshipScore == 70)
+ if (relationshipScore == PARENTS_MAX_COMPATABILITY)
whichString = 0;
StringCopy(gStringVar4, sCompatibilityMessages[whichString]);
@@ -1108,20 +1102,20 @@ void SetDaycareCompatibilityString(void)
bool8 NameHasGenderSymbol(const u8 *name, u8 genderRatio)
{
u8 i;
- u8 symbolsCount[2]; // male, female
- symbolsCount[0] = symbolsCount[1] = 0;
+ u8 symbolsCount[GENDER_COUNT];
+ symbolsCount[MALE] = symbolsCount[FEMALE] = 0;
for (i = 0; name[i] != EOS; i++)
{
if (name[i] == CHAR_MALE)
- symbolsCount[0]++;
+ symbolsCount[MALE]++;
if (name[i] == CHAR_FEMALE)
- symbolsCount[1]++;
+ symbolsCount[FEMALE]++;
}
- if (genderRatio == MON_MALE && symbolsCount[0] != 0 && symbolsCount[1] == 0)
+ if (genderRatio == MON_MALE && symbolsCount[MALE] != 0 && symbolsCount[FEMALE] == 0)
return TRUE;
- if (genderRatio == MON_FEMALE && symbolsCount[1] != 0 && symbolsCount[0] == 0)
+ if (genderRatio == MON_FEMALE && symbolsCount[FEMALE] != 0 && symbolsCount[MALE] == 0)
return TRUE;
return FALSE;
@@ -1150,13 +1144,13 @@ static u8 *AppendMonGenderSymbol(u8 *name, struct BoxPokemon *boxMon)
static void GetDaycareLevelMenuText(struct DayCare *daycare, u8 *dest)
{
- u8 monNames[2][20];
+ u8 monNames[DAYCARE_MON_COUNT][20];
u8 i;
*dest = EOS;
- for (i = 0; i < 2; i++)
+ for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
- GetBoxMonNick(&daycare->mons[i].mon, monNames[i]);
+ GetBoxMonNickname(&daycare->mons[i].mon, monNames[i]);
AppendMonGenderSymbol(monNames[i], &daycare->mons[i].mon);
}
@@ -1174,7 +1168,7 @@ static void GetDaycareLevelMenuLevelText(struct DayCare *daycare, u8 *dest)
u8 text[20];
*dest = EOS;
- for (i = 0; i < 2; i++)
+ for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
StringAppend(dest, gText_Lv);
level = GetLevelAfterDaycareSteps(&daycare->mons[i].mon, daycare->mons[i].steps);
@@ -1206,13 +1200,13 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y)
AddTextPrinter(&printer, 0xFF, NULL);
}
-static void DaycarePrintMonNick(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
+static void DaycarePrintMonNickname(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
{
- u8 nick[POKEMON_NAME_LENGTH * 2];
+ u8 nickname[POKEMON_NAME_LENGTH * 2];
- GetBoxMonNick(&daycare->mons[daycareSlotId].mon, nick);
- AppendMonGenderSymbol(nick, &daycare->mons[daycareSlotId].mon);
- DaycareAddTextPrinter(windowId, nick, 8, y);
+ GetBoxMonNickname(&daycare->mons[daycareSlotId].mon, nickname);
+ AppendMonGenderSymbol(nickname, &daycare->mons[daycareSlotId].mon);
+ DaycareAddTextPrinter(windowId, nickname, 8, y);
}
static void DaycarePrintMonLvl(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
@@ -1234,7 +1228,7 @@ static void DaycarePrintMonInfo(u8 windowId, s32 daycareSlotId, u8 y)
{
if (daycareSlotId < (unsigned) DAYCARE_MON_COUNT)
{
- DaycarePrintMonNick(&gSaveBlock1Ptr->daycare, windowId, daycareSlotId, y);
+ DaycarePrintMonNickname(&gSaveBlock1Ptr->daycare, windowId, daycareSlotId, y);
DaycarePrintMonLvl(&gSaveBlock1Ptr->daycare, windowId, daycareSlotId, y);
}
}
@@ -1254,8 +1248,8 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
case 1:
gSpecialVar_Result = input;
break;
- case 5:
- gSpecialVar_Result = 2;
+ case DAYCARE_LEVEL_MENU_EXIT:
+ gSpecialVar_Result = DAYCARE_EXITED_LEVEL_MENU;
break;
}
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
@@ -1266,7 +1260,7 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
}
else if (gMain.newKeys & B_BUTTON)
{
- gSpecialVar_Result = 2;
+ gSpecialVar_Result = DAYCARE_EXITED_LEVEL_MENU;
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
ClearStdWindowAndFrame(gTasks[taskId].tWindowId, TRUE);
RemoveWindow(gTasks[taskId].tWindowId);
diff --git a/src/decoration.c b/src/decoration.c
index 3e6428501..b4b825e24 100644
--- a/src/decoration.c
+++ b/src/decoration.c
@@ -2043,7 +2043,7 @@ const u32 *GetDecorationIconPicOrPalette(u16 decor, u8 mode)
if (decor > NUM_DECORATIONS)
decor = DECOR_NONE;
- return gUnknown_085A6BE8[decor][mode];
+ return gDecorIconTable[decor][mode];
}
u8 AddDecorationIconObjectFromEventObject(u16 tilesTag, u16 paletteTag, u8 decor)
@@ -2095,7 +2095,7 @@ u8 AddDecorationIconObject(u8 decor, s16 x, s16 y, u8 priority, u16 tilesTag, u1
gSprites[spriteId].pos2.x = x + 4;
gSprites[spriteId].pos2.y = y + 4;
}
- else if (gUnknown_085A6BE8[decor][0] == NULL)
+ else if (gDecorIconTable[decor][0] == NULL)
{
spriteId = AddDecorationIconObjectFromEventObject(tilesTag, paletteTag, decor);
if (spriteId == MAX_SPRITES)
diff --git a/src/egg_hatch.c b/src/egg_hatch.c
index c796a0423..9e9d1c2c5 100644
--- a/src/egg_hatch.c
+++ b/src/egg_hatch.c
@@ -56,7 +56,7 @@ struct EggHatchData
extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle
extern const u8 gText_HatchedFromEgg[];
-extern const u8 gText_NickHatchPrompt[];
+extern const u8 gText_NicknameHatchPrompt[];
static void Task_EggHatch(u8 taskID);
static void CB2_EggHatch_0(void);
@@ -298,13 +298,13 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
u16 species;
u32 personality, pokerus;
u8 i, friendship, language, gameMet, markings, obedience;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u32 ivs[NUM_STATS];
species = GetMonData(egg, MON_DATA_SPECIES);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
moves[i] = GetMonData(egg, MON_DATA_MOVE1 + i);
}
@@ -324,7 +324,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
CreateMon(temp, species, EGG_HATCH_LEVEL, 32, TRUE, personality, OT_ID_PLAYER_ID, 0);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]);
}
@@ -368,7 +368,7 @@ static void AddHatchedMonToParty(u8 id)
GetSetPokedexFlag(pokeNum, FLAG_SET_SEEN);
GetSetPokedexFlag(pokeNum, FLAG_SET_CAUGHT);
- GetMonNick(mon, gStringVar1);
+ GetMonNickname2(mon, gStringVar1);
ball = ITEM_POKE_BALL;
SetMonData(mon, MON_DATA_POKEBALL, &ball);
@@ -388,17 +388,17 @@ void ScriptHatchMon(void)
AddHatchedMonToParty(gSpecialVar_0x8004);
}
-static bool8 sub_807158C(struct DayCare *daycare, u8 daycareId)
+static bool8 _CheckDaycareMonReceivedMail(struct DayCare *daycare, u8 daycareId)
{
- u8 nick[0x20];
+ u8 nickname[32];
struct DaycareMon *daycareMon = &daycare->mons[daycareId];
- GetBoxMonNick(&daycareMon->mon, nick);
- if (daycareMon->mail.message.itemId != 0
- && (StringCompareWithoutExtCtrlCodes(nick, daycareMon->mail.monName) != 0
+ GetBoxMonNickname(&daycareMon->mon, nickname);
+ if (daycareMon->mail.message.itemId != ITEM_NONE
+ && (StringCompareWithoutExtCtrlCodes(nickname, daycareMon->mail.monName) != 0
|| StringCompareWithoutExtCtrlCodes(gSaveBlock2Ptr->playerName, daycareMon->mail.OT_name) != 0))
{
- StringCopy(gStringVar1, nick);
+ StringCopy(gStringVar1, nickname);
TVShowConvertInternationalString(gStringVar2, daycareMon->mail.OT_name, daycareMon->mail.gameLanguage);
TVShowConvertInternationalString(gStringVar3, daycareMon->mail.monName, daycareMon->mail.monLanguage);
return TRUE;
@@ -406,9 +406,9 @@ static bool8 sub_807158C(struct DayCare *daycare, u8 daycareId)
return FALSE;
}
-bool8 sub_8071614(void)
+bool8 CheckDaycareMonReceivedMail(void)
{
- return sub_807158C(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004);
+ return _CheckDaycareMonReceivedMail(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004);
}
static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc)
@@ -634,7 +634,7 @@ static void CB2_EggHatch_1(void)
}
break;
case 5:
- GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
+ GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_HatchedFromEgg);
EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, 0xFF);
PlayFanfare(MUS_FANFA5);
@@ -651,8 +651,8 @@ static void CB2_EggHatch_1(void)
sEggHatchData->CB2_state++;
break;
case 8:
- GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
- StringExpandPlaceholders(gStringVar4, gText_NickHatchPrompt);
+ GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
+ StringExpandPlaceholders(gStringVar4, gText_NicknameHatchPrompt);
EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 2, 1);
sEggHatchData->CB2_state++;
break;
@@ -668,7 +668,7 @@ static void CB2_EggHatch_1(void)
switch (Menu_ProcessInputNoWrapClearOnChoose())
{
case 0:
- GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3);
+ GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3);
species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES);
gender = GetMonGender(&gPlayerParty[sEggHatchData->eggPartyID]);
personality = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_PERSONALITY, 0);
@@ -880,9 +880,9 @@ u8 GetEggStepsToSubtract(void)
return 1;
}
-u16 sub_80722E0(void)
+u16 CountPartyAliveNonEggMons(void)
{
u16 aliveNonEggMonsCount = CountStorageNonEggMons();
- aliveNonEggMonsCount += CountPartyAliveNonEggMonsExcept(6);
+ aliveNonEggMonsCount += CountPartyAliveNonEggMonsExcept(PARTY_SIZE);
return aliveNonEggMonsCount;
}
diff --git a/src/event_obj_lock.c b/src/event_obj_lock.c
index 566b4931d..22a29fd5d 100644
--- a/src/event_obj_lock.c
+++ b/src/event_obj_lock.c
@@ -92,7 +92,7 @@ void ScriptUnfreezeEventObjects(void)
{
u8 playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
- sub_80D338C();
+ ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
}
@@ -104,7 +104,7 @@ void sub_8098524(void)
EventObjectClearHeldMovementIfFinished(&gEventObjects[gSelectedEventObject]);
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
- sub_80D338C();
+ ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
}
diff --git a/src/field_specials.c b/src/field_specials.c
index 5af0fd88a..befc2e781 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -35,6 +35,7 @@
#include "rtc.h"
#include "script.h"
#include "script_menu.h"
+#include "slot_machine.h"
#include "sound.h"
#include "starter_choose.h"
#include "string_util.h"
@@ -44,11 +45,17 @@
#include "tv.h"
#include "wallclock.h"
#include "window.h"
+#include "constants/battle_frontier.h"
+#include "constants/decorations.h"
#include "constants/event_objects.h"
+#include "constants/event_object_movement_constants.h"
#include "constants/field_effects.h"
+#include "constants/field_specials.h"
#include "constants/items.h"
+#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"
@@ -60,29 +67,28 @@
EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE;
EWRAM_DATA u8 gBikeCollisions = 0;
-static EWRAM_DATA u32 gBikeCyclingTimer = 0;
-static EWRAM_DATA u8 gUnknown_0203AB5C = 0;
+static EWRAM_DATA u32 sBikeCyclingTimer = 0;
+static EWRAM_DATA u8 sUnknown_0203AB5C = 0;
static EWRAM_DATA u8 sPetalburgGymSlidingDoorFrameCounter = 0;
-static EWRAM_DATA u8 gUnknown_0203AB5E = 0;
-static EWRAM_DATA u16 gUnknown_0203AB60 = 0;
-static EWRAM_DATA u16 gUnknown_0203AB62 = 0;
-static EWRAM_DATA struct ListMenuItem *gUnknown_0203AB64 = NULL;
-static EWRAM_DATA u16 gUnknown_0203AB68 = 0;
-static EWRAM_DATA u16 gUnknown_0203AB6A = 0;
-static EWRAM_DATA u8 gUnknown_0203AB6C = 0;
-static EWRAM_DATA u8 gUnknown_0203AB6D = 0;
-static EWRAM_DATA u8 gUnknown_0203AB6E = 0;
-static EWRAM_DATA u8 gUnknown_0203AB6F = 0;
-static EWRAM_DATA u32 gUnknown_0203AB70 = 0;
-
-struct ListMenuTemplate gUnknown_030061D0;
+static EWRAM_DATA u8 sTutorMoveAndElevatorWindowId = 0;
+static EWRAM_DATA u16 sLilycoveDeptStore_NeverRead = 0;
+static EWRAM_DATA u16 sLilycoveDeptStore_DefaultFloorChoice = 0;
+static EWRAM_DATA struct ListMenuItem *sScrollableMultichoice_ListMenuItem = NULL;
+static EWRAM_DATA u16 sScrollableMultichoice_ScrollOffset = 0;
+static EWRAM_DATA u16 sFrontierExchangeCorner_NeverRead = 0;
+static EWRAM_DATA u8 sScrollableMultichoice_ItemSpriteId = 0;
+static EWRAM_DATA u8 sBattlePointsWindowId = 0;
+static EWRAM_DATA u8 sFrontierExchangeCorner_ItemIconWindowId = 0;
+static EWRAM_DATA u8 sPCBoxToSendMon = 0;
+static EWRAM_DATA u32 sUnknown_0203AB70 = 0;
+
+struct ListMenuTemplate gScrollableMultichoice_ListMenuTemplate;
extern const u16 gEventObjectPalette8[];
extern const u16 gEventObjectPalette17[];
extern const u16 gEventObjectPalette33[];
extern const u16 gEventObjectPalette34[];
-
void UpdateMovedLilycoveFanClubMembers(void);
void sub_813BF60(void);
u16 GetNumMovedLilycoveFanClubMembers(void);
@@ -99,23 +105,23 @@ static void Task_LotteryCornerComputerEffect(u8);
static void LotteryCornerComputerEffect(struct Task *);
static void sub_81395BC(u8 taskId);
static void sub_8139620(u8 taskId);
-static void sub_8139AF4(u8 taskId);
-static void sub_8139C2C(u16 a1, u8 a2);
-static void MoveElevatorWindowLights(u8 taskId);
-static void sub_813A2DC(u8 taskId);
-static void sub_813AA60(u16 a0, u16 a1);
-static void sub_813ACE8(u8 a0, u16 a1);
-static void sub_813A42C(void);
-static void sub_813A4EC(u8 taskId);
-static void sub_813A694(u8 taskId);
-static void sub_813A46C(s32 itemIndex, bool8 onInit, struct ListMenu *list);
-static void sub_813AC44(u16 a0, u16 a1);
-static void sub_813AD34(u8 a0, u16 a1);
-static void sub_813A570(u8 taskId);
-static void sub_813A738(u8 taskId);
+static void Task_MoveElevator(u8 taskId);
+static void MoveElevatorWindowLights(u16 floorDelta, bool8 descending);
+static void Task_MoveElevatorWindowLights(u8 taskId);
+static void Task_ShowScrollableMultichoice(u8 taskId);
+static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection);
+static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection);
+static void InitScrollableMultichoice(void);
+static void ScrollableMultichoice_ProcessInput(u8 taskId);
+static void ScrollableMultichoice_UpdateScrollArrows(u8 taskId);
+static void ScrollableMultichoice_MoveCursor(s32 itemIndex, bool8 onInit, struct ListMenu *list);
+static void HideFrontierExchangeCornerItemIcon(u16 menu, u16 unused);
+static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection);
+static void CloseScrollableMultichoice(u8 taskId);
+static void ScrollableMultichoice_RemoveScrollArrows(u8 taskId);
static void sub_813A600(u8 taskId);
static void sub_813A664(u8 taskId);
-static void sub_813ABD4(u16 a0);
+static void ShowFrontierExchangeCornerItemIcon(u16 item);
static void Task_DeoxysRockInteraction(u8 taskId);
static void ChangeDeoxysRockLevel(u8 a0);
static void WaitForDeoxysRockMovement(u8 taskId);
@@ -144,14 +150,14 @@ void ResetCyclingRoadChallengeData(void)
{
gBikeCyclingChallenge = FALSE;
gBikeCollisions = 0;
- gBikeCyclingTimer = 0;
+ sBikeCyclingTimer = 0;
}
void Special_BeginCyclingRoadChallenge(void)
{
gBikeCyclingChallenge = TRUE;
gBikeCollisions = 0;
- gBikeCyclingTimer = gMain.vblankCounter1;
+ sBikeCyclingTimer = gMain.vblankCounter1;
}
u16 GetPlayerAvatarBike(void)
@@ -237,7 +243,7 @@ static void DetermineCyclingRoadResults(u32 numFrames, u8 numBikeCollisions)
}
void FinishCyclingRoadChallenge(void) {
- const u32 numFrames = gMain.vblankCounter1 - gBikeCyclingTimer;
+ const u32 numFrames = gMain.vblankCounter1 - sBikeCyclingTimer;
DetermineCyclingRoadResults(numFrames, gBikeCollisions);
RecordCyclingRoadResults(numFrames, gBikeCollisions);
@@ -310,16 +316,16 @@ u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y)
{
case 1:
case 8:
- return 1;
+ return SS_TIDAL_LOCATION_SLATEPORT;
case 3:
case 9:
- return 4;
+ return SS_TIDAL_LOCATION_ROUTE131;
case 4:
case 5:
- return 2;
+ return SS_TIDAL_LOCATION_LILYCOVE;
case 6:
case 10:
- return 3;
+ return SS_TIDAL_LOCATION_ROUTE124;
case 2:
if (*varCruiseStepCount < 60)
{
@@ -356,7 +362,7 @@ u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y)
}
*mapGroup = MAP_GROUP(ROUTE132);
*y = 20;
- return 0;
+ return SS_TIDAL_LOCATION_OTHER;
}
bool32 ShouldDoWallyCall(void)
@@ -419,10 +425,10 @@ bool32 ShouldDoScottCall(void)
{
switch (gMapHeader.mapType)
{
- case 1:
- case 2:
- case 3:
- case 6:
+ case MAP_TYPE_TOWN:
+ case MAP_TYPE_CITY:
+ case MAP_TYPE_ROUTE:
+ case MAP_TYPE_OCEAN_ROUTE:
if (++(*GetVarPointer(VAR_SCOTT_CALL_STEP_COUNTER)) < 10)
{
return FALSE;
@@ -446,10 +452,10 @@ bool32 ShouldDoRoxanneCall(void)
{
switch (gMapHeader.mapType)
{
- case 1:
- case 2:
- case 3:
- case 6:
+ case MAP_TYPE_TOWN:
+ case MAP_TYPE_CITY:
+ case MAP_TYPE_ROUTE:
+ case MAP_TYPE_OCEAN_ROUTE:
if (++(*GetVarPointer(VAR_ROXANNE_CALL_STEP_COUNTER)) < 250)
{
return FALSE;
@@ -473,10 +479,10 @@ bool32 ShouldDoRivalRayquazaCall(void)
{
switch (gMapHeader.mapType)
{
- case 1:
- case 2:
- case 3:
- case 6:
+ case MAP_TYPE_TOWN:
+ case MAP_TYPE_CITY:
+ case MAP_TYPE_ROUTE:
+ case MAP_TYPE_OCEAN_ROUTE:
if (++(*GetVarPointer(VAR_RIVAL_RAYQUAZA_CALL_STEP_COUNTER)) < 250)
{
return FALSE;
@@ -516,8 +522,13 @@ void SpawnLinkPartnerEventObject(void)
u8 j = 0;
s16 x = 0;
s16 y = 0;
- u8 gUnknown_085B2B5C[] = {7, 9, 8, 10};
- s8 gUnknown_085B2B60[][2] = {
+ u8 movementTypes[] = {
+ MOVEMENT_TYPE_FACE_UP,
+ MOVEMENT_TYPE_FACE_LEFT,
+ MOVEMENT_TYPE_FACE_DOWN,
+ MOVEMENT_TYPE_FACE_RIGHT
+ };
+ s8 coordOffsets[][2] = {
{ 0, 1},
{ 1, 0},
{ 0, -1},
@@ -577,10 +588,10 @@ void SpawnLinkPartnerEventObject(void)
linkSpriteId = EVENT_OBJ_GFX_RIVAL_MAY_NORMAL;
break;
}
- SpawnSpecialEventObjectParameterized(linkSpriteId, gUnknown_085B2B5C[j], 0xf0 - i, gUnknown_085B2B60[j][0] + x + 7, gUnknown_085B2B60[j][1] + y + 7, 0);
- LoadLinkPartnerEventObjectSpritePalette(linkSpriteId, 0xf0 - i, i);
+ SpawnSpecialEventObjectParameterized(linkSpriteId, movementTypes[j], 240 - i, coordOffsets[j][0] + x + 7, coordOffsets[j][1] + y + 7, 0);
+ LoadLinkPartnerEventObjectSpritePalette(linkSpriteId, 240 - i, i);
j++;
- if (j == 4)
+ if (j == MAX_LINK_PLAYERS)
{
j = 0;
}
@@ -624,7 +635,8 @@ static void LoadLinkPartnerEventObjectSpritePalette(u8 graphicsId, u8 localEvent
}
}
-static const struct UCoords8 sMauvilleGymSwitchCoords[] = {
+static const struct UCoords8 sMauvilleGymSwitchCoords[] =
+{
{ 7, 22},
{11, 19},
{10, 16},
@@ -814,7 +826,7 @@ static const u16 sPetalburgGymSlidingDoorMetatiles[] = {
void PetalburgGymSpecial1(void)
{
- gUnknown_0203AB5C = 0;
+ sUnknown_0203AB5C = 0;
sPetalburgGymSlidingDoorFrameCounter = 0;
PlaySE(SE_KI_GASYAN);
CreateTask(Task_PetalburgGym, 8);
@@ -822,10 +834,10 @@ void PetalburgGymSpecial1(void)
static void Task_PetalburgGym(u8 taskId)
{
- if (gUnknown_085B2B78[sPetalburgGymSlidingDoorFrameCounter] == gUnknown_0203AB5C)
+ if (gUnknown_085B2B78[sPetalburgGymSlidingDoorFrameCounter] == sUnknown_0203AB5C)
{
PetalburgGymFunc(gSpecialVar_0x8004, sPetalburgGymSlidingDoorMetatiles[sPetalburgGymSlidingDoorFrameCounter]);
- gUnknown_0203AB5C = 0;
+ sUnknown_0203AB5C = 0;
if ((++sPetalburgGymSlidingDoorFrameCounter) == ARRAY_COUNT(sPetalburgGymSlidingDoorMetatiles))
{
DestroyTask(taskId);
@@ -834,7 +846,7 @@ static void Task_PetalburgGym(u8 taskId)
}
else
{
- gUnknown_0203AB5C++;
+ sUnknown_0203AB5C++;
}
}
@@ -1077,36 +1089,35 @@ static void PCTurnOnEffect_0(struct Task *task)
task->data[3]++;
}
-// enum pc location,
-static void PCTurnOnEffect_1(s16 flag, s8 dx, s8 dy)
+static void PCTurnOnEffect_1(s16 isPcTurnedOn, s8 dx, s8 dy)
{
u16 tileId = 0;
- if (flag != 0)
+ if (isPcTurnedOn)
{
- if (gSpecialVar_0x8004 == 0)
+ if (gSpecialVar_0x8004 == PC_LOCATION_OTHER)
{
tileId = METATILE_ID(Building, PC_Off);
}
- else if (gSpecialVar_0x8004 == 1)
+ else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE)
{
tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_Off);
}
- else if (gSpecialVar_0x8004 == 2)
+ else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE)
{
tileId = METATILE_ID(BrendansMaysHouse, MayPC_Off);
}
}
else
{
- if (gSpecialVar_0x8004 == 0)
+ if (gSpecialVar_0x8004 == PC_LOCATION_OTHER)
{
tileId = METATILE_ID(Building, PC_On);
}
- else if (gSpecialVar_0x8004 == 1)
+ else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE)
{
tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_On);
}
- else if (gSpecialVar_0x8004 == 2)
+ else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE)
{
tileId = METATILE_ID(BrendansMaysHouse, MayPC_On);
}
@@ -1294,7 +1305,7 @@ void IsGrassTypeInParty(void)
void SpawnCameraObject(void)
{
- u8 obj = SpawnSpecialEventObjectParameterized(EVENT_OBJ_GFX_BOY_1, 8, EVENT_OBJ_ID_CAMERA, gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7, 3);
+ u8 obj = SpawnSpecialEventObjectParameterized(EVENT_OBJ_GFX_BOY_1, MOVEMENT_TYPE_FACE_DOWN, EVENT_OBJ_ID_CAMERA, gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7, 3);
gEventObjects[obj].invisible = TRUE;
CameraObjectSetFollowedObjectId(gEventObjects[obj].spriteId);
}
@@ -1327,16 +1338,16 @@ void BufferEReaderTrainerName(void)
u16 GetSlotMachineId(void)
{
- static const u8 gUnknown_085B2B88[] = {12, 2, 4, 5, 1, 8, 7, 11, 3, 10, 9, 6};
- static const u8 gUnknown_085B2B94[] = {0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5};
- static const u8 gUnknown_085B2BA0[] = {3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5};
+ static const u8 sSlotMachineRandomSeeds[] = {12, 2, 4, 5, 1, 8, 7, 11, 3, 10, 9, 6};
+ static const u8 sSlotMachineIds[] = {0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5};
+ static const u8 sSlotMachineServiceDayIds[] = {3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5};
- u32 v0 = gSaveBlock1Ptr->easyChatPairs[0].unk0_0 + gSaveBlock1Ptr->easyChatPairs[0].unk2 + gUnknown_085B2B88[gSpecialVar_0x8004];
- if (GetPriceReduction(2))
+ u32 rnd = gSaveBlock1Ptr->easyChatPairs[0].unk0_0 + gSaveBlock1Ptr->easyChatPairs[0].unk2 + sSlotMachineRandomSeeds[gSpecialVar_0x8004];
+ if (GetPriceReduction(POKENEWS_GAME_CORNER))
{
- return gUnknown_085B2BA0[v0 % 12];
+ return sSlotMachineServiceDayIds[rnd % SLOT_MACHINE_COUNT];
}
- return gUnknown_085B2B94[v0 % 12];
+ return sSlotMachineIds[rnd % SLOT_MACHINE_COUNT];
}
bool8 FoundAbandonedShipRoom1Key(void)
@@ -1434,7 +1445,7 @@ u8 TryUpdateRusturfTunnelState(void)
return FALSE;
}
-void SetShoalItemFlag(u16 v0)
+void SetShoalItemFlag(u16 unused)
{
FlagSet(FLAG_SYS_SHOAL_ITEM);
}
@@ -1442,7 +1453,7 @@ void SetShoalItemFlag(u16 v0)
void PutZigzagoonInPlayerParty(void)
{
u16 monData;
- CreateMon(&gPlayerParty[0], SPECIES_ZIGZAGOON, 7, 0x20, FALSE, 0, OT_ID_PLAYER_ID, 0);
+ CreateMon(&gPlayerParty[0], SPECIES_ZIGZAGOON, 7, 32, FALSE, 0, OT_ID_PLAYER_ID, 0);
monData = TRUE;
SetMonData(&gPlayerParty[0], MON_DATA_ABILITY_NUM, &monData);
monData = MOVE_TACKLE;
@@ -1529,7 +1540,7 @@ void SetRoute119Weather(void)
{
if (IsMapTypeOutdoors(GetLastUsedWarpMapType()) != TRUE)
{
- SetSav1Weather(20);
+ SetSav1Weather(WEATHER_ROUTE119_CYCLE);
}
}
@@ -1537,7 +1548,7 @@ void SetRoute123Weather(void)
{
if (IsMapTypeOutdoors(GetLastUsedWarpMapType()) != TRUE)
{
- SetSav1Weather(21);
+ SetSav1Weather(WEATHER_ROUTE123_CYCLE);
}
}
@@ -1560,9 +1571,10 @@ u16 ScriptGetPartyMonSpecies(void)
return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL);
}
-void nullsub_54(void)
+// Removed for Emerald
+void TryInitBattleTowerAwardManEventObject(void)
{
-
+ //TryInitLocalEventObject(6);
}
u16 GetDaysUntilPacifidlogTMAvailable(void)
@@ -1653,7 +1665,7 @@ u16 sub_813986C(void)
}
}
-bool8 sub_81398C0(void)
+bool8 BufferTMHMMoveName(void)
{
if (gSpecialVar_0x8004 >= ITEM_TM01 && gSpecialVar_0x8004 <= ITEM_HM08)
{
@@ -1664,14 +1676,14 @@ bool8 sub_81398C0(void)
return FALSE;
}
-bool8 sub_813990C(void)
+bool8 IsBadEggInParty(void)
{
u8 partyCount = CalculatePlayerPartyCount();
u8 i;
for (i = 0; i < partyCount; i++)
{
- if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_BAD_EGG) == 1)
+ if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_BAD_EGG) == TRUE)
return TRUE;
}
@@ -1693,7 +1705,8 @@ void sub_8139980(void)
SetCameraPanning(8, 0);
}
-const struct WindowTemplate gUnknown_085B2BAC = {
+const struct WindowTemplate gElevatorFloor_WindowTemplate =
+{
.bg = 0,
.tilemapLeft = 21,
.tilemapTop = 1,
@@ -1703,23 +1716,24 @@ const struct WindowTemplate gUnknown_085B2BAC = {
.baseBlock = 8,
};
-const u8 *const gElevatorFloorsTable[] = {
- gText_B4F,
- gText_B3F,
- gText_B2F,
- gText_B1F,
- gText_1F,
- gText_2F,
- gText_3F,
- gText_4F,
- gText_5F,
- gText_6F,
- gText_7F,
- gText_8F,
- gText_9F,
- gText_10F,
- gText_11F,
- gText_Rooftop
+const u8 *const gDeptStoreFloorNames[] =
+{
+ [DEPT_STORE_FLOORNUM_B4F] = gText_B4F,
+ [DEPT_STORE_FLOORNUM_B3F] = gText_B3F,
+ [DEPT_STORE_FLOORNUM_B2F] = gText_B2F,
+ [DEPT_STORE_FLOORNUM_B1F] = gText_B1F,
+ [DEPT_STORE_FLOORNUM_1F] = gText_1F,
+ [DEPT_STORE_FLOORNUM_2F] = gText_2F,
+ [DEPT_STORE_FLOORNUM_3F] = gText_3F,
+ [DEPT_STORE_FLOORNUM_4F] = gText_4F,
+ [DEPT_STORE_FLOORNUM_5F] = gText_5F,
+ [DEPT_STORE_FLOORNUM_6F] = gText_6F,
+ [DEPT_STORE_FLOORNUM_7F] = gText_7F,
+ [DEPT_STORE_FLOORNUM_8F] = gText_8F,
+ [DEPT_STORE_FLOORNUM_9F] = gText_9F,
+ [DEPT_STORE_FLOORNUM_10F] = gText_10F,
+ [DEPT_STORE_FLOORNUM_11F] = gText_11F,
+ [DEPT_STORE_FLOORNUM_ROOFTOP] = gText_Rooftop
};
static const u16 sElevatorWindowTiles_Ascending[][3] =
@@ -1760,104 +1774,105 @@ static const u16 sElevatorWindowTiles_Descending[][3] =
},
};
-void SetDepartmentStoreFloorVar(void)
+void SetDeptStoreFloor(void)
{
u8 deptStoreFloor;
switch (gSaveBlock1Ptr->dynamicWarp.mapNum)
{
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_1F):
- deptStoreFloor = 4;
+ deptStoreFloor = DEPT_STORE_FLOORNUM_1F;
break;
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_2F):
- deptStoreFloor = 5;
+ deptStoreFloor = DEPT_STORE_FLOORNUM_2F;
break;
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_3F):
- deptStoreFloor = 6;
+ deptStoreFloor = DEPT_STORE_FLOORNUM_3F;
break;
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_4F):
- deptStoreFloor = 7;
+ deptStoreFloor = DEPT_STORE_FLOORNUM_4F;
break;
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_5F):
- deptStoreFloor = 8;
+ deptStoreFloor = DEPT_STORE_FLOORNUM_5F;
break;
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP):
- deptStoreFloor = 15;
+ deptStoreFloor = DEPT_STORE_FLOORNUM_ROOFTOP;
break;
default:
- deptStoreFloor = 4;
+ deptStoreFloor = DEPT_STORE_FLOORNUM_1F;
break;
}
VarSet(VAR_DEPT_STORE_FLOOR, deptStoreFloor);
}
-u16 sub_81399F4(void)
+u16 GetDeptStoreDefaultFloorChoice(void)
{
- gUnknown_0203AB60 = 0;
- gUnknown_0203AB62 = 0;
+ sLilycoveDeptStore_NeverRead = 0;
+ sLilycoveDeptStore_DefaultFloorChoice = 0;
if (gSaveBlock1Ptr->dynamicWarp.mapGroup == MAP_GROUP(LILYCOVE_CITY_DEPARTMENT_STORE_1F))
{
switch (gSaveBlock1Ptr->dynamicWarp.mapNum)
{
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_5F):
- gUnknown_0203AB60 = 0;
- gUnknown_0203AB62 = 0;
+ sLilycoveDeptStore_NeverRead = 0;
+ sLilycoveDeptStore_DefaultFloorChoice = 0;
break;
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_4F):
- gUnknown_0203AB60 = 0;
- gUnknown_0203AB62 = 1;
+ sLilycoveDeptStore_NeverRead = 0;
+ sLilycoveDeptStore_DefaultFloorChoice = 1;
break;
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_3F):
- gUnknown_0203AB60 = 0;
- gUnknown_0203AB62 = 2;
+ sLilycoveDeptStore_NeverRead = 0;
+ sLilycoveDeptStore_DefaultFloorChoice = 2;
break;
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_2F):
- gUnknown_0203AB60 = 0;
- gUnknown_0203AB62 = 3;
+ sLilycoveDeptStore_NeverRead = 0;
+ sLilycoveDeptStore_DefaultFloorChoice = 3;
break;
case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_1F):
- gUnknown_0203AB60 = 0;
- gUnknown_0203AB62 = 4;
+ sLilycoveDeptStore_NeverRead = 0;
+ sLilycoveDeptStore_DefaultFloorChoice = 4;
break;
}
}
- return gUnknown_0203AB62;
+ return sLilycoveDeptStore_DefaultFloorChoice;
}
-void ShakeScreenInElevator(void)
+void MoveElevator(void)
{
- static const u8 gUnknown_085B2C18[] = { 0x08, 0x10, 0x18, 0x20, 0x26, 0x2e, 0x34, 0x38, 0x39 };
+ static const u8 sElevatorTripLength[] = { 8, 16, 24, 32, 38, 46, 52, 56, 57 };
- s16 *data = gTasks[CreateTask(sub_8139AF4, 9)].data;
+ s16 *data = gTasks[CreateTask(Task_MoveElevator, 9)].data;
u16 floorDelta;
data[1] = 0;
data[2] = 0;
data[4] = 1;
+ // descending
if (gSpecialVar_0x8005 > gSpecialVar_0x8006)
{
floorDelta = gSpecialVar_0x8005 - gSpecialVar_0x8006;
- data[6] = 1;
+ data[6] = TRUE;
}
else
{
floorDelta = gSpecialVar_0x8006 - gSpecialVar_0x8005;
- data[6] = 0;
+ data[6] = FALSE;
}
if (floorDelta > 8)
floorDelta = 8;
- data[5] = gUnknown_085B2C18[floorDelta];
+ data[5] = sElevatorTripLength[floorDelta];
SetCameraPanningCallback(NULL);
- sub_8139C2C(floorDelta, data[6]);
+ MoveElevatorWindowLights(floorDelta, data[6]);
PlaySE(SE_ELEBETA);
}
-static void sub_8139AF4(u8 taskId)
+static void Task_MoveElevator(u8 taskId)
{
s16 *data = gTasks[taskId].data;
data[1]++;
@@ -1867,6 +1882,8 @@ static void sub_8139AF4(u8 taskId)
data[2]++;
data[4] = -data[4];
SetCameraPanning(0, data[4]);
+
+ // arrived at floor
if (data[2] == data[5])
{
PlaySE(SE_PINPON);
@@ -1877,44 +1894,44 @@ static void sub_8139AF4(u8 taskId)
}
}
-void sub_8139B60(void)
+void ShowDeptStoreElevatorFloorSelect(void)
{
int xPos;
- gUnknown_0203AB5E = AddWindow(&gUnknown_085B2BAC);
- SetStandardWindowBorderStyle(gUnknown_0203AB5E, 0);
+ sTutorMoveAndElevatorWindowId = AddWindow(&gElevatorFloor_WindowTemplate);
+ SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, 0);
xPos = GetStringCenterAlignXOffset(1, gText_ElevatorNowOn, 64);
- AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
+ AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
- xPos = GetStringCenterAlignXOffset(1, gElevatorFloorsTable[gSpecialVar_0x8005], 64);
- AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gElevatorFloorsTable[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
+ xPos = GetStringCenterAlignXOffset(1, gDeptStoreFloorNames[gSpecialVar_0x8005], 64);
+ AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
- PutWindowTilemap(gUnknown_0203AB5E);
- CopyWindowToVram(gUnknown_0203AB5E, 3);
+ PutWindowTilemap(sTutorMoveAndElevatorWindowId);
+ CopyWindowToVram(sTutorMoveAndElevatorWindowId, 3);
}
-void sub_8139C10(void)
+void CloseDeptStoreElevatorWindow(void)
{
- ClearStdWindowAndFrameToTransparent(gUnknown_0203AB5E, TRUE);
- RemoveWindow(gUnknown_0203AB5E);
+ ClearStdWindowAndFrameToTransparent(sTutorMoveAndElevatorWindowId, TRUE);
+ RemoveWindow(sTutorMoveAndElevatorWindowId);
}
-static void sub_8139C2C(u16 a1, bool8 descending)
+static void MoveElevatorWindowLights(u16 floorDelta, bool8 descending)
{
- static const u8 gUnknown_085B2C21[] = { 0x03, 0x06, 0x09, 0x0c, 0x0f, 0x12, 0x15, 0x18, 0x1b };
+ static const u8 sElevatorLightCycles[] = { 3, 6, 9, 12, 15, 18, 21, 24, 27 };
- if (FuncIsActiveTask(MoveElevatorWindowLights) != TRUE)
+ if (FuncIsActiveTask(Task_MoveElevatorWindowLights) != TRUE)
{
- u8 taskId = CreateTask(MoveElevatorWindowLights, 8);
+ u8 taskId = CreateTask(Task_MoveElevatorWindowLights, 8);
gTasks[taskId].data[0] = 0;
gTasks[taskId].data[1] = 0;
gTasks[taskId].data[2] = descending;
- gTasks[taskId].data[3] = gUnknown_085B2C21[a1];
+ gTasks[taskId].data[3] = sElevatorLightCycles[floorDelta];
}
}
-static void MoveElevatorWindowLights(u8 taskId)
+static void Task_MoveElevatorWindowLights(u8 taskId)
{
u8 x, y;
s16 *data = gTasks[taskId].data;
@@ -1922,6 +1939,8 @@ static void MoveElevatorWindowLights(u8 taskId)
if (data[1] == 6)
{
data[0]++;
+
+ // ascending
if (data[2] == FALSE)
{
for (y = 0; y < 3; y++)
@@ -1932,6 +1951,7 @@ static void MoveElevatorWindowLights(u8 taskId)
}
}
}
+ // descending
else
{
for (y = 0; y < 3; y++)
@@ -1952,7 +1972,7 @@ static void MoveElevatorWindowLights(u8 taskId)
data[1]++;
}
-void sub_8139D98(void)
+void BufferVarsForIVRater(void)
{
u8 i;
u32 ivStorage[NUM_STATS];
@@ -1993,16 +2013,37 @@ void sub_8139D98(void)
}
}
-bool8 warp0_in_pokecenter(void)
-{
- static const u16 gUnknown_085B2C2A[] = { 0x0202, 0x0301, 0x0405, 0x0504, 0x0604, 0x0700, 0x0804, 0x090b, 0x0a05, 0x0b05, 0x0c02, 0x0d06, 0x0e03, 0x0f02, 0x100c, 0x100a, 0x1a35, 0x193c, 0xFFFF };
+bool8 UsedPokemonCenterWarp(void)
+{
+ static const u16 sPokemonCenters[] =
+ {
+ MAP_OLDALE_TOWN_POKEMON_CENTER_1F,
+ MAP_DEWFORD_TOWN_POKEMON_CENTER_1F,
+ MAP_LAVARIDGE_TOWN_POKEMON_CENTER_1F,
+ MAP_FALLARBOR_TOWN_POKEMON_CENTER_1F,
+ MAP_VERDANTURF_TOWN_POKEMON_CENTER_1F,
+ MAP_PACIFIDLOG_TOWN_POKEMON_CENTER_1F,
+ MAP_PETALBURG_CITY_POKEMON_CENTER_1F,
+ MAP_SLATEPORT_CITY_POKEMON_CENTER_1F,
+ MAP_MAUVILLE_CITY_POKEMON_CENTER_1F,
+ MAP_RUSTBORO_CITY_POKEMON_CENTER_1F,
+ MAP_FORTREE_CITY_POKEMON_CENTER_1F,
+ MAP_LILYCOVE_CITY_POKEMON_CENTER_1F,
+ MAP_MOSSDEEP_CITY_POKEMON_CENTER_1F,
+ MAP_SOOTOPOLIS_CITY_POKEMON_CENTER_1F,
+ MAP_EVER_GRANDE_CITY_POKEMON_CENTER_1F,
+ MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F,
+ MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F,
+ MAP_UNION_ROOM,
+ 0xFFFF
+ };
int i;
u16 map = (gLastUsedWarp.mapGroup << 8) + gLastUsedWarp.mapNum;
- for (i = 0; gUnknown_085B2C2A[i] != 0xFFFF; i++)
+ for (i = 0; sPokemonCenters[i] != 0xFFFF; i++)
{
- if (gUnknown_085B2C2A[i] == map)
+ if (sPokemonCenters[i] == map)
return TRUE;
}
@@ -2018,130 +2059,191 @@ bool32 sub_8139ED0(void)
return TRUE;
}
-void UpdateFrontierManiac(u16 a0)
+void UpdateFrontierManiac(u16 daysSince)
{
u16 *var = GetVarPointer(VAR_FRONTIER_MANIAC_FACILITY);
- *var += a0;
- *var %= 10;
-}
-
-void sub_8139F20(void)
-{
- static const u8 *const gUnknown_085B2C50[][3] = {
- { BattleFrontier_Lounge2_Text_260971, BattleFrontier_Lounge2_Text_260A1E, BattleFrontier_Lounge2_Text_260AE7 },
- { BattleFrontier_Lounge2_Text_2619AC, BattleFrontier_Lounge2_Text_261A91, BattleFrontier_Lounge2_Text_261B0C },
- { BattleFrontier_Lounge2_Text_261B95, BattleFrontier_Lounge2_Text_261B95, BattleFrontier_Lounge2_Text_261B95 },
- { BattleFrontier_Lounge2_Text_261C1A, BattleFrontier_Lounge2_Text_261C1A, BattleFrontier_Lounge2_Text_261C1A },
- { BattleFrontier_Lounge2_Text_260BC4, BattleFrontier_Lounge2_Text_260C6D, BattleFrontier_Lounge2_Text_260D3A },
- { BattleFrontier_Lounge2_Text_260E1E, BattleFrontier_Lounge2_Text_260EC7, BattleFrontier_Lounge2_Text_260F74 },
- { BattleFrontier_Lounge2_Text_2614E6, BattleFrontier_Lounge2_Text_261591, BattleFrontier_Lounge2_Text_26166F },
- { BattleFrontier_Lounge2_Text_261282, BattleFrontier_Lounge2_Text_261329, BattleFrontier_Lounge2_Text_261403 },
- { BattleFrontier_Lounge2_Text_261026, BattleFrontier_Lounge2_Text_2610CC, BattleFrontier_Lounge2_Text_261194 },
- { BattleFrontier_Lounge2_Text_26174D, BattleFrontier_Lounge2_Text_2617F9, BattleFrontier_Lounge2_Text_2618C4 },
+ *var += daysSince;
+ *var %= FRONTIER_MANIAC_FACILITY_COUNT;
+}
+
+void ShowFrontierManiacMessage(void)
+{
+ static const u8 *const sFrontierManiacMessages[][FRONTIER_MANIAC_MESSAGE_COUNT] =
+ {
+ [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] =
+ {
+ BattleFrontier_Lounge2_Text_260971,
+ BattleFrontier_Lounge2_Text_260A1E,
+ BattleFrontier_Lounge2_Text_260AE7
+ },
+ [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] =
+ {
+ BattleFrontier_Lounge2_Text_2619AC,
+ BattleFrontier_Lounge2_Text_261A91,
+ BattleFrontier_Lounge2_Text_261B0C
+ },
+ [FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] =
+ {
+ BattleFrontier_Lounge2_Text_261B95,
+ BattleFrontier_Lounge2_Text_261B95,
+ BattleFrontier_Lounge2_Text_261B95
+ },
+ [FRONTIER_MANIAC_BATTLE_TOWER_LINK_MULTIS] =
+ {
+ BattleFrontier_Lounge2_Text_261C1A,
+ BattleFrontier_Lounge2_Text_261C1A,
+ BattleFrontier_Lounge2_Text_261C1A
+ },
+ [FRONTIER_MANIAC_BATTLE_DOME] =
+ {
+ BattleFrontier_Lounge2_Text_260BC4,
+ BattleFrontier_Lounge2_Text_260C6D,
+ BattleFrontier_Lounge2_Text_260D3A
+ },
+ [FRONTIER_MANIAC_BATTLE_FACTORY] =
+ {
+ BattleFrontier_Lounge2_Text_260E1E,
+ BattleFrontier_Lounge2_Text_260EC7,
+ BattleFrontier_Lounge2_Text_260F74
+ },
+ [FRONTIER_MANIAC_BATTLE_PALACE] =
+ {
+ BattleFrontier_Lounge2_Text_2614E6,
+ BattleFrontier_Lounge2_Text_261591,
+ BattleFrontier_Lounge2_Text_26166F
+ },
+ [FRONTIER_MANIAC_BATTLE_ARENA] =
+ {
+ BattleFrontier_Lounge2_Text_261282,
+ BattleFrontier_Lounge2_Text_261329,
+ BattleFrontier_Lounge2_Text_261403
+ },
+ [FRONTIER_MANIAC_BATTLE_PIKE] =
+ {
+ BattleFrontier_Lounge2_Text_261026,
+ BattleFrontier_Lounge2_Text_2610CC,
+ BattleFrontier_Lounge2_Text_261194
+ },
+ [FRONTIER_MANIAC_BATTLE_PYRAMID] =
+ {
+ BattleFrontier_Lounge2_Text_26174D,
+ BattleFrontier_Lounge2_Text_2617F9,
+ BattleFrontier_Lounge2_Text_2618C4
+ },
};
- static const u8 gUnknown_085B2CC8[][2] = {
- { 0x15, 0x38 },
- { 0x15, 0x23 },
- { 0xff, 0xff },
- { 0xff, 0xff },
- { 0x02, 0x04 },
- { 0x07, 0x15 },
- { 0x07, 0x15 },
- { 0x0e, 0x1c },
- { 0x0d, 0x70 },
- { 0x07, 0x38 }
+ static const u8 sFrontierManiacStreakThresholds[][FRONTIER_MANIAC_MESSAGE_COUNT - 1] =
+ {
+ [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] = { 21, 56 },
+ [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] = { 21, 35 },
+ [FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] = { 255, 255 },
+ [FRONTIER_MANIAC_BATTLE_TOWER_LINK_MULTIS] = { 255, 255 },
+ [FRONTIER_MANIAC_BATTLE_DOME] = { 2, 4 },
+ [FRONTIER_MANIAC_BATTLE_FACTORY] = { 7, 21 },
+ [FRONTIER_MANIAC_BATTLE_PALACE] = { 7, 21 },
+ [FRONTIER_MANIAC_BATTLE_ARENA] = { 14, 28 },
+ [FRONTIER_MANIAC_BATTLE_PIKE] = { 13, 112 }, //BUG: 112 (0x70) is probably a mistake; the Pike Queen is battled twice well before that
+ [FRONTIER_MANIAC_BATTLE_PYRAMID] = { 7, 56 }
};
u8 i;
- u16 unk = 0;
- u16 var = VarGet(VAR_FRONTIER_MANIAC_FACILITY);
- switch (var)
+ u16 winStreak = 0;
+ u16 facility = VarGet(VAR_FRONTIER_MANIAC_FACILITY);
+
+ switch (facility)
{
- case 0:
- case 1:
- case 2:
- case 3:
- if (gSaveBlock2Ptr->frontier.towerWinStreaks[var][0] >= gSaveBlock2Ptr->frontier.towerWinStreaks[var][1])
+ case FRONTIER_MANIAC_BATTLE_TOWER_SINGLES:
+ case FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES:
+ case FRONTIER_MANIAC_BATTLE_TOWER_MULTIS:
+ case FRONTIER_MANIAC_BATTLE_TOWER_LINK_MULTIS:
+ if (gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50]
+ >= gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN])
{
- unk = gSaveBlock2Ptr->frontier.towerWinStreaks[var][0];
+ winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50];
}
else
{
- unk = gSaveBlock2Ptr->frontier.towerWinStreaks[var][1];
+ winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN];
}
break;
- case 4:
- if (gSaveBlock2Ptr->frontier.domeWinStreaks[0][0] >= gSaveBlock2Ptr->frontier.domeWinStreaks[0][1])
+ case FRONTIER_MANIAC_BATTLE_DOME:
+ if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]
+ >= gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN])
{
- unk = gSaveBlock2Ptr->frontier.domeWinStreaks[0][0];
+ winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50];
}
else
{
- unk = gSaveBlock2Ptr->frontier.domeWinStreaks[0][1];
+ winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN];
}
break;
- case 5:
- if (gSaveBlock2Ptr->frontier.factoryWinStreaks[0][0] >= gSaveBlock2Ptr->frontier.factoryWinStreaks[0][1])
+ case FRONTIER_MANIAC_BATTLE_FACTORY:
+ if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]
+ >= gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN])
{
- unk = gSaveBlock2Ptr->frontier.factoryWinStreaks[0][0];
+ winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50];
}
else
{
- unk = gSaveBlock2Ptr->frontier.factoryWinStreaks[0][1];
+ winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN];
}
break;
- case 6:
- if (gSaveBlock2Ptr->frontier.palaceWinStreaks[0][0] >= gSaveBlock2Ptr->frontier.palaceWinStreaks[0][1])
+ case FRONTIER_MANIAC_BATTLE_PALACE:
+ if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]
+ >= gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN])
{
- unk = gSaveBlock2Ptr->frontier.palaceWinStreaks[0][0];
+ winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50];
}
else
{
- unk = gSaveBlock2Ptr->frontier.palaceWinStreaks[0][1];
+ winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN];
}
break;
- case 7:
- if (gSaveBlock2Ptr->frontier.arenaWinStreaks[0] >= gSaveBlock2Ptr->frontier.arenaWinStreaks[1])
+ case FRONTIER_MANIAC_BATTLE_ARENA:
+ if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50]
+ >= gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN])
{
- unk = gSaveBlock2Ptr->frontier.arenaWinStreaks[0];
+ winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50];
}
else
{
- unk = gSaveBlock2Ptr->frontier.arenaWinStreaks[1];
+ winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN];
}
break;
- case 8:
- if (gSaveBlock2Ptr->frontier.pikeWinStreaks[0] >= gSaveBlock2Ptr->frontier.pikeWinStreaks[1])
+ case FRONTIER_MANIAC_BATTLE_PIKE:
+ if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50]
+ >= gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN])
{
- unk = gSaveBlock2Ptr->frontier.pikeWinStreaks[0];
+ winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50];
}
else
{
- unk = gSaveBlock2Ptr->frontier.pikeWinStreaks[1];
+ winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN];
}
break;
- case 9:
- if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[0] >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[1])
+ case FRONTIER_MANIAC_BATTLE_PYRAMID:
+ if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50]
+ >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN])
{
- unk = gSaveBlock2Ptr->frontier.pyramidWinStreaks[0];
+ winStreak = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50];
}
else
{
- unk = gSaveBlock2Ptr->frontier.pyramidWinStreaks[1];
+ winStreak = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN];
}
break;
}
- for (i = 0; i < 2 && gUnknown_085B2CC8[var][i] < unk; i++);
+ for (i = 0; i < FRONTIER_MANIAC_MESSAGE_COUNT - 1 && sFrontierManiacStreakThresholds[facility][i] < winStreak; i++);
- ShowFieldMessage(gUnknown_085B2C50[var][i]);
+ ShowFieldMessage(sFrontierManiacMessages[facility][i]);
}
-void sub_813A080(void)
+// gSpecialVar_0x8005 and 0x8006 here are used by MoveElevator
+void BufferBattleTowerElevatorFloors(void)
{
- static const u16 gUnknown_085B2CDC[] = {
- 0x0007, 0x000e, 0x0015, 0x001c, 0x0023, 0x0031, 0x003f, 0x004d, 0x005b, 0x0000
+ static const u16 sBattleTowerStreakThresholds[] = {
+ 7, 14, 21, 28, 35, 49, 63, 77, 91, 0
};
u8 i;
@@ -2155,9 +2257,9 @@ void sub_813A080(void)
return;
}
- for (i = 0; i < 9; i++)
+ for (i = 0; i < ARRAY_COUNT(sBattleTowerStreakThresholds) - 1; i++)
{
- if (gUnknown_085B2CDC[i] > gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode])
+ if (sBattleTowerStreakThresholds[i] > gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode])
{
gSpecialVar_0x8005 = 4;
gSpecialVar_0x8006 = i + 5;
@@ -2169,161 +2271,166 @@ void sub_813A080(void)
gSpecialVar_0x8006 = 12;
}
-void sub_813A128(void)
-{
- u8 taskId = CreateTask(sub_813A2DC, 8);
+// 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 0:
- 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;
+ case SCROLL_MULTI_NONE:
+ 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 1:
- task->data[0] = 5;
- 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;
+ case SCROLL_MULTI_GLASS_WORKSHOP_VENDOR:
+ 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 2:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_POKEMON_FAN_CLUB_RATER:
+ 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 3:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1:
+ 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 4:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
+ 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 5:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR:
+ 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 6:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR:
+ 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 7:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_BERRY_POWDER_VENDOR:
+ 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 8:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_BF_RECEPTIONIST:
+ 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 9:
- case 10:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_BF_MOVE_TUTOR_1:
+ case SCROLL_MULTI_BF_MOVE_TUTOR_2:
+ 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 11:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_SS_TIDAL_DESTINATION:
+ 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 12:
- task->data[0] = 6;
- 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;
+ case SCROLL_MULTI_BATTLE_TENT_RULES:
+ 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 gUnknown_085B2CF0[][16] = {
+static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] =
+{
+ [SCROLL_MULTI_NONE] =
{
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_GLASS_WORKSHOP_VENDOR] =
{
gText_BlueFlute,
gText_YellowFlute,
@@ -2332,16 +2439,9 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_BlackFlute,
gText_PrettyChair,
gText_PrettyDesk,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_POKEMON_FAN_CLUB_RATER] =
{
gText_0Pts,
gText_10Pts,
@@ -2354,12 +2454,9 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_80Pts,
gText_90Pts,
gText_100Pts,
- gText_QuestionMark,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_QuestionMark
},
+ [SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1] =
{
gText_KissPoster16BP,
gText_KissCushion32BP,
@@ -2371,31 +2468,18 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_CyndaquilDoll80BP,
gText_ChikoritaDoll80BP,
gText_TotodileDoll80BP,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2] =
{
gText_LaprasDoll128BP,
gText_SnorlaxDoll128BP,
gText_VenusaurDoll256BP,
gText_CharizardDoll256BP,
gText_BlastoiseDoll256BP,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR] =
{
gText_Protein1BP,
gText_Calcium1BP,
@@ -2403,17 +2487,9 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_Zinc1BP,
gText_Carbos1BP,
gText_HpUp1BP,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR] =
{
gText_Leftovers48BP,
gText_WhiteHerb48BP,
@@ -2424,14 +2500,9 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_KingsRock64BP,
gText_FocusBand64BP,
gText_ScopeLens64BP,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_BERRY_POWDER_VENDOR] =
{
gText_EnergyPowder50,
gText_EnergyRoot80,
@@ -2444,12 +2515,9 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_Zinc1000,
gText_HPUp1000,
gText_PPUp3000,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_BF_RECEPTIONIST] =
{
gText_BattleTower2,
gText_BattleDome,
@@ -2460,14 +2528,9 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_BattlePyramid,
gText_RankingHall,
gText_ExchangeService,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_BF_MOVE_TUTOR_1] =
{
gText_Softboiled16BP,
gText_SeismicToss24BP,
@@ -2479,13 +2542,9 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_Counter48BP,
gText_ThunderWave48BP,
gText_SwordsDance48BP,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_BF_MOVE_TUTOR_2] =
{
gText_DefenseCurl16BP,
gText_Snore24BP,
@@ -2497,13 +2556,9 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_IcePunch48BP,
gText_ThunderPunch48BP,
gText_FirePunch48BP,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_SS_TIDAL_DESTINATION] =
{
gText_SlateportCity,
gText_BattleFrontier,
@@ -2511,17 +2566,9 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_NavelRock,
gText_BirthIsland,
gText_FarawayIsland,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
},
+ [SCROLL_MULTI_BATTLE_TENT_RULES] =
{
gText_BattleTrainers,
gText_BattleBasics,
@@ -2529,142 +2576,134 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
gText_PokemonMoves,
gText_Underpowered,
gText_WhenInDanger,
- gText_Exit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ gText_Exit
}
};
-static void sub_813A2DC(u8 taskId)
+static void Task_ShowScrollableMultichoice(u8 taskId)
{
- u32 unk1;
+ u32 width;
u8 i, windowId;
struct WindowTemplate template;
struct Task *task = &gTasks[taskId];
ScriptContext2_Enable();
- gUnknown_0203AB68 = 0;
- gUnknown_0203AB6C = 0x40;
- sub_813AA60(task->data[11], 0);
- sub_813ACE8(task->data[11], 0);
- gUnknown_0203AB64 = AllocZeroed(task->data[1] * 8);
- gUnknown_0203AB6A = 0;
- sub_813A42C();
+ sScrollableMultichoice_ScrollOffset = 0;
+ sScrollableMultichoice_ItemSpriteId = MAX_SPRITES;
+ 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 = gUnknown_085B2CF0[gSpecialVar_0x8004][i];
- gUnknown_0203AB64[i].name = text;
- gUnknown_0203AB64[i].id = i;
- unk1 = display_text_and_get_width(text, unk1);
+ const u8 *text = sScrollableMultichoiceOptions[gSpecialVar_0x8004][i];
+ sScrollableMultichoice_ListMenuItem[i].name = text;
+ sScrollableMultichoice_ListMenuItem[i].id = i;
+ 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);
- gUnknown_030061D0.totalItems = task->data[1];
- gUnknown_030061D0.maxShowed = task->data[0];
- gUnknown_030061D0.windowId = task->data[13];
+ gScrollableMultichoice_ListMenuTemplate.totalItems = task->tNumItems;
+ gScrollableMultichoice_ListMenuTemplate.maxShowed = task->tMaxItemsOnScreen;
+ gScrollableMultichoice_ListMenuTemplate.windowId = task->tWindowId;
- sub_813A694(taskId);
- task->data[14] = ListMenuInit(&gUnknown_030061D0, task->data[7], task->data[8]);
+ ScrollableMultichoice_UpdateScrollArrows(taskId);
+ task->tListTaskId = ListMenuInit(&gScrollableMultichoice_ListMenuTemplate, task->tScrollOffset, task->tSelectedRow);
schedule_bg_copy_tilemap_to_vram(0);
- gTasks[taskId].func = sub_813A4EC;
+ gTasks[taskId].func = ScrollableMultichoice_ProcessInput;
}
-static void sub_813A42C(void)
+static void InitScrollableMultichoice(void)
{
- gUnknown_030061D0.items = gUnknown_0203AB64;
- gUnknown_030061D0.moveCursorFunc = sub_813A46C;
- gUnknown_030061D0.itemPrintFunc = NULL;
- gUnknown_030061D0.totalItems = 1;
- gUnknown_030061D0.maxShowed = 1;
- gUnknown_030061D0.windowId = 0;
- gUnknown_030061D0.header_X = 0;
- gUnknown_030061D0.item_X = 8;
- gUnknown_030061D0.cursor_X = 0;
- gUnknown_030061D0.upText_Y = 1;
- gUnknown_030061D0.cursorPal = 2;
- gUnknown_030061D0.fillValue = 1;
- gUnknown_030061D0.cursorShadowPal = 3;
- gUnknown_030061D0.lettersSpacing = 0;
- gUnknown_030061D0.itemVerticalPadding = 0;
- gUnknown_030061D0.scrollMultiple = 0;
- gUnknown_030061D0.fontId = 1;
- gUnknown_030061D0.cursorKind = 0;
+ gScrollableMultichoice_ListMenuTemplate.items = sScrollableMultichoice_ListMenuItem;
+ gScrollableMultichoice_ListMenuTemplate.moveCursorFunc = ScrollableMultichoice_MoveCursor;
+ gScrollableMultichoice_ListMenuTemplate.itemPrintFunc = NULL;
+ gScrollableMultichoice_ListMenuTemplate.totalItems = 1;
+ gScrollableMultichoice_ListMenuTemplate.maxShowed = 1;
+ gScrollableMultichoice_ListMenuTemplate.windowId = 0;
+ gScrollableMultichoice_ListMenuTemplate.header_X = 0;
+ gScrollableMultichoice_ListMenuTemplate.item_X = 8;
+ gScrollableMultichoice_ListMenuTemplate.cursor_X = 0;
+ gScrollableMultichoice_ListMenuTemplate.upText_Y = 1;
+ gScrollableMultichoice_ListMenuTemplate.cursorPal = 2;
+ gScrollableMultichoice_ListMenuTemplate.fillValue = 1;
+ gScrollableMultichoice_ListMenuTemplate.cursorShadowPal = 3;
+ gScrollableMultichoice_ListMenuTemplate.lettersSpacing = 0;
+ gScrollableMultichoice_ListMenuTemplate.itemVerticalPadding = 0;
+ gScrollableMultichoice_ListMenuTemplate.scrollMultiple = 0;
+ gScrollableMultichoice_ListMenuTemplate.fontId = 1;
+ gScrollableMultichoice_ListMenuTemplate.cursorKind = 0;
}
-static void sub_813A46C(s32 itemIndex, bool8 onInit, struct ListMenu *list)
+static void ScrollableMultichoice_MoveCursor(s32 itemIndex, bool8 onInit, struct ListMenu *list)
{
u8 taskId;
PlaySE(SE_SELECT);
- taskId = FindTaskIdByFunc(sub_813A4EC);
+ taskId = FindTaskIdByFunc(ScrollableMultichoice_ProcessInput);
if (taskId != 0xFF)
{
- u16 misc;
+ u16 selection;
struct Task *task = &gTasks[taskId];
- ListMenuGetScrollAndRow(task->data[14], &misc, NULL);
- gUnknown_0203AB68 = misc;
- ListMenuGetCurrentItemArrayId(task->data[14], &misc);
- sub_813AC44(task->data[11], gUnknown_0203AB6A);
- sub_813AA60(task->data[11], misc);
- sub_813AD34(task->data[11], misc);
- gUnknown_0203AB6A = misc;
+ ListMenuGetScrollAndRow(task->tListTaskId, &selection, NULL);
+ sScrollableMultichoice_ScrollOffset = selection;
+ ListMenuGetCurrentItemArrayId(task->tListTaskId, &selection);
+ HideFrontierExchangeCornerItemIcon(task->tScrollMultiId, sFrontierExchangeCorner_NeverRead);
+ FillFrontierExchangeCornerWindowAndItemIcon(task->tScrollMultiId, selection);
+ ShowBattleFrontierTutorMoveDescription(task->tScrollMultiId, selection);
+ sFrontierExchangeCorner_NeverRead = selection;
}
}
-static void sub_813A4EC(u8 taskId)
+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);
- sub_813A570(taskId);
+ CloseScrollableMultichoice(taskId);
break;
default:
gSpecialVar_Result = input;
PlaySE(SE_SELECT);
- if (!task->data[6])
+ if (!task->tKeepOpenAfterSelect)
{
- sub_813A570(taskId);
+ CloseScrollableMultichoice(taskId);
}
- else if (input == task->data[1] - 1)
+ // if selected option was the last one (Exit)
+ else if (input == task->tNumItems - 1)
{
- sub_813A570(taskId);
+ CloseScrollableMultichoice(taskId);
}
else
{
- sub_813A738(taskId);
+ ScrollableMultichoice_RemoveScrollArrows(taskId);
task->func = sub_813A600;
EnableBothScriptContexts();
}
@@ -2672,37 +2711,39 @@ static void sub_813A4EC(u8 taskId)
}
}
-static void sub_813A570(u8 taskId)
+static void CloseScrollableMultichoice(u8 taskId)
{
- u16 array;
+ u16 selection;
struct Task *task = &gTasks[taskId];
- ListMenuGetCurrentItemArrayId(task->data[14], &array);
- sub_813AC44(task->data[11], array);
- sub_813A738(taskId);
- DestroyListMenuTask(task->data[14], NULL, NULL);
- Free(gUnknown_0203AB64);
- ClearStdWindowAndFrameToTransparent(task->data[13], 1);
- FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0));
- CopyWindowToVram(task->data[13], 2);
- RemoveWindow(task->data[13]);
+ ListMenuGetCurrentItemArrayId(task->tListTaskId, &selection);
+ HideFrontierExchangeCornerItemIcon(task->tScrollMultiId, selection);
+ ScrollableMultichoice_RemoveScrollArrows(taskId);
+ DestroyListMenuTask(task->tListTaskId, NULL, NULL);
+ Free(sScrollableMultichoice_ListMenuItem);
+ 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;
}
}
+// Never called
void sub_813A630(void)
{
u8 taskId = FindTaskIdByFunc(sub_813A600);
@@ -2712,20 +2753,20 @@ void sub_813A630(void)
}
else
{
- gTasks[taskId].data[6]++;
+ gTasks[taskId].tKeepOpenAfterSelect++;
}
}
static void sub_813A664(u8 taskId)
{
ScriptContext2_Enable();
- sub_813A694(taskId);
- gTasks[taskId].func = sub_813A4EC;
+ ScrollableMultichoice_UpdateScrollArrows(taskId);
+ gTasks[taskId].func = ScrollableMultichoice_ProcessInput;
}
-static void sub_813A694(u8 taskId)
+static void ScrollableMultichoice_UpdateScrollArrows(u8 taskId)
{
- static const struct ScrollArrowsTemplate gUnknown_085B3030 = {
+ static const struct ScrollArrowsTemplate sScrollableMultichoice_ScrollArrowsTemplate = {
.firstArrowType = SCROLL_ARROW_UP,
.firstX = 0,
.firstY = 0,
@@ -2740,34 +2781,51 @@ static void sub_813A694(u8 taskId)
};
struct Task *task = &gTasks[taskId];
- struct ScrollArrowsTemplate template = gUnknown_085B3030;
- if (task->data[0] != task->data[1])
+ struct ScrollArrowsTemplate template = sScrollableMultichoice_ScrollArrowsTemplate;
+ 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, &gUnknown_0203AB68);
+ template.fullyDownThreshold = task->data[1] - task->tMaxItemsOnScreen;
+ task->tScrollArrowId = AddScrollIndicatorArrowPair(&template, &sScrollableMultichoice_ScrollOffset);
}
}
-static void sub_813A738(u8 taskId)
+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);
}
}
-void nullsub_55(void)
+// Removed for Emerald (replaced by ShowScrollableMultichoice)
+void ShowGlassWorkshopMenu(void)
{
-
+ /*
+ u8 i;
+ ScriptContext2_Enable();
+ Menu_DrawStdWindowFrame(0, 0, 10, 11);
+ InitMenu(0, 1, 1, 5, 0, 9);
+ gUnknown_0203925C = 0;
+ ClearVerticalScrollIndicatorPalettes();
+ LoadScrollIndicatorPalette();
+ sub_810F2B4();
+ for (i = 0; i < 5; i++)
+ {
+ Menu_PrintText(gUnknown_083F83C0[i], 1, 2 * i + 1);
+ }
+ gUnknown_0203925B = 0;
+ gUnknown_0203925A = ARRAY_COUNT(gUnknown_083F83C0);
+ CreateTask(sub_810F118, 8);
+ */
}
-void sub_813A76C(void)
+void SetBattleTowerLinkPlayerGfx(void)
{
u8 i;
for (i = 0; i < 2; i++)
@@ -2783,34 +2841,34 @@ void sub_813A76C(void)
}
}
-void sub_813A7B8(void)
-{
- static const u8 *const gUnknown_085B3040[] = {
- BattleFrontier_Lounge5_Text_26468D,
- BattleFrontier_Lounge5_Text_2646E5,
- BattleFrontier_Lounge5_Text_264741,
- BattleFrontier_Lounge5_Text_2647A4,
- BattleFrontier_Lounge5_Text_2647FC,
- BattleFrontier_Lounge5_Text_264858,
- BattleFrontier_Lounge5_Text_2648BE,
- BattleFrontier_Lounge5_Text_264916,
- BattleFrontier_Lounge5_Text_264972,
- BattleFrontier_Lounge5_Text_2649D5,
- BattleFrontier_Lounge5_Text_264A3F,
- BattleFrontier_Lounge5_Text_264A9B,
- BattleFrontier_Lounge5_Text_264AF3,
- BattleFrontier_Lounge5_Text_264B5D,
- BattleFrontier_Lounge5_Text_2648BE,
- BattleFrontier_Lounge5_Text_264BC3,
- BattleFrontier_Lounge5_Text_264C36,
- BattleFrontier_Lounge5_Text_2648BE,
- BattleFrontier_Lounge5_Text_264C95,
- BattleFrontier_Lounge5_Text_264D01,
- BattleFrontier_Lounge5_Text_264D6B,
- BattleFrontier_Lounge5_Text_264DD7,
- BattleFrontier_Lounge5_Text_264E33,
- BattleFrontier_Lounge5_Text_264E8F,
- BattleFrontier_Lounge5_Text_2648BE,
+void ShowNatureGirlMessage(void)
+{
+ static const u8 *const sNatureGirlMessages[] = {
+ [NATURE_HARDY] = BattleFrontier_Lounge5_Text_NatureGirlHardy,
+ [NATURE_LONELY] = BattleFrontier_Lounge5_Text_NatureGirlLonely,
+ [NATURE_BRAVE] = BattleFrontier_Lounge5_Text_NatureGirlBrave,
+ [NATURE_ADAMANT] = BattleFrontier_Lounge5_Text_NatureGirlAdamant,
+ [NATURE_NAUGHTY] = BattleFrontier_Lounge5_Text_NatureGirlNaughty,
+ [NATURE_BOLD] = BattleFrontier_Lounge5_Text_NatureGirlBold,
+ [NATURE_DOCILE] = BattleFrontier_Lounge5_Text_NatureGirlDocileNaiveQuietQuirky,
+ [NATURE_RELAXED] = BattleFrontier_Lounge5_Text_NatureGirlRelaxed,
+ [NATURE_IMPISH] = BattleFrontier_Lounge5_Text_NatureGirlImpish,
+ [NATURE_LAX] = BattleFrontier_Lounge5_Text_NatureGirlLax,
+ [NATURE_TIMID] = BattleFrontier_Lounge5_Text_NatureGirlTimid,
+ [NATURE_HASTY] = BattleFrontier_Lounge5_Text_NatureGirlHasty,
+ [NATURE_SERIOUS] = BattleFrontier_Lounge5_Text_NatureGirlSerious,
+ [NATURE_JOLLY] = BattleFrontier_Lounge5_Text_NatureGirlJolly,
+ [NATURE_NAIVE] = BattleFrontier_Lounge5_Text_NatureGirlDocileNaiveQuietQuirky,
+ [NATURE_MODEST] = BattleFrontier_Lounge5_Text_NatureGirlModest,
+ [NATURE_MILD] = BattleFrontier_Lounge5_Text_NatureGirlMild,
+ [NATURE_QUIET] = BattleFrontier_Lounge5_Text_NatureGirlDocileNaiveQuietQuirky,
+ [NATURE_BASHFUL] = BattleFrontier_Lounge5_Text_NatureGirlBashful,
+ [NATURE_RASH] = BattleFrontier_Lounge5_Text_NatureGirlRash,
+ [NATURE_CALM] = BattleFrontier_Lounge5_Text_NatureGirlCalm,
+ [NATURE_GENTLE] = BattleFrontier_Lounge5_Text_NatureGirlGentle,
+ [NATURE_SASSY] = BattleFrontier_Lounge5_Text_NatureGirlSassy,
+ [NATURE_CAREFUL] = BattleFrontier_Lounge5_Text_NatureGirlCareful,
+ [NATURE_QUIRKY] = BattleFrontier_Lounge5_Text_NatureGirlDocileNaiveQuietQuirky,
};
u8 nature;
@@ -2821,19 +2879,20 @@ void sub_813A7B8(void)
}
nature = GetNature(&gPlayerParty[gSpecialVar_0x8004]);
- ShowFieldMessage(gUnknown_085B3040[nature]);
+ ShowFieldMessage(sNatureGirlMessages[nature]);
}
-void UpdateFrontierGambler(u16 a0)
+void UpdateFrontierGambler(u16 daysSince)
{
- u16 *var = GetVarPointer(VAR_FRONTIER_GAMBLER_FACILITY);
- *var += a0;
- *var %= 12;
+ u16 *var = GetVarPointer(VAR_FRONTIER_GAMBLER_CHALLENGE);
+ *var += daysSince;
+ *var %= FRONTIER_GAMBLER_CHALLENGE_COUNT;
}
-void sub_813A820(void)
+void ShowFrontierGamblerLookingMessage(void)
{
- static const u8 *const gUnknown_085B30A4[] = {
+ static const u8 *const sFrontierGamblerLookingMessages[] =
+ {
BattleFrontier_Lounge3_Text_262261,
BattleFrontier_Lounge3_Text_26230D,
BattleFrontier_Lounge3_Text_2623B9,
@@ -2848,14 +2907,15 @@ void sub_813A820(void)
BattleFrontier_Lounge3_Text_2629BC,
};
- u16 var = VarGet(VAR_FRONTIER_GAMBLER_FACILITY);
- ShowFieldMessage(gUnknown_085B30A4[var]);
- VarSet(VAR_FRONTIER_GAMBLER_SET_FACILITY_F, var);
+ u16 challenge = VarGet(VAR_FRONTIER_GAMBLER_CHALLENGE);
+ ShowFieldMessage(sFrontierGamblerLookingMessages[challenge]);
+ VarSet(VAR_FRONTIER_GAMBLER_SET_CHALLENGE, challenge);
}
-void sub_813A854(void)
+void ShowFrontierGamblerGoMessage(void)
{
- static const u8 *const gUnknown_085B30D4[] = {
+ static const u8 *const sFrontierGamblerGoMessages[] =
+ {
BattleFrontier_Lounge3_Text_262C04,
BattleFrontier_Lounge3_Text_262C90,
BattleFrontier_Lounge3_Text_262D1C,
@@ -2870,45 +2930,59 @@ void sub_813A854(void)
BattleFrontier_Lounge3_Text_263211,
};
- ShowFieldMessage(gUnknown_085B30D4[VarGet(VAR_FRONTIER_GAMBLER_SET_FACILITY_F)]);
+ ShowFieldMessage(sFrontierGamblerGoMessages[VarGet(VAR_FRONTIER_GAMBLER_SET_CHALLENGE)]);
}
-void sub_813A878(u8 a0)
+void FrontierGamblerSetWonOrLost(bool8 won)
{
- static const u16 gUnknown_085B3104[] = {0x0000, 0x0001, 0x0002, 0x0100, 0x0101, 0x0400, 0x0401, 0x0200, 0x0201, 0x0300, 0x0500, 0x0600};
+ static const u16 sFrontierChallenges[] =
+ {
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_TOWER, FRONTIER_MODE_SINGLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_TOWER, FRONTIER_MODE_DOUBLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_TOWER, FRONTIER_MODE_MULTIS),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_DOME, FRONTIER_MODE_SINGLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_DOME, FRONTIER_MODE_DOUBLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_SINGLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_DOUBLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_SINGLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_DOUBLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_ARENA, FRONTIER_MODE_SINGLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_PIKE, FRONTIER_MODE_SINGLES),
+ FRONTIER_CHALLENGE(FRONTIER_FACILITY_PYRAMID, FRONTIER_MODE_SINGLES)
+ };
u16 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
- u16 var2 = VarGet(VAR_FRONTIER_GAMBLER_SET_FACILITY_F);
+ u16 challenge = VarGet(VAR_FRONTIER_GAMBLER_SET_CHALLENGE);
u16 frontierFacilityId = VarGet(VAR_FRONTIER_FACILITY);
- if (VarGet(VAR_FRONTIER_GAMBLER_PLACED_BET_F) == 1)
+ if (VarGet(VAR_FRONTIER_GAMBLER_STATE) == FRONTIER_GAMBLER_PLACED_BET)
{
- if (gUnknown_085B3104[var2] == (frontierFacilityId << 8) + battleMode)
+ if (sFrontierChallenges[challenge] == FRONTIER_CHALLENGE(frontierFacilityId, battleMode))
{
- if (a0 != 0)
+ if (won)
{
- VarSet(VAR_FRONTIER_GAMBLER_PLACED_BET_F, 2);
+ VarSet(VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON);
}
else
{
- VarSet(VAR_FRONTIER_GAMBLER_PLACED_BET_F, 3);
+ VarSet(VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_LOST);
}
}
}
}
-void sub_813A8FC(void)
+void UpdateBattlePointsWindow(void)
{
u8 string[32];
u32 x;
StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.battlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP);
x = GetStringRightAlignXOffset(1, string, 48);
- AddTextPrinterParameterized(gUnknown_0203AB6D, 1, string, x, 1, 0, NULL);
+ AddTextPrinterParameterized(sBattlePointsWindowId, 1, string, x, 1, 0, NULL);
}
-void sub_813A958(void)
+void ShowBattlePointsWindow(void)
{
- static const struct WindowTemplate gUnknown_085B311C = {
+ static const struct WindowTemplate sBattlePoints_WindowTemplate = {
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 1,
@@ -2918,19 +2992,19 @@ void sub_813A958(void)
.baseBlock = 8,
};
- gUnknown_0203AB6D = AddWindow(&gUnknown_085B311C);
- SetStandardWindowBorderStyle(gUnknown_0203AB6D, 0);
- sub_813A8FC();
- CopyWindowToVram(gUnknown_0203AB6D, 2);
+ sBattlePointsWindowId = AddWindow(&sBattlePoints_WindowTemplate);
+ SetStandardWindowBorderStyle(sBattlePointsWindowId, 0);
+ UpdateBattlePointsWindow();
+ CopyWindowToVram(sBattlePointsWindowId, 2);
}
-void sub_813A988(void)
+void CloseBattlePointsWindow(void)
{
- ClearStdWindowAndFrameToTransparent(gUnknown_0203AB6D, TRUE);
- RemoveWindow(gUnknown_0203AB6D);
+ ClearStdWindowAndFrameToTransparent(sBattlePointsWindowId, TRUE);
+ RemoveWindow(sBattlePointsWindowId);
}
-void sub_813A9A4(void)
+void TakeFrontierBattlePoints(void)
{
if (gSaveBlock2Ptr->frontier.battlePoints < gSpecialVar_0x8004)
{
@@ -2942,11 +3016,11 @@ void sub_813A9A4(void)
}
}
-void sub_813A9D0(void)
+void GiveFrontierBattlePoints(void)
{
- if (gSaveBlock2Ptr->frontier.battlePoints + gSpecialVar_0x8004 > 9999)
+ if (gSaveBlock2Ptr->frontier.battlePoints + gSpecialVar_0x8004 > MAX_BATTLE_FRONTIER_POINTS)
{
- gSaveBlock2Ptr->frontier.battlePoints = 9999;
+ gSaveBlock2Ptr->frontier.battlePoints = MAX_BATTLE_FRONTIER_POINTS;
}
else
{
@@ -2954,14 +3028,14 @@ void sub_813A9D0(void)
}
}
-u16 sub_813AA04(void)
+u16 GetFrontierBattlePoints(void)
{
return gSaveBlock2Ptr->frontier.battlePoints;
}
-void sub_813AA18(void)
+void ShowFrontierExchangeCornerItemIconWindow(void)
{
- static const struct WindowTemplate gUnknown_085B3124 = {
+ static const struct WindowTemplate sFrontierExchangeCorner_ItemIconWindowTemplate = {
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 9,
@@ -2971,159 +3045,139 @@ void sub_813AA18(void)
.baseBlock = 20,
};
- gUnknown_0203AB6E = AddWindow(&gUnknown_085B3124);
- SetStandardWindowBorderStyle(gUnknown_0203AB6E, 0);
- CopyWindowToVram(gUnknown_0203AB6E, 2);
+ sFrontierExchangeCorner_ItemIconWindowId = AddWindow(&sFrontierExchangeCorner_ItemIconWindowTemplate);
+ SetStandardWindowBorderStyle(sFrontierExchangeCorner_ItemIconWindowId, 0);
+ CopyWindowToVram(sFrontierExchangeCorner_ItemIconWindowId, 2);
}
-void sub_813AA44(void)
+void CloseFrontierExchangeCornerItemIconWindow(void)
{
- ClearStdWindowAndFrameToTransparent(gUnknown_0203AB6E, TRUE);
- RemoveWindow(gUnknown_0203AB6E);
+ ClearStdWindowAndFrameToTransparent(sFrontierExchangeCorner_ItemIconWindowId, TRUE);
+ RemoveWindow(sFrontierExchangeCorner_ItemIconWindowId);
}
-static void sub_813AA60(u16 a0, u16 a1)
+static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
{
- static const u16 gUnknown_085B312C[] = { 0x004b, 0x0067, 0x0057, 0x004f, 0x0054, 0x0055, 0x0056, 0x0050, 0x0051, 0x0052, 0xFFFF };
- static const u16 gUnknown_085B3142[] = { 0x0071, 0x006f, 0x0072, 0x0073, 0x0074, 0xFFFF };
- static const u16 gUnknown_085B314E[] = { 0x0040, 0x0043, 0x0041, 0x0046, 0x0042, 0x003f, 0xFFFF };
- static const u16 gUnknown_085B315C[] = { 0x00c8, 0x00b4, 0x00b7, 0x00b9, 0x00b3, 0x00ba, 0x00bb, 0x00c4, 0x00c6, 0xFFFF };
-
- static const u8 *const gUnknown_085B3170[] = {
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2601AA,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2601D0,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_260201,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26022F,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26025B,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_260287,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2602B5,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2602E0,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26030F,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26033E,
- gText_Exit,
- };
-
- static const u8 *const gUnknown_085B319C[] = {
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
- gText_Exit
- };
+ #include "data/battle_frontier/battle_frontier_exchange_corner.h"
- static const u8 *const gUnknown_085B31B4[] = {
- BattleFrontier_BattlePointExchangeServiceCorner_Text_260397,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2603BE,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2603E6,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26040E,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_260436,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26045C,
- gText_Exit
- };
-
- static const u8 *const gUnknown_085B31D0[] = {
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26047A,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2604AC,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2604D8,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_26050F,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_260542,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_260575,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2605A8,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_2605E2,
- BattleFrontier_BattlePointExchangeServiceCorner_Text_260613,
- gText_Exit
- };
-
- if (a0 > 2 && a0 < 7)
+ 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 (a0)
+ switch (menu)
{
- case 3:
- AddTextPrinterParameterized2(0, 1, gUnknown_085B3170[a1], 0, NULL, 2, 1, 3);
- if (gUnknown_085B312C[a1] == 0xFFFF)
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1:
+ AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_Decor1Descriptions[selection], 0, NULL, 2, 1, 3);
+ if (sFrontierExchangeCorner_Decor1[selection] == 0xFFFF)
{
- sub_813ABD4(gUnknown_085B312C[a1]);
+ ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor1[selection]);
}
else
{
FreeSpriteTilesByTag(5500);
FreeSpritePaletteByTag(5500);
- gUnknown_0203AB6C = AddDecorationIconObject(gUnknown_085B312C[a1], 33, 88, 0, 5500, 5500);
+ sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor1[selection], 33, 88, 0, 5500, 5500);
}
break;
- case 4:
- AddTextPrinterParameterized2(0, 1, gUnknown_085B319C[a1], 0, NULL, 2, 1, 3);
- if (gUnknown_085B3142[a1] == 0xFFFF)
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
+ AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_Decor2Descriptions[selection], 0, NULL, 2, 1, 3);
+ if (sFrontierExchangeCorner_Decor2[selection] == 0xFFFF)
{
- sub_813ABD4(gUnknown_085B3142[a1]);
+ ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor2[selection]);
}
else
{
FreeSpriteTilesByTag(5500);
FreeSpritePaletteByTag(5500);
- gUnknown_0203AB6C = AddDecorationIconObject(gUnknown_085B3142[a1], 33, 88, 0, 5500, 5500);
+ sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor2[selection], 33, 88, 0, 5500, 5500);
}
break;
- case 5:
- AddTextPrinterParameterized2(0, 1, gUnknown_085B31B4[a1], 0, NULL, 2, 1, 3);
- sub_813ABD4(gUnknown_085B314E[a1]);
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR:
+ AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_VitaminsDescriptions[selection], 0, NULL, 2, 1, 3);
+ ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Vitamins[selection]);
break;
- case 6:
- AddTextPrinterParameterized2(0, 1, gUnknown_085B31D0[a1], 0, NULL, 2, 1, 3);
- sub_813ABD4(gUnknown_085B315C[a1]);
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR:
+ AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_HoldItemsDescriptions[selection], 0, NULL, 2, 1, 3);
+ ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_HoldItems[selection]);
break;
}
}
}
-static void sub_813ABD4(u16 a0)
+static void ShowFrontierExchangeCornerItemIcon(u16 item)
{
FreeSpriteTilesByTag(5500);
FreeSpritePaletteByTag(5500);
- gUnknown_0203AB6C = AddItemIconSprite(5500, 5500, a0);
+ sScrollableMultichoice_ItemSpriteId = AddItemIconSprite(5500, 5500, item);
- if (gUnknown_0203AB6C != MAX_SPRITES)
+ if (sScrollableMultichoice_ItemSpriteId != MAX_SPRITES)
{
- gSprites[gUnknown_0203AB6C].oam.priority = 0;
- gSprites[gUnknown_0203AB6C].pos1.x = 36;
- gSprites[gUnknown_0203AB6C].pos1.y = 92;
+ gSprites[sScrollableMultichoice_ItemSpriteId].oam.priority = 0;
+ gSprites[sScrollableMultichoice_ItemSpriteId].pos1.x = 36;
+ gSprites[sScrollableMultichoice_ItemSpriteId].pos1.y = 92;
}
}
-static void sub_813AC44(u16 a0, u16 unused)
+static void HideFrontierExchangeCornerItemIcon(u16 menu, u16 unused)
{
- if (gUnknown_0203AB6C != MAX_SPRITES)
+ if (sScrollableMultichoice_ItemSpriteId != MAX_SPRITES)
{
- switch (a0)
+ switch (menu)
{
- case 3 ... 6:
- DestroySpriteAndFreeResources(&gSprites[gUnknown_0203AB6C]);
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1:
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR:
+ case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR:
+ DestroySpriteAndFreeResources(&gSprites[sScrollableMultichoice_ItemSpriteId]);
break;
}
- gUnknown_0203AB6C = MAX_SPRITES;
- }
-}
+ sScrollableMultichoice_ItemSpriteId = MAX_SPRITES;
+ }
+}
+
+static const u16 sBattleFrontier_TutorMoves1[] =
+{
+ MOVE_SOFT_BOILED,
+ MOVE_SEISMIC_TOSS,
+ MOVE_DREAM_EATER,
+ MOVE_MEGA_PUNCH,
+ MOVE_MEGA_KICK,
+ MOVE_BODY_SLAM,
+ MOVE_ROCK_SLIDE,
+ MOVE_COUNTER,
+ MOVE_THUNDER_WAVE,
+ MOVE_SWORDS_DANCE
+};
-static const u16 gUnknown_085B31F8[] = { 0x0087, 0x0045, 0x008a, 0x0005, 0x0019, 0x0022, 0x009d, 0x0044, 0x0056, 0x000e };
-static const u16 gUnknown_085B320C[] = { 0x006f, 0x00ad, 0x00bd, 0x0081, 0x00c4, 0x00cb, 0x00f4, 0x0008, 0x0009, 0x0007 };
+static const u16 sBattleFrontier_TutorMoves2[] =
+{
+ MOVE_DEFENSE_CURL,
+ MOVE_SNORE,
+ MOVE_MUD_SLAP,
+ MOVE_SWIFT,
+ MOVE_ICY_WIND,
+ MOVE_ENDURE,
+ MOVE_PSYCH_UP,
+ MOVE_ICE_PUNCH,
+ MOVE_THUNDER_PUNCH,
+ MOVE_FIRE_PUNCH
+};
-void sub_813AC7C(void)
+void BufferBattleFrontierTutorMoveName(void)
{
if (gSpecialVar_0x8005 != 0)
{
- StringCopy(gStringVar1, gMoveNames[gUnknown_085B320C[gSpecialVar_0x8004]]);
+ StringCopy(gStringVar1, gMoveNames[sBattleFrontier_TutorMoves2[gSpecialVar_0x8004]]);
}
else
{
- StringCopy(gStringVar1, gMoveNames[gUnknown_085B31F8[gSpecialVar_0x8004]]);
+ StringCopy(gStringVar1, gMoveNames[sBattleFrontier_TutorMoves1[gSpecialVar_0x8004]]);
}
}
-static void sub_813ACE8(u8 a0, u16 a1)
+static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection)
{
- static const struct WindowTemplate gUnknown_085B3220 = {
+ static const struct WindowTemplate sBattleFrontierTutor_WindowTemplate =
+ {
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 7,
@@ -3133,20 +3187,21 @@ static void sub_813ACE8(u8 a0, u16 a1)
.baseBlock = 28,
};
- if (a0 == 9 || a0 == 10)
+ if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_1 || menu == SCROLL_MULTI_BF_MOVE_TUTOR_2)
{
if (gSpecialVar_0x8006 == 0)
{
- gUnknown_0203AB5E = AddWindow(&gUnknown_085B3220);
- SetStandardWindowBorderStyle(gUnknown_0203AB5E, 0);
+ sTutorMoveAndElevatorWindowId = AddWindow(&sBattleFrontierTutor_WindowTemplate);
+ SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, 0);
}
- sub_813AD34(a0, a1);
+ ShowBattleFrontierTutorMoveDescription(menu, selection);
}
}
-static void sub_813AD34(u8 a0, u16 a1)
+static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection)
{
- static const u8 *const gUnknown_085B3228[] = {
+ static const u8 *const sBattleFrontier_TutorMoveDescriptions1[] =
+ {
BattleFrontier_Lounge7_Text_265E30,
BattleFrontier_Lounge7_Text_265E5B,
BattleFrontier_Lounge7_Text_265E8A,
@@ -3160,7 +3215,8 @@ static void sub_813AD34(u8 a0, u16 a1)
gText_Exit,
};
- static const u8 *const gUnknown_085B3254[] = {
+ static const u8 *const sBattleFrontier_TutorMoveDescriptions2[] =
+ {
BattleFrontier_Lounge7_Text_26600A,
BattleFrontier_Lounge7_Text_26603E,
BattleFrontier_Lounge7_Text_266070,
@@ -3174,26 +3230,27 @@ static void sub_813AD34(u8 a0, u16 a1)
gText_Exit,
};
- if (a0 == 9 || a0 == 10)
+ if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_1 || menu == SCROLL_MULTI_BF_MOVE_TUTOR_2)
{
- FillWindowPixelRect(gUnknown_0203AB5E, PIXEL_FILL(1), 0, 0, 96, 48);
- if (a0 == 10)
+ FillWindowPixelRect(sTutorMoveAndElevatorWindowId, PIXEL_FILL(1), 0, 0, 96, 48);
+ if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_2)
{
- AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gUnknown_085B3254[a1], 0, 1, 0, NULL);
+ AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, sBattleFrontier_TutorMoveDescriptions2[selection], 0, 1, 0, NULL);
}
else
{
- AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gUnknown_085B3228[a1], 0, 1, 0, NULL);
+ AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, sBattleFrontier_TutorMoveDescriptions1[selection], 0, 1, 0, NULL);
}
}
}
-void sub_813ADB8(void)
+void CloseBattleFrontierTutorWindow(void)
{
- ClearStdWindowAndFrameToTransparent(gUnknown_0203AB5E, TRUE);
- RemoveWindow(gUnknown_0203AB5E);
+ ClearStdWindowAndFrameToTransparent(sTutorMoveAndElevatorWindowId, TRUE);
+ RemoveWindow(sTutorMoveAndElevatorWindowId);
}
+// Never called
void sub_813ADD4(void)
{
u16 scrollOffset, selectedRow;
@@ -3202,75 +3259,92 @@ 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 < 6; i++)
+ for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++)
{
- AddTextPrinterParameterized5(task->data[13], 1, gUnknown_085B2CF0[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);
}
}
-void sub_813AEB4(void)
+void GetBattleFrontierTutorMoveIndex(void)
{
u8 i;
- u16 temp1 = 0;
- u16 temp2 = 0;
+ u16 moveTutor = 0;
+ u16 moveIndex = 0;
gSpecialVar_0x8005 = 0;
- temp1 = VarGet(VAR_TEMP_E);
- temp2 = VarGet(VAR_TEMP_D);
+ moveTutor = VarGet(VAR_TEMP_E);
+ moveIndex = VarGet(VAR_TEMP_D);
- if (temp1 != 0)
+ if (moveTutor != 0)
{
i = 0;
do
{
- if (gTutorMoves[i] == gUnknown_085B320C[temp2])
+ if (gTutorMoves[i] == sBattleFrontier_TutorMoves2[moveIndex])
{
gSpecialVar_0x8005 = i;
break;
}
i++;
- } while (i < 30);
+ } while (i < TUTOR_MOVE_COUNT);
}
else
{
i = 0;
do
{
- if (gTutorMoves[i] == gUnknown_085B31F8[temp2])
+ if (gTutorMoves[i] == sBattleFrontier_TutorMoves1[moveIndex])
{
gSpecialVar_0x8005 = i;
break;
}
i++;
- } while (i < 30);
+ } while (i < TUTOR_MOVE_COUNT);
}
}
+// Never called
void sub_813AF48(void)
{
u8 taskId = FindTaskIdByFunc(sub_813A600);
if (taskId != 0xFF)
{
struct Task *task = &gTasks[taskId];
- DestroyListMenuTask(task->data[14], NULL, NULL);
- Free(gUnknown_0203AB64);
- 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]);
+ DestroyListMenuTask(task->tListTaskId, NULL, NULL);
+ Free(sScrollableMultichoice_ListMenuItem);
+ 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);
@@ -3405,47 +3479,47 @@ void sub_813B1D0(void)
BlendPalettes(0x04000000, 16, 0);
}
-void set_unknown_box_id(u8 id)
+void SetPCBoxToSendMon(u8 boxId)
{
- gUnknown_0203AB6F = id;
+ sPCBoxToSendMon = boxId;
}
-u16 get_unknown_box_id(void)
+u16 GetPCBoxToSendMon(void)
{
- return gUnknown_0203AB6F;
+ return sPCBoxToSendMon;
}
-bool8 sub_813B21C(void)
+bool8 ShouldShowBoxWasFullMessage(void)
{
- if (FlagGet(FLAG_SYS_STORAGE_UNKNOWN_FLAG) == FALSE)
+ if (!FlagGet(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE))
{
- if (StorageGetCurrentBox() != VarGet(VAR_STORAGE_UNKNOWN))
+ if (StorageGetCurrentBox() != VarGet(VAR_PC_BOX_TO_SEND_MON))
{
- FlagSet(FLAG_SYS_STORAGE_UNKNOWN_FLAG);
+ FlagSet(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE);
return TRUE;
}
}
return FALSE;
}
-bool8 sub_813B260(void)
+bool8 IsDestinationBoxFull(void)
{
int box;
int i;
- set_unknown_box_id(VarGet(VAR_STORAGE_UNKNOWN));
+ SetPCBoxToSendMon(VarGet(VAR_PC_BOX_TO_SEND_MON));
box = StorageGetCurrentBox();
do
{
for (i = 0; i < IN_BOX_COUNT; i++)
{
- if (GetBoxMonData(GetBoxedMonPtr(box, i), MON_DATA_SPECIES, 0) == 0)
+ if (GetBoxMonData(GetBoxedMonPtr(box, i), MON_DATA_SPECIES, 0) == SPECIES_NONE)
{
- if (get_unknown_box_id() != box)
+ if (GetPCBoxToSendMon() != box)
{
- FlagClear(FLAG_SYS_STORAGE_UNKNOWN_FLAG);
+ FlagClear(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE);
}
- VarSet(VAR_STORAGE_UNKNOWN, box);
- return sub_813B21C();
+ VarSet(VAR_PC_BOX_TO_SEND_MON, box);
+ return ShouldShowBoxWasFullMessage();
}
}
@@ -3606,35 +3680,37 @@ void Unused_SetWeatherSunny(void)
SetCurrentAndNextWeather(WEATHER_SUNNY);
}
-bool32 sub_813B490(void)
-{
- static const u8 gUnknown_085B3420[][3] = {
- { 0x02, 0x04, 0x01 },
- { 0x04, 0x04, 0x01 },
- { 0x05, 0x00, 0x01 },
- { 0x06, 0x03, 0x01 },
- { 0x08, 0x06, 0x01 },
- { 0x09, 0x0d, 0x01 },
- { 0x0a, 0x07, 0x01 },
- { 0x0b, 0x07, 0x01 },
- { 0x0c, 0x04, 0x01 },
- { 0x0e, 0x05, 0x01 },
- { 0x0f, 0x04, 0x01 },
- { 0x1a, 0x37, 0x01 }
+// Always returns 1
+u32 GetMartEmployeeObjectEventId(void)
+{
+ static const u8 sPokeMarts[][3] =
+ {
+ { MAP_GROUP(OLDALE_TOWN_MART), MAP_NUM(OLDALE_TOWN_MART), 1 },
+ { MAP_GROUP(LAVARIDGE_TOWN_MART), MAP_NUM(LAVARIDGE_TOWN_MART), 1 },
+ { MAP_GROUP(FALLARBOR_TOWN_MART), MAP_NUM(FALLARBOR_TOWN_MART), 1 },
+ { MAP_GROUP(VERDANTURF_TOWN_MART), MAP_NUM(VERDANTURF_TOWN_MART), 1 },
+ { MAP_GROUP(PETALBURG_CITY_MART), MAP_NUM(PETALBURG_CITY_MART), 1 },
+ { MAP_GROUP(SLATEPORT_CITY_MART), MAP_NUM(SLATEPORT_CITY_MART), 1 },
+ { MAP_GROUP(MAUVILLE_CITY_MART), MAP_NUM(MAUVILLE_CITY_MART), 1 },
+ { MAP_GROUP(RUSTBORO_CITY_MART), MAP_NUM(RUSTBORO_CITY_MART), 1 },
+ { MAP_GROUP(FORTREE_CITY_MART), MAP_NUM(FORTREE_CITY_MART), 1 },
+ { MAP_GROUP(MOSSDEEP_CITY_MART), MAP_NUM(MOSSDEEP_CITY_MART), 1 },
+ { MAP_GROUP(SOOTOPOLIS_CITY_MART), MAP_NUM(SOOTOPOLIS_CITY_MART), 1 },
+ { MAP_GROUP(BATTLE_FRONTIER_MART), MAP_NUM(BATTLE_FRONTIER_MART), 1 }
};
u8 i;
- for (i = 0; i < 12; i++)
+ for (i = 0; i < ARRAY_COUNT(sPokeMarts); i++)
{
- if (gSaveBlock1Ptr->location.mapGroup == gUnknown_085B3420[i][0])
+ if (gSaveBlock1Ptr->location.mapGroup == sPokeMarts[i][0])
{
- if (gSaveBlock1Ptr->location.mapNum == gUnknown_085B3420[i][1])
+ if (gSaveBlock1Ptr->location.mapNum == sPokeMarts[i][1])
{
- return gUnknown_085B3420[i][2];
+ return sPokeMarts[i][2];
}
}
}
- return TRUE;
+ return 1;
}
bool32 sub_813B4E0(void)
@@ -3648,6 +3724,7 @@ bool32 sub_813B4E0(void)
return FALSE;
}
+// Always returns FALSE
bool32 sub_813B514(void)
{
if (!VarGet(VAR_ALWAYS_ZERO_0x403F))
@@ -3659,7 +3736,7 @@ bool32 sub_813B514(void)
void sub_813B534(void)
{
- gUnknown_0203AB70 = gBattleTypeFlags;
+ sUnknown_0203AB70 = gBattleTypeFlags;
gBattleTypeFlags = 0;
if (!gReceivedRemoteLinkPlayers)
{
@@ -3793,14 +3870,14 @@ static void sub_813B57C(u8 taskId)
{
sub_800AC34();
}
- gBattleTypeFlags = gUnknown_0203AB70;
+ gBattleTypeFlags = sUnknown_0203AB70;
EnableBothScriptContexts();
DestroyTask(taskId);
break;
}
}
-void sub_813B7D8(void)
+void Script_DoRayquazaScene(void)
{
if (gSpecialVar_0x8004 == 0)
{
@@ -3870,23 +3947,25 @@ static void _fwalk(u8 taskId)
}
}
-void sub_813B968(void)
+void GetBattlePyramidHint(void)
{
gSpecialVar_Result = gSpecialVar_0x8004 / 7;
gSpecialVar_Result -= (gSpecialVar_Result / 20) * 20;
}
-void sub_813B9A0(void)
+// Used to avoid a potential softlock if the player respawns on Dewford with no way off
+void ResetHealLocationFromDewford(void)
{
if (gSaveBlock1Ptr->lastHealLocation.mapGroup == MAP_GROUP(DEWFORD_TOWN) && gSaveBlock1Ptr->lastHealLocation.mapNum == MAP_NUM(DEWFORD_TOWN))
{
- SetLastHealLocationWarp(3);
+ SetLastHealLocationWarp(HEAL_LOCATION_PETALBURG_CITY);
}
}
-bool8 sub_813B9C0(void)
+bool8 InPokemonCenter(void)
{
- static const u16 gUnknown_085B3444[] = {
+ static const u16 sPokemonCenters[] =
+ {
MAP_OLDALE_TOWN_POKEMON_CENTER_1F,
MAP_DEWFORD_TOWN_POKEMON_CENTER_1F,
MAP_LAVARIDGE_TOWN_POKEMON_CENTER_1F,
@@ -3914,9 +3993,9 @@ bool8 sub_813B9C0(void)
int i;
u16 map = (gSaveBlock1Ptr->location.mapGroup << 8) + gSaveBlock1Ptr->location.mapNum;
- for (i = 0; gUnknown_085B3444[i] != 0xFFFF; i++)
+ for (i = 0; sPokemonCenters[i] != 0xFFFF; i++)
{
- if (gUnknown_085B3444[i] == map)
+ if (sPokemonCenters[i] == map)
{
return TRUE;
}
diff --git a/src/frontier_util.c b/src/frontier_util.c
index 69db5f762..83934c9f6 100644
--- a/src/frontier_util.c
+++ b/src/frontier_util.c
@@ -794,15 +794,15 @@ static void sub_81A17A0(void)
case 0:
break;
case 1:
- sub_813A878(0);
+ FrontierGamblerSetWonOrLost(FALSE);
VarSet(VAR_TEMP_0, gSaveBlock2Ptr->frontier.field_CA8);
break;
case 4:
- sub_813A878(0);
+ FrontierGamblerSetWonOrLost(FALSE);
VarSet(VAR_TEMP_0, gSaveBlock2Ptr->frontier.field_CA8);
break;
case 3:
- sub_813A878(1);
+ FrontierGamblerSetWonOrLost(TRUE);
VarSet(VAR_TEMP_0, gSaveBlock2Ptr->frontier.field_CA8);
break;
case 2:
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/match_call.c b/src/match_call.c
index bf5642a83..bcbf10766 100644
--- a/src/match_call.c
+++ b/src/match_call.c
@@ -1290,7 +1290,7 @@ static bool32 sub_81963F0(u8 taskId)
sub_81973A4();
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
- sub_80D338C();
+ ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
ScriptContext2_Disable();
}
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/mon_markings.c b/src/mon_markings.c
index f8b128045..f4d6b3818 100644
--- a/src/mon_markings.c
+++ b/src/mon_markings.c
@@ -350,7 +350,7 @@ void sub_811FAA4(u8 markings, s16 x, s16 y)
u16 i;
sMenu->cursorPos = 0;
sMenu->markings = markings;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < NUM_MON_MARKINGS; i++)
sMenu->markingsArray[i] = (sMenu->markings >> i) & 1;
sub_811FC80(x, y, sMenu->baseTileTag, sMenu->basePaletteTag);
}
@@ -371,7 +371,7 @@ void sub_811FAF8(void)
DestroySprite(sMenu->menuWindowSprites[i]);
sMenu->menuWindowSprites[i] = NULL;
}
- for (i = 0; i < 4; i++)
+ for (i = 0; i < NUM_MON_MARKINGS; i++)
{
if (!sMenu->menuMarkingSprites[i])
return;
@@ -422,7 +422,7 @@ bool8 sub_811FBA4(void)
{
case 4:
sMenu->markings = 0;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < NUM_MON_MARKINGS; i++)
sMenu->markings |= sMenu->markingsArray[i] << i;
return FALSE;
case 5:
@@ -498,7 +498,7 @@ static void sub_811FC80(s16 x, s16 y, u16 baseTileTag, u16 basePaletteTag)
sprTemplate.callback = sub_811FF40;
sprTemplate.oam = &gUnknown_0859EE84;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < NUM_MON_MARKINGS; i++)
{
spriteId = CreateSprite(&sprTemplate, x + 32, y + 16 + 16 * i, 0);
if (spriteId != MAX_SPRITES)
diff --git a/src/mossdeep_gym.c b/src/mossdeep_gym.c
index e4e807c4e..bc279334b 100644
--- a/src/mossdeep_gym.c
+++ b/src/mossdeep_gym.c
@@ -55,7 +55,7 @@ void FinishMossdeepGymTiles(void)
id = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[id]);
- sub_80D338C();
+ ScriptMovement_UnfreezeEventObjects();
}
u16 MossdeepGym_MoveEvents(u8 arg0)
diff --git a/src/move_relearner.c b/src/move_relearner.c
index 0d1362232..121ac66e8 100644
--- a/src/move_relearner.c
+++ b/src/move_relearner.c
@@ -154,7 +154,7 @@ static EWRAM_DATA struct
{
u8 state;
u8 heartSpriteIds[16]; /*0x001*/
- u16 movesToLearn[4]; /*0x012*/
+ u16 movesToLearn[MAX_MON_MOVES]; /*0x012*/
u8 filler1A[0x44 - 0x1A]; /*0x01A*/
u8 partyMon; /*0x044*/
u8 moveSlot; /*0x045*/
diff --git a/src/naming_screen.c b/src/naming_screen.c
index b259d9a24..095a43117 100644
--- a/src/naming_screen.c
+++ b/src/naming_screen.c
@@ -541,16 +541,16 @@ static void DisplaySentToPCMessage(void)
{
u8 stringToDisplay = 0;
- if (!sub_813B260())
+ if (!IsDestinationBoxFull())
{
- StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_STORAGE_UNKNOWN)));
+ StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON)));
StringCopy(gStringVar2, gNamingScreenData->destBuffer);
}
else
{
- StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_STORAGE_UNKNOWN)));
+ StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON)));
StringCopy(gStringVar2, gNamingScreenData->destBuffer);
- StringCopy(gStringVar3, GetBoxNamePtr(get_unknown_box_id()));
+ StringCopy(gStringVar3, GetBoxNamePtr(GetPCBoxToSendMon()));
stringToDisplay = 2;
}
diff --git a/src/new_game.c b/src/new_game.c
index b4d9ba9b3..1021ea96c 100644
--- a/src/new_game.c
+++ b/src/new_game.c
@@ -81,7 +81,7 @@ u32 GetTrainerId(u8 *trainerId)
void CopyTrainerId(u8 *dst, u8 *src)
{
s32 i;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < TRAINER_ID_LENGTH; i++)
dst[i] = src[i];
}
diff --git a/src/option_menu.c b/src/option_menu.c
index 3ffb2738f..e0473b5c3 100644
--- a/src/option_menu.c
+++ b/src/option_menu.c
@@ -48,6 +48,13 @@ enum
WIN_OPTIONS
};
+#define YPOS_TEXTSPEED (MENUITEM_TEXTSPEED * 16)
+#define YPOS_BATTLESCENE (MENUITEM_BATTLESCENE * 16)
+#define YPOS_BATTLESTYLE (MENUITEM_BATTLESTYLE * 16)
+#define YPOS_SOUND (MENUITEM_SOUND * 16)
+#define YPOS_BUTTONMODE (MENUITEM_BUTTONMODE * 16)
+#define YPOS_FRAMETYPE (MENUITEM_FRAMETYPE * 16)
+
// this file's functions
static void Task_OptionMenuFadeIn(u8 taskId);
static void Task_OptionMenuProcessInput(u8 taskId);
@@ -80,13 +87,13 @@ static const u8 sEqualSignGfx[] = INCBIN_U8("graphics/misc/option_menu_equals_si
static const u8 *const sOptionMenuItemsNames[MENUITEM_COUNT] =
{
- gText_TextSpeed,
- gText_BattleScene,
- gText_BattleStyle,
- gText_Sound,
- gText_ButtonMode,
- gText_Frame,
- gText_OptionMenuCancel,
+ [MENUITEM_TEXTSPEED] = gText_TextSpeed,
+ [MENUITEM_BATTLESCENE] = gText_BattleScene,
+ [MENUITEM_BATTLESTYLE] = gText_BattleStyle,
+ [MENUITEM_SOUND] = gText_Sound,
+ [MENUITEM_BUTTONMODE] = gText_ButtonMode,
+ [MENUITEM_FRAMETYPE] = gText_Frame,
+ [MENUITEM_CANCEL] = gText_OptionMenuCancel,
};
static const struct WindowTemplate sOptionMenuWinTemplates[] =
@@ -280,12 +287,12 @@ static void Task_OptionMenuProcessInput(u8 taskId)
if (gTasks[taskId].data[TD_MENUSELECTION] > 0)
gTasks[taskId].data[TD_MENUSELECTION]--;
else
- gTasks[taskId].data[TD_MENUSELECTION] = 6;
+ gTasks[taskId].data[TD_MENUSELECTION] = MENUITEM_CANCEL;
HighlightOptionMenuItem(gTasks[taskId].data[TD_MENUSELECTION]);
}
else if (gMain.newKeys & DPAD_DOWN)
{
- if (gTasks[taskId].data[TD_MENUSELECTION] <= 5)
+ if (gTasks[taskId].data[TD_MENUSELECTION] < MENUITEM_CANCEL)
gTasks[taskId].data[TD_MENUSELECTION]++;
else
gTasks[taskId].data[TD_MENUSELECTION] = 0;
@@ -431,7 +438,7 @@ static void TextSpeed_DrawChoices(u8 selection)
styles[2] = 0;
styles[selection] = 1;
- DrawOptionMenuChoice(gText_TextSpeedSlow, 104, 0, styles[0]);
+ DrawOptionMenuChoice(gText_TextSpeedSlow, 104, YPOS_TEXTSPEED, styles[0]);
widthSlow = GetStringWidth(1, gText_TextSpeedSlow, 0);
widthMid = GetStringWidth(1, gText_TextSpeedMid, 0);
@@ -439,9 +446,9 @@ static void TextSpeed_DrawChoices(u8 selection)
widthMid -= 94;
xMid = (widthSlow - widthMid - widthFast) / 2 + 104;
- DrawOptionMenuChoice(gText_TextSpeedMid, xMid, 0, styles[1]);
+ DrawOptionMenuChoice(gText_TextSpeedMid, xMid, YPOS_TEXTSPEED, styles[1]);
- DrawOptionMenuChoice(gText_TextSpeedFast, GetStringRightAlignXOffset(1, gText_TextSpeedFast, 198), 0, styles[2]);
+ DrawOptionMenuChoice(gText_TextSpeedFast, GetStringRightAlignXOffset(1, gText_TextSpeedFast, 198), YPOS_TEXTSPEED, styles[2]);
}
static u8 BattleScene_ProcessInput(u8 selection)
@@ -463,8 +470,8 @@ static void BattleScene_DrawChoices(u8 selection)
styles[1] = 0;
styles[selection] = 1;
- DrawOptionMenuChoice(gText_BattleSceneOn, 104, 16, styles[0]);
- DrawOptionMenuChoice(gText_BattleSceneOff, GetStringRightAlignXOffset(1, gText_BattleSceneOff, 198), 16, styles[1]);
+ DrawOptionMenuChoice(gText_BattleSceneOn, 104, YPOS_BATTLESCENE, styles[0]);
+ DrawOptionMenuChoice(gText_BattleSceneOff, GetStringRightAlignXOffset(1, gText_BattleSceneOff, 198), YPOS_BATTLESCENE, styles[1]);
}
static u8 BattleStyle_ProcessInput(u8 selection)
@@ -486,8 +493,8 @@ static void BattleStyle_DrawChoices(u8 selection)
styles[1] = 0;
styles[selection] = 1;
- DrawOptionMenuChoice(gText_BattleStyleShift, 104, 32, styles[0]);
- DrawOptionMenuChoice(gText_BattleStyleSet, GetStringRightAlignXOffset(1, gText_BattleStyleSet, 198), 32, styles[1]);
+ DrawOptionMenuChoice(gText_BattleStyleShift, 104, YPOS_BATTLESTYLE, styles[0]);
+ DrawOptionMenuChoice(gText_BattleStyleSet, GetStringRightAlignXOffset(1, gText_BattleStyleSet, 198), YPOS_BATTLESTYLE, styles[1]);
}
static u8 Sound_ProcessInput(u8 selection)
@@ -510,8 +517,8 @@ static void Sound_DrawChoices(u8 selection)
styles[1] = 0;
styles[selection] = 1;
- DrawOptionMenuChoice(gText_SoundMono, 104, 48, styles[0]);
- DrawOptionMenuChoice(gText_SoundStereo, GetStringRightAlignXOffset(1, gText_SoundStereo, 198), 48, styles[1]);
+ DrawOptionMenuChoice(gText_SoundMono, 104, YPOS_SOUND, styles[0]);
+ DrawOptionMenuChoice(gText_SoundStereo, GetStringRightAlignXOffset(1, gText_SoundStereo, 198), YPOS_SOUND, styles[1]);
}
static u8 FrameType_ProcessInput(u8 selection)
@@ -568,8 +575,8 @@ static void FrameType_DrawChoices(u8 selection)
text[i] = EOS;
- DrawOptionMenuChoice(gText_FrameType, 104, 80, 0);
- DrawOptionMenuChoice(text, 128, 80, 1);
+ DrawOptionMenuChoice(gText_FrameType, 104, YPOS_FRAMETYPE, 0);
+ DrawOptionMenuChoice(text, 128, YPOS_FRAMETYPE, 1);
}
static u8 ButtonMode_ProcessInput(u8 selection)
@@ -605,7 +612,7 @@ static void ButtonMode_DrawChoices(u8 selection)
styles[2] = 0;
styles[selection] = 1;
- DrawOptionMenuChoice(gText_ButtonTypeNormal, 104, 64, styles[0]);
+ DrawOptionMenuChoice(gText_ButtonTypeNormal, 104, YPOS_BUTTONMODE, styles[0]);
widthNormal = GetStringWidth(1, gText_ButtonTypeNormal, 0);
widthLR = GetStringWidth(1, gText_ButtonTypeLR, 0);
@@ -613,9 +620,9 @@ static void ButtonMode_DrawChoices(u8 selection)
widthLR -= 94;
xLR = (widthNormal - widthLR - widthLA) / 2 + 104;
- DrawOptionMenuChoice(gText_ButtonTypeLR, xLR, 64, styles[1]);
+ DrawOptionMenuChoice(gText_ButtonTypeLR, xLR, YPOS_BUTTONMODE, styles[1]);
- DrawOptionMenuChoice(gText_ButtonTypeLEqualsA, GetStringRightAlignXOffset(1, gText_ButtonTypeLEqualsA, 198), 64, styles[2]);
+ DrawOptionMenuChoice(gText_ButtonTypeLEqualsA, GetStringRightAlignXOffset(1, gText_ButtonTypeLEqualsA, 198), YPOS_BUTTONMODE, styles[2]);
}
static void DrawTextOption(void)
diff --git a/src/overworld.c b/src/overworld.c
index 2f6898ee5..e32024c77 100644
--- a/src/overworld.c
+++ b/src/overworld.c
@@ -1759,7 +1759,7 @@ void CB2_ContinueSavedGame(void)
static void FieldClearVBlankHBlankCallbacks(void)
{
- if (warp0_in_pokecenter() == TRUE)
+ if (UsedPokemonCenterWarp() == TRUE)
CloseLink();
if (gWirelessCommType != 0)
@@ -2435,7 +2435,7 @@ static void UpdateAllLinkPlayers(u16 *keys, s32 selfId)
struct TradeRoomPlayer trainer;
s32 i;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_LINK_PLAYERS; i++)
{
u8 key = keys[i];
u16 setFacing = FACING_NONE;
@@ -3026,7 +3026,7 @@ static s32 sub_80878E4(u8 linkPlayerId)
static u8 GetLinkPlayerIdAt(s16 x, s16 y)
{
u8 i;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_LINK_PLAYERS; i++)
{
if (gLinkPlayerEventObjects[i].active
&& (gLinkPlayerEventObjects[i].movementMode == 0 || gLinkPlayerEventObjects[i].movementMode == 2))
diff --git a/src/pokeblock.c b/src/pokeblock.c
index d9f5c5498..14e5b6a1f 100644
--- a/src/pokeblock.c
+++ b/src/pokeblock.c
@@ -3,7 +3,6 @@
#include "battle.h"
#include "battle_controllers.h"
#include "battle_message.h"
-#include "berry.h"
#include "bg.h"
#include "decompress.h"
#include "event_data.h"
@@ -30,6 +29,7 @@
#include "task.h"
#include "text.h"
#include "text_window.h"
+#include "constants/berry.h"
#include "constants/items.h"
#include "constants/songs.h"
#include "constants/rgb.h"
diff --git a/src/pokemon.c b/src/pokemon.c
index b4d791e27..da659b10d 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -2989,11 +2989,11 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove)
void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move)
{
s32 i;
- u16 moves[4];
- u8 pp[4];
+ u16 moves[MAX_MON_MOVES];
+ u8 pp[MAX_MON_MOVES];
u8 ppBonuses;
- for (i = 0; i < 3; i++)
+ for (i = 0; i < MAX_MON_MOVES - 1; i++)
{
moves[i] = GetMonData(mon, MON_DATA_MOVE2 + i, NULL);
pp[i] = GetMonData(mon, MON_DATA_PP2 + i, NULL);
@@ -3016,11 +3016,11 @@ void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move)
void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move)
{
s32 i;
- u16 moves[4];
- u8 pp[4];
+ u16 moves[MAX_MON_MOVES];
+ u8 pp[MAX_MON_MOVES];
u8 ppBonuses;
- for (i = 0; i < 3; i++)
+ for (i = 0; i < MAX_MON_MOVES - 1; i++)
{
moves[i] = GetBoxMonData(boxMon, MON_DATA_MOVE2 + i, NULL);
pp[i] = GetBoxMonData(boxMon, MON_DATA_PP2 + i, NULL);
@@ -3304,21 +3304,21 @@ u8 CountAliveMonsInBattle(u8 caseId)
switch (caseId)
{
case BATTLE_ALIVE_EXCEPT_ACTIVE:
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_BATTLERS_COUNT; i++)
{
if (i != gActiveBattler && !(gAbsentBattlerFlags & gBitTable[i]))
retVal++;
}
break;
case BATTLE_ALIVE_ATK_SIDE:
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_BATTLERS_COUNT; i++)
{
if (GetBattlerSide(i) == GetBattlerSide(gBattlerAttacker) && !(gAbsentBattlerFlags & gBitTable[i]))
retVal++;
}
break;
case BATTLE_ALIVE_DEF_SIDE:
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_BATTLERS_COUNT; i++)
{
if (GetBattlerSide(i) == GetBattlerSide(gBattlerTarget) && !(gAbsentBattlerFlags & gBitTable[i]))
retVal++;
@@ -4329,7 +4329,7 @@ u8 SendMonToPC(struct Pokemon* mon)
{
s32 boxNo, boxPos;
- set_unknown_box_id(VarGet(VAR_STORAGE_UNKNOWN));
+ SetPCBoxToSendMon(VarGet(VAR_PC_BOX_TO_SEND_MON));
boxNo = StorageGetCurrentBox();
@@ -4344,9 +4344,9 @@ u8 SendMonToPC(struct Pokemon* mon)
CopyMon(checkingMon, &mon->box, sizeof(mon->box));
gSpecialVar_MonBoxId = boxNo;
gSpecialVar_MonBoxPos = boxPos;
- if (get_unknown_box_id() != boxNo)
- FlagClear(FLAG_SYS_STORAGE_UNKNOWN_FLAG);
- VarSet(VAR_STORAGE_UNKNOWN, boxNo);
+ if (GetPCBoxToSendMon() != boxNo)
+ FlagClear(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE);
+ VarSet(VAR_PC_BOX_TO_SEND_MON, boxNo);
return MON_GIVEN_TO_PC;
}
}
@@ -4817,11 +4817,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
{
if (evCount >= MAX_TOTAL_EVS)
return TRUE;
- if (dataSigned >= 100)
+ if (dataSigned >= EV_ITEM_RAISE_LIMIT)
break;
- if (dataSigned + r2 > 100)
- r5 = 100 - (dataSigned + r2) + r2;
+ if (dataSigned + r2 > EV_ITEM_RAISE_LIMIT)
+ r5 = EV_ITEM_RAISE_LIMIT - (dataSigned + r2) + r2;
else
r5 = r2;
@@ -5021,11 +5021,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
{
if (evCount >= MAX_TOTAL_EVS)
return TRUE;
- if (dataSigned >= 100)
+ if (dataSigned >= EV_ITEM_RAISE_LIMIT)
break;
- if (dataSigned + r2 > 100)
- r5 = 100 - (dataSigned + r2) + r2;
+ if (dataSigned + r2 > EV_ITEM_RAISE_LIMIT)
+ r5 = EV_ITEM_RAISE_LIMIT - (dataSigned + r2) + r2;
else
r5 = r2;
@@ -6096,7 +6096,7 @@ u32 CanSpeciesLearnTMHM(u16 species, u8 tm)
u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves)
{
- u16 learnedMoves[4];
+ u16 learnedMoves[MAX_MON_MOVES];
u8 numMoves = 0;
u16 species = GetMonData(mon, MON_DATA_SPECIES, 0);
u8 level = GetMonData(mon, MON_DATA_LEVEL, 0);
@@ -6146,7 +6146,7 @@ u8 GetLevelUpMovesBySpecies(u16 species, u16 *moves)
u8 GetNumberOfRelearnableMoves(struct Pokemon *mon)
{
- u16 learnedMoves[4];
+ u16 learnedMoves[MAX_MON_MOVES];
u16 moves[20];
u8 numMoves = 0;
u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0);
@@ -6683,7 +6683,7 @@ u8 sub_806EF08(u8 arg0)
var = (arg0 != 0) ? 2 : 0;
break;
}
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_LINK_PLAYERS; i++)
{
if (gLinkPlayers[i].id == (s16)(var))
break;
@@ -6706,7 +6706,7 @@ u8 sub_806EF84(u8 arg0, u8 arg1)
var = (arg0 != 0) ? 2 : 0;
break;
}
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_LINK_PLAYERS; i++)
{
if (gLinkPlayers[i].id == (s16)(var))
break;
diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c
index 06531be0e..c6994e5ac 100644
--- a/src/pokemon_storage_system.c
+++ b/src/pokemon_storage_system.c
@@ -453,7 +453,7 @@ EWRAM_DATA static bool8 sInPartyMenu = 0;
EWRAM_DATA static u8 sCurrentBoxOption = 0;
EWRAM_DATA static u8 gUnknown_02039D0E = 0;
EWRAM_DATA static u8 sWhichToReshow = 0;
-EWRAM_DATA static u8 gUnknown_02039D10 = 0;
+EWRAM_DATA static u8 sLastUsedBox = 0;
EWRAM_DATA static u16 gUnknown_02039D12 = 0;
EWRAM_DATA static struct Pokemon gUnknown_02039D14 = {0};
EWRAM_DATA static s8 sBoxCursorArea = 0;
@@ -2167,7 +2167,7 @@ static void Cb2_EnterPSS(u8 boxOption)
gUnknown_02039D12 = 0;
sPSSData->state = 0;
sPSSData->taskId = CreateTask(Cb_InitPSS, 3);
- gUnknown_02039D10 = StorageGetCurrentBox();
+ sLastUsedBox = StorageGetCurrentBox();
SetMainCallback2(Cb2_PSS);
}
}
@@ -4366,10 +4366,10 @@ static bool8 DoShowPartyMenu(void)
static void sub_80CABE0(void)
{
- if (gUnknown_02039D10 != StorageGetCurrentBox())
+ if (sLastUsedBox != StorageGetCurrentBox())
{
- FlagClear(FLAG_SYS_STORAGE_UNKNOWN_FLAG);
- VarSet(VAR_STORAGE_UNKNOWN, StorageGetCurrentBox());
+ FlagClear(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE);
+ VarSet(VAR_PC_BOX_TO_SEND_MON, StorageGetCurrentBox());
}
}
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index 8018e4fe0..5908f8bba 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -121,8 +121,8 @@ static EWRAM_DATA struct PokemonSummaryScreenData
u8 metGame; // 0xB
u32 pid; // 0xC
u32 exp; // 0x10
- u16 moves[4]; // 0x14
- u8 pp[4]; // 0x1C
+ u16 moves[MAX_MON_MOVES]; // 0x14
+ u8 pp[MAX_MON_MOVES]; // 0x1C
u16 currentHP; // 0x20
u16 maxHP; // 0x22
u16 atk; // 0x24
@@ -224,10 +224,10 @@ static void DrawExperienceProgressBar(struct Pokemon* mon);
static void DrawContestMoveHearts(u16 move);
static void LimitEggSummaryPageDisplay(void);
static void ResetWindows(void);
-static void sub_81C25E8(void);
-static void sub_81C2628(void);
-static void sub_81C2794(void);
-static void sub_81C27DC(struct Pokemon *mon, u16 a);
+static void PrintMonInfo(void);
+static void PrintNotEggInfo(void);
+static void PrintEggInfo(void);
+static void PrintGenderSymbol(struct Pokemon *mon, u16 a);
static void PrintPageNamesAndStatsPageToWindows(void);
static void CreatePageWindowTilemaps(u8 a);
static void ClearPageWindowTilemaps(u8 a);
@@ -1173,7 +1173,7 @@ static bool8 SummaryScreen_LoadGraphics(void)
gMain.state++;
break;
case 11:
- sub_81C25E8();
+ PrintMonInfo();
gMain.state++;
break;
case 12:
@@ -1449,7 +1449,7 @@ static void sub_81C0348(void)
DrawPokerusCuredSymbol(&sMonSummaryScreen->currentMon);
}
-static void sub_81C0434(void)
+static void FreeSummaryScreen(void)
{
FreeAllWindowBuffers();
Free(sMonSummaryScreen);
@@ -1474,7 +1474,7 @@ static void CloseSummaryScreen(u8 taskId)
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100);
if (gMonSpritesGfxPtr == 0)
sub_806F47C(0);
- sub_81C0434();
+ FreeSummaryScreen();
DestroyTask(taskId);
}
}
@@ -1625,7 +1625,7 @@ static void sub_81C0704(u8 taskId)
SetTypeIcons();
break;
case 10:
- sub_81C25E8();
+ PrintMonInfo();
break;
case 11:
PrintPageSpecificText(sMonSummaryScreen->currPageIndex);
@@ -2571,7 +2571,7 @@ static void DrawPokerusCuredSymbol(struct Pokemon *mon) // This checks if the mo
schedule_bg_copy_tilemap_to_vram(3);
}
-static void sub_81C228C(bool8 isMonShiny)
+static void SetDexNumberColor(bool8 isMonShiny)
{
if (!isMonShiny)
sub_8199C30(3, 1, 4, 8, 8, 0);
@@ -2695,19 +2695,19 @@ static void SummaryScreen_PrintTextOnWindow(u8 windowId, const u8 *string, u8 x,
AddTextPrinterParameterized4(windowId, 1, x, y, 0, lineSpacing, sTextColors_861CD2C[colorId], 0, string);
}
-static void sub_81C25E8(void)
+static void PrintMonInfo(void)
{
FillWindowPixelBuffer(PSS_LABEL_WINDOW_PORTRAIT_DEX_NUMBER, PIXEL_FILL(0));
FillWindowPixelBuffer(PSS_LABEL_WINDOW_PORTRAIT_NICKNAME, PIXEL_FILL(0));
FillWindowPixelBuffer(PSS_LABEL_WINDOW_PORTRAIT_SPECIES, PIXEL_FILL(0));
if (!sMonSummaryScreen->summary.isEgg)
- sub_81C2628();
+ PrintNotEggInfo();
else
- sub_81C2794();
+ PrintEggInfo();
schedule_bg_copy_tilemap_to_vram(0);
}
-static void sub_81C2628(void)
+static void PrintNotEggInfo(void)
{
u8 strArray[16];
struct Pokemon *mon = &sMonSummaryScreen->currentMon;
@@ -2721,12 +2721,12 @@ static void sub_81C2628(void)
if (!IsMonShiny(mon))
{
SummaryScreen_PrintTextOnWindow(PSS_LABEL_WINDOW_PORTRAIT_DEX_NUMBER, gStringVar1, 0, 1, 0, 1);
- sub_81C228C(FALSE);
+ SetDexNumberColor(FALSE);
}
else
{
SummaryScreen_PrintTextOnWindow(PSS_LABEL_WINDOW_PORTRAIT_DEX_NUMBER, gStringVar1, 0, 1, 0, 7);
- sub_81C228C(TRUE);
+ SetDexNumberColor(TRUE);
}
PutWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_DEX_NUMBER);
}
@@ -2734,9 +2734,9 @@ static void sub_81C2628(void)
{
ClearWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_DEX_NUMBER);
if (!IsMonShiny(mon))
- sub_81C228C(FALSE);
+ SetDexNumberColor(FALSE);
else
- sub_81C228C(TRUE);
+ SetDexNumberColor(TRUE);
}
StringCopy(gStringVar1, &gText_LevelSymbol[0]);
ConvertIntToDecimalStringN(gStringVar2, summary->level, 0, 3);
@@ -2747,12 +2747,12 @@ static void sub_81C2628(void)
strArray[0] = CHAR_SLASH;
StringCopy(&strArray[1], &gSpeciesNames[summary->species2][0]);
SummaryScreen_PrintTextOnWindow(PSS_LABEL_WINDOW_PORTRAIT_SPECIES, &strArray[0], 0, 1, 0, 1);
- sub_81C27DC(mon, summary->species2);
+ PrintGenderSymbol(mon, summary->species2);
PutWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_NICKNAME);
PutWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_SPECIES);
}
-static void sub_81C2794(void)
+static void PrintEggInfo(void)
{
GetMonNickname(&sMonSummaryScreen->currentMon, gStringVar1);
SummaryScreen_PrintTextOnWindow(PSS_LABEL_WINDOW_PORTRAIT_NICKNAME, gStringVar1, 0, 1, 0, 1);
@@ -2761,7 +2761,7 @@ static void sub_81C2794(void)
ClearWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_SPECIES);
}
-static void sub_81C27DC(struct Pokemon *mon, u16 species)
+static void PrintGenderSymbol(struct Pokemon *mon, u16 species)
{
if (species != SPECIES_NIDORAN_M && species != SPECIES_NIDORAN_F)
{
diff --git a/src/recorded_battle.c b/src/recorded_battle.c
index b2aa3c008..bd1974d48 100644
--- a/src/recorded_battle.c
+++ b/src/recorded_battle.c
@@ -37,8 +37,8 @@ struct PlayerInfo
struct MovePp
{
- u16 moves[4];
- u8 pp[4];
+ u16 moves[MAX_MON_MOVES];
+ u8 pp[MAX_MON_MOVES];
};
struct RecordedBattleSave
@@ -91,7 +91,7 @@ EWRAM_DATA static u32 sBattleFlags = 0;
EWRAM_DATA static u32 sAI_Scripts = 0;
EWRAM_DATA static struct Pokemon sSavedPlayerParty[PARTY_SIZE] = {0};
EWRAM_DATA static struct Pokemon sSavedOpponentParty[PARTY_SIZE] = {0};
-EWRAM_DATA static u16 sPlayerMonMoves[2][4] = {0};
+EWRAM_DATA static u16 sPlayerMonMoves[2][MAX_MON_MOVES] = {0};
EWRAM_DATA static struct PlayerInfo sPlayers[MAX_BATTLERS_COUNT] = {0};
EWRAM_DATA static u8 sUnknown_0203CCD0 = 0;
EWRAM_DATA static u8 sRecordMixFriendName[PLAYER_NAME_LENGTH + 1] = {0};
@@ -766,11 +766,11 @@ void sub_818603C(u8 arg0)
{
if (sBattleRecords[battlerId][sRecordedBytesNo[battlerId]] == ACTION_MOVE_CHANGE)
{
- u8 ppBonuses[4];
- u8 array1[4];
- u8 array2[4];
+ u8 ppBonuses[MAX_MON_MOVES];
+ u8 array1[MAX_MON_MOVES];
+ u8 array2[MAX_MON_MOVES];
struct MovePp movePp;
- u8 array3[8];
+ u8 array3[(MAX_MON_MOVES * 2)];
u8 var;
RecordedBattle_GetBattlerAction(battlerId);
diff --git a/src/region_map.c b/src/region_map.c
index 4957f1cac..3bb532a19 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -24,6 +24,7 @@
#include "region_map.h"
#include "constants/region_map_sections.h"
#include "heal_location.h"
+#include "constants/field_specials.h"
#include "constants/heal_locations.h"
#include "constants/map_types.h"
#include "constants/rgb.h"
@@ -1144,20 +1145,20 @@ static void RegionMap_InitializeStateBasedOnSSTidalLocation(void)
x = 0;
switch (GetSSTidalLocation(&mapGroup, &mapNum, &xOnMap, &yOnMap))
{
- case 1:
+ case SS_TIDAL_LOCATION_SLATEPORT:
gRegionMap->mapSecId = MAPSEC_SLATEPORT_CITY;
break;
- case 2:
+ case SS_TIDAL_LOCATION_LILYCOVE:
gRegionMap->mapSecId = MAPSEC_LILYCOVE_CITY;
break;
- case 3:
+ case SS_TIDAL_LOCATION_ROUTE124:
gRegionMap->mapSecId = MAPSEC_ROUTE_124;
break;
- case 4:
+ case SS_TIDAL_LOCATION_ROUTE131:
gRegionMap->mapSecId = MAPSEC_ROUTE_131;
break;
default:
- case 0:
+ case SS_TIDAL_LOCATION_OTHER:
mapHeader = Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum);
gRegionMap->mapSecId = mapHeader->regionMapSectionId;
diff --git a/src/scrcmd.c b/src/scrcmd.c
index 0326a56a4..4c8895ab8 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -1247,7 +1247,7 @@ bool8 ScrCmd_releaseall(struct ScriptContext *ctx)
HideFieldMessageBox();
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
- sub_80D338C();
+ ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
return FALSE;
}
@@ -1261,7 +1261,7 @@ bool8 ScrCmd_release(struct ScriptContext *ctx)
EventObjectClearHeldMovementIfFinished(&gEventObjects[gSelectedEventObject]);
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
- sub_80D338C();
+ ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
return FALSE;
}
@@ -1624,7 +1624,7 @@ bool8 ScrCmd_bufferstdstring(struct ScriptContext *ctx)
u8 stringVarIndex = ScriptReadByte(ctx);
u16 index = VarGet(ScriptReadHalfword(ctx));
- StringCopy(sScriptStringVars[stringVarIndex], gUnknown_0858BAF0[index]);
+ StringCopy(sScriptStringVars[stringVarIndex], gStdStrings[index]);
return FALSE;
}
diff --git a/src/script_menu.c b/src/script_menu.c
index c1dc2af63..7afe30080 100644
--- a/src/script_menu.c
+++ b/src/script_menu.c
@@ -13,1026 +13,30 @@
#include "strings.h"
#include "task.h"
#include "text.h"
+#include "constants/field_specials.h"
#include "constants/items.h"
+#include "constants/script_menu.h"
#include "constants/songs.h"
-// multichoice lists
-const struct MenuAction MultichoiceList_000[] =
-{
- {gUnknown_085EAD37, NULL},
- {gUnknown_085EAD41, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_002[] =
-{
- {gUnknown_085EAD67, NULL},
- {gUnknown_085EAD6D, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_003[] =
-{
- {gUnknown_085EAD72, NULL},
- {gUnknown_085EAD84, NULL},
- {gUnknown_085EAD96, NULL},
- {gText_Cancel2, NULL},
-};
-
-const struct MenuAction MultichoiceList_004[] =
-{
- {gText_CoolnessContest, NULL},
- {gText_BeautyContest, NULL},
- {gText_CutenessContest, NULL},
- {gText_SmartnessContest, NULL},
- {gText_ToughnessContest, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_006[] =
-{
- {gUnknown_085EADF9, NULL},
- {gUnknown_085EAE04, NULL},
- {gUnknown_085EAE12, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_005[] =
-{
- {gUnknown_085EADF9, NULL},
- {gUnknown_085EAE04, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_007[] =
-{
- {gMenuText_Register, NULL},
- {gUnknown_085EAE12, NULL},
- {gUnknown_085EAE1B, NULL},
- {gText_Cancel2, NULL},
-};
-
-const struct MenuAction MultichoiceList_012[] =
-{
- {gUnknown_085EAE27, NULL},
- {gUnknown_085EAE2C, NULL},
-};
-
-const struct MenuAction MultichoiceList_013[] =
-{
- {gUnknown_085EAE31, NULL},
- {gUnknown_085EAE35, NULL},
- {gUnknown_085EAE39, NULL},
- {gUnknown_085EAE3D, NULL},
- {gUnknown_085EAE41, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_014[] =
-{
- {gUnknown_085EAD5F, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_016[] =
-{
- {gUnknown_085EAE53, NULL},
- {gUnknown_085EAE5A, NULL},
-};
-
-const struct MenuAction MultichoiceList_020[] =
-{
- {gText_Yes, NULL},
- {gText_No, NULL},
- {gUnknown_085EAD6D, NULL},
-};
-
-const struct MenuAction MultichoiceList_023[] =
-{
- {gUnknown_085EAEA2, NULL},
- {gUnknown_085EAEAC, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_024[] =
-{
- {gText_Lv50, NULL},
- {gText_OpenLevel, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_025[] = //Trick House Mechadoll 1, Question 1
-{
- {gTrickHouse_Mechadoll_Oddish, NULL},
- {gTrickHouse_Mechadoll_Poochyena, NULL},
- {gTrickHouse_Mechadoll_Taillow, NULL},
-};
-
-const struct MenuAction MultichoiceList_026[] = //Trick House Mechadoll 1, Question 2
-{
- {gTrickHouse_Mechadoll_Azurill, NULL},
- {gTrickHouse_Mechadoll_Lotad, NULL},
- {gTrickHouse_Mechadoll_Wingull, NULL},
-};
-
-const struct MenuAction MultichoiceList_027[] = //Trick House Mechadoll 1, Question 3
-{
- {gTrickHouse_Mechadoll_Dustox, NULL},
- {gTrickHouse_Mechadoll_Zubat, NULL},
- {gTrickHouse_Mechadoll_Nincada, NULL},
-};
-
-const struct MenuAction MultichoiceList_028[] = //Trick House Mechadoll 2, Question 1
-{
- {gTrickHouse_Mechadoll_Ralts, NULL},
- {gTrickHouse_Mechadoll_Zigzagoon, NULL},
- {gTrickHouse_Mechadoll_Slakoth, NULL},
-};
-
-const struct MenuAction MultichoiceList_029[] = //Trick House Mechadoll 2, Question 2
-{
- {gTrickHouse_Mechadoll_Poochyena2, NULL},
- {gTrickHouse_Mechadoll_Shroomish, NULL},
- {gTrickHouse_Mechadoll_Zigzagoon2, NULL},
-};
-
-const struct MenuAction MultichoiceList_030[] = //Trick House Mechadoll 2, Question 3
-{
- {gTrickHouse_Mechadoll_Poochyena3, NULL},
- {gTrickHouse_Mechadoll_Zubat2, NULL},
- {gTrickHouse_Mechadoll_Carvanha, NULL},
-};
-
-const struct MenuAction MultichoiceList_031[] = //Trick House Mechadoll 3, Question 1
-{
- {gTrickHouse_Mechadoll_BurnHeal, NULL},
- {gTrickHouse_Mechadoll_HarborMail, NULL},
- {gTrickHouse_Mechadoll_SamePrice, NULL},
-};
+#include "data/script_menu.h"
-const struct MenuAction MultichoiceList_032[] = //Trick House Mechadoll 3, Question 2
-{
- {gTrickHouse_Mechadoll_60Yen, NULL},
- {gTrickHouse_Mechadoll_55Yen, NULL},
- {gTrickHouse_Mechadoll_Nothing, NULL},
-};
-
-const struct MenuAction MultichoiceList_033[] = //Trick House Mechadoll 3, Question 3
-{
- {gTrickHouse_Mechadoll_CostMore, NULL},
- {gTrickHouse_Mechadoll_CostLess, NULL},
- {gTrickHouse_Mechadoll_SamePrice2, NULL},
-};
+static EWRAM_DATA u8 sProcessInputDelay = 0;
-const struct MenuAction MultichoiceList_034[] = //Trick House Mechadoll 4, Question 1
-{
- {gTrickHouse_Mechadoll_Male, NULL},
- {gTrickHouse_Mechadoll_Female, NULL},
- {gTrickHouse_Mechadoll_Neither, NULL},
-};
+static u8 sLilycoveSSTidalSelections[SSTIDAL_SELECTION_COUNT];
-const struct MenuAction MultichoiceList_035[] = //Trick House Mechadoll 4, Question 2
-{
- {gTrickHouse_Mechadoll_ElderlyMen, NULL},
- {gTrickHouse_Mechadoll_ElderlyLadies, NULL},
- {gTrickHouse_Mechadoll_SameNumber, NULL},
-};
-
-const struct MenuAction MultichoiceList_036[] = //Trick House Mechadoll 4, Question 3
-{
- {gTrickHouse_Mechadoll_None, NULL},
- {gTrickHouse_Mechadoll_One, NULL},
- {gTrickHouse_Mechadoll_Two, NULL},
-};
-
-const struct MenuAction MultichoiceList_037[] = //Trick House Mechadoll 5, Question 1
-{
- {gTrickHouse_Mechadoll_Two2, NULL},
- {gTrickHouse_Mechadoll_Three, NULL},
- {gTrickHouse_Mechadoll_Four, NULL},
-};
-
-const struct MenuAction MultichoiceList_038[] = //Trick House Mechadoll 5, Question 2
-{
- {gTrickHouse_Mechadoll_Six, NULL},
- {gTrickHouse_Mechadoll_Seven, NULL},
- {gTrickHouse_Mechadoll_Eight, NULL},
-};
-
-const struct MenuAction MultichoiceList_039[] = //Trick House Mechadoll 5, Question 3
-{
- {gTrickHouse_Mechadoll_Six2, NULL},
- {gTrickHouse_Mechadoll_Seven2, NULL},
- {gTrickHouse_Mechadoll_Eight2, NULL},
-};
-
-const struct MenuAction MultichoiceList_042[] =
-{
- {gUnknown_085EAEC3, NULL},
- {gUnknown_085EAED6, NULL},
- {gUnknown_085EAEE6, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_043[] =
-{
- {gUnknown_085EAEF6, NULL},
- {gUnknown_085EAF02, NULL},
- {gUnknown_085EAF0E, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_044[] =
-{
- {gUnknown_085EAF1B, NULL},
- {gUnknown_085EAF24, NULL},
- {gUnknown_085EAF2F, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_045[] =
-{
- {gUnknown_085EAF34, NULL},
- {gUnknown_085EAF3E, NULL},
-};
-
-const struct MenuAction MultichoiceList_046[] =
-{
- {gUnknown_085EAF4B, NULL},
- {gUnknown_085EAF58, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_047[] =
-{
- {gUnknown_085EAF65, NULL},
- {gUnknown_085EAF70, NULL},
- {gUnknown_085EAF7D, NULL},
- {gUnknown_085EAF87, NULL},
- {gUnknown_085EAF93, NULL},
- {gUnknown_085EAF9F, NULL},
- {gUnknown_085EAFAB, NULL},
- {gText_Cancel2, NULL},
-};
-
-const struct MenuAction MultichoiceList_048[] =
-{
- {gUnknown_085EAFB6, NULL},
- {gUnknown_085EAFCF, NULL},
- {gUnknown_085EAFE8, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_055[] =
-{
- {gUnknown_085EB089, NULL},
- {gUnknown_085EB09C, NULL},
- {gUnknown_085EB0AF, NULL},
- {gUnknown_085EB0C2, NULL},
- {gUnknown_085EB0D5, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_049[] =
-{
- {gUnknown_085EB002, NULL},
- {gUnknown_085EB017, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_050[] =
-{
- {gUnknown_085EB02A, NULL},
- {gUnknown_085EB034, NULL},
-};
-
-const struct MenuAction MultichoiceList_052[] =
-{
- {gText_LilycoveCity, NULL},
- {gText_BattleFrontier, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_053[] =
-{
- {gText_SlateportCity, NULL},
- {gText_LilycoveCity, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_054[] =
-{
- {gUnknown_085EB07E, NULL},
- {gUnknown_085EB084, NULL},
-};
-
-const struct MenuAction MultichoiceList_056[] =
-{
- {gText_LilycoveCity, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_057[] =
-{
- {gText_5F, NULL},
- {gText_4F, NULL},
- {gText_3F, NULL},
- {gText_2F, NULL},
- {gText_1F, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_058[] =
-{
- {gUnknown_085EB040, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_059[] =
-{
- {gUnknown_085EB04A, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_060[] =
-{
- {gUnknown_085EB040, NULL},
- {gUnknown_085EB04A, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_061[] =
-{
- {gUnknown_085EB057, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_062[] =
-{
- {gUnknown_085EB040, NULL},
- {gUnknown_085EB057, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_063[] =
-{
- {gUnknown_085EB04A, NULL},
- {gUnknown_085EB057, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_064[] =
-{
- {gUnknown_085EB040, NULL},
- {gUnknown_085EB04A, NULL},
- {gUnknown_085EB057, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_065[] =
-{
- {gUnknown_085EB062, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_066[] =
-{
- {gUnknown_085EB040, NULL},
- {gUnknown_085EB062, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_067[] =
-{
- {gUnknown_085EB04A, NULL},
- {gUnknown_085EB062, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_068[] =
-{
- {gUnknown_085EB040, NULL},
- {gUnknown_085EB04A, NULL},
- {gUnknown_085EB062, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_069[] =
-{
- {gUnknown_085EB057, NULL},
- {gUnknown_085EB062, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_070[] =
-{
- {gUnknown_085EB040, NULL},
- {gUnknown_085EB057, NULL},
- {gUnknown_085EB062, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_071[] =
-{
- {gUnknown_085EB04A, NULL},
- {gUnknown_085EB057, NULL},
- {gUnknown_085EB062, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_072[] =
-{
- {gUnknown_085EB040, NULL},
- {gUnknown_085EB04A, NULL},
- {gUnknown_085EB057, NULL},
- {gUnknown_085EB062, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_073[] =
-{
- {gText_Opponent, NULL},
- {gText_Tourney_Tree, NULL},
- {gText_ReadyToStart, NULL},
- {gUnknown_085EB5BC, NULL},
- {gUnknown_085EB5C3, NULL},
- {gUnknown_085EB5C8, NULL},
-};
-
-const struct MenuAction MultichoiceList_107[] =
-{
- {gText_Opponent, NULL},
- {gText_Tourney_Tree, NULL},
- {gText_ReadyToStart, NULL},
- {gUnknown_085EB5C3, NULL},
- {gUnknown_085EB5C8, NULL},
-};
-
-const struct MenuAction MultichoiceList_088[] =
-{
- {gUnknown_085EB29A, NULL},
- {gUnknown_085EB2A3, NULL},
-};
-
-const struct MenuAction MultichoiceList_076[] =
-{
- {gUnknown_085EB372, NULL},
- {gUnknown_085EB37F, NULL},
- {gUnknown_085EB389, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_017[] =
-{
- {gText_Yes, NULL},
- {gText_No, NULL},
- {gUnknown_085EAD6D, NULL},
-};
-
-const struct MenuAction MultichoiceList_018[] =
-{
- {gUnknown_085EAE6E, NULL},
- {gUnknown_085EAE7C, NULL},
- {gUnknown_085EAE8A, NULL},
- {gUnknown_085EAD6D, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_078[] =
-{
- {gUnknown_085EB372, NULL},
- {gUnknown_085EB37F, NULL},
- {gUnknown_085EB397, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_079[] =
-{
- {gUnknown_085EB372, NULL},
- {gUnknown_085EB37F, NULL},
- {gUnknown_085EB389, NULL},
- {gUnknown_085EB397, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_074[] =
-{
- {gUnknown_085EB372, NULL},
- {gUnknown_085EB37F, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_080[] =
-{
- {gUnknown_085EB3A4, NULL},
- {gUnknown_085EB3B1, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_081[] =
-{
- {gUnknown_085EB3D4, NULL},
- {gUnknown_085EB3C6, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_082[] =
-{
- {gText_NormalRank, NULL},
- {gText_SuperRank, NULL},
- {gText_HyperRank, NULL},
- {gText_MasterRank, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_083[] =
-{
- {gText_BattleBag, NULL},
- {gText_HeldItem, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_084[] =
-{
- {gText_LinkContest, NULL},
- {gText_AboutE_Mode, NULL},
- {gText_AboutG_Mode, NULL},
- {gText_Cancel2, NULL},
-};
-
-const struct MenuAction MultichoiceList_085[] =
-{
- {gText_E_Mode, NULL},
- {gText_G_Mode, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_086[] =
-{
- {gText_MenuOptionPokedex, NULL},
- {gText_MenuOptionPokemon, NULL},
- {gText_MenuOptionBag, NULL},
- {gText_MenuOptionPokenav, NULL},
- {gUnknown_085EB278, NULL},
- {gText_MenuOptionSave, NULL},
- {gText_MenuOptionOption, NULL},
- {gText_MenuOptionExit, NULL},
-};
-
-const struct MenuAction MultichoiceList_087[] =
-{
- {gUnknown_085EB28A, NULL},
- {gUnknown_085EB290, NULL},
- {gUnknown_085EB295, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_089[] =
-{
- {gText_SouthernIsland, NULL},
- {gText_BirthIsland, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_090[] =
-{
- {gText_SouthernIsland, NULL},
- {gText_FarawayIsland, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_091[] =
-{
- {gText_BirthIsland, NULL},
- {gText_FarawayIsland, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_092[] =
-{
- {gText_SouthernIsland, NULL},
- {gText_BirthIsland, NULL},
- {gText_FarawayIsland, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_093[] =
-{
- {gUnknown_085EB2E4, NULL},
- {gUnknown_085EB2F0, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_094[] =
-{
- {gText_Yes, NULL},
- {gUnknown_085EB2FC, NULL},
-};
-
-const struct MenuAction MultichoiceList_095[] =
-{
- {gUnknown_085EB3DF, NULL},
- {gUnknown_085EB3EA, NULL},
- {gUnknown_085EB3F1, NULL},
- {gUnknown_085EB3FC, NULL},
- {gUnknown_085EB40A, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_011[] =
-{
- {gUnknown_085EB415, NULL},
- {gUnknown_085EB41D, NULL},
- {gUnknown_085EB424, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_096[] =
-{
- {gUnknown_085EB45C, NULL},
- {gUnknown_085EB469, NULL},
- {gUnknown_085EB475, NULL},
- {gUnknown_085EB482, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_097[] =
-{
- {gUnknown_085EB42F, NULL},
- {gUnknown_085EB43A, NULL},
- {gUnknown_085EB444, NULL},
- {gUnknown_085EB451, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_098[] =
-{
- {gUnknown_085EB48E, NULL},
- {gUnknown_085EB496, NULL},
- {gUnknown_085EB4A3, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_099[] =
-{
- {gUnknown_085EB4AD, NULL},
- {gUnknown_085EB4B9, NULL},
- {gUnknown_085EB4C7, NULL},
- {gUnknown_085EB4D4, NULL},
- {gUnknown_085EB4E0, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_100[] =
-{
- {gText_BattleBasics, NULL},
- {gText_PokemonNature, NULL},
- {gText_PokemonMoves, NULL},
- {gText_Underpowered, NULL},
- {gText_WhenInDanger, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_101[] =
-{
- {gUnknown_085EB532, NULL},
- {gUnknown_085EB543, NULL},
- {gUnknown_085EB555, NULL},
- {gUnknown_085EB563, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_102[] =
-{
- {gUnknown_085EB56E, NULL},
- {gUnknown_085EB57E, NULL},
- {gUnknown_085EB589, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_103[] =
-{
- {gUnknown_085EB5B6, NULL},
- {gUnknown_085EB5BC, NULL},
- {gUnknown_085EB5C3, NULL},
- {gUnknown_085EB5C8, NULL},
-};
-
-const struct MenuAction MultichoiceList_104[] =
-{
- {gUnknown_085EB5B6, NULL},
- {gUnknown_085EB5C3, NULL},
- {gUnknown_085EB5C8, NULL},
-};
-
-const struct MenuAction MultichoiceList_105[] =
-{
- {gUnknown_085EB5B6, NULL},
- {gUnknown_085EB5BC, NULL},
- {gUnknown_085EB5C8, NULL},
-};
-
-const struct MenuAction MultichoiceList_106[] =
-{
- {gUnknown_085EB5B6, NULL},
- {gUnknown_085EB5C8, NULL},
-};
-
-const struct MenuAction MultichoiceList_108[] =
-{
- {gUnknown_085EE14B, NULL},
- {gUnknown_085EE14F, NULL},
-};
-
-const struct MenuAction MultichoiceList_109[] =
-{
- {gUnknown_085EB2FF, NULL},
- {gUnknown_085EB310, NULL},
- {gUnknown_085EB317, NULL},
- {gUnknown_085EB31F, NULL},
-};
-
-const struct MenuAction MultichoiceList_110[] =
-{
- {gText_CaveOfOrigin, NULL},
- {gText_MtPyre, NULL},
- {gText_SkyPillar, NULL},
- {gText_DontRemember, NULL},
-};
-
-const struct MenuAction MultichoiceList_111[] =
-{
- {gUnknown_085EB4AD, NULL},
- {gUnknown_085EB4B9, NULL},
- {gUnknown_085EB4C7, NULL},
- {gUnknown_085EB4D4, NULL},
- {gUnknown_085EB597, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_112[] =
-{
- {gText_BattleTrainers, NULL},
- {gUnknown_085EB45C, NULL},
- {gUnknown_085EB469, NULL},
- {gUnknown_085EB475, NULL},
- {gUnknown_085EB482, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_113[] =
-{
- {gText_NormalTagMatch, NULL},
- {gText_VarietyTagMatch, NULL},
- {gText_UniqueTagMatch, NULL},
- {gText_ExpertTagMatch, NULL},
- {gText_Exit, NULL},
-};
-
-const struct MenuAction MultichoiceList_001[] =
-{
- {gText_Exit, NULL},
-};
-
-struct MultichoiceListStruct
-{
- const struct MenuAction *list;
- u8 count;
-};
-
-const struct MultichoiceListStruct gMultichoiceLists[] =
-{
- {MultichoiceList_000, ARRAY_COUNT(MultichoiceList_000)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_002, ARRAY_COUNT(MultichoiceList_002)},
- {MultichoiceList_003, ARRAY_COUNT(MultichoiceList_003)},
- {MultichoiceList_004, ARRAY_COUNT(MultichoiceList_004)},
- {MultichoiceList_005, ARRAY_COUNT(MultichoiceList_005)},
- {MultichoiceList_006, ARRAY_COUNT(MultichoiceList_006)},
- {MultichoiceList_007, ARRAY_COUNT(MultichoiceList_007)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_011, ARRAY_COUNT(MultichoiceList_011)},
- {MultichoiceList_012, ARRAY_COUNT(MultichoiceList_012)},
- {MultichoiceList_013, ARRAY_COUNT(MultichoiceList_013)},
- {MultichoiceList_014, ARRAY_COUNT(MultichoiceList_014)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_016, ARRAY_COUNT(MultichoiceList_016)},
- {MultichoiceList_017, ARRAY_COUNT(MultichoiceList_017)},
- {MultichoiceList_018, ARRAY_COUNT(MultichoiceList_018)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_020, ARRAY_COUNT(MultichoiceList_020)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_023, ARRAY_COUNT(MultichoiceList_023)},
- {MultichoiceList_024, ARRAY_COUNT(MultichoiceList_024)},
- {MultichoiceList_025, ARRAY_COUNT(MultichoiceList_025)},
- {MultichoiceList_026, ARRAY_COUNT(MultichoiceList_026)},
- {MultichoiceList_027, ARRAY_COUNT(MultichoiceList_027)},
- {MultichoiceList_028, ARRAY_COUNT(MultichoiceList_028)},
- {MultichoiceList_029, ARRAY_COUNT(MultichoiceList_029)},
- {MultichoiceList_030, ARRAY_COUNT(MultichoiceList_030)},
- {MultichoiceList_031, ARRAY_COUNT(MultichoiceList_031)},
- {MultichoiceList_032, ARRAY_COUNT(MultichoiceList_032)},
- {MultichoiceList_033, ARRAY_COUNT(MultichoiceList_033)},
- {MultichoiceList_034, ARRAY_COUNT(MultichoiceList_034)},
- {MultichoiceList_035, ARRAY_COUNT(MultichoiceList_035)},
- {MultichoiceList_036, ARRAY_COUNT(MultichoiceList_036)},
- {MultichoiceList_037, ARRAY_COUNT(MultichoiceList_037)},
- {MultichoiceList_038, ARRAY_COUNT(MultichoiceList_038)},
- {MultichoiceList_039, ARRAY_COUNT(MultichoiceList_039)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_042, ARRAY_COUNT(MultichoiceList_042)},
- {MultichoiceList_043, ARRAY_COUNT(MultichoiceList_043)},
- {MultichoiceList_044, ARRAY_COUNT(MultichoiceList_044)},
- {MultichoiceList_045, ARRAY_COUNT(MultichoiceList_045)},
- {MultichoiceList_046, ARRAY_COUNT(MultichoiceList_046)},
- {MultichoiceList_047, ARRAY_COUNT(MultichoiceList_047)},
- {MultichoiceList_048, ARRAY_COUNT(MultichoiceList_048)},
- {MultichoiceList_049, ARRAY_COUNT(MultichoiceList_049)},
- {MultichoiceList_050, ARRAY_COUNT(MultichoiceList_050)},
- {MultichoiceList_001, ARRAY_COUNT(MultichoiceList_001)},
- {MultichoiceList_052, ARRAY_COUNT(MultichoiceList_052)},
- {MultichoiceList_053, ARRAY_COUNT(MultichoiceList_053)},
- {MultichoiceList_054, ARRAY_COUNT(MultichoiceList_054)},
- {MultichoiceList_055, ARRAY_COUNT(MultichoiceList_055)},
- {MultichoiceList_056, ARRAY_COUNT(MultichoiceList_056)},
- {MultichoiceList_057, ARRAY_COUNT(MultichoiceList_057)},
- {MultichoiceList_058, ARRAY_COUNT(MultichoiceList_058)},
- {MultichoiceList_059, ARRAY_COUNT(MultichoiceList_059)},
- {MultichoiceList_060, ARRAY_COUNT(MultichoiceList_060)},
- {MultichoiceList_061, ARRAY_COUNT(MultichoiceList_061)},
- {MultichoiceList_062, ARRAY_COUNT(MultichoiceList_062)},
- {MultichoiceList_063, ARRAY_COUNT(MultichoiceList_063)},
- {MultichoiceList_064, ARRAY_COUNT(MultichoiceList_064)},
- {MultichoiceList_065, ARRAY_COUNT(MultichoiceList_065)},
- {MultichoiceList_066, ARRAY_COUNT(MultichoiceList_066)},
- {MultichoiceList_067, ARRAY_COUNT(MultichoiceList_067)},
- {MultichoiceList_068, ARRAY_COUNT(MultichoiceList_068)},
- {MultichoiceList_069, ARRAY_COUNT(MultichoiceList_069)},
- {MultichoiceList_070, ARRAY_COUNT(MultichoiceList_070)},
- {MultichoiceList_071, ARRAY_COUNT(MultichoiceList_071)},
- {MultichoiceList_072, ARRAY_COUNT(MultichoiceList_072)},
- {MultichoiceList_073, ARRAY_COUNT(MultichoiceList_073)},
- {MultichoiceList_074, ARRAY_COUNT(MultichoiceList_074)},
- {MultichoiceList_074, ARRAY_COUNT(MultichoiceList_074)},
- {MultichoiceList_076, ARRAY_COUNT(MultichoiceList_076)},
- {MultichoiceList_076, ARRAY_COUNT(MultichoiceList_076)},
- {MultichoiceList_078, ARRAY_COUNT(MultichoiceList_078)},
- {MultichoiceList_079, ARRAY_COUNT(MultichoiceList_079)},
- {MultichoiceList_080, ARRAY_COUNT(MultichoiceList_080)},
- {MultichoiceList_081, ARRAY_COUNT(MultichoiceList_081)},
- {MultichoiceList_082, ARRAY_COUNT(MultichoiceList_082)},
- {MultichoiceList_083, ARRAY_COUNT(MultichoiceList_083)},
- {MultichoiceList_084, ARRAY_COUNT(MultichoiceList_084)},
- {MultichoiceList_085, ARRAY_COUNT(MultichoiceList_085)},
- {MultichoiceList_086, ARRAY_COUNT(MultichoiceList_086)},
- {MultichoiceList_087, ARRAY_COUNT(MultichoiceList_087)},
- {MultichoiceList_088, ARRAY_COUNT(MultichoiceList_088)},
- {MultichoiceList_089, ARRAY_COUNT(MultichoiceList_089)},
- {MultichoiceList_090, ARRAY_COUNT(MultichoiceList_090)},
- {MultichoiceList_091, ARRAY_COUNT(MultichoiceList_091)},
- {MultichoiceList_092, ARRAY_COUNT(MultichoiceList_092)},
- {MultichoiceList_093, ARRAY_COUNT(MultichoiceList_093)},
- {MultichoiceList_094, ARRAY_COUNT(MultichoiceList_094)},
- {MultichoiceList_095, ARRAY_COUNT(MultichoiceList_095)},
- {MultichoiceList_096, ARRAY_COUNT(MultichoiceList_096)},
- {MultichoiceList_097, ARRAY_COUNT(MultichoiceList_097)},
- {MultichoiceList_098, ARRAY_COUNT(MultichoiceList_098)},
- {MultichoiceList_099, ARRAY_COUNT(MultichoiceList_099)},
- {MultichoiceList_100, ARRAY_COUNT(MultichoiceList_100)},
- {MultichoiceList_101, ARRAY_COUNT(MultichoiceList_101)},
- {MultichoiceList_102, ARRAY_COUNT(MultichoiceList_102)},
- {MultichoiceList_103, ARRAY_COUNT(MultichoiceList_103)},
- {MultichoiceList_104, ARRAY_COUNT(MultichoiceList_104)},
- {MultichoiceList_105, ARRAY_COUNT(MultichoiceList_105)},
- {MultichoiceList_106, ARRAY_COUNT(MultichoiceList_106)},
- {MultichoiceList_107, ARRAY_COUNT(MultichoiceList_107)},
- {MultichoiceList_108, ARRAY_COUNT(MultichoiceList_108)},
- {MultichoiceList_109, ARRAY_COUNT(MultichoiceList_109)},
- {MultichoiceList_110, ARRAY_COUNT(MultichoiceList_110)},
- {MultichoiceList_111, ARRAY_COUNT(MultichoiceList_111)},
- {MultichoiceList_112, ARRAY_COUNT(MultichoiceList_112)},
- {MultichoiceList_113, ARRAY_COUNT(MultichoiceList_113)},
-};
-
-const u8 *const gUnknown_0858BAF0[] =
-{
- gText_Cool,
- gText_Beauty,
- gText_Cute,
- gText_Smart,
- gText_Tough,
- gText_Normal,
- gText_Super,
- gText_Hyper,
- gText_Master,
- gText_Cool2,
- gText_Beauty2,
- gText_Cute2,
- gText_Smart2,
- gText_Tough2,
- gText_Items,
- gText_Key_Items,
- gText_Poke_Balls,
- gText_TMs_Hms,
- gText_Berries2,
- gText_Single2,
- gText_Double2,
- gText_Multi,
- gText_MultiLink,
- gText_BattleTower2,
- gText_BattleDome,
- gText_BattleFactory,
- gText_BattlePalace,
- gText_BattleArena,
- gText_BattlePike,
- gText_BattlePyramid,
-};
-
-const u8 gUnknown_0858BB68[] = { 74, 75, 76, 77, 78, 79 };
-
-const u8 *const sPCNameStrings[] =
-{
- gText_SomeonesPC,
- gText_LanettesPC,
- gText_PlayersPC,
- gText_LogOff,
-};
-
-const u8 *const gUnknown_0858BB80[] =
-{
- gText_SlateportCity,
- gText_BattleFrontier,
- gText_SouthernIsland,
- gText_NavelRock,
- gText_BirthIsland,
- gText_FarawayIsland,
- gText_Exit,
-};
-
-const u8 *const gUnknown_0858BB9C[] =
-{
- OldaleTown_PokemonCenter_2F_Text_277F1B,
- OldaleTown_PokemonCenter_2F_Text_277F5A,
- OldaleTown_PokemonCenter_2F_Text_277F96,
- OldaleTown_PokemonCenter_2F_Text_27889C,
-};
-const u8 *const gUnknown_0858BBAC[] =
-{
- OldaleTown_PokemonCenter_2F_Text_27879F,
- OldaleTown_PokemonCenter_2F_Text_2787D5,
- OldaleTown_PokemonCenter_2F_Text_278831,
- OldaleTown_PokemonCenter_2F_Text_27889C,
-};
-const u8 *const gUnknown_0858BBBC[] =
-{
- OldaleTown_PokemonCenter_2F_Text_27879F,
- OldaleTown_PokemonCenter_2F_Text_2787D5,
- OldaleTown_PokemonCenter_2F_Text_2787FC,
- OldaleTown_PokemonCenter_2F_Text_27889C,
-};
-const u8 *const gUnknown_0858BBCC[] =
-{
- OldaleTown_PokemonCenter_2F_Text_27879F,
- OldaleTown_PokemonCenter_2F_Text_2787D5,
- OldaleTown_PokemonCenter_2F_Text_278831,
- OldaleTown_PokemonCenter_2F_Text_2787FC,
- OldaleTown_PokemonCenter_2F_Text_27889C,
-};
-const u8 *const gUnknown_0858BBE0[] =
-{
- OldaleTown_PokemonCenter_2F_Text_277F1B,
- OldaleTown_PokemonCenter_2F_Text_277F5A,
- OldaleTown_PokemonCenter_2F_Text_27889C,
-};
-const u8 *const gUnknown_0858BBEC[] =
-{
- OldaleTown_PokemonCenter_2F_Text_27879F,
- OldaleTown_PokemonCenter_2F_Text_2787D5,
- OldaleTown_PokemonCenter_2F_Text_27889C,
-};
-
-EWRAM_DATA u8 gUnknown_02039F90 = 0;
-
-static u8 gUnknown_03001124[7];
-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 Task_HandleMultichoiceInput(u8 taskId);
+static void Task_HandleYesNoInput(u8 taskId);
+static void Task_HandleMultichoiceGridInput(u8 taskId);
+static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 cursorPos);
+static void InitMultichoiceCheckWrap(bool8 ignoreBPress, u8 count, u8 windowId, u8 multichoiceId);
+static void DrawLinkServicesMultichoiceMenu(u8 multichoiceId);
+static void CreatePCMultichoice(void);
+static void CreateLilycoveSSTidalMultichoice(void);
static bool8 IsPicboxClosed(void);
-static void CreateStartMenu(void);
-static void sub_80E2CC4(u8, u8, u8, u8);
+static void CreateStartMenuForPokenavTutorial(void);
+static void InitMultichoiceNoWrap(bool8 ignoreBPress, u8 unusedCount, u8 windowId, u8 multichoiceId);
-bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPress)
+bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress)
{
if (FuncIsActiveTask(Task_HandleMultichoiceInput) == TRUE)
{
@@ -1060,7 +64,8 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8
}
}
-static u16 sub_80E1EB8(const u8 *str)
+// Unused
+static u16 GetLengthWithExpandedPlayerName(const u8 *str)
{
u16 length = 0;
@@ -1069,7 +74,7 @@ static u16 sub_80E1EB8(const u8 *str)
if (*str == PLACEHOLDER_BEGIN)
{
str++;
- if (*str == 1)
+ if (*str == PLACEHOLDER_ID_PLAYER)
{
length += StringLength(gSaveBlock2Ptr->playerName);
str++;
@@ -1085,28 +90,28 @@ static u16 sub_80E1EB8(const u8 *str)
return length;
}
-static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPress, u8 cursorPos)
+static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 cursorPos)
{
int i;
u8 windowId;
- u8 count = gMultichoiceLists[multichoiceId].count;
- const struct MenuAction *actions = gMultichoiceLists[multichoiceId].list;
+ u8 count = sMultichoiceLists[multichoiceId].count;
+ const struct MenuAction *actions = sMultichoiceLists[multichoiceId].list;
int width = 0;
u8 newWidth;
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);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, cursorPos);
schedule_bg_copy_tilemap_to_vram(0);
- sub_80E1FBC(ignoreBPress, count, windowId, multichoiceId);
+ InitMultichoiceCheckWrap(ignoreBPress, count, windowId, multichoiceId);
}
#define tLeft data[0]
@@ -1118,17 +123,17 @@ static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPre
#define tWindowId data[6]
#define tMultichoiceId data[7]
-static void sub_80E1FBC(u8 ignoreBPress, u8 count, u8 windowId, u8 multichoiceId)
+static void InitMultichoiceCheckWrap(bool8 ignoreBPress, u8 count, u8 windowId, u8 multichoiceId)
{
u8 i;
u8 taskId;
- gUnknown_02039F90 = 2;
+ sProcessInputDelay = 2;
- for (i = 0; i < 6; i++)
+ for (i = 0; i < ARRAY_COUNT(sLinkServicesMultichoiceIds); i++)
{
- if (gUnknown_0858BB68[i] == multichoiceId)
+ if (sLinkServicesMultichoiceIds[i] == multichoiceId)
{
- gUnknown_02039F90 = 12;
+ sProcessInputDelay = 12;
}
}
@@ -1144,7 +149,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)
@@ -1154,9 +159,9 @@ static void Task_HandleMultichoiceInput(u8 taskId)
if (!gPaletteFade.active)
{
- if (gUnknown_02039F90)
+ if (sProcessInputDelay)
{
- gUnknown_02039F90--;
+ sProcessInputDelay--;
}
else
{
@@ -1167,7 +172,7 @@ static void Task_HandleMultichoiceInput(u8 taskId)
if (gMain.newKeys & (DPAD_UP | DPAD_DOWN))
{
- sub_80E2A94(tMultichoiceId);
+ DrawLinkServicesMultichoiceMenu(tMultichoiceId);
}
if (selection != MENU_NOTHING_CHOSEN)
@@ -1177,7 +182,7 @@ static void Task_HandleMultichoiceInput(u8 taskId)
if (tIgnoreBPress)
return;
PlaySE(SE_SELECT);
- gSpecialVar_Result = 127;
+ gSpecialVar_Result = MULTI_B_PRESSED;
}
else
{
@@ -1208,7 +213,7 @@ bool8 ScriptMenu_YesNo(u8 left, u8 top)
}
}
-// unused
+// Unused
bool8 IsScriptActive(void)
{
if (gSpecialVar_Result == 0xFF)
@@ -1243,7 +248,7 @@ static void Task_HandleYesNoInput(u8 taskId)
EnableBothScriptContexts();
}
-bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPress, u8 columnCount)
+bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 columnCount)
{
if (FuncIsActiveTask(Task_HandleMultichoiceGridInput) == TRUE)
{
@@ -1258,22 +263,22 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPr
gSpecialVar_Result = 0xFF;
width = 0;
- for (i = 0; i < gMultichoiceLists[multichoiceId].count; i++)
+ for (i = 0; i < sMultichoiceLists[multichoiceId].count; i++)
{
- width = display_text_and_get_width(gMultichoiceLists[multichoiceId].list[i].text, width);
+ width = DisplayTextAndGetWidth(sMultichoiceLists[multichoiceId].list[i].text, width);
}
- newWidth = convert_pixel_width_to_tile_width(width);
+ newWidth = ConvertPixelWidthToTileWidth(width);
- left = sub_80E2D5C(left, columnCount * newWidth);
- rowCount = gMultichoiceLists[multichoiceId].count / columnCount;
+ left = ScriptMenu_AdjustLeftCoordFromWidth(left, columnCount * newWidth);
+ rowCount = sMultichoiceLists[multichoiceId].count / columnCount;
taskId = CreateTask(Task_HandleMultichoiceGridInput, 80);
gTasks[taskId].tIgnoreBPress = ignoreBPress;
gTasks[taskId].tWindowId = CreateWindowFromRect(left, top, columnCount * newWidth, rowCount * 2);
SetStandardWindowBorderStyle(gTasks[taskId].tWindowId, 0);
- PrintMenuGridTable(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, gMultichoiceLists[multichoiceId].list);
+ PrintMenuGridTable(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, sMultichoiceLists[multichoiceId].list);
sub_8199944(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, 0);
CopyWindowToVram(gTasks[taskId].tWindowId, 3);
return TRUE;
@@ -1293,7 +298,7 @@ static void Task_HandleMultichoiceGridInput(u8 taskId)
if (tIgnoreBPress)
return;
PlaySE(SE_SELECT);
- gSpecialVar_Result = 0x7F;
+ gSpecialVar_Result = MULTI_B_PRESSED;
break;
default:
gSpecialVar_Result = selection;
@@ -1307,7 +312,7 @@ static void Task_HandleMultichoiceGridInput(u8 taskId)
#undef tWindowId
-bool16 ScrSpecial_CreatePCMenu(void)
+bool16 ScriptMenu_CreatePCMultichoice(void)
{
if (FuncIsActiveTask(Task_HandleMultichoiceInput) == TRUE)
{
@@ -1316,12 +321,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;
@@ -1332,17 +337,18 @@ 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?
+ // Include Hall of Fame option if player is champion
+ if (FlagGet(FLAG_SYS_GAME_CLEAR))
{
numChoices = 4;
windowId = CreateWindowFromRect(0, 0, width, 8);
@@ -1358,7 +364,8 @@ static void CreatePCMenu(void)
AddTextPrinterParameterized(windowId, 1, gText_LogOff, y, 33, TEXT_SPEED_FF, NULL);
}
- if (FlagGet(FLAG_SYS_PC_LANETTE)) // player met lanette?
+ // Change PC name if player has met Lanette
+ if (FlagGet(FLAG_SYS_PC_LANETTE))
AddTextPrinterParameterized(windowId, 1, gText_LanettesPC, y, 1, TEXT_SPEED_FF, NULL);
else
AddTextPrinterParameterized(windowId, 1, gText_SomeonesPC, y, 1, TEXT_SPEED_FF, NULL);
@@ -1367,7 +374,7 @@ static void CreatePCMenu(void)
PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, numChoices, 0);
CopyWindowToVram(windowId, 3);
- sub_80E1FBC(FALSE, numChoices, windowId, 1);
+ InitMultichoiceCheckWrap(FALSE, numChoices, windowId, MULTI_PC);
}
void ScriptMenu_DisplayPCStartupPrompt(void)
@@ -1376,7 +383,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)
{
@@ -1385,14 +392,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;
@@ -1400,21 +409,22 @@ static void sub_80E2578(void)
u8 i;
u32 j;
- for (i = 0; i < ARRAY_COUNT(gUnknown_03001124); i++)
+ for (i = 0; i < SSTIDAL_SELECTION_COUNT; 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++;
}
}
@@ -1422,14 +432,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);
}
}
@@ -1438,14 +448,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);
}
}
@@ -1454,14 +464,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);
}
}
@@ -1470,69 +480,69 @@ 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 = 11;
- sub_813A128();
+ gSpecialVar_0x8004 = SCROLL_MULTI_SS_TIDAL_DESTINATION;
+ ShowScrollableMultichoice();
}
else
{
pixelWidth = 0;
- for (j = 0; j < ARRAY_COUNT(gUnknown_0858BB80); j++)
+ for (j = 0; j < SSTIDAL_SELECTION_COUNT; j++)
{
- u8 test = gUnknown_03001124[j];
- if (test != 0xFF)
+ u8 selection = sLilycoveSSTidalSelections[j];
+ if (selection != 0xFF)
{
- pixelWidth = display_text_and_get_width(gUnknown_0858BB80[test], pixelWidth);
+ pixelWidth = DisplayTextAndGetWidth(sLilycoveSSTidalDestinations[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(gUnknown_0858BB80); i++)
+ for (selectionCount = 0, i = 0; i < SSTIDAL_SELECTION_COUNT; i++)
{
- if (gUnknown_03001124[i] != 0xFF)
+ if (sLilycoveSSTidalSelections[i] != 0xFF)
{
- AddTextPrinterParameterized(windowId, 1, gUnknown_0858BB80[gUnknown_03001124[i]], 8, temp * 16 + 1, TEXT_SPEED_FF, NULL);
- temp++;
+ AddTextPrinterParameterized(windowId, 1, sLilycoveSSTidalDestinations[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);
+ InitMultichoiceCheckWrap(FALSE, count, windowId, MULTI_SSTIDAL_LILYCOVE);
}
}
-void sub_80E2878(void)
+void GetLilycoveSSTidalSelection(void)
{
- if (gSpecialVar_Result != 0x7F)
+ if (gSpecialVar_Result != MULTI_B_PRESSED)
{
- gSpecialVar_Result = gUnknown_03001124[gSpecialVar_Result];
+ gSpecialVar_Result = sLilycoveSSTidalSelections[gSpecialVar_Result];
}
}
@@ -1629,50 +639,52 @@ void ClearToTransparentAndRemoveWindow(u8 windowId)
RemoveWindow(windowId);
}
-static void sub_80E2A94(u8 multichoiceId)
+static void DrawLinkServicesMultichoiceMenu(u8 multichoiceId)
{
switch (multichoiceId)
{
- case 77:
+ case MULTI_WIRELESS_NO_BERRY:
FillWindowPixelBuffer(0, PIXEL_FILL(1));
- AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
+ AddTextPrinterParameterized2(0, 1, sWirelessOptionsNoBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
- case 76:
+ case MULTI_CABLE_CLUB_WITH_RECORD_MIX:
FillWindowPixelBuffer(0, PIXEL_FILL(1));
- AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
+ AddTextPrinterParameterized2(0, 1, sCableClubOptions_WithRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
- case 78:
+ case MULTI_WIRELESS_NO_RECORD:
FillWindowPixelBuffer(0, PIXEL_FILL(1));
- AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
+ AddTextPrinterParameterized2(0, 1, sWirelessOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
- case 79:
+ case MULTI_WIRELESS_ALL_SERVICES:
FillWindowPixelBuffer(0, PIXEL_FILL(1));
- AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
+ AddTextPrinterParameterized2(0, 1, sWirelessOptions_AllServices[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
- case 75:
+ case MULTI_WIRELESS_NO_RECORD_BERRY:
FillWindowPixelBuffer(0, PIXEL_FILL(1));
- AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
+ AddTextPrinterParameterized2(0, 1, sWirelessOptions_NoRecordMixBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
- case 74:
+ case MULTI_CABLE_CLUB_NO_RECORD_MIX:
FillWindowPixelBuffer(0, PIXEL_FILL(1));
- AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
+ AddTextPrinterParameterized2(0, 1, sCableClubOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
}
}
-bool16 sp106_CreateStartMenu(void)
+bool16 ScriptMenu_CreateStartMenuForPokenavTutorial(void)
{
if (FuncIsActiveTask(Task_HandleMultichoiceInput) == TRUE)
{
return FALSE;
}
-
- gSpecialVar_Result = 0xFF;
- CreateStartMenu();
- return TRUE;
+ else
+ {
+ gSpecialVar_Result = 0xFF;
+ CreateStartMenuForPokenavTutorial();
+ return TRUE;
+ }
}
-static void CreateStartMenu(void)
+static void CreateStartMenuForPokenavTutorial(void)
{
u8 windowId = CreateWindowFromRect(21, 0, 7, 18);
SetStandardWindowBorderStyle(windowId, 0);
@@ -1684,17 +696,17 @@ static void CreateStartMenu(void)
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL);
- sub_81983AC(windowId, 1, 0, 9, 16, 8, 0);
- sub_80E2CC4(0, 8, windowId, 86);
+ sub_81983AC(windowId, 1, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0);
+ InitMultichoiceNoWrap(FALSE, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), windowId, MULTI_FORCED_START_MENU);
CopyWindowToVram(windowId, 3);
}
#define tWindowId data[6]
-static void sub_80E2CC4(bool8 ignoreBPress, u8 unused, u8 windowId, u8 multichoiceId)
+static void InitMultichoiceNoWrap(bool8 ignoreBPress, u8 unusedCount, u8 windowId, u8 multichoiceId)
{
u8 taskId;
- gUnknown_02039F90 = 2;
+ sProcessInputDelay = 2;
taskId = CreateTask(Task_HandleMultichoiceInput, 80);
gTasks[taskId].tIgnoreBPress = ignoreBPress;
gTasks[taskId].tDoWrap = 0;
@@ -1711,47 +723,43 @@ 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 prevWidth)
{
- int len = display_text_and_get_width_internal(str);
- if (len < prevMaxWidth)
+ int width = DisplayTextAndGetWidthInternal(str);
+ if (width < prevWidth)
{
- len = prevMaxWidth;
+ width = prevWidth;
}
- return len;
+ return width;
}
-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/script_movement.c b/src/script_movement.c
index 9fee9e060..03d6b10e8 100644
--- a/src/script_movement.c
+++ b/src/script_movement.c
@@ -3,20 +3,22 @@
#include "event_object_movement.h"
#include "task.h"
#include "util.h"
+#include "constants/event_objects.h"
+#include "constants/event_object_movement_constants.h"
// static functions
-static void sub_80D33AC(u8);
-static u8 sub_80D33F4(void);
-static bool8 sub_80D3408(u8, u8, const u8 *);
-static u8 sub_80D3474(u8, u8);
-static bool8 sub_80D3584(u8, u8);
-static void sub_80D35DC(u8, u8, u8, const u8 *);
-static void UnfreezeObjects(u8);
-static void sub_80D3660(u8);
-static void sub_80A2490(u8, u8, u8, const u8 *);
+static void ScriptMovement_StartMoveObjects(u8 priority);
+static u8 GetMoveObjectsTaskId(void);
+static bool8 ScriptMovement_TryAddNewMovement(u8 taskId, u8 eventObjId, const u8 *movementScript);
+static u8 GetMovementScriptIdFromEventObjectId(u8 taskId, u8 eventObjId);
+static bool8 IsMovementScriptFinished(u8 taskId, u8 moveScrId);
+static void ScriptMovement_AddNewMovement(u8 taskId, u8 moveScrId, u8 eventObjId, const u8 *movementScript);
+static void ScriptMovement_UnfreezeActiveObjects(u8 taskId);
+static void ScriptMovement_MoveObjects(u8 taskId);
+static void ScriptMovement_TakeStep(u8 taskId, u8 moveScrId, u8 eventObjId, const u8 *movementScript);
// EWRAM_DATA
-static EWRAM_DATA const u8 *gUnknown_02039D90[16] = {0};
+static EWRAM_DATA const u8 *gMovementScripts[EVENT_OBJECTS_COUNT] = {0};
// text
bool8 ScriptMovement_StartObjectMovementScript(u8 localId, u8 mapNum, u8 mapGroup, const u8 *movementScript)
@@ -25,207 +27,207 @@ bool8 ScriptMovement_StartObjectMovementScript(u8 localId, u8 mapNum, u8 mapGrou
if (TryGetEventObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &eventObjId))
return TRUE;
- if (!FuncIsActiveTask(sub_80D3660))
- sub_80D33AC(50);
- return sub_80D3408(sub_80D33F4(), eventObjId, movementScript);
+ if (!FuncIsActiveTask(ScriptMovement_MoveObjects))
+ ScriptMovement_StartMoveObjects(50);
+ return ScriptMovement_TryAddNewMovement(GetMoveObjectsTaskId(), eventObjId, movementScript);
}
-bool8 ScriptMovement_IsObjectMovementFinished(u8 localId, u8 mapNum, u8 mapBank)
+bool8 ScriptMovement_IsObjectMovementFinished(u8 localId, u8 mapNum, u8 mapGroup)
{
u8 eventObjId;
- u8 r4;
- u8 r1;
+ u8 taskId;
+ u8 moveScrId;
- if (TryGetEventObjectIdByLocalIdAndMap(localId, mapNum, mapBank, &eventObjId))
+ if (TryGetEventObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &eventObjId))
return TRUE;
- r4 = sub_80D33F4();
- r1 = sub_80D3474(r4, eventObjId);
- if (r1 == 16)
+ taskId = GetMoveObjectsTaskId();
+ moveScrId = GetMovementScriptIdFromEventObjectId(taskId, eventObjId);
+ if (moveScrId == EVENT_OBJECTS_COUNT)
return TRUE;
- return sub_80D3584(r4, r1);
+ return IsMovementScriptFinished(taskId, moveScrId);
}
-void sub_80D338C(void)
+void ScriptMovement_UnfreezeEventObjects(void)
{
u8 taskId;
- taskId = sub_80D33F4();
+ taskId = GetMoveObjectsTaskId();
if (taskId != 0xFF)
{
- UnfreezeObjects(taskId);
+ ScriptMovement_UnfreezeActiveObjects(taskId);
DestroyTask(taskId);
}
}
-
-static void sub_80D33AC(u8 priority)
+static void ScriptMovement_StartMoveObjects(u8 priority)
{
u8 taskId;
u8 i;
- taskId = CreateTask(sub_80D3660, priority);
- for (i = 1; i < 16; i++)
+ taskId = CreateTask(ScriptMovement_MoveObjects, priority);
+
+ for (i = 1; i < NUM_TASK_DATA; i++)
gTasks[taskId].data[i] = 0xFFFF;
}
-static u8 sub_80D33F4(void)
+static u8 GetMoveObjectsTaskId(void)
{
- return FindTaskIdByFunc(sub_80D3660);
+ return FindTaskIdByFunc(ScriptMovement_MoveObjects);
}
-static bool8 sub_80D3408(u8 taskId, u8 eventObjId, const u8 *movementScript)
+static bool8 ScriptMovement_TryAddNewMovement(u8 taskId, u8 eventObjId, const u8 *movementScript)
{
- u8 r4;
+ u8 moveScrId;
- r4 = sub_80D3474(taskId, eventObjId);
- if (r4 != 16)
+ moveScrId = GetMovementScriptIdFromEventObjectId(taskId, eventObjId);
+ if (moveScrId != EVENT_OBJECTS_COUNT)
{
- if (sub_80D3584(taskId, r4) == 0)
+ if (IsMovementScriptFinished(taskId, moveScrId) == 0)
{
return TRUE;
}
else
{
- sub_80D35DC(taskId, r4, eventObjId, movementScript);
+ ScriptMovement_AddNewMovement(taskId, moveScrId, eventObjId, movementScript);
return FALSE;
}
}
- r4 = sub_80D3474(taskId, 0xFF);
- if (r4 == 16)
+ moveScrId = GetMovementScriptIdFromEventObjectId(taskId, EVENT_OBJ_ID_PLAYER);
+ if (moveScrId == EVENT_OBJECTS_COUNT)
{
return TRUE;
}
else
{
- sub_80D35DC(taskId, r4, eventObjId, movementScript);
+ ScriptMovement_AddNewMovement(taskId, moveScrId, eventObjId, movementScript);
return FALSE;
}
}
-static u8 sub_80D3474(u8 taskId, u8 b)
+static u8 GetMovementScriptIdFromEventObjectId(u8 taskId, u8 eventObjId)
{
- u8 *ptr;
+ u8 *moveScriptId;
u8 i;
- ptr = (u8 *)&gTasks[taskId].data[1];
- for (i = 0; i < 16; i++, ptr++)
+ moveScriptId = (u8 *)&gTasks[taskId].data[1];
+ for (i = 0; i < EVENT_OBJECTS_COUNT; i++, moveScriptId++)
{
- if (*ptr == b)
+ if (*moveScriptId == eventObjId)
return i;
}
- return 16;
+ return EVENT_OBJECTS_COUNT;
}
-static void sub_80D34B0(u8 taskId, u8 b, u8 **c)
+static void LoadEventObjectIdPtrFromMovementScript(u8 taskId, u8 moveScrId, u8 **pEventObjId)
{
u8 i;
- *c = (u8 *)&gTasks[taskId].data[1];
- for (i = 0; i < b; i++, (*c)++)
+ *pEventObjId = (u8 *)&gTasks[taskId].data[1];
+ for (i = 0; i < moveScrId; i++, (*pEventObjId)++)
;
}
-static void sub_80D34E4(u8 taskId, u8 b, u8 c)
+static void SetEventObjectIdAtMovementScript(u8 taskId, u8 moveScrId, u8 eventObjId)
{
u8 *ptr;
- sub_80D34B0(taskId, b, &ptr);
- *ptr = c; //what is this supposed to do?
+ LoadEventObjectIdPtrFromMovementScript(taskId, moveScrId, &ptr);
+ *ptr = eventObjId;
}
-static void sub_80D3508(u8 taskId, u8 b, u8 *c)
+static void LoadEventObjectIdFromMovementScript(u8 taskId, u8 moveScrId, u8 *eventObjId)
{
u8 *ptr;
- sub_80D34B0(taskId, b, &ptr);
- *c = *ptr;
+ LoadEventObjectIdPtrFromMovementScript(taskId, moveScrId, &ptr);
+ *eventObjId = *ptr;
}
-static void sub_80D352C(u8 a, u8 b)
+static void ClearMovementScriptFinished(u8 taskId, u8 moveScrId)
{
- u16 var = ~gBitTable[b];
+ u16 mask = ~gBitTable[moveScrId];
- gTasks[a].data[0] &= var;
+ gTasks[taskId].data[0] &= mask;
}
-static void sub_80D355C(u8 taskId, u8 b)
+static void SetMovementScriptFinished(u8 taskId, u8 moveScrId)
{
- gTasks[taskId].data[0] |= gBitTable[b];
+ gTasks[taskId].data[0] |= gBitTable[moveScrId];
}
-static bool8 sub_80D3584(u8 taskId, u8 b)
+static bool8 IsMovementScriptFinished(u8 taskId, u8 moveScrId)
{
- u16 var = (u16)gTasks[taskId].data[0] & gBitTable[b];
+ u16 moveScriptFinished = (u16)gTasks[taskId].data[0] & gBitTable[moveScrId];
- if (var != 0)
+ if (moveScriptFinished != 0)
return TRUE;
else
return FALSE;
}
-static void npc_obj_offscreen_culling_and_flag_update(u8 a, const u8 *movementScript)
+static void SetMovementScript(u8 moveScrId, const u8 *movementScript)
{
- gUnknown_02039D90[a] = movementScript;
+ gMovementScripts[moveScrId] = movementScript;
}
-static const u8 *sub_80D35CC(u8 a)
+static const u8 *GetMovementScript(u8 moveScrId)
{
- return gUnknown_02039D90[a];
+ return gMovementScripts[moveScrId];
}
-static void sub_80D35DC(u8 taskId, u8 b, u8 eventObjId, const u8 *movementScript)
+static void ScriptMovement_AddNewMovement(u8 taskId, u8 moveScrId, u8 eventObjId, const u8 *movementScript)
{
- sub_80D352C(taskId, b);
- npc_obj_offscreen_culling_and_flag_update(b, movementScript);
- sub_80D34E4(taskId, b, eventObjId);
+ ClearMovementScriptFinished(taskId, moveScrId);
+ SetMovementScript(moveScrId, movementScript);
+ SetEventObjectIdAtMovementScript(taskId, moveScrId, eventObjId);
}
-static void UnfreezeObjects(u8 taskId)
+static void ScriptMovement_UnfreezeActiveObjects(u8 taskId)
{
u8 *pEventObjId;
u8 i;
pEventObjId = (u8 *)&gTasks[taskId].data[1];
- for (i = 0; i < 16; i++, pEventObjId++)
+ for (i = 0; i < EVENT_OBJECTS_COUNT; i++, pEventObjId++)
{
if (*pEventObjId != 0xFF)
UnfreezeEventObject(&gEventObjects[*pEventObjId]);
}
}
-static void sub_80D3660(u8 taskId)
+static void ScriptMovement_MoveObjects(u8 taskId)
{
u8 i;
- u8 var;
+ u8 eventObjId;
- for (i = 0; i < 16; i++)
+ for (i = 0; i < EVENT_OBJECTS_COUNT; i++)
{
- sub_80D3508(taskId, i, &var);
- if (var != 0xFF)
- sub_80A2490(taskId, i, var, sub_80D35CC(i));
+ LoadEventObjectIdFromMovementScript(taskId, i, &eventObjId);
+ if (eventObjId != 0xFF)
+ ScriptMovement_TakeStep(taskId, i, eventObjId, GetMovementScript(i));
}
}
-static void sub_80A2490(u8 taskId, u8 b, u8 eventObjId, const u8 *d)
+static void ScriptMovement_TakeStep(u8 taskId, u8 moveScrId, u8 eventObjId, const u8 *movementScript)
{
- u8 var;
+ u8 nextMoveActionId;
if (EventObjectIsHeldMovementActive(&gEventObjects[eventObjId])
&& !EventObjectClearHeldMovementIfFinished(&gEventObjects[eventObjId]))
return;
- var = *d;
- if (var == 0xFE)
+ nextMoveActionId = *movementScript;
+ if (nextMoveActionId == MOVEMENT_ACTION_STEP_END)
{
- sub_80D355C(taskId, b);
+ SetMovementScriptFinished(taskId, moveScrId);
FreezeEventObject(&gEventObjects[eventObjId]);
}
else
{
- if (!EventObjectSetHeldMovement(&gEventObjects[eventObjId], var))
+ if (!EventObjectSetHeldMovement(&gEventObjects[eventObjId], nextMoveActionId))
{
- d++;
- npc_obj_offscreen_culling_and_flag_update(b, d);
+ movementScript++;
+ SetMovementScript(moveScrId, movementScript);
}
}
}
diff --git a/src/script_pokemon_util_80F87D8.c b/src/script_pokemon_util_80F87D8.c
index 51bd73b1c..a80fe49ff 100755
--- a/src/script_pokemon_util_80F87D8.c
+++ b/src/script_pokemon_util_80F87D8.c
@@ -585,14 +585,14 @@ void HasEnoughMonsForDoubleBattle(void)
{
switch (GetMonsStateToDoubles())
{
- case 0:
- gSpecialVar_Result = 0;
+ case PLAYER_HAS_TWO_USABLE_MONS:
+ gSpecialVar_Result = PLAYER_HAS_TWO_USABLE_MONS;
break;
- case 1:
- gSpecialVar_Result = 1;
+ case PLAYER_HAS_ONE_MON:
+ gSpecialVar_Result = PLAYER_HAS_ONE_MON;
break;
- case 2:
- gSpecialVar_Result = 2;
+ case PLAYER_HAS_ONE_USABLE_MON:
+ gSpecialVar_Result = PLAYER_HAS_ONE_USABLE_MON;
break;
}
}
diff --git a/src/secret_base.c b/src/secret_base.c
index 71346d389..dc11c7aeb 100644
--- a/src/secret_base.c
+++ b/src/secret_base.c
@@ -349,7 +349,7 @@ void SetPlayerSecretBase(void)
u16 i;
gSaveBlock1Ptr->secretBases[0].secretBaseId = sCurSecretBaseId;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < TRAINER_ID_LENGTH; i++)
gSaveBlock1Ptr->secretBases[0].trainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
VarSet(VAR_CURRENT_SECRET_BASE, 0);
@@ -1291,7 +1291,7 @@ static void SetSecretBaseDataAndLanguage(u8 secretBaseId, struct SecretBase *sec
static bool8 SecretBasesHaveSameTrainerId(struct SecretBase *secretBase1, struct SecretBase *secretBase2)
{
u8 i;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < TRAINER_ID_LENGTH; i++)
{
if (secretBase1->trainerId[i] != secretBase2->trainerId[i])
return FALSE;
@@ -1445,7 +1445,7 @@ bool8 SecretBaseBelongsToPlayer(struct SecretBase *secretBase)
return FALSE;
// Check if the player's trainer Id matches the secret base's id.
- for (i = 0; i < 4; i++)
+ for (i = 0; i < TRAINER_ID_LENGTH; i++)
{
if (secretBase->trainerId[i] != gSaveBlock2Ptr->playerTrainerId[i])
return FALSE;
diff --git a/src/strings.c b/src/strings.c
index ebc995f13..ed702958e 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -599,89 +599,89 @@ const u8 gText_Brawly[] = _("BRAWLY");
const u8 gText_Winona[] = _("WINONA");
const u8 gText_Phoebe[] = _("PHOEBE");
const u8 gText_Glacia[] = _("GLACIA");
-const u8 gUnknown_085EAD37[] = _("PETALBURG");
-const u8 gUnknown_085EAD41[] = _("SLATEPORT");
-const u8 gUnknown_085EAD4B[] = _("LITTLEROOT");
-const u8 gUnknown_085EAD56[] = _("LILYCOVE");
-const u8 gUnknown_085EAD5F[] = _("DEWFORD");
-const u8 gUnknown_085EAD67[] = _("ENTER");
-const u8 gUnknown_085EAD6D[] = _("INFO");
-const u8 gUnknown_085EAD72[] = _("What's a CONTEST?");
-const u8 gUnknown_085EAD84[] = _("Types of CONTESTS");
-const u8 gUnknown_085EAD96[] = _("Ranks");
-const u8 gUnknown_085EAD9C[] = _("Judging");
+const u8 gText_Petalburg[] = _("PETALBURG");
+const u8 gText_Slateport[] = _("SLATEPORT");
+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");
+const u8 gText_WhatsAContest[] = _("What's a CONTEST?");
+const u8 gText_TypesOfContests[] = _("Types of CONTESTS");
+const u8 gText_Ranks[] = _("Ranks");
+const u8 gText_Judging[] = _("Judging"); //unused
const u8 gText_CoolnessContest[] = _("COOLNESS CONTEST");
const u8 gText_BeautyContest[] = _("BEAUTY CONTEST");
const u8 gText_CutenessContest[] = _("CUTENESS CONTEST");
const u8 gText_SmartnessContest[] = _("SMARTNESS CONTEST");
const u8 gText_ToughnessContest[] = _("TOUGHNESS CONTEST");
-const u8 gUnknown_085EADF9[] = _("DECORATION");
-const u8 gUnknown_085EAE04[] = _("PACK UP");
-const u8 gUnknown_085EAE0C[] = _("COUNT");
-const u8 gUnknown_085EAE12[] = _("REGISTRY");
-const u8 gUnknown_085EAE1B[] = _("INFORMATION");
-const u8 gUnknown_085EAE27[] = _("MACH");
-const u8 gUnknown_085EAE2C[] = _("ACRO");
-const u8 gUnknown_085EAE31[] = _("PSN");
-const u8 gUnknown_085EAE35[] = _("PAR");
-const u8 gUnknown_085EAE39[] = _("SLP");
-const u8 gUnknown_085EAE3D[] = _("BRN");
-const u8 gUnknown_085EAE41[] = _("FRZ");
+const u8 gText_Decoration2[] = _("DECORATION");
+const u8 gText_PackUp[] = _("PACK UP");
+const u8 gText_Count[] = _("COUNT"); //unused
+const u8 gText_Registry[] = _("REGISTRY");
+const u8 gText_Information[] = _("INFORMATION");
+const u8 gText_Mach[] = _("MACH");
+const u8 gText_Acro[] = _("ACRO");
+const u8 gText_Psn[] = _("PSN");
+const u8 gText_Par[] = _("PAR");
+const u8 gText_Slp[] = _("SLP");
+const u8 gText_Brn[] = _("BRN");
+const u8 gText_Frz[] = _("FRZ");
const u8 gUnknown_085EAE45[] = _("TOXIC");
const u8 gUnknown_085EAE4B[] = _("OK");
const u8 gUnknown_085EAE4E[] = _("QUIT");
-const u8 gUnknown_085EAE53[] = _("Saw it");
-const u8 gUnknown_085EAE5A[] = _("Not yet");
+const u8 gText_SawIt[] = _("Saw it");
+const u8 gText_NotYet[] = _("Not yet");
const u8 gText_Yes[] = _("YES");
const u8 gText_No[] = _("NO");
const u8 gUnknown_085EAE69[] = _("INFO");
-const u8 gUnknown_085EAE6E[] = _("SINGLE BATTLE");
-const u8 gUnknown_085EAE7C[] = _("DOUBLE BATTLE");
-const u8 gUnknown_085EAE8A[] = _("MULTI BATTLE");
+const u8 gText_SingleBattle[] = _("SINGLE BATTLE");
+const u8 gText_DoubleBattle[] = _("DOUBLE BATTLE");
+const u8 gText_MultiBattle[] = _("MULTI BATTLE");
const u8 gUnknown_085EAE97[] = _("MR. BRINEY");
-const u8 gUnknown_085EAEA2[] = _("CHALLENGE");
-const u8 gUnknown_085EAEAC[] = _("INFO");
+const u8 gText_Challenge[] = _("CHALLENGE");
+const u8 gText_Info3[] = _("INFO");
const u8 gText_Lv50[] = _("LV. 50");
const u8 gText_OpenLevel[] = _("OPEN LEVEL");
-const u8 gUnknown_085EAEC3[] = _("FRESH WATER{CLEAR_TO 0x48}¥200");
-const u8 gUnknown_085EAED6[] = _("SODA POP{CLEAR_TO 0x48}¥300");
-const u8 gUnknown_085EAEE6[] = _("LEMONADE{CLEAR_TO 0x48}¥350");
-const u8 gUnknown_085EAEF6[] = _("HOW TO RIDE");
-const u8 gUnknown_085EAF02[] = _("HOW TO TURN");
-const u8 gUnknown_085EAF0E[] = _("SANDY SLOPES");
-const u8 gUnknown_085EAF1B[] = _("WHEELIES");
-const u8 gUnknown_085EAF24[] = _("BUNNY-HOPS");
-const u8 gUnknown_085EAF2F[] = _("JUMP");
-const u8 gUnknown_085EAF34[] = _("Satisfied");
-const u8 gUnknown_085EAF3E[] = _("Dissatisfied");
-const u8 gUnknown_085EAF4B[] = _("DEEPSEATOOTH");
-const u8 gUnknown_085EAF58[] = _("DEEPSEASCALE");
-const u8 gUnknown_085EAF65[] = _("BLUE FLUTE");
-const u8 gUnknown_085EAF70[] = _("YELLOW FLUTE");
-const u8 gUnknown_085EAF7D[] = _("RED FLUTE");
-const u8 gUnknown_085EAF87[] = _("WHITE FLUTE");
-const u8 gUnknown_085EAF93[] = _("BLACK FLUTE");
-const u8 gUnknown_085EAF9F[] = _("GLASS CHAIR");
-const u8 gUnknown_085EAFAB[] = _("GLASS DESK");
-const u8 gUnknown_085EAFB6[] = _("TREECKO DOLL 1,000 COINS");
-const u8 gUnknown_085EAFCF[] = _("TORCHIC DOLL 1,000 COINS");
-const u8 gUnknown_085EAFE8[] = _("MUDKIP DOLL 1,000 COINS");
-const u8 gUnknown_085EB002[] = _(" 50 COINS ¥1,000");
-const u8 gUnknown_085EB017[] = _("500 COINS ¥10,000");
-const u8 gUnknown_085EB02A[] = _("Excellent");
-const u8 gUnknown_085EB034[] = _("Not so good");
-const u8 gUnknown_085EB040[] = _("RED SHARD");
-const u8 gUnknown_085EB04A[] = _("YELLOW SHARD");
-const u8 gUnknown_085EB057[] = _("BLUE SHARD");
-const u8 gUnknown_085EB062[] = _("GREEN SHARD");
+const u8 gText_FreshWaterAndPrice[] = _("FRESH WATER{CLEAR_TO 0x48}¥200");
+const u8 gText_SodaPopAndPrice[] = _("SODA POP{CLEAR_TO 0x48}¥300");
+const u8 gText_LemonadeAndPrice[] = _("LEMONADE{CLEAR_TO 0x48}¥350");
+const u8 gText_HowToRide[] = _("HOW TO RIDE");
+const u8 gText_HowToTurn[] = _("HOW TO TURN");
+const u8 gText_SandySlopes[] = _("SANDY SLOPES");
+const u8 gText_Wheelies[] = _("WHEELIES");
+const u8 gText_BunnyHops[] = _("BUNNY-HOPS");
+const u8 gText_Jump[] = _("JUMP");
+const u8 gText_Satisfied[] = _("Satisfied");
+const u8 gText_Dissatisfied[] = _("Dissatisfied");
+const u8 gText_DeepSeaTooth[] = _("DEEPSEATOOTH");
+const u8 gText_DeepSeaScale[] = _("DEEPSEASCALE");
+const u8 gText_BlueFlute2[] = _("BLUE FLUTE");
+const u8 gText_YellowFlute2[] = _("YELLOW FLUTE");
+const u8 gText_RedFlute2[] = _("RED FLUTE");
+const u8 gText_WhiteFlute2[] = _("WHITE FLUTE");
+const u8 gText_BlackFlute2[] = _("BLACK FLUTE");
+const u8 gText_GlassChair[] = _("GLASS CHAIR");
+const u8 gText_GlassDesk[] = _("GLASS DESK");
+const u8 gText_TreeckoDollAndPrice[] = _("TREECKO DOLL 1,000 COINS");
+const u8 gText_TorchicDollAndPrice[] = _("TORCHIC DOLL 1,000 COINS");
+const u8 gText_MudkipDollAndPrice[] = _("MUDKIP DOLL 1,000 COINS");
+const u8 gText_50CoinsAndPrice[] = _(" 50 COINS ¥1,000");
+const u8 gText_500CoinsAndPrice[] = _("500 COINS ¥10,000");
+const u8 gText_Excellent2[] = _("Excellent");
+const u8 gText_NotSoGood[] = _("Not so good");
+const u8 gText_RedShard[] = _("RED SHARD");
+const u8 gText_YellowShard[] = _("YELLOW SHARD");
+const u8 gText_BlueShard[] = _("BLUE SHARD");
+const u8 gText_GreenShard[] = _("GREEN SHARD");
const u8 gText_BattleFrontier[] = _("BATTLE FRONTIER");
-const u8 gUnknown_085EB07E[] = _("Right");
-const u8 gUnknown_085EB084[] = _("Left");
-const u8 gUnknown_085EB089[] = _("TM32{CLEAR_TO 0x48}1,500 COINS");
-const u8 gUnknown_085EB09C[] = _("TM29{CLEAR_TO 0x48}3,500 COINS");
-const u8 gUnknown_085EB0AF[] = _("TM35{CLEAR_TO 0x48}4,000 COINS");
-const u8 gUnknown_085EB0C2[] = _("TM24{CLEAR_TO 0x48}4,000 COINS");
-const u8 gUnknown_085EB0D5[] = _("TM13{CLEAR_TO 0x48}4,000 COINS");
+const u8 gText_Right[] = _("Right");
+const u8 gText_Left[] = _("Left");
+const u8 gText_TM32AndPrice[] = _("TM32{CLEAR_TO 0x48}1,500 COINS");
+const u8 gText_TM29AndPrice[] = _("TM29{CLEAR_TO 0x48}3,500 COINS");
+const u8 gText_TM35AndPrice[] = _("TM35{CLEAR_TO 0x48}4,000 COINS");
+const u8 gText_TM24AndPrice[] = _("TM24{CLEAR_TO 0x48}4,000 COINS");
+const u8 gText_TM13AndPrice[] = _("TM13{CLEAR_TO 0x48}4,000 COINS");
const u8 gText_Cool[] = _("COOL");
const u8 gText_Beauty[] = _("BEAUTY");
const u8 gText_Cute[] = _("CUTE");
@@ -728,82 +728,81 @@ const u8 gText_MenuOptionPokedex[] = _("POKéDEX");
const u8 gText_MenuOptionPokemon[] = _("POKéMON");
const u8 gText_MenuOptionBag[] = _("BAG");
const u8 gText_MenuOptionPokenav[] = _("POKéNAV");
-const u8 gUnknown_085EB278[] = _("");
+const u8 gText_Blank[] = _("");
const u8 gText_MenuOptionSave[] = _("SAVE");
const u8 gText_MenuOptionOption[] = _("OPTION");
const u8 gText_MenuOptionExit[] = _("EXIT");
-const u8 gUnknown_085EB28A[] = __(" ");
-const u8 gUnknown_085EB28C[] = _("5BP");
-const u8 gUnknown_085EB290[] = _("10BP");
-const u8 gUnknown_085EB295[] = _("15BP");
-const u8 gUnknown_085EB29A[] = _("RED TENT");
-const u8 gUnknown_085EB2A3[] = _("BLUE TENT");
+const u8 gText_5BP[] = _(" 5BP");
+const u8 gText_10BP[] = _("10BP");
+const u8 gText_15BP[] = _("15BP");
+const u8 gText_RedTent[] = _("RED TENT");
+const u8 gText_BlueTent[] = _("BLUE TENT");
const u8 gText_SouthernIsland[] = _("SOUTHERN ISLAND");
const u8 gText_BirthIsland[] = _("BIRTH ISLAND");
const u8 gText_FarawayIsland[] = _("FARAWAY ISLAND");
const u8 gText_NavelRock[] = _("NAVEL ROCK");
-const u8 gUnknown_085EB2E4[] = _("CLAW FOSSIL");
-const u8 gUnknown_085EB2F0[] = _("ROOT FOSSIL");
-const u8 gUnknown_085EB2FC[] = _("NO");
-const u8 gUnknown_085EB2FF[] = _("I'll battle now!");
-const u8 gUnknown_085EB310[] = _("I won!");
-const u8 gUnknown_085EB317[] = _("I lost!");
-const u8 gUnknown_085EB31F[] = _("I won't tell.");
+const u8 gText_ClawFossil[] = _("CLAW FOSSIL");
+const u8 gText_RootFossil[] = _("ROOT FOSSIL");
+const u8 gText_No4[] = _("NO");
+const u8 gText_IllBattleNow[] = _("I'll battle now!");
+const u8 gText_IWon[] = _("I won!");
+const u8 gText_ILost[] = _("I lost!");
+const u8 gText_IWontTell[] = _("I won't tell.");
const u8 gText_NormalTagMatch[] = _("NORMAL TAG MATCH");
const u8 gText_VarietyTagMatch[] = _("VARIETY TAG MATCH");
const u8 gText_UniqueTagMatch[] = _("UNIQUE TAG MATCH");
const u8 gText_ExpertTagMatch[] = _("EXPERT TAG MATCH");
-const u8 gUnknown_085EB372[] = _("TRADE CENTER");
-const u8 gUnknown_085EB37F[] = _("COLOSSEUM");
-const u8 gUnknown_085EB389[] = _("RECORD CORNER");
-const u8 gUnknown_085EB397[] = _("BERRY CRUSH");
+const u8 gText_TradeCenter[] = _("TRADE CENTER");
+const u8 gText_Colosseum[] = _("COLOSSEUM");
+const u8 gText_RecordCorner[] = _("RECORD CORNER");
+const u8 gText_BerryCrush3[] = _("BERRY CRUSH");
const u8 gUnknown_085EB3A3[] = _("");
-const u8 gUnknown_085EB3A4[] = _("POKéMON JUMP");
-const u8 gUnknown_085EB3B1[] = _("DODRIO BERRY-PICKING");
-const u8 gUnknown_085EB3C6[] = _("BECOME LEADER");
-const u8 gUnknown_085EB3D4[] = _("JOIN GROUP");
-const u8 gUnknown_085EB3DF[] = _("TWO STYLES");
-const u8 gUnknown_085EB3EA[] = _("LV. 50");
-const u8 gUnknown_085EB3F1[] = _("OPEN LEVEL");
-const u8 gUnknown_085EB3FC[] = _("{PKMN} TYPE & NO.");
-const u8 gUnknown_085EB40A[] = _("HOLD ITEMS");
-const u8 gUnknown_085EB415[] = _("SYMBOLS");
-const u8 gUnknown_085EB41D[] = _("RECORD");
-const u8 gUnknown_085EB424[] = _("BATTLE PTS");
-const u8 gUnknown_085EB42F[] = _("TOWER INFO");
-const u8 gUnknown_085EB43A[] = _("BATTLE {PKMN}");
-const u8 gUnknown_085EB444[] = _("BATTLE SALON");
-const u8 gUnknown_085EB451[] = _("MULTI-LINK");
-const u8 gUnknown_085EB45C[] = _("BATTLE RULES");
-const u8 gUnknown_085EB469[] = _("JUDGE: MIND");
-const u8 gUnknown_085EB475[] = _("JUDGE: SKILL");
-const u8 gUnknown_085EB482[] = _("JUDGE: BODY");
-const u8 gUnknown_085EB48E[] = _("MATCHUP");
-const u8 gUnknown_085EB496[] = _("TOURNEY TREE");
-const u8 gUnknown_085EB4A3[] = _("DOUBLE KO");
-const u8 gUnknown_085EB4AD[] = _("BASIC RULES");
-const u8 gUnknown_085EB4B9[] = _("SWAP: PARTNER");
-const u8 gUnknown_085EB4C7[] = _("SWAP: NUMBER");
-const u8 gUnknown_085EB4D4[] = _("SWAP: NOTES");
-const u8 gUnknown_085EB4E0[] = _("OPEN LEVEL");
+const u8 gText_PokemonJump[] = _("POKéMON JUMP");
+const u8 gText_DodrioBerryPicking[] = _("DODRIO BERRY-PICKING");
+const u8 gText_BecomeLeader[] = _("BECOME LEADER");
+const u8 gText_JoinGroup[] = _("JOIN GROUP");
+const u8 gText_TwoStyles[] = _("TWO STYLES");
+const u8 gText_Lv50_3[] = _("LV. 50");
+const u8 gText_OpenLevel2[] = _("OPEN LEVEL");
+const u8 gText_MonTypeAndNo[] = _("{PKMN} TYPE & NO.");
+const u8 gText_HoldItems[] = _("HOLD ITEMS");
+const u8 gText_Symbols2[] = _("SYMBOLS");
+const u8 gText_Record3[] = _("RECORD");
+const u8 gText_BattlePts[] = _("BATTLE PTS");
+const u8 gText_TowerInfo[] = _("TOWER INFO");
+const u8 gText_BattleMon[] = _("BATTLE {PKMN}");
+const u8 gText_BattleSalon[] = _("BATTLE SALON");
+const u8 gText_MultiLink2[] = _("MULTI-LINK");
+const u8 gText_BattleRules[] = _("BATTLE RULES");
+const u8 gText_JudgeMind[] = _("JUDGE: MIND");
+const u8 gText_JudgeSkill[] = _("JUDGE: SKILL");
+const u8 gText_JudgeBody[] = _("JUDGE: BODY");
+const u8 gText_Matchup[] = _("MATCHUP");
+const u8 gText_TourneyTree[] = _("TOURNEY TREE");
+const u8 gText_DoubleKO[] = _("DOUBLE KO");
+const u8 gText_BasicRules[] = _("BASIC RULES");
+const u8 gText_SwapPartners[] = _("SWAP: PARTNER");
+const u8 gText_SwapNumber[] = _("SWAP: NUMBER");
+const u8 gText_SwapNotes[] = _("SWAP: NOTES");
+const u8 gText_OpenLevel3[] = _("OPEN LEVEL");
const u8 gText_BattleBasics[] = _("BATTLE BASICS");
const u8 gText_PokemonNature[] = _("POKéMON NATURE");
const u8 gText_PokemonMoves[] = _("POKéMON MOVES");
const u8 gText_Underpowered[] = _("UNDERPOWERED");
const u8 gText_WhenInDanger[] = _("WHEN IN DANGER");
-const u8 gUnknown_085EB532[] = _("PYRAMID: POKéMON");
-const u8 gUnknown_085EB543[] = _("PYRAMID: TRAINERS");
-const u8 gUnknown_085EB555[] = _("PYRAMID: MAZE");
-const u8 gUnknown_085EB563[] = _("BATTLE BAG");
-const u8 gUnknown_085EB56E[] = _("POKéNAV AND BAG");
-const u8 gUnknown_085EB57E[] = _("HELD ITEMS");
-const u8 gUnknown_085EB589[] = _("POKéMON ORDER");
-const u8 gUnknown_085EB597[] = _("BATTLE POKéMON");
+const u8 gText_PyramidPokemon[] = _("PYRAMID: POKéMON");
+const u8 gText_PyramidTrainers[] = _("PYRAMID: TRAINERS");
+const u8 gText_PyramidMaze[] = _("PYRAMID: MAZE");
+const u8 gText_BattleBag2[] = _("BATTLE BAG");
+const u8 gText_PokenavAndBag[] = _("POKéNAV AND BAG");
+const u8 gText_HeldItems[] = _("HELD ITEMS");
+const u8 gText_PokemonOrder[] = _("POKéMON ORDER");
+const u8 gText_BattlePokemon[] = _("BATTLE POKéMON");
const u8 gText_BattleTrainers[] = _("BATTLE TRAINERS");
-const u8 gUnknown_085EB5B6[] = _("GO ON");
-const u8 gUnknown_085EB5BC[] = _("RECORD");
-const u8 gUnknown_085EB5C3[] = _("REST");
-const u8 gUnknown_085EB5C8[] = _("RETIRE");
+const u8 gText_GoOn[] = _("GO ON");
+const u8 gText_Record2[] = _("RECORD");
+const u8 gText_Rest[] = _("REST");
+const u8 gText_Retire[] = _("RETIRE");
const u8 gText_99TimesPlus[] = _("99 times +");
const u8 gText_1MinutePlus[] = _("1 minute +");
const u8 gText_SpaceSeconds[] = _(" seconds");
@@ -1292,7 +1291,7 @@ const u8 gMatchCall_MayTrainersPokemonText[] = _("I'll use any POKéMON!");
const u8 gMatchCall_MaySelfIntroductionText_Line1[] = _("My POKéMON and I help");
const u8 gMatchCall_MaySelfIntroductionText_Line2[] = _("my father's research.");
const u8 gText_HatchedFromEgg[] = _("{STR_VAR_1} hatched from the EGG!");
-const u8 gText_NickHatchPrompt[] = _("Would you like to nickname the newly\nhatched {STR_VAR_1}?");
+const u8 gText_NicknameHatchPrompt[] = _("Would you like to nickname the newly\nhatched {STR_VAR_1}?");
ALIGNED(4) const u8 gText_ReadyToBerryCrush[] = _("Are you ready to BERRY-CRUSH?\nPlease pick a BERRY for use.\p");
ALIGNED(4) const u8 gText_WaitForAllChooseBerry[] = _("Please wait while each member\nchooses a BERRY.");
ALIGNED(4) const u8 gText_EndedWithXUnitsPowder[] = _("{PAUSE_MUSIC}{PLAY_BGM MUS_FANFA1}You ended up with {STR_VAR_1} units of\nsilky-smooth BERRY POWDER.{RESUME_MUSIC}\pYour total amount of BERRY POWDER\nis {STR_VAR_2}.\p");
@@ -1419,8 +1418,8 @@ const u8 gUnknown_085EE0FA[] = _("つうしん しゅうりょう!");
const u8 gUnknown_085EE107[] = _("あらたな トレーナーが\nホウエンに やってきた!");
const u8 gUnknown_085EE120[] = _("しばらく おまちください");
const u8 gUnknown_085EE12D[] = _("かきこみ エラー です\nデータが ほぞん できませんでした");
-const u8 gUnknown_085EE14B[] = _("RED");
-const u8 gUnknown_085EE14F[] = _("BLUE");
+const u8 gText_Red[] = _("RED");
+const u8 gText_Blue[] = _("BLUE");
const u8 gUnknown_085EE154[] = _("---");
const u8 gText_SingleBattleRoomResults[] = _("{PLAYER}'s Single Battle Room Results");
const u8 gText_DoubleBattleRoomResults[] = _("{PLAYER}'s Double Battle Room Results");
diff --git a/src/trade.c b/src/trade.c
index 7e585e280..196d9659c 100644
--- a/src/trade.c
+++ b/src/trade.c
@@ -3032,7 +3032,7 @@ static u8 sub_8079A3C(u8 *str, u8 whichParty, u8 monIdx)
static void sub_8079AA4(u8 *a0, u8 a1, u8 a2)
{
- u16 arr[4];
+ u16 moves[MAX_MON_MOVES];
u16 i;
if (!gUnknown_0203229C->unk_51[a1][a2])
@@ -3041,11 +3041,11 @@ static void sub_8079AA4(u8 *a0, u8 a1, u8 a2)
{
if (!a1)
{
- arr[i] = GetMonData(&gPlayerParty[a2], i + MON_DATA_MOVE1, NULL);
+ moves[i] = GetMonData(&gPlayerParty[a2], i + MON_DATA_MOVE1, NULL);
}
else
{
- arr[i] = GetMonData(&gEnemyParty[a2], i + MON_DATA_MOVE1, NULL);
+ moves[i] = GetMonData(&gEnemyParty[a2], i + MON_DATA_MOVE1, NULL);
}
}
@@ -3053,9 +3053,9 @@ static void sub_8079AA4(u8 *a0, u8 a1, u8 a2)
for (i = 0; i < MAX_MON_MOVES; i++)
{
- if (arr[i] != MOVE_NONE)
+ if (moves[i] != MOVE_NONE)
{
- StringAppend(a0, gMoveNames[arr[i]]);
+ StringAppend(a0, gMoveNames[moves[i]]);
}
StringAppend(a0, gText_NewLine3);
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++)
diff --git a/src/tv.c b/src/tv.c
index 3e9390e61..4696a25e3 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -38,8 +38,10 @@
#include "secret_base.h"
#include "tv.h"
#include "data.h"
+#include "constants/contest.h"
#include "constants/layouts.h"
#include "constants/metatile_behaviors.h"
+#include "constants/script_menu.h"
// Static type declarations
@@ -182,7 +184,7 @@ static void DoTVShowPokemonContestLiveUpdates2(void);
static const struct {
u16 species;
- u16 moves[4];
+ u16 moves[MAX_MON_MOVES];
u8 level;
u8 location;
} sPokeOutbreakSpeciesList[] = {
@@ -2329,7 +2331,7 @@ void sub_80EE35C(u16 foeSpecies, u16 species, u8 moveIdx, const u16 *movePtr, u1
show->battleSeminar.foeSpecies = foeSpecies;
show->battleSeminar.species = species;
show->battleSeminar.move = movePtr[moveIdx];
- for (i = 0, j = 0; i < 4; i ++)
+ for (i = 0, j = 0; i < MAX_MON_MOVES; i ++)
{
if (i != moveIdx && movePtr[i])
{
@@ -2786,11 +2788,11 @@ bool8 GetPriceReduction(u8 newsKind)
{
u8 i;
- if (newsKind == 0)
+ if (newsKind == POKENEWS_NONE)
{
return FALSE;
}
- for (i = 0; i < 16; i ++)
+ for (i = 0; i < POKE_NEWS_COUNT; i ++)
{
if (gSaveBlock1Ptr->pokeNews[i].kind == newsKind)
{
@@ -2870,17 +2872,17 @@ void CopyContestRankToStringVar(u8 varIdx, u8 rank)
{
switch (rank)
{
- case 0: // NORMAL
- StringCopy(gTVStringVarPtrs[varIdx], gUnknown_0858BAF0[5]);
+ case CONTEST_RANK_NORMAL:
+ StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_NORMAL]);
break;
- case 1: // SUPER
- StringCopy(gTVStringVarPtrs[varIdx], gUnknown_0858BAF0[6]);
+ case CONTEST_RANK_SUPER:
+ StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_SUPER]);
break;
- case 2: // HYPER
- StringCopy(gTVStringVarPtrs[varIdx], gUnknown_0858BAF0[7]);
+ case CONTEST_RANK_HYPER:
+ StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_HYPER]);
break;
- case 3: // MASTER
- StringCopy(gTVStringVarPtrs[varIdx], gUnknown_0858BAF0[8]);
+ case CONTEST_RANK_MASTER:
+ StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_MASTER]);
break;
}
}
@@ -2889,20 +2891,20 @@ void CopyContestCategoryToStringVar(u8 varIdx, u8 category)
{
switch (category)
{
- case 0: // COOL
- StringCopy(gTVStringVarPtrs[varIdx], gUnknown_0858BAF0[0]);
+ case CONTEST_CATEGORY_COOL:
+ StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_COOL]);
break;
- case 1: // BEAUTY
- StringCopy(gTVStringVarPtrs[varIdx], gUnknown_0858BAF0[1]);
+ case CONTEST_CATEGORY_BEAUTY:
+ StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_BEAUTY]);
break;
- case 2: // CUTE
- StringCopy(gTVStringVarPtrs[varIdx], gUnknown_0858BAF0[2]);
+ case CONTEST_CATEGORY_CUTE:
+ StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_CUTE]);
break;
- case 3: // SMART
- StringCopy(gTVStringVarPtrs[varIdx], gUnknown_0858BAF0[3]);
+ case CONTEST_CATEGORY_SMART:
+ StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_SMART]);
break;
- case 4: // TOUGH
- StringCopy(gTVStringVarPtrs[varIdx], gUnknown_0858BAF0[4]);
+ case CONTEST_CATEGORY_TOUGH:
+ StringCopy(gTVStringVarPtrs[varIdx], gStdStrings[STDSTRING_TOUGH]);
break;
}
}
diff --git a/tools/gbafix/gbafix.c b/tools/gbafix/gbafix.c
index 9088cdc5f..598e43aa0 100644
--- a/tools/gbafix/gbafix.c
+++ b/tools/gbafix/gbafix.c
@@ -206,7 +206,7 @@ int main(int argc, char *argv[])
// parse command line
for (arg=1; arg<argc; arg++)
{
- if ((ARGV[0] == '-'))
+ if (ARGV[0] == '-')
{
switch (ARGV[1])
{