summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/apprentice.c4
-rw-r--r--src/data/script_menu.h1006
-rw-r--r--src/field_specials.c353
-rw-r--r--src/hof_pc.c2
-rw-r--r--src/international_string_util.c4
-rw-r--r--src/mauville_old_man.c2
-rw-r--r--src/pokemon.c12
-rw-r--r--src/scrcmd.c2
-rw-r--r--src/script_menu.c1279
-rwxr-xr-xsrc/script_pokemon_util_80F87D8.c12
-rw-r--r--src/string_util.c28
-rw-r--r--src/strings.c255
-rw-r--r--src/trader.c2
-rw-r--r--src/tv.c38
14 files changed, 1524 insertions, 1475 deletions
diff --git a/src/apprentice.c b/src/apprentice.c
index 76962807e..113b22f6e 100644
--- a/src/apprentice.c
+++ b/src/apprentice.c
@@ -1559,8 +1559,8 @@ static void CreateMenuWithAnswers(u8 arg0)
pixelWidth = width;
}
- width = convert_pixel_width_to_tile_width(pixelWidth);
- left = sub_80E2D5C(left, width);
+ width = ConvertPixelWidthToTileWidth(pixelWidth);
+ left = ScriptMenu_AdjustLeftCoordFromWidth(left, width);
windowId = CreateAndShowWindow(left, top, width, count * 2);
SetStandardWindowBorderStyle(windowId, 0);
diff --git a/src/data/script_menu.h b/src/data/script_menu.h
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/field_specials.c b/src/field_specials.c
index 18e938ede..0c4cc34e3 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -55,6 +55,7 @@
#include "constants/heal_locations.h"
#include "constants/map_types.h"
#include "constants/maps.h"
+#include "constants/script_menu.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/moves.h"
@@ -2270,144 +2271,160 @@ void BufferBattleTowerElevatorFloors(void)
gSpecialVar_0x8006 = 12;
}
-// data[1]: number of options in the multichoice
+// Scrollable Multichoice task data defines
+#define tMaxItemsOnScreen data[0]
+#define tNumItems data[1]
+#define tLeft data[2]
+#define tTop data[3]
+#define tWidth data[4]
+#define tHeight data[5]
+#define tKeepOpenAfterSelect data[6]
+#define tScrollOffset data[7]
+#define tSelectedRow data[8]
+#define tScrollMultiId data[11]
+#define tScrollArrowId data[12]
+#define tWindowId data[13]
+#define tListTaskId data[14]
+#define tTaskId data[15]
+// data[9] and [10] unused
+
void ShowScrollableMultichoice(void)
{
u8 taskId = CreateTask(Task_ShowScrollableMultichoice, 8);
struct Task *task = &gTasks[taskId];
- task->data[11] = gSpecialVar_0x8004;
+ task->tScrollMultiId = gSpecialVar_0x8004;
switch (gSpecialVar_0x8004)
{
case SCROLL_MULTI_NONE:
- task->data[0] = 1;
- task->data[1] = 1;
- task->data[2] = 1;
- task->data[3] = 1;
- task->data[4] = 1;
- task->data[5] = 1;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = 1;
+ task->tNumItems = 1;
+ task->tLeft = 1;
+ task->tTop = 1;
+ task->tWidth = 1;
+ task->tHeight = 1;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_GLASS_WORKSHOP_VENDOR:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN - 1;
- task->data[1] = 8;
- task->data[2] = 1;
- task->data[3] = 1;
- task->data[4] = 9;
- task->data[5] = 10;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN - 1;
+ task->tNumItems = 8;
+ task->tLeft = 1;
+ task->tTop = 1;
+ task->tWidth = 9;
+ task->tHeight = 10;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_POKEMON_FAN_CLUB_RATER:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 12;
- task->data[2] = 1;
- task->data[3] = 1;
- task->data[4] = 7;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 12;
+ task->tLeft = 1;
+ task->tTop = 1;
+ task->tWidth = 7;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 11;
- task->data[2] = 14;
- task->data[3] = 1;
- task->data[4] = 15;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 11;
+ task->tLeft = 14;
+ task->tTop = 1;
+ task->tWidth = 15;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 6;
- task->data[2] = 14;
- task->data[3] = 1;
- task->data[4] = 15;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 6;
+ task->tLeft = 14;
+ task->tTop = 1;
+ task->tWidth = 15;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 7;
- task->data[2] = 14;
- task->data[3] = 1;
- task->data[4] = 15;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 7;
+ task->tLeft = 14;
+ task->tTop = 1;
+ task->tWidth = 15;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 10;
- task->data[2] = 14;
- task->data[3] = 1;
- task->data[4] = 15;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 10;
+ task->tLeft = 14;
+ task->tTop = 1;
+ task->tWidth = 15;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BERRY_POWDER_VENDOR:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 12;
- task->data[2] = 15;
- task->data[3] = 1;
- task->data[4] = 14;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 12;
+ task->tLeft = 15;
+ task->tTop = 1;
+ task->tWidth = 14;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_RECEPTIONIST:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 10;
- task->data[2] = 17;
- task->data[3] = 1;
- task->data[4] = 11;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 10;
+ task->tLeft = 17;
+ task->tTop = 1;
+ task->tWidth = 11;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BF_MOVE_TUTOR_1:
case SCROLL_MULTI_BF_MOVE_TUTOR_2:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 11;
- task->data[2] = 15;
- task->data[3] = 1;
- task->data[4] = 14;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 11;
+ task->tLeft = 15;
+ task->tTop = 1;
+ task->tWidth = 14;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_SS_TIDAL_DESTINATION:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 7;
- task->data[2] = 19;
- task->data[3] = 1;
- task->data[4] = 10;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 7;
+ task->tLeft = 19;
+ task->tTop = 1;
+ task->tWidth = 10;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
case SCROLL_MULTI_BATTLE_TENT_RULES:
- task->data[0] = MAX_SCROLL_MULTI_ON_SCREEN;
- task->data[1] = 7;
- task->data[2] = 17;
- task->data[3] = 1;
- task->data[4] = 12;
- task->data[5] = 12;
- task->data[6] = 0;
- task->data[15] = taskId;
+ task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
+ task->tNumItems = 7;
+ task->tLeft = 17;
+ task->tTop = 1;
+ task->tWidth = 12;
+ task->tHeight = 12;
+ task->tKeepOpenAfterSelect = FALSE;
+ task->tTaskId = taskId;
break;
default:
- gSpecialVar_Result = 0x7F;
+ gSpecialVar_Result = MULTI_B_PRESSED;
DestroyTask(taskId);
break;
}
}
-static const u8 *const sScrollableMenuOptions[][MAX_SCROLL_MULTI_LENGTH] =
+static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] =
{
[SCROLL_MULTI_NONE] =
{
@@ -2565,7 +2582,7 @@ static const u8 *const sScrollableMenuOptions[][MAX_SCROLL_MULTI_LENGTH] =
static void Task_ShowScrollableMultichoice(u8 taskId)
{
- u32 unk1;
+ u32 width;
u8 i, windowId;
struct WindowTemplate template;
struct Task *task = &gTasks[taskId];
@@ -2573,46 +2590,46 @@ static void Task_ShowScrollableMultichoice(u8 taskId)
ScriptContext2_Enable();
sScrollableMultichoice_ScrollOffset = 0;
sScrollableMultichoice_ItemSpriteId = MAX_SPRITES;
- FillFrontierExchangeCornerWindowAndItemIcon(task->data[11], 0);
- ShowBattleFrontierTutorWindow(task->data[11], 0);
- sScrollableMultichoice_ListMenuItem = AllocZeroed(task->data[1] * 8);
+ FillFrontierExchangeCornerWindowAndItemIcon(task->tScrollMultiId, 0);
+ ShowBattleFrontierTutorWindow(task->tScrollMultiId, 0);
+ sScrollableMultichoice_ListMenuItem = AllocZeroed(task->tNumItems * 8);
sFrontierExchangeCorner_NeverRead = 0;
InitScrollableMultichoice();
- for (unk1 = 0, i = 0; i < task->data[1]; i++)
+ for (width = 0, i = 0; i < task->tNumItems; i++)
{
- const u8 *text = sScrollableMenuOptions[gSpecialVar_0x8004][i];
+ const u8 *text = sScrollableMultichoiceOptions[gSpecialVar_0x8004][i];
sScrollableMultichoice_ListMenuItem[i].name = text;
sScrollableMultichoice_ListMenuItem[i].id = i;
- unk1 = display_text_and_get_width(text, unk1);
+ width = DisplayTextAndGetWidth(text, width);
}
- task->data[4] = convert_pixel_width_to_tile_width(unk1);
+ task->tWidth = ConvertPixelWidthToTileWidth(width);
- if (task->data[2] + task->data[4] > 0x1D)
+ if (task->tLeft + task->tWidth > MAX_MULTICHOICE_WIDTH + 1)
{
- int unk2 = 0x1D - task->data[4];
- if (unk2 < 0)
+ int adjustedLeft = MAX_MULTICHOICE_WIDTH + 1 - task->tWidth;
+ if (adjustedLeft < 0)
{
- task->data[2] = 0;
+ task->tLeft = 0;
}
else
{
- task->data[2] = unk2;
+ task->tLeft = adjustedLeft;
}
}
- template = CreateWindowTemplate(0, task->data[2], task->data[3], task->data[4], task->data[5], 0xF, 0x64);
+ template = CreateWindowTemplate(0, task->tLeft, task->tTop, task->tWidth, task->tHeight, 0xF, 0x64);
windowId = AddWindow(&template);
- task->data[13] = windowId;
+ task->tWindowId = windowId;
SetStandardWindowBorderStyle(windowId, 0);
- gScrollableMultichoice_ListMenuTemplate.totalItems = task->data[1];
- gScrollableMultichoice_ListMenuTemplate.maxShowed = task->data[0];
- gScrollableMultichoice_ListMenuTemplate.windowId = task->data[13];
+ gScrollableMultichoice_ListMenuTemplate.totalItems = task->tNumItems;
+ gScrollableMultichoice_ListMenuTemplate.maxShowed = task->tMaxItemsOnScreen;
+ gScrollableMultichoice_ListMenuTemplate.windowId = task->tWindowId;
ScrollableMultichoice_UpdateScrollArrows(taskId);
- task->data[14] = ListMenuInit(&gScrollableMultichoice_ListMenuTemplate, task->data[7], task->data[8]);
+ task->tListTaskId = ListMenuInit(&gScrollableMultichoice_ListMenuTemplate, task->tScrollOffset, task->tSelectedRow);
schedule_bg_copy_tilemap_to_vram(0);
gTasks[taskId].func = ScrollableMultichoice_ProcessInput;
}
@@ -2648,12 +2665,12 @@ static void ScrollableMultichoice_MoveCursor(s32 itemIndex, bool8 onInit, struct
{
u16 selection;
struct Task *task = &gTasks[taskId];
- ListMenuGetScrollAndRow(task->data[14], &selection, NULL);
+ ListMenuGetScrollAndRow(task->tListTaskId, &selection, NULL);
sScrollableMultichoice_ScrollOffset = selection;
- ListMenuGetCurrentItemArrayId(task->data[14], &selection);
- HideFrontierExchangeCornerItemIcon(task->data[11], sFrontierExchangeCorner_NeverRead);
- FillFrontierExchangeCornerWindowAndItemIcon(task->data[11], selection);
- ShowBattleFrontierTutorMoveDescription(task->data[11], selection);
+ ListMenuGetCurrentItemArrayId(task->tListTaskId, &selection);
+ HideFrontierExchangeCornerItemIcon(task->tScrollMultiId, sFrontierExchangeCorner_NeverRead);
+ FillFrontierExchangeCornerWindowAndItemIcon(task->tScrollMultiId, selection);
+ ShowBattleFrontierTutorMoveDescription(task->tScrollMultiId, selection);
sFrontierExchangeCorner_NeverRead = selection;
}
}
@@ -2661,25 +2678,26 @@ static void ScrollableMultichoice_MoveCursor(s32 itemIndex, bool8 onInit, struct
static void ScrollableMultichoice_ProcessInput(u8 taskId)
{
struct Task *task = &gTasks[taskId];
- s32 input = ListMenu_ProcessInput(task->data[14]);
+ s32 input = ListMenu_ProcessInput(task->tListTaskId);
switch (input)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_CANCEL:
- gSpecialVar_Result = 0x7F;
+ gSpecialVar_Result = MULTI_B_PRESSED;
PlaySE(SE_SELECT);
CloseScrollableMultichoice(taskId);
break;
default:
gSpecialVar_Result = input;
PlaySE(SE_SELECT);
- if (!task->data[6])
+ if (!task->tKeepOpenAfterSelect)
{
CloseScrollableMultichoice(taskId);
}
- else if (input == task->data[1] - 1)
+ // if selected option was the last one (Exit)
+ else if (input == task->tNumItems - 1)
{
CloseScrollableMultichoice(taskId);
}
@@ -2697,28 +2715,29 @@ static void CloseScrollableMultichoice(u8 taskId)
{
u16 selection;
struct Task *task = &gTasks[taskId];
- ListMenuGetCurrentItemArrayId(task->data[14], &selection);
- HideFrontierExchangeCornerItemIcon(task->data[11], selection);
+ ListMenuGetCurrentItemArrayId(task->tListTaskId, &selection);
+ HideFrontierExchangeCornerItemIcon(task->tScrollMultiId, selection);
ScrollableMultichoice_RemoveScrollArrows(taskId);
- DestroyListMenuTask(task->data[14], NULL, NULL);
+ DestroyListMenuTask(task->tListTaskId, NULL, NULL);
Free(sScrollableMultichoice_ListMenuItem);
- ClearStdWindowAndFrameToTransparent(task->data[13], 1);
- FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0));
- CopyWindowToVram(task->data[13], 2);
- RemoveWindow(task->data[13]);
+ ClearStdWindowAndFrameToTransparent(task->tWindowId, 1);
+ FillWindowPixelBuffer(task->tWindowId, PIXEL_FILL(0));
+ CopyWindowToVram(task->tWindowId, 2);
+ RemoveWindow(task->tWindowId);
DestroyTask(taskId);
EnableBothScriptContexts();
}
+// Functionally unused; tKeepOpenAfterSelect is only != 0 in unused functions
static void sub_813A600(u8 taskId)
{
- switch (gTasks[taskId].data[6])
+ switch (gTasks[taskId].tKeepOpenAfterSelect)
{
case 1:
default:
break;
case 2:
- gTasks[taskId].data[6] = 1;
+ gTasks[taskId].tKeepOpenAfterSelect = 1;
gTasks[taskId].func = sub_813A664;
break;
}
@@ -2734,7 +2753,7 @@ void sub_813A630(void)
}
else
{
- gTasks[taskId].data[6]++;
+ gTasks[taskId].tKeepOpenAfterSelect++;
}
}
@@ -2763,24 +2782,24 @@ static void ScrollableMultichoice_UpdateScrollArrows(u8 taskId)
struct Task *task = &gTasks[taskId];
struct ScrollArrowsTemplate template = sScrollableMultichoice_ScrollArrowsTemplate;
- if (task->data[0] != task->data[1])
+ if (task->tMaxItemsOnScreen != task->data[1])
{
- template.firstX = (task->data[4] / 2) * 8 + 12 + (task->data[2] - 1) * 8;
+ template.firstX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8;
template.firstY = 8;
- template.secondX = (task->data[4] / 2) * 8 + 12 + (task->data[2] - 1) * 8;
- template.secondY = task->data[5] * 8 + 10;
+ template.secondX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8;
+ template.secondY = task->tHeight * 8 + 10;
template.fullyUpThreshold = 0;
- template.fullyDownThreshold = task->data[1] - task->data[0];
- task->data[12] = AddScrollIndicatorArrowPair(&template, &sScrollableMultichoice_ScrollOffset);
+ template.fullyDownThreshold = task->data[1] - task->tMaxItemsOnScreen;
+ task->tScrollArrowId = AddScrollIndicatorArrowPair(&template, &sScrollableMultichoice_ScrollOffset);
}
}
static void ScrollableMultichoice_RemoveScrollArrows(u8 taskId)
{
struct Task *task = &gTasks[taskId];
- if (task->data[0] != task->data[1])
+ if (task->tMaxItemsOnScreen != task->data[1])
{
- RemoveScrollIndicatorArrowPair(task->data[12]);
+ RemoveScrollIndicatorArrowPair(task->tScrollArrowId);
}
}
@@ -3041,7 +3060,7 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
{
#include "data/battle_frontier/battle_frontier_exchange_corner.h"
- if (menu > SCROLL_MULTI_POKEMON_FAN_CLUB_RATER && menu < SCROLL_MULTI_BERRY_POWDER_VENDOR)
+ if (menu >= SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1 && menu <= SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR)
{
FillWindowPixelRect(0, PIXEL_FILL(1), 0, 0, 216, 32);
switch (menu)
@@ -3240,17 +3259,17 @@ void sub_813ADD4(void)
if (taskId != 0xFF)
{
struct Task *task = &gTasks[taskId];
- ListMenuGetScrollAndRow(task->data[14], &scrollOffset, &selectedRow);
- SetStandardWindowBorderStyle(task->data[13], 0);
+ ListMenuGetScrollAndRow(task->tListTaskId, &scrollOffset, &selectedRow);
+ SetStandardWindowBorderStyle(task->tWindowId, 0);
for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++)
{
- AddTextPrinterParameterized5(task->data[13], 1, sScrollableMenuOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
+ AddTextPrinterParameterized5(task->tWindowId, 1, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
}
- AddTextPrinterParameterized(task->data[13], 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
- PutWindowTilemap(task->data[13]);
- CopyWindowToVram(task->data[13], 3);
+ AddTextPrinterParameterized(task->tWindowId, 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
+ PutWindowTilemap(task->tWindowId);
+ CopyWindowToVram(task->tWindowId, 3);
}
}
@@ -3299,17 +3318,33 @@ void sub_813AF48(void)
if (taskId != 0xFF)
{
struct Task *task = &gTasks[taskId];
- DestroyListMenuTask(task->data[14], NULL, NULL);
+ DestroyListMenuTask(task->tListTaskId, NULL, NULL);
Free(sScrollableMultichoice_ListMenuItem);
- ClearStdWindowAndFrameToTransparent(task->data[13], TRUE);
- FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0));
- ClearWindowTilemap(task->data[13]);
- CopyWindowToVram(task->data[13], 2);
- RemoveWindow(task->data[13]);
+ ClearStdWindowAndFrameToTransparent(task->tWindowId, TRUE);
+ FillWindowPixelBuffer(task->tWindowId, PIXEL_FILL(0));
+ ClearWindowTilemap(task->tWindowId);
+ CopyWindowToVram(task->tWindowId, 2);
+ RemoveWindow(task->tWindowId);
DestroyTask(taskId);
}
}
+// Undefine Scrollable Multichoice task data macros
+#undef tMaxItemsOnScreen
+#undef tNumItems
+#undef tLeft
+#undef tTop
+#undef tWidth
+#undef tHeight
+#undef tKeepOpenAfterSelect
+#undef tScrollOffset
+#undef tSelectedRow
+#undef tScrollMultiId
+#undef tScrollArrowId
+#undef tWindowId
+#undef tListTaskId
+#undef tTaskId
+
void DoDeoxysRockInteraction(void)
{
CreateTask(Task_DeoxysRockInteraction, 8);
diff --git a/src/hof_pc.c b/src/hof_pc.c
index 01015ee81..327749179 100644
--- a/src/hof_pc.c
+++ b/src/hof_pc.c
@@ -27,7 +27,7 @@ static void ReshowPCMenuAfterHallOfFamePC(void)
{
ScriptContext2_Enable();
Overworld_PlaySpecialMapMusic();
- ScrSpecial_CreatePCMenu();
+ ScriptMenu_CreatePCMultichoice();
ScriptMenu_DisplayPCStartupPrompt();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
CreateTask(Task_WaitForPaletteFade, 10);
diff --git a/src/international_string_util.c b/src/international_string_util.c
index 9dc795dd0..ec5057359 100644
--- a/src/international_string_util.c
+++ b/src/international_string_util.c
@@ -45,7 +45,7 @@ int GetMaxWidthInMenuTable(const struct MenuAction *str, int arg1)
var = stringWidth;
}
- return convert_pixel_width_to_tile_width(var);
+ return ConvertPixelWidthToTileWidth(var);
}
int sub_81DB3D8(const struct MenuAction *str, const u8* arg1, int arg2)
@@ -59,7 +59,7 @@ int sub_81DB3D8(const struct MenuAction *str, const u8* arg1, int arg2)
var = stringWidth;
}
- return convert_pixel_width_to_tile_width(var);
+ return ConvertPixelWidthToTileWidth(var);
}
int Intl_GetListMenuWidth(const struct ListMenuTemplate *listMenu)
diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c
index 64f04f3bc..a4d70c062 100644
--- a/src/mauville_old_man.c
+++ b/src/mauville_old_man.c
@@ -1155,7 +1155,7 @@ static void PrintStoryList(void)
if (curWidth > width)
width = curWidth;
}
- sStorytellerWindowId = CreateWindowFromRect(0, 0, convert_pixel_width_to_tile_width(width), GetFreeStorySlot() * 2 + 2);
+ sStorytellerWindowId = CreateWindowFromRect(0, 0, ConvertPixelWidthToTileWidth(width), GetFreeStorySlot() * 2 + 2);
SetStandardWindowBorderStyle(sStorytellerWindowId, 0);
for (i = 0; i < 4; i++)
{
diff --git a/src/pokemon.c b/src/pokemon.c
index 29358b22f..8812e5bc4 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -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;
diff --git a/src/scrcmd.c b/src/scrcmd.c
index 560784c47..4c8895ab8 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -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 c31c8d76b..7afe30080 100644
--- a/src/script_menu.c
+++ b/src/script_menu.c
@@ -15,1025 +15,28 @@
#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)
{
@@ -1061,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;
@@ -1070,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++;
@@ -1086,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]
@@ -1119,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;
}
}
@@ -1145,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)
@@ -1155,9 +159,9 @@ static void Task_HandleMultichoiceInput(u8 taskId)
if (!gPaletteFade.active)
{
- if (gUnknown_02039F90)
+ if (sProcessInputDelay)
{
- gUnknown_02039F90--;
+ sProcessInputDelay--;
}
else
{
@@ -1168,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)
@@ -1178,7 +182,7 @@ static void Task_HandleMultichoiceInput(u8 taskId)
if (tIgnoreBPress)
return;
PlaySE(SE_SELECT);
- gSpecialVar_Result = 127;
+ gSpecialVar_Result = MULTI_B_PRESSED;
}
else
{
@@ -1209,7 +213,7 @@ bool8 ScriptMenu_YesNo(u8 left, u8 top)
}
}
-// unused
+// Unused
bool8 IsScriptActive(void)
{
if (gSpecialVar_Result == 0xFF)
@@ -1244,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)
{
@@ -1259,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;
@@ -1294,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;
@@ -1308,7 +312,7 @@ static void Task_HandleMultichoiceGridInput(u8 taskId)
#undef tWindowId
-bool16 ScrSpecial_CreatePCMenu(void)
+bool16 ScriptMenu_CreatePCMultichoice(void)
{
if (FuncIsActiveTask(Task_HandleMultichoiceInput) == TRUE)
{
@@ -1317,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;
@@ -1333,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);
@@ -1359,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);
@@ -1368,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)
@@ -1377,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)
{
@@ -1386,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;
@@ -1401,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++;
}
}
@@ -1423,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);
}
}
@@ -1439,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);
}
}
@@ -1455,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);
}
}
@@ -1471,28 +480,28 @@ static void sub_80E2578(void)
{
if (gSpecialVar_0x8004 == 0)
{
- gUnknown_03001124[temp] = 5;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_FARAWAY_ISLAND;
+ selectionCount++;
}
if (gSpecialVar_0x8004 == 1 && FlagGet(FLAG_HAS_OLD_SEA_MAP) == FALSE)
{
- gUnknown_03001124[temp] = 5;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_FARAWAY_ISLAND;
+ selectionCount++;
FlagSet(FLAG_HAS_OLD_SEA_MAP);
}
}
- gUnknown_03001124[temp] = 6;
- temp++;
+ sLilycoveSSTidalSelections[selectionCount] = SSTIDAL_SELECTION_EXIT;
+ selectionCount++;
if (gSpecialVar_0x8004 == 0 && FlagGet(FLAG_MET_SCOTT_ON_SS_TIDAL) == TRUE)
{
- count = temp;
+ count = selectionCount;
}
- count = temp;
- if (count == 7)
+ count = selectionCount;
+ if (count == SSTIDAL_SELECTION_COUNT)
{
gSpecialVar_0x8004 = SCROLL_MULTI_SS_TIDAL_DESTINATION;
ShowScrollableMultichoice();
@@ -1501,39 +510,39 @@ static void sub_80E2578(void)
{
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];
}
}
@@ -1630,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);
@@ -1685,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;
@@ -1712,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_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/string_util.c b/src/string_util.c
index 39d235ab8..bce299057 100644
--- a/src/string_util.c
+++ b/src/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/src/strings.c b/src/strings.c
index ebc995f13..36674e875 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");
@@ -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/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 0c389faa9..62d261a63 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
@@ -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;
}
}