Remainder of script_menu documentation

This commit is contained in:
GriffinR 2019-09-19 18:31:09 -04:00
parent 275695c189
commit 9fb24bbbce
6 changed files with 289 additions and 288 deletions

View File

@ -175,7 +175,7 @@ SlateportCity_Harbor_EventScript_20CB06:: @ 820CB06
SlateportCity_Harbor_EventScript_20CB1A:: @ 820CB1A
goto_if_set FLAG_MET_SCOTT_ON_SS_TIDAL, SlateportCity_Harbor_EventScript_20CB50
multichoicedefault 18, 8, MULTI_SSTIDAL_SLATEPORT_2, 2, 0
multichoicedefault 18, 8, MULTI_SSTIDAL_SLATEPORT_NO_BF, 2, 0
switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_20CB92
case 1, SlateportCity_Harbor_EventScript_20CC2D
@ -183,7 +183,7 @@ SlateportCity_Harbor_EventScript_20CB1A:: @ 820CB1A
end
SlateportCity_Harbor_EventScript_20CB50:: @ 820CB50
multichoicedefault 17, 6, MULTI_SSTIDAL_SLATEPORT_1, 2, 0
multichoicedefault 17, 6, MULTI_SSTIDAL_SLATEPORT_WITH_BF, 2, 0
switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_20CB92
case 1, SlateportCity_Harbor_EventScript_20CBBA

View File

@ -8,120 +8,120 @@
#define MULTI_B_PRESSED 127
// Multichoice Ids
#define MULTI_BRINEY_ON_DEWFORD 0
#define MULTI_PC 1 // Exit only, populated by CreatePCMultichoice
#define MULTI_ENTERINFO 2
#define MULTI_CONTEST_INFO 3
#define MULTI_CONTEST_TYPE 4
#define MULTI_DECOR_NOREGISTRY 5
#define MULTI_DECOR_REGISTRY 6
#define MULTI_REGISTER_MENU 7
#define MULTI_SSTIDAL_LILYCOVE 8 // Exit only, populated by CreateLilycoveSSTidalMultichoice
#define MULTI_UNUSED_9 9
#define MULTI_UNUSED_10 10
#define MULTI_FRONTIER_PASS_INFO 11
#define MULTI_BIKE 12
#define MULTI_STATUS_INFO 13
#define MULTI_BRINEY_OFF_DEWFORD 14
#define MULTI_UNUSED_15 15
#define MULTI_VIEWED_PAINTINGS 16
#define MULTI_YESNOINFO 17
#define MULTI_BATTLE_MODE 18
#define MULTI_UNUSED_19 19
#define MULTI_YESNOINFO_2 20
#define MULTI_UNUSED_21 21
#define MULTI_UNUSED_22 22
#define MULTI_CHALLENGEINFO 23
#define MULTI_LEVEL_MODE 24
#define MULTI_MECHADOLL1_Q1 25
#define MULTI_MECHADOLL1_Q2 26
#define MULTI_MECHADOLL1_Q3 27
#define MULTI_MECHADOLL2_Q1 28
#define MULTI_MECHADOLL2_Q2 29
#define MULTI_MECHADOLL2_Q3 30
#define MULTI_MECHADOLL3_Q1 31
#define MULTI_MECHADOLL3_Q2 32
#define MULTI_MECHADOLL3_Q3 33
#define MULTI_MECHADOLL4_Q1 34
#define MULTI_MECHADOLL4_Q2 35
#define MULTI_MECHADOLL4_Q3 36
#define MULTI_MECHADOLL5_Q1 37
#define MULTI_MECHADOLL5_Q2 38
#define MULTI_MECHADOLL5_Q3 39
#define MULTI_UNUSED_40 40
#define MULTI_UNUSED_41 41
#define MULTI_VENDING_MACHINE 42
#define MULTI_MACH_BIKE_INFO 43
#define MULTI_ACRO_BIKE_INFO 44
#define MULTI_SATISFACTION 45
#define MULTI_STERN_DEEPSEA 46
#define MULTI_UNUSED_ASH_VENDOR 47 // Replaced by scrollable multichoice
#define MULTI_GAME_CORNER_DOLLS 48
#define MULTI_GAME_CORNER_COINS 49
#define MULTI_HOWS_FISHING 50
#define MULTI_UNUSED_51 51
#define MULTI_SSTIDAL_SLATEPORT_1 52 // TODO: rename
#define MULTI_SSTIDAL_BATTLE_FRONTIER 53
#define MULTI_RIGHTLEFT 54
#define MULTI_GAME_CORNER_TMS 55
#define MULTI_SSTIDAL_SLATEPORT_2 56 //
#define MULTI_FLOORS 57
#define MULTI_SHARDS_R 58
#define MULTI_SHARDS_Y 59
#define MULTI_SHARDS_RY 60
#define MULTI_SHARDS_B 61
#define MULTI_SHARDS_RB 62
#define MULTI_SHARDS_YB 63
#define MULTI_SHARDS_RYB 64
#define MULTI_SHARDS_G 65
#define MULTI_SHARDS_RG 66
#define MULTI_SHARDS_YG 67
#define MULTI_SHARDS_RYG 68
#define MULTI_SHARDS_BG 69
#define MULTI_SHARDS_RBG 70
#define MULTI_SHARDS_YBG 71
#define MULTI_SHARDS_RYBG 72
#define MULTI_TOURNEY_WITH_RECORD 73
#define MULTI_LINK_SERVICES_A1 74 // TODO: rename
#define MULTI_LINK_SERVICES_A2 75 //
#define MULTI_LINK_SERVICES_B1 76 //
#define MULTI_LINK_SERVICES_B2 77 //
#define MULTI_LINK_SERVICES_C 78 //
#define MULTI_LINK_SERVICES_D 79 //
#define MULTI_WIRELESS_MINIGAME 80
#define MULTI_LINK_LEADER 81
#define MULTI_CONTEST_RANK 82
#define MULTI_FRONTIER_ITEM_CHOOSE 83
#define MULTI_LINK_CONTEST_INFO 84
#define MULTI_LINK_CONTEST_MODE 85
#define MULTI_FORCED_START_MENU 86
#define MULTI_FRONTIER_GAMBLER_BET 87
#define MULTI_TENT 88
#define MULTI_UNUSED_SSTIDAL_1 89 // These 4 were replaced by CreateLilycoveSSTidalMultichoice
#define MULTI_UNUSED_SSTIDAL_2 90 //
#define MULTI_UNUSED_SSTIDAL_3 91 //
#define MULTI_UNUSED_SSTIDAL_4 92 //
#define MULTI_FOSSIL 93
#define MULTI_YESNO 94
#define MULTI_FRONTIER_RULES 95
#define MULTI_BATTLE_ARENA_RULES 96
#define MULTI_BATTLE_TOWER_RULES 97
#define MULTI_BATTLE_DOME_RULES 98
#define MULTI_BATTLE_FACTORY_RULES 99
#define MULTI_BATTLE_PALACE_RULES 100
#define MULTI_BATTLE_PYRAMID_RULES 101
#define MULTI_BATTLE_PIKE_RULES 102
#define MULTI_GO_ON_RECORD_REST_RETIRE 103
#define MULTI_GO_ON_REST_RETIRE 104
#define MULTI_GO_ON_RECORD_RETIRE 105
#define MULTI_GO_ON_RETIRE 106
#define MULTI_TOURNEY_NO_RECORD 107
#define MULTI_TV_LATI 108
#define MULTI_BATTLE_TOWER_FEELINGS 109
#define MULTI_WHERES_RAYQUAZA 110
#define MULTI_SLATEPORT_TENT_RULES 111
#define MULTI_FALLARBOR_TENT_RULES 112
#define MULTI_TAG_MATCH_TYPE 113
#define MULTI_BRINEY_ON_DEWFORD 0
#define MULTI_PC 1 // Exit only, populated by CreatePCMultichoice
#define MULTI_ENTERINFO 2
#define MULTI_CONTEST_INFO 3
#define MULTI_CONTEST_TYPE 4
#define MULTI_DECOR_NOREGISTRY 5
#define MULTI_DECOR_REGISTRY 6
#define MULTI_REGISTER_MENU 7
#define MULTI_SSTIDAL_LILYCOVE 8 // Exit only, populated by CreateLilycoveSSTidalMultichoice
#define MULTI_UNUSED_9 9
#define MULTI_UNUSED_10 10
#define MULTI_FRONTIER_PASS_INFO 11
#define MULTI_BIKE 12
#define MULTI_STATUS_INFO 13
#define MULTI_BRINEY_OFF_DEWFORD 14
#define MULTI_UNUSED_15 15
#define MULTI_VIEWED_PAINTINGS 16
#define MULTI_YESNOINFO 17
#define MULTI_BATTLE_MODE 18
#define MULTI_UNUSED_19 19
#define MULTI_YESNOINFO_2 20
#define MULTI_UNUSED_21 21
#define MULTI_UNUSED_22 22
#define MULTI_CHALLENGEINFO 23
#define MULTI_LEVEL_MODE 24
#define MULTI_MECHADOLL1_Q1 25
#define MULTI_MECHADOLL1_Q2 26
#define MULTI_MECHADOLL1_Q3 27
#define MULTI_MECHADOLL2_Q1 28
#define MULTI_MECHADOLL2_Q2 29
#define MULTI_MECHADOLL2_Q3 30
#define MULTI_MECHADOLL3_Q1 31
#define MULTI_MECHADOLL3_Q2 32
#define MULTI_MECHADOLL3_Q3 33
#define MULTI_MECHADOLL4_Q1 34
#define MULTI_MECHADOLL4_Q2 35
#define MULTI_MECHADOLL4_Q3 36
#define MULTI_MECHADOLL5_Q1 37
#define MULTI_MECHADOLL5_Q2 38
#define MULTI_MECHADOLL5_Q3 39
#define MULTI_UNUSED_40 40
#define MULTI_UNUSED_41 41
#define MULTI_VENDING_MACHINE 42
#define MULTI_MACH_BIKE_INFO 43
#define MULTI_ACRO_BIKE_INFO 44
#define MULTI_SATISFACTION 45
#define MULTI_STERN_DEEPSEA 46
#define MULTI_UNUSED_ASH_VENDOR 47 // Replaced by scrollable multichoice
#define MULTI_GAME_CORNER_DOLLS 48
#define MULTI_GAME_CORNER_COINS 49
#define MULTI_HOWS_FISHING 50
#define MULTI_UNUSED_51 51
#define MULTI_SSTIDAL_SLATEPORT_WITH_BF 52
#define MULTI_SSTIDAL_BATTLE_FRONTIER 53
#define MULTI_RIGHTLEFT 54
#define MULTI_GAME_CORNER_TMS 55
#define MULTI_SSTIDAL_SLATEPORT_NO_BF 56
#define MULTI_FLOORS 57
#define MULTI_SHARDS_R 58
#define MULTI_SHARDS_Y 59
#define MULTI_SHARDS_RY 60
#define MULTI_SHARDS_B 61
#define MULTI_SHARDS_RB 62
#define MULTI_SHARDS_YB 63
#define MULTI_SHARDS_RYB 64
#define MULTI_SHARDS_G 65
#define MULTI_SHARDS_RG 66
#define MULTI_SHARDS_YG 67
#define MULTI_SHARDS_RYG 68
#define MULTI_SHARDS_BG 69
#define MULTI_SHARDS_RBG 70
#define MULTI_SHARDS_YBG 71
#define MULTI_SHARDS_RYBG 72
#define MULTI_TOURNEY_WITH_RECORD 73
#define MULTI_LINK_SERVICES_A1 74 // TODO: rename
#define MULTI_LINK_SERVICES_A2 75 //
#define MULTI_LINK_SERVICES_B1 76 //
#define MULTI_LINK_SERVICES_B2 77 //
#define MULTI_LINK_SERVICES_C 78 //
#define MULTI_LINK_SERVICES_D 79 //
#define MULTI_WIRELESS_MINIGAME 80
#define MULTI_LINK_LEADER 81
#define MULTI_CONTEST_RANK 82
#define MULTI_FRONTIER_ITEM_CHOOSE 83
#define MULTI_LINK_CONTEST_INFO 84
#define MULTI_LINK_CONTEST_MODE 85
#define MULTI_FORCED_START_MENU 86
#define MULTI_FRONTIER_GAMBLER_BET 87
#define MULTI_TENT 88
#define MULTI_UNUSED_SSTIDAL_1 89 // These 4 were replaced by CreateLilycoveSSTidalMultichoice
#define MULTI_UNUSED_SSTIDAL_2 90 //
#define MULTI_UNUSED_SSTIDAL_3 91 //
#define MULTI_UNUSED_SSTIDAL_4 92 //
#define MULTI_FOSSIL 93
#define MULTI_YESNO 94
#define MULTI_FRONTIER_RULES 95
#define MULTI_BATTLE_ARENA_RULES 96
#define MULTI_BATTLE_TOWER_RULES 97
#define MULTI_BATTLE_DOME_RULES 98
#define MULTI_BATTLE_FACTORY_RULES 99
#define MULTI_BATTLE_PALACE_RULES 100
#define MULTI_BATTLE_PYRAMID_RULES 101
#define MULTI_BATTLE_PIKE_RULES 102
#define MULTI_GO_ON_RECORD_REST_RETIRE 103
#define MULTI_GO_ON_REST_RETIRE 104
#define MULTI_GO_ON_RECORD_RETIRE 105
#define MULTI_GO_ON_RETIRE 106
#define MULTI_TOURNEY_NO_RECORD 107
#define MULTI_TV_LATI 108
#define MULTI_BATTLE_TOWER_FEELINGS 109
#define MULTI_WHERES_RAYQUAZA 110
#define MULTI_SLATEPORT_TENT_RULES 111
#define MULTI_FALLARBOR_TENT_RULES 112
#define MULTI_TAG_MATCH_TYPE 113
// Lilycove SS Tidal Multichoice Selections
#define SSTIDAL_SELECTION_SLATEPORT 0

View File

@ -3,17 +3,17 @@
extern const u8 *const gStdStrings[];
bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 var3, u8 var4);
bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 var3, u8 var4, u8 var5);
bool8 ScriptMenu_YesNo(u8 var1, u8 var2);
bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount);
bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3);
bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress);
bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 defaultChoice);
bool8 ScriptMenu_YesNo(u8 left, u8 top);
bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 columnCount);
bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y);
bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void);
int ConvertPixelWidthToTileWidth(int);
u8 CreateWindowFromRect(u8, u8, u8, u8);
void ClearToTransparentAndRemoveWindow(u8);
int DisplayTextAndGetWidth(const u8*, int);
int ScriptMenu_AdjustLeftCoordFromWidth(int arg0, int tileWidth);
int ConvertPixelWidthToTileWidth(int width);
u8 CreateWindowFromRect(u8 x, u8 y, u8 width, u8 height);
void ClearToTransparentAndRemoveWindow(u8 windowId);
int DisplayTextAndGetWidth(const u8* str, int width);
int ScriptMenu_AdjustLeftCoordFromWidth(int left, int width);
bool16 ScriptMenu_CreatePCMultichoice(void);
void ScriptMenu_DisplayPCStartupPrompt(void);

View File

@ -288,7 +288,7 @@ const struct MenuAction MultichoiceList_HowsFishing[] =
{gText_NotSoGood},
};
const struct MenuAction MultichoiceList_SSTidalSlateport1[] =
const struct MenuAction MultichoiceList_SSTidalSlateportWithBF[] =
{
{gText_LilycoveCity},
{gText_BattleFrontier},
@ -308,7 +308,7 @@ const struct MenuAction MultichoiceList_RightLeft[] =
{gText_Left},
};
const struct MenuAction MultichoiceList_SSTidalSlateport2[] =
const struct MenuAction MultichoiceList_SSTidalSlateportNoBF[] =
{
{gText_LilycoveCity},
{gText_Exit},
@ -784,120 +784,120 @@ struct MultichoiceListStruct
const struct MultichoiceListStruct gMultichoiceLists[] =
{
[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_1] = MULTICHOICE(MultichoiceList_SSTidalSlateport1),
[MULTI_SSTIDAL_BATTLE_FRONTIER] = MULTICHOICE(MultichoiceList_SSTidalBattleFrontier),
[MULTI_RIGHTLEFT] = MULTICHOICE(MultichoiceList_RightLeft),
[MULTI_GAME_CORNER_TMS] = MULTICHOICE(MultichoiceList_GameCornerTMs),
[MULTI_SSTIDAL_SLATEPORT_2] = MULTICHOICE(MultichoiceList_SSTidalSlateport2),
[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_LINK_SERVICES_A1] = MULTICHOICE(MultichoiceList_LinkServicesA),
[MULTI_LINK_SERVICES_A2] = MULTICHOICE(MultichoiceList_LinkServicesA),
[MULTI_LINK_SERVICES_B1] = MULTICHOICE(MultichoiceList_LinkServicesB),
[MULTI_LINK_SERVICES_B2] = MULTICHOICE(MultichoiceList_LinkServicesB),
[MULTI_LINK_SERVICES_C] = MULTICHOICE(MultichoiceList_LinkServicesC),
[MULTI_LINK_SERVICES_D] = MULTICHOICE(MultichoiceList_LinkServicesD),
[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),
[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_LINK_SERVICES_A1] = MULTICHOICE(MultichoiceList_LinkServicesA),
[MULTI_LINK_SERVICES_A2] = MULTICHOICE(MultichoiceList_LinkServicesA),
[MULTI_LINK_SERVICES_B1] = MULTICHOICE(MultichoiceList_LinkServicesB),
[MULTI_LINK_SERVICES_B2] = MULTICHOICE(MultichoiceList_LinkServicesB),
[MULTI_LINK_SERVICES_C] = MULTICHOICE(MultichoiceList_LinkServicesC),
[MULTI_LINK_SERVICES_D] = MULTICHOICE(MultichoiceList_LinkServicesD),
[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[] =
@ -952,17 +952,18 @@ const u8 *const sPCNameStrings[] =
gText_LogOff,
};
const u8 *const gLilycoveSSTidalDestinations[] =
const u8 *const gLilycoveSSTidalDestinations[SSTIDAL_SELECTION_COUNT] =
{
gText_SlateportCity,
gText_BattleFrontier,
gText_SouthernIsland,
gText_NavelRock,
gText_BirthIsland,
gText_FarawayIsland,
gText_Exit,
[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,
};
// TODO: name
const u8 *const gUnknown_0858BB9C[] =
{
CableClub_Text_TradeUsingLinkCable,

View File

@ -83,7 +83,6 @@ static EWRAM_DATA u8 sPCBoxToSendMon = 0;
static EWRAM_DATA u32 sUnknown_0203AB70 = 0;
struct ListMenuTemplate gScrollableMultichoice_ListMenuTemplate;
static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH];
extern const u16 gEventObjectPalette8[];
extern const u16 gEventObjectPalette17[];

View File

@ -20,24 +20,23 @@
#include "data/script_menu.h"
EWRAM_DATA u8 gProcessInputDelay = 0;
static EWRAM_DATA u8 sProcessInputDelay = 0;
static u8 sLilycoveSSTidalSelections[ARRAY_COUNT(gLilycoveSSTidalDestinations)];
//static u32 filler_0300112c;
static u8 sLilycoveSSTidalSelections[SSTIDAL_SELECTION_COUNT];
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 DrawLinkServicesMultichoiceMenu(u8);
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 CreateStartMenuForPokenavTutorial(void);
static void sub_80E2CC4(u8, u8, u8, u8);
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)
{
@ -66,7 +65,7 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8
}
// Unused
static u16 sub_80E1EB8(const u8 *str)
static u16 GetLengthWithExpandedPlayerName(const u8 *str)
{
u16 length = 0;
@ -75,7 +74,7 @@ static u16 sub_80E1EB8(const u8 *str)
if (*str == PLACEHOLDER_BEGIN)
{
str++;
if (*str == 1)
if (*str == 1) // 01 is the second byte of the {PLAYER} placeholder
{
length += StringLength(gSaveBlock2Ptr->playerName);
str++;
@ -91,7 +90,7 @@ 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;
@ -112,7 +111,7 @@ static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPre
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]
@ -124,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;
gProcessInputDelay = 2;
sProcessInputDelay = 2;
for (i = 0; i < ARRAY_COUNT(gLinkServicesMultichoiceIds); i++)
{
if (gLinkServicesMultichoiceIds[i] == multichoiceId)
{
gProcessInputDelay = 12;
sProcessInputDelay = 12;
}
}
@ -160,9 +159,9 @@ static void Task_HandleMultichoiceInput(u8 taskId)
if (!gPaletteFade.active)
{
if (gProcessInputDelay)
if (sProcessInputDelay)
{
gProcessInputDelay--;
sProcessInputDelay--;
}
else
{
@ -249,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)
{
@ -348,7 +347,8 @@ static void CreatePCMultichoice(void)
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);
@ -364,7 +364,8 @@ static void CreatePCMultichoice(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);
@ -373,7 +374,7 @@ static void CreatePCMultichoice(void)
PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, numChoices, 0);
CopyWindowToVram(windowId, 3);
sub_80E1FBC(FALSE, numChoices, windowId, MULTI_PC);
InitMultichoiceCheckWrap(FALSE, numChoices, windowId, MULTI_PC);
}
void ScriptMenu_DisplayPCStartupPrompt(void)
@ -408,7 +409,7 @@ static void CreateLilycoveSSTidalMultichoice(void)
u8 i;
u32 j;
for (i = 0; i < ARRAY_COUNT(sLilycoveSSTidalSelections); i++)
for (i = 0; i < SSTIDAL_SELECTION_COUNT; i++)
{
sLilycoveSSTidalSelections[i] = 0xFF;
}
@ -509,7 +510,7 @@ static void CreateLilycoveSSTidalMultichoice(void)
{
pixelWidth = 0;
for (j = 0; j < ARRAY_COUNT(gLilycoveSSTidalDestinations); j++)
for (j = 0; j < SSTIDAL_SELECTION_COUNT; j++)
{
u8 selection = sLilycoveSSTidalSelections[j];
if (selection != 0xFF)
@ -522,7 +523,7 @@ static void CreateLilycoveSSTidalMultichoice(void)
windowId = CreateWindowFromRect(MAX_MULTICHOICE_WIDTH - width, (6 - count) * 2, width, count * 2);
SetStandardWindowBorderStyle(windowId, 0);
for (selectionCount = 0, i = 0; i < ARRAY_COUNT(gLilycoveSSTidalDestinations); i++)
for (selectionCount = 0, i = 0; i < SSTIDAL_SELECTION_COUNT; i++)
{
if (sLilycoveSSTidalSelections[i] != 0xFF)
{
@ -533,7 +534,7 @@ static void CreateLilycoveSSTidalMultichoice(void)
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, count - 1);
CopyWindowToVram(windowId, 3);
sub_80E1FBC(FALSE, count, windowId, MULTI_SSTIDAL_LILYCOVE);
InitMultichoiceCheckWrap(FALSE, count, windowId, MULTI_SSTIDAL_LILYCOVE);
}
}
@ -695,17 +696,17 @@ static void CreateStartMenuForPokenavTutorial(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(FALSE, 8, windowId, MULTI_FORCED_START_MENU);
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;
gProcessInputDelay = 2;
sProcessInputDelay = 2;
taskId = CreateTask(Task_HandleMultichoiceInput, 80);
gTasks[taskId].tIgnoreBPress = ignoreBPress;
gTasks[taskId].tDoWrap = 0;
@ -729,14 +730,14 @@ static int DisplayTextAndGetWidthInternal(const u8 *str)
return GetStringWidth(1, temp, 0);
}
int DisplayTextAndGetWidth(const u8 *str, int prevMaxWidth)
int DisplayTextAndGetWidth(const u8 *str, int prevWidth)
{
int len = DisplayTextAndGetWidthInternal(str);
if (len < prevMaxWidth)
int width = DisplayTextAndGetWidthInternal(str);
if (width < prevWidth)
{
len = prevMaxWidth;
width = prevWidth;
}
return len;
return width;
}
int ConvertPixelWidthToTileWidth(int width)