diff options
Diffstat (limited to 'src')
46 files changed, 2252 insertions, 1326 deletions
diff --git a/src/battle_controller_pokedude.c b/src/battle_controller_pokedude.c index 8737a3866..a6b3fe994 100644 --- a/src/battle_controller_pokedude.c +++ b/src/battle_controller_pokedude.c @@ -125,7 +125,7 @@ static void SetPokedudeMonData(u8 monId); static void sub_8159478(u8 battlerId); static void PokedudeDoMoveAnimation(void); static void sub_81595EC(u8 taskId); -static const u8 *sub_8159EF0(void); +static const u8 *GetPokedudeText(void); u8 *gUnknown_3005EE0[MAX_BATTLERS_COUNT]; @@ -222,10 +222,10 @@ static const u8 gUnknown_8479048[][8] = static const u8 (*const gUnknown_8479060[])[8] = { - gUnknown_8479008, - gUnknown_8479018, - gUnknown_8479030, - gUnknown_8479048, + [TTVSCR_BATTLE] = gUnknown_8479008, + [TTVSCR_STATUS] = gUnknown_8479018, + [TTVSCR_MATCHUPS] = gUnknown_8479030, + [TTVSCR_CATCHING] = gUnknown_8479048, }; static const u8 gUnknown_8479070[][8] = @@ -259,10 +259,10 @@ static const u8 gUnknown_84790C0[][8] = static const u8 (*const gUnknown_84790D8[])[8] = { - gUnknown_8479070, - gUnknown_8479080, - gUnknown_84790A0, - gUnknown_84790C0, + [TTVSCR_BATTLE] = gUnknown_8479070, + [TTVSCR_STATUS] = gUnknown_8479080, + [TTVSCR_MATCHUPS] = gUnknown_84790A0, + [TTVSCR_CATCHING] = gUnknown_84790C0, }; static const struct Unk_84790E8 gUnknown_84790E8[] = @@ -415,48 +415,48 @@ static const struct Unk_84790E8 gUnknown_8479168[] = static const struct Unk_84790E8 *const gUnknown_8479198[] = { - gUnknown_84790E8, - gUnknown_8479108, - gUnknown_8479130, - gUnknown_8479168, + [TTVSCR_BATTLE] = gUnknown_84790E8, + [TTVSCR_STATUS] = gUnknown_8479108, + [TTVSCR_MATCHUPS] = gUnknown_8479130, + [TTVSCR_CATCHING] = gUnknown_8479168, }; -static const u8 *const gUnknown_84791A8[] = +static const u8 *const sPokedudeTexts_Battle[] = { - gUnknown_81C5F69, - gUnknown_81C5FA7, - gUnknown_81C5FDC, - gUnknown_81C601C, + Pokedude_Text_SpeedierBattlerGoesFirst, + Pokedude_Text_MyRattataFasterThanPidgey, + Pokedude_Text_BattlersTakeTurnsAttacking, + Pokedude_Text_MyRattataWonGetsEXP, }; -static const u8 *const gUnknown_84791B8[] = +static const u8 *const sPokedudeTexts_Status[] = { - gUnknown_81C60FA, - gUnknown_81C60FA, - gUnknown_81C615A, - gUnknown_81C6196, - gUnknown_81C61EA, + Pokedude_Text_UhOhRattataPoisoned, + Pokedude_Text_UhOhRattataPoisoned, + Pokedude_Text_HealStatusRightAway, + Pokedude_Text_UsingItemTakesTurn, + Pokedude_Text_YayWeManagedToWin, }; -static const u8 *const gUnknown_84791CC[] = +static const u8 *const sPokedudeTexts_TypeMatchup[] = { - gUnknown_81C6202, - gUnknown_81C6301, - gUnknown_81C63A9, - gUnknown_81C63F9, - gUnknown_81C6446, - gUnknown_81C657A, - gUnknown_81C6637, + Pokedude_Text_WaterNotVeryEffectiveAgainstGrass, + Pokedude_Text_GrassEffectiveAgainstWater, + Pokedude_Text_LetsTryShiftingMons, + Pokedude_Text_ShiftingUsesTurn, + Pokedude_Text_ButterfreeDoubleResistsGrass, + Pokedude_Text_ButterfreeGoodAgainstOddish, + Pokedude_Text_YeahWeWon, }; -static const u8 *const gUnknown_84791E8[] = +static const u8 *const sPokedudeTexts_Catching[] = { - gUnknown_81C6645, - gUnknown_81C6645, - gUnknown_81C66CF, - gUnknown_81C6787, - gUnknown_81C684B, - gUnknown_81C686C, + Pokedude_Text_WeakenMonBeforeCatching, + Pokedude_Text_WeakenMonBeforeCatching, + Pokedude_Text_BestIfTargetStatused, + Pokedude_Text_CantDoubleUpOnStatus, + Pokedude_Text_LetMeThrowBall, + Pokedude_Text_PickBestKindOfBall, }; static const struct PokedudeBattlePartyInfo sParties_Battle[] = @@ -554,10 +554,10 @@ static const struct PokedudeBattlePartyInfo sParties_Catching[] = static const struct PokedudeBattlePartyInfo *const sPokedudeBattlePartyPointers[] = { - sParties_Battle, - sParties_Status, - sParties_Matchups, - sParties_Catching, + [TTVSCR_BATTLE] = sParties_Battle, + [TTVSCR_STATUS] = sParties_Status, + [TTVSCR_MATCHUPS] = sParties_Matchups, + [TTVSCR_CATCHING] = sParties_Catching, }; static void nullsub_99(void) @@ -2595,7 +2595,7 @@ static void sub_8159BA8(void) break; case 2: gBattle_BG0_Y = 0; - BattleStringExpandPlaceholdersToDisplayedString(sub_8159EF0()); + BattleStringExpandPlaceholdersToDisplayedString(GetPokedudeText()); BattlePutTextOnWindow(gDisplayedStringBattle, 24); ++gUnknown_3005EE0[gActiveBattler][2]; break; @@ -2656,7 +2656,7 @@ static void sub_8159D04(void) } break; case 3: - BattleStringExpandPlaceholdersToDisplayedString(sub_8159EF0()); + BattleStringExpandPlaceholdersToDisplayedString(GetPokedudeText()); BattlePutTextOnWindow(gDisplayedStringBattle, 24); ++gUnknown_3005EE0[gActiveBattler][2]; break; @@ -2696,19 +2696,19 @@ static void sub_8159D04(void) } } -static const u8 *sub_8159EF0(void) +static const u8 *GetPokedudeText(void) { switch (gBattleStruct->field_96) { - case 0: + case TTVSCR_BATTLE: default: - return gUnknown_84791A8[gBattleStruct->field_97 - 1]; - case 1: - return gUnknown_84791B8[gBattleStruct->field_97 - 1]; - case 2: - return gUnknown_84791CC[gBattleStruct->field_97 - 1]; - case 3: - return gUnknown_84791E8[gBattleStruct->field_97 - 1]; + return sPokedudeTexts_Battle[gBattleStruct->field_97 - 1]; + case TTVSCR_STATUS: + return sPokedudeTexts_Status[gBattleStruct->field_97 - 1]; + case TTVSCR_MATCHUPS: + return sPokedudeTexts_TypeMatchup[gBattleStruct->field_97 - 1]; + case TTVSCR_CATCHING: + return sPokedudeTexts_Catching[gBattleStruct->field_97 - 1]; } } diff --git a/src/battle_main.c b/src/battle_main.c index e7d02c673..bbfcf5cf9 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -641,17 +641,17 @@ void CB2_InitBattle(void) if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) { if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - HelpSystem_SetSomeVariable2(0x19); + SetHelpContext(HELPCONTEXT_TRAINER_BATTLE_DOUBLE); else - HelpSystem_SetSomeVariable2(0x18); + SetHelpContext(HELPCONTEXT_TRAINER_BATTLE_SINGLE); } else if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) { - HelpSystem_SetSomeVariable2(0x1A); + SetHelpContext(HELPCONTEXT_SAFARI_BATTLE); } else { - HelpSystem_SetSomeVariable2(0x17); + SetHelpContext(HELPCONTEXT_WILD_BATTLE); } } } @@ -3713,7 +3713,7 @@ static void HandleEndTurn_BattleLost(void) } else { - if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && ScrSpecial_GetTrainerBattleMode() == TRAINER_BATTLE_EARLY_RIVAL) + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && GetTrainerBattleMode() == TRAINER_BATTLE_EARLY_RIVAL) { if (GetRivalBattleFlags() & RIVAL_BATTLE_HEAL_AFTER) gBattleCommunication[MULTISTRING_CHOOSER] = 1; // Dont do white out text diff --git a/src/battle_records.c b/src/battle_records.c index e2ae94f65..3196d9bad 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -88,7 +88,7 @@ static u8 *const sStringVars[3] = { gStringVar3 }; -void Special_BattleRecords(void) +void ShowBattleRecords(void) { SetVBlankCallback(NULL); SetMainCallback2(MainCB2_SetUp); diff --git a/src/battle_setup.c b/src/battle_setup.c index 354487abd..82a73990b 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -221,7 +221,7 @@ static bool8 CheckSilphScopeInPokemonTower(u16 mapGroup, u16 mapNum) return FALSE; } -void BattleSetup_StartWildBattle(void) +void StartWildBattle(void) { if (GetSafariZoneFlag()) DoSafariBattle(); @@ -243,7 +243,7 @@ static void DoStandardWildBattle(void) IncrementGameStat(GAME_STAT_WILD_BATTLES); } -void BattleSetup_StartRoamerBattle(void) +void StartRoamerBattle(void) { ScriptContext2_Enable(); FreezeObjectEvents(); @@ -285,7 +285,7 @@ static void DoTrainerBattle(void) IncrementGameStat(GAME_STAT_TRAINER_BATTLES); } -void ScrSpecial_StartOldManTutorialBattle(void) +void StartOldManTutorialBattle(void) { CreateMaleMon(&gEnemyParty[0], SPECIES_WEEDLE, 5); ScriptContext2_Enable(); @@ -294,7 +294,7 @@ void ScrSpecial_StartOldManTutorialBattle(void) CreateBattleStartTask(B_TRANSITION_SLICED_SCREEN, 0); } -void BattleSetup_StartScriptedWildBattle(void) +void StartScriptedWildBattle(void) { ScriptContext2_Enable(); gMain.savedCallback = CB2_EndScriptedWildBattle; @@ -304,7 +304,7 @@ void BattleSetup_StartScriptedWildBattle(void) IncrementGameStat(GAME_STAT_WILD_BATTLES); } -void ScrSpecial_StartMarowakBattle(void) +void StartMarowakBattle(void) { ScriptContext2_Enable(); gMain.savedCallback = CB2_EndMarowakBattle; @@ -323,7 +323,7 @@ void ScrSpecial_StartMarowakBattle(void) IncrementGameStat(GAME_STAT_WILD_BATTLES); } -void ScrSpecial_StartSouthernIslandBattle(void) +void StartSouthernIslandBattle(void) { ScriptContext2_Enable(); gMain.savedCallback = CB2_EndScriptedWildBattle; @@ -333,7 +333,7 @@ void ScrSpecial_StartSouthernIslandBattle(void) IncrementGameStat(GAME_STAT_WILD_BATTLES); } -void Special_StartLegendaryBattle(void) +void StartLegendaryBattle(void) { u16 species; @@ -364,7 +364,7 @@ void Special_StartLegendaryBattle(void) IncrementGameStat(GAME_STAT_WILD_BATTLES); } -void Special_StartGroudonKyogreBattle(void) +void StartGroudonKyogreBattle(void) { ScriptContext2_Enable(); gMain.savedCallback = CB2_EndScriptedWildBattle; @@ -377,7 +377,7 @@ void Special_StartGroudonKyogreBattle(void) IncrementGameStat(GAME_STAT_WILD_BATTLES); } -void Special_StartRegiBattle(void) +void StartRegiBattle(void) { ScriptContext2_Enable(); gMain.savedCallback = CB2_EndScriptedWildBattle; @@ -778,7 +778,7 @@ const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data) { case TRAINER_BATTLE_SINGLE_NO_INTRO_TEXT: TrainerBattleLoadArgs(sOrdinaryNoIntroBattleParams, data); - return EventScript_DoTrainerBattle; + return EventScript_DoNoIntroTrainerBattle; case TRAINER_BATTLE_DOUBLE: TrainerBattleLoadArgs(sDoubleBattleParams, data); SetMapVarsToTrainer(); @@ -807,7 +807,7 @@ const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data) return EventScript_TryDoRematchBattle; case TRAINER_BATTLE_EARLY_RIVAL: TrainerBattleLoadArgs(sEarlyRivalBattleParams, data); - return EventScript_DoTrainerBattle; + return EventScript_DoNoIntroTrainerBattle; default: TrainerBattleLoadArgs(sOrdinaryBattleParams, data); SetMapVarsToTrainer(); @@ -820,7 +820,7 @@ void ConfigureAndSetUpOneTrainerBattle(u8 trainerEventObjId, const u8 *trainerSc gSelectedObjectEvent = trainerEventObjId; gSpecialVar_LastTalked = gObjectEvents[trainerEventObjId].localId; BattleSetup_ConfigureTrainerBattle(trainerScript + 1); - ScriptContext1_SetupScript(gUnknown_81A4EB4); + ScriptContext1_SetupScript(EventScript_DoTrainerBattleFromApproach); ScriptContext2_Enable(); } @@ -838,7 +838,7 @@ void SetUpTrainerMovement(void) SetTrainerMovementType(objectEvent, GetTrainerFacingDirectionMovementType(objectEvent->facingDirection)); } -u8 ScrSpecial_GetTrainerBattleMode(void) +u8 GetTrainerBattleMode(void) { return sTrainerBattleMode; } @@ -848,7 +848,7 @@ u16 GetRivalBattleFlags(void) return sRivalBattleFlags; } -u16 ScrSpecial_HasTrainerBeenFought(void) +u16 Script_HasTrainerBeenFought(void) { return FlagGet(GetTrainerAFlag()); } @@ -879,10 +879,10 @@ void ClearTrainerFlag(u16 trainerId) FlagClear(FLAG_TRAINER_FLAG_START + trainerId); } -void BattleSetup_StartTrainerBattle(void) +void StartTrainerBattle(void) { gBattleTypeFlags = BATTLE_TYPE_TRAINER; - if (ScrSpecial_GetTrainerBattleMode() == TRAINER_BATTLE_EARLY_RIVAL && GetRivalBattleFlags() & RIVAL_BATTLE_TUTORIAL) + if (GetTrainerBattleMode() == TRAINER_BATTLE_EARLY_RIVAL && GetRivalBattleFlags() & RIVAL_BATTLE_TUTORIAL) gBattleTypeFlags |= BATTLE_TYPE_FIRST_BATTLE; gMain.savedCallback = CB2_EndTrainerBattle; DoTrainerBattle(); @@ -956,7 +956,7 @@ static void CB2_EndRematchBattle(void) } } -void ScrSpecial_StartTrainerEyeRematch(void) +void StartRematchBattle(void) { gBattleTypeFlags = BATTLE_TYPE_TRAINER; gMain.savedCallback = CB2_EndRematchBattle; @@ -964,7 +964,7 @@ void ScrSpecial_StartTrainerEyeRematch(void) ScriptContext1_Stop(); } -void ScrSpecial_ShowTrainerIntroSpeech(void) +void ShowTrainerIntroSpeech(void) { ShowFieldMessage(GetIntroSpeechOfApproachingTrainer()); } @@ -985,7 +985,7 @@ const u8 *BattleSetup_GetTrainerPostBattleScript(void) return Test_EventScript_Sign; } -void ScrSpecial_ShowTrainerNonBattlingSpeech(void) +void ShowTrainerCantBattleSpeech(void) { ShowFieldMessage(GetTrainerCantBattleSpeech()); } diff --git a/src/battle_tower.c b/src/battle_tower.c index ca434fad3..818c909aa 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -177,7 +177,7 @@ static const u16 sLongStreakPrizes[] = { ITEM_CHOICE_BAND }; -void ScrSpecial_BattleTowerMapScript2(void) +void BattleTowerMapScript2(void) { u8 count = 0; s32 levelType; diff --git a/src/berry_powder.c b/src/berry_powder.c index 2eff23802..3ebffed48 100644 --- a/src/berry_powder.c +++ b/src/berry_powder.c @@ -36,7 +36,7 @@ static bool8 HasEnoughBerryPowder(u32 cost) return TRUE; } -bool8 Special_HasEnoughBerryPowder(void) +bool8 Script_HasEnoughBerryPowder(void) { if (DecryptBerryPowder(&gSaveBlock2Ptr->berryCrush.berryPowderAmount) < gSpecialVar_0x8004) return FALSE; @@ -73,7 +73,7 @@ static bool8 TakeBerryPowder(u32 cost) } } -bool8 Special_TakeBerryPowder(void) +bool8 Script_TakeBerryPowder(void) { u32 *powder = &gSaveBlock2Ptr->berryCrush.berryPowderAmount; if (!HasEnoughBerryPowder(gSpecialVar_0x8004)) diff --git a/src/cable_club.c b/src/cable_club.c index e7277ed07..b7f9b9114 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -573,7 +573,7 @@ static void Task_ReestablishLinkInCableClubRoom_2(u8 taskId) } } -void Special_CableClub_AskSaveTheGame(void) +void CableClub_AskSaveTheGame(void) { Field_AskSaveTheGame(); } @@ -765,7 +765,7 @@ void CleanupLinkRoomState(void) copy_saved_warp2_bank_and_enter_x_to_warp1(127); } -void sub_8081770(void) +void ExitLinkRoom(void) { sub_8057F5C(); } @@ -896,7 +896,7 @@ static void CreateTask_StartWiredCableClubTrade(void) CreateTask(Task_StartWiredCableClubTrade, 80); } -void Special_WiredCableClubTrade(void) +void StartWiredCableClubTrade(void) { CreateTask_StartWiredCableClubTrade(); ScriptContext1_Stop(); diff --git a/src/credits.c b/src/credits.c index a53d72f31..63d4c9c85 100644 --- a/src/credits.c +++ b/src/credits.c @@ -714,7 +714,7 @@ static const struct CreditsTextHeader sCreditsTexts[] = { { gString_Dummy, gString_Dummy, FALSE } }; -void Special_Credits(void) +void DoCredits(void) { sCreditsMgr = AllocZeroed(sizeof(*sCreditsMgr)); ResetTasks(); diff --git a/src/easy_chat.c b/src/easy_chat.c index 14662b660..657d178d7 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -276,7 +276,7 @@ static u16 GetRandomWordFromAnyGroup(u16 groupId) return GetRandomWordFromGroup(groupId); } -void Special_BufferEasyChatMessage(void) +void ShowEasyChatMessage(void) { u16 *easyChatWords; int columns, rows; diff --git a/src/field_effect.c b/src/field_effect.c index c7dd8b4e4..49b48ed93 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -1232,7 +1232,7 @@ static bool8 FallWarpEffect_7(struct Task * task) { VarSet(VAR_TEMP_1, 1); SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_SURFING); - HelpSystem_SetSomeVariable2(22); + SetHelpContext(HELPCONTEXT_SURFING); } DestroyTask(FindTaskIdByFunc(Task_FallWarpFieldEffect)); return FALSE; @@ -2963,7 +2963,7 @@ static void UseSurfEffect_5(struct Task * task) ScriptContext2_Disable(); FieldEffectActiveListRemove(FLDEFF_USE_SURF); DestroyTask(FindTaskIdByFunc(Task_FldEffUseSurf)); - HelpSystem_SetSomeVariable2(22); + SetHelpContext(HELPCONTEXT_SURFING); } } diff --git a/src/field_special_scene.c b/src/field_special_scene.c index 4f9446942..327426231 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -21,6 +21,7 @@ void nullsub_60(void) { } -void nullsub_61(void) +// From Hoenn's SS Tidal +void LookThroughPorthole(void) { } diff --git a/src/field_specials.c b/src/field_specials.c index 5ac165156..e8def2c39 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -46,6 +46,7 @@ #include "constants/moves.h" #include "constants/menu.h" #include "constants/event_objects.h" +#include "constants/metatile_labels.h" static EWRAM_DATA u8 sElevatorCurrentFloorWindowId = 0; static EWRAM_DATA u16 sElevatorScroll = 0; @@ -76,12 +77,12 @@ static void Task_SuspendListMenu(u8 taskId); static void Task_RedrawScrollArrowsAndWaitInput(u8 taskId); static void Task_CreateMenuRemoveScrollIndicatorArrowPair(u8 taskId); static void Task_ListMenuRemoveScrollIndicatorArrowPair(u8 taskId); -static u16 GetStarterPokemon(u16 starterIdx); +static u16 GetStarterSpeciesById(u16 starterIdx); static void ChangeBoxPokemonNickname_CB(void); static void ChangePokemonNickname_CB(void); static void Task_RunPokemonLeagueLightingEffect(u8 taskId); static void Task_CancelPokemonLeagueLightingEffect(u8 taskId); -static void Task_DoDeoxysRockInteraction(u8 taskId); +static void Task_DoDeoxysTriangleInteraction(u8 taskId); static void MoveDeoxysObject(u8 num); static void Task_WaitDeoxysFieldEffect(u8 taskId); static void Task_WingFlapSound(u8 taskId); @@ -92,14 +93,14 @@ static u8 *const sStringVarPtrs[] = { gStringVar3 }; -void Special_ShowDiploma(void) +void ShowDiploma(void) { sub_8112364(); SetMainCallback2(CB2_ShowDiploma); ScriptContext2_Enable(); } -void Special_ForcePlayerOntoBike(void) +void ForcePlayerOntoBike(void) { if (gPlayerAvatar.flags & 1) SetPlayerAvatarTransitionFlags(2); @@ -112,7 +113,7 @@ void nullsub_74(void) } -u8 Special_GetPlayerAvatarBike(void) +u8 GetPlayerAvatarBike(void) { if (TestPlayerAvatarFlags(4)) return 1; @@ -122,24 +123,24 @@ u8 Special_GetPlayerAvatarBike(void) return 0; } -void Special_ShowStringVar4AsFieldMessage(void) +void ShowFieldMessageStringVar4(void) { ShowFieldMessage(gStringVar4); } -void Special_GetPlayerXY(void) +void GetPlayerXY(void) { gSpecialVar_0x8004 = gSaveBlock1Ptr->pos.x; gSpecialVar_0x8005 = gSaveBlock1Ptr->pos.y; } -u8 Special_GetPlayerTrainerIdOnesDigit(void) +u8 GetPlayerTrainerIdOnesDigit(void) { u16 playerId = (gSaveBlock2Ptr->playerTrainerId[1] << 8) | gSaveBlock2Ptr->playerTrainerId[0]; return playerId % 10; } -void Special_BufferBigGuyOrBigGirlString(void) +void BufferBigGuyOrBigGirlString(void) { if (gSaveBlock2Ptr->playerGender == MALE) StringCopy(gStringVar1, gText_BigGuy); @@ -147,7 +148,7 @@ void Special_BufferBigGuyOrBigGirlString(void) StringCopy(gStringVar1, gText_BigGirl); } -void Special_BufferSonOrDaughterString(void) +void BufferSonOrDaughterString(void) { if (gSaveBlock2Ptr->playerGender == MALE) StringCopy(gStringVar1, gText_Son); @@ -155,12 +156,12 @@ void Special_BufferSonOrDaughterString(void) StringCopy(gStringVar1, gText_Daughter); } -u8 Special_GetBattleOutcome(void) +u8 GetBattleOutcome(void) { return gBattleOutcome; } -void Special_SetHiddenItemFlag(void) +void SetHiddenItemFlag(void) { FlagSet(gSpecialVar_0x8004); } @@ -184,13 +185,13 @@ u8 GetLeadMonFriendship(void) return 0; } -void Special_TownMap(void) +void ShowTownMap(void) { sub_8112364(); sub_80BFF50(1, CB2_ReturnToFieldContinueScriptPlayMapMusic); } -bool8 Special_PlayerHasGrassPokemonInParty(void) +bool8 PlayerHasGrassPokemonInParty(void) { u8 i; struct Pokemon * pokemon; @@ -211,34 +212,41 @@ bool8 Special_PlayerHasGrassPokemonInParty(void) return FALSE; } -void Special_AnimatePcTurnOn(void) +#define tState data[0] +#define tTimer data[1] + +void AnimatePcTurnOn(void) { u8 taskId; if (FuncIsActiveTask(Task_AnimatePcTurnOn) != TRUE) { taskId = CreateTask(Task_AnimatePcTurnOn, 8); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = 0; + gTasks[taskId].tState = 0; + gTasks[taskId].tTimer = 0; } } +// PC flickers on and off while turning on static void Task_AnimatePcTurnOn(u8 taskId) { s16 *data = gTasks[taskId].data; - if (data[1] == 6) + if (tTimer == 6) { - PcTurnOnUpdateMetatileId(data[0] & 1); + PcTurnOnUpdateMetatileId(tState & 1); DrawWholeMapView(); - data[1] = 0; - data[0]++; - if (data[0] == 5) + tTimer = 0; + tState++; + if (tState == 5) DestroyTask(taskId); } - data[1]++; + tTimer++; } -static void PcTurnOnUpdateMetatileId(bool16 a0) +#undef tState +#undef tTimer + +static void PcTurnOnUpdateMetatileId(bool16 flickerOff) { u16 metatileId = 0; s8 deltaX = 0; @@ -260,28 +268,28 @@ static void PcTurnOnUpdateMetatileId(bool16 a0) deltaY = -1; break; } - if (a0) + if (flickerOff) { if (gSpecialVar_0x8004 == 0) - metatileId = 0x62; + metatileId = METATILE_Building_PCOff; else if (gSpecialVar_0x8004 == 1) - metatileId = 0x28F; + metatileId = METATILE_GenericBuilding1_PlayersPCOff; else if (gSpecialVar_0x8004 == 2) - metatileId = 0x28F; + metatileId = METATILE_GenericBuilding1_PlayersPCOff; } else { if (gSpecialVar_0x8004 == 0) - metatileId = 0x63; + metatileId = METATILE_Building_PCOn; else if (gSpecialVar_0x8004 == 1) - metatileId = 0x28A; + metatileId = METATILE_GenericBuilding1_PlayersPCOn; else if (gSpecialVar_0x8004 == 2) - metatileId = 0x28A; + metatileId = METATILE_GenericBuilding1_PlayersPCOn; } - MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + deltaX + 7, gSaveBlock1Ptr->pos.y + deltaY + 7, metatileId | 0xC00); + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + deltaX + 7, gSaveBlock1Ptr->pos.y + deltaY + 7, metatileId | METATILE_COLLISION_MASK); } -void Special_AnimatePcTurnOff() +void AnimatePcTurnOff() { u16 metatileId = 0; s8 deltaX = 0; @@ -304,12 +312,12 @@ void Special_AnimatePcTurnOff() break; } if (gSpecialVar_0x8004 == 0) - metatileId = 0x62; + metatileId = METATILE_Building_PCOff; else if (gSpecialVar_0x8004 == 1) - metatileId = 0x28F; + metatileId = METATILE_GenericBuilding1_PlayersPCOff; else if (gSpecialVar_0x8004 == 2) - metatileId = 0x28F; - MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + deltaX + 7, gSaveBlock1Ptr->pos.y + deltaY + 7, metatileId | 0xC00); + metatileId = METATILE_GenericBuilding1_PlayersPCOff; + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + deltaX + 7, gSaveBlock1Ptr->pos.y + deltaY + 7, metatileId | METATILE_COLLISION_MASK); DrawWholeMapView(); } @@ -381,7 +389,7 @@ static const u8 sSlotMachineIndices[] = { 5 }; -u8 Special_GetRandomSlotMachine(void) +u8 GetRandomSlotMachineId(void) { u16 rval = Random() % NELEMS(sSlotMachineIndices); return sSlotMachineIndices[rval]; @@ -404,7 +412,7 @@ void GiveLeadMonEffortRibbon(void) SetMonData(&gPlayerParty[leadMonIdx], MON_DATA_EFFORT_RIBBON, ¶m); } -bool8 ScrSpecial_AreLeadMonEVsMaxedOut(void) +bool8 AreLeadMonEVsMaxedOut(void) { u8 leadMonIndex = GetLeadMonIndex(); if (GetMonEVCount(&gPlayerParty[leadMonIndex]) >= 510) @@ -413,9 +421,9 @@ bool8 ScrSpecial_AreLeadMonEVsMaxedOut(void) return FALSE; } -bool8 Special_IsStarterFirstStageInParty(void) +bool8 IsStarterFirstStageInParty(void) { - u16 species = GetStarterPokemon(VarGet(VAR_STARTER_MON)); + u16 species = GetStarterSpeciesById(VarGet(VAR_STARTER_MON)); u8 partyCount = CalculatePlayerPartyCount(); u8 i; for (i = 0; i < partyCount; i++) @@ -426,7 +434,7 @@ bool8 Special_IsStarterFirstStageInParty(void) return FALSE; } -bool8 Special_IsThereRoomInAnyBoxForMorePokemon(void) +bool8 IsThereRoomInAnyBoxForMorePokemon(void) { u16 i; u16 j; @@ -441,7 +449,7 @@ bool8 Special_IsThereRoomInAnyBoxForMorePokemon(void) return FALSE; } -bool8 Special_CheckPartyPokerus(void) +bool8 IsPokerusInParty(void) { if (!CheckPartyPokerus(gPlayerParty, 0x3F)) return FALSE; @@ -455,7 +463,7 @@ bool8 Special_CheckPartyPokerus(void) #define tDuration data[3] #define tYtrans data[4] -void Special_ShakeScreen(void) +void ShakeScreen(void) { /* * 0x8004 = x translation @@ -518,12 +526,12 @@ u8 GetLeadMonIndex(void) return 0; } -u16 Special_GetSpeciesOfPartySlot_x8004(void) +u16 GetPartyMonSpecies(void) { return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL); } -bool8 Special_IsMonOTNameNotPlayers(void) +bool8 IsMonOTNameNotPlayers(void) { GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_NAME, gStringVar1); @@ -533,7 +541,8 @@ bool8 Special_IsMonOTNameNotPlayers(void) return TRUE; } -void nullsub_75(void) +// Used to nop all the unused specials from RS +void NullFieldSpecial(void) { } @@ -545,7 +554,7 @@ void sub_80CADC4(void) sub_809D424(); } -void Special_SetVermilionTrashCans(void) +void SetVermilionTrashCans(void) { u16 idx = (Random() % 15) + 1; gSpecialVar_0x8004 = idx; @@ -712,7 +721,7 @@ static u16 SampleResortGorgeousReward(void) return sResortGorgeousDeluxeRewards[Random() % NELEMS(sResortGorgeousDeluxeRewards)]; } -bool8 Special_CheckAddCoins(void) +bool8 CheckAddCoins(void) { if (gSpecialVar_Result + gSpecialVar_0x8006 > 9999) return FALSE; @@ -769,15 +778,39 @@ static const u8 sUnused_83F5B84[] = { }; static const u16 sElevatorWindowMetatilesGoingUp[][3] = { - {0x2e8, 0x2e9, 0x2ea}, - {0x2f0, 0x2f1, 0x2f2}, - {0x2f8, 0x2f9, 0x2fa} + { + METATILE_SilphCo_ElevatorWindow_Top0, + METATILE_SilphCo_ElevatorWindow_Top1, + METATILE_SilphCo_ElevatorWindow_Top2 + }, + { + METATILE_SilphCo_ElevatorWindow_Mid0, + METATILE_SilphCo_ElevatorWindow_Mid1, + METATILE_SilphCo_ElevatorWindow_Mid2 + }, + { + METATILE_SilphCo_ElevatorWindow_Bottom0, + METATILE_SilphCo_ElevatorWindow_Bottom1, + METATILE_SilphCo_ElevatorWindow_Bottom2 + } }; static const u16 sElevatorWindowMetatilesGoingDown[][3] = { - {0x2e8, 0x2ea, 0x2e9}, - {0x2f0, 0x2f2, 0x2f1}, - {0x2f8, 0x2fa, 0x2f9} + { + METATILE_SilphCo_ElevatorWindow_Top0, + METATILE_SilphCo_ElevatorWindow_Top2, + METATILE_SilphCo_ElevatorWindow_Top1 + }, + { + METATILE_SilphCo_ElevatorWindow_Mid0, + METATILE_SilphCo_ElevatorWindow_Mid2, + METATILE_SilphCo_ElevatorWindow_Mid1 + }, + { + METATILE_SilphCo_ElevatorWindow_Bottom0, + METATILE_SilphCo_ElevatorWindow_Bottom2, + METATILE_SilphCo_ElevatorWindow_Bottom1 + } }; static const u8 sElevatorAnimationDuration[] = { @@ -804,7 +837,7 @@ static const u8 sElevatorWindowAnimDuration[] = { 27 }; -void Special_GetElevatorFloor(void) +void GetElevatorFloor(void) { u16 floor = 4; if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(ROCKET_HIDEOUT_B1F)) @@ -899,7 +932,7 @@ void Special_GetElevatorFloor(void) VarSet(VAR_ELEVATOR_FLOOR, floor); } -u16 Special_InitElevatorFloorSelectMenuPos(void) +u16 InitElevatorFloorSelectMenuPos(void) { sElevatorScroll = 0; sElevatorCursorPos = 0; @@ -1017,7 +1050,7 @@ u16 Special_InitElevatorFloorSelectMenuPos(void) return sElevatorCursorPos; } -void Special_AnimateElevator(void) +void AnimateElevator(void) { u16 nfloors; s16 *data = gTasks[CreateTask(Task_ElevatorShake, 9)].data; @@ -1062,7 +1095,7 @@ static void Task_ElevatorShake(u8 taskId) } } -void Special_DrawElevatorCurrentFloorWindow(void) +void DrawElevatorCurrentFloorWindow(void) { const u8 *floorname; u32 strwidth; @@ -1080,7 +1113,7 @@ void Special_DrawElevatorCurrentFloorWindow(void) } } -void Special_CloseElevatorCurrentFloorWindow(void) +void CloseElevatorCurrentFloorWindow(void) { ClearStdWindowAndFrameToTransparent(sElevatorCurrentFloorWindowId, TRUE); RemoveWindow(sElevatorCurrentFloorWindowId); @@ -1113,7 +1146,7 @@ static void Task_AnimateElevatorWindowView(u8 taskId) { for (j = 0; j < 3; j++) { - MapGridSetMetatileIdAt(j + 8, i + 7, sElevatorWindowMetatilesGoingUp[i][data[0] % 3] | 0xC00); + MapGridSetMetatileIdAt(j + 8, i + 7, sElevatorWindowMetatilesGoingUp[i][data[0] % 3] | METATILE_COLLISION_MASK); } } } @@ -1123,7 +1156,7 @@ static void Task_AnimateElevatorWindowView(u8 taskId) { for (j = 0; j < 3; j++) { - MapGridSetMetatileIdAt(j + 8, i + 7, sElevatorWindowMetatilesGoingDown[i][data[0] % 3] | 0xC00); + MapGridSetMetatileIdAt(j + 8, i + 7, sElevatorWindowMetatilesGoingDown[i][data[0] % 3] | METATILE_COLLISION_MASK); } } } @@ -1135,7 +1168,7 @@ static void Task_AnimateElevatorWindowView(u8 taskId) data[1]++; } -void Special_ListMenu(void) +void ListMenu(void) { u8 taskId; struct Task * task; @@ -1439,7 +1472,7 @@ static void Task_SuspendListMenu(u8 taskId) } } -void Special_ReturnToListMenu(void) +void ReturnToListMenu(void) { u8 taskId = FindTaskIdByFunc(Task_SuspendListMenu); if (taskId == 0xFF) @@ -1483,31 +1516,31 @@ static void Task_ListMenuRemoveScrollIndicatorArrowPair(u8 taskId) RemoveScrollIndicatorArrowPair(task->data[12]); } -void Special_ForcePlayerToStartSurfing(void) +void ForcePlayerToStartSurfing(void) { - HelpSystem_SetSomeVariable2(22); + SetHelpContext(HELPCONTEXT_SURFING); SetPlayerAvatarTransitionFlags(8); } -static const u16 sStarterMon[] = { +static const u16 sStarterSpecies[] = { SPECIES_BULBASAUR, SPECIES_SQUIRTLE, SPECIES_CHARMANDER }; -static u16 GetStarterPokemon(u16 idx) +static u16 GetStarterSpeciesById(u16 idx) { - if (idx >= NELEMS(sStarterMon)) + if (idx >= NELEMS(sStarterSpecies)) idx = 0; - return sStarterMon[idx]; + return sStarterSpecies[idx]; } -u16 ScrSpecial_GetStarter(void) +u16 GetStarterSpecies(void) { - return GetStarterPokemon(VarGet(VAR_STARTER_MON)); + return GetStarterSpeciesById(VarGet(VAR_STARTER_MON)); } -void Special_SetSeenMon(void) +void SetSeenMon(void) { GetSetPokedexFlag(SpeciesToNationalPokedexNum(gSpecialVar_0x8004), 2); } @@ -1548,7 +1581,7 @@ static bool8 HasMonBeenRenamed(u8 idx) return FALSE; } -bool8 Special_HasLeadMonBeenRenamed(void) +bool8 HasLeadMonBeenRenamed(void) { return HasMonBeenRenamed(GetLeadMonIndex()); } @@ -1633,13 +1666,13 @@ static void ChangePokemonNickname_CB(void) CB2_ReturnToFieldContinueScriptPlayMapMusic(); } -void Special_GetMonNickname(void) +void BufferMonNickname(void) { GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar1); StringGetEnd10(gStringVar1); } -void Special_IsMonOTIDNotPlayers(void) +void IsMonOTIDNotPlayers(void) { if (GetPlayerTrainerId() == GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_ID, NULL)) gSpecialVar_Result = FALSE; @@ -1672,7 +1705,7 @@ u8 GetUnlockedSeviiAreas(void) return result; } -void Special_UpdateTrainerCardPhotoIcons(void) +void UpdateTrainerCardPhotoIcons(void) { u16 species[PARTY_SIZE]; u32 personality[PARTY_SIZE]; @@ -1729,7 +1762,7 @@ u16 GetHiddenItemAttr(u32 hiddenItem, u8 attr) return 1; } -bool8 Special_PlayerPartyContainsSpecies(void) +bool8 DoesPlayerPartyContainSpecies(void) { u8 partyCount = CalculatePlayerPartyCount(); u8 i; @@ -1756,7 +1789,7 @@ static const u8 sMartMaps[][3] = { {MAP_GROUP(SIX_ISLAND_MART), MAP_NUM(SIX_ISLAND_MART), 1} }; -u8 Special_GetMartClerkObjectId(void) +u8 GetMartClerkObjectId(void) { u8 i; for (i = 0; i < NELEMS(sMartMaps); i++) @@ -1915,7 +1948,7 @@ void sub_80CC59C(void) } } -u16 Special_BattleCardAction(void) +u16 BattleCardAction(void) { switch (gSpecialVar_Result) { @@ -2016,7 +2049,7 @@ bool8 sub_80CC87C(void) return FALSE; } -bool8 Special_ItemIsTM_GetMoveName(void) +bool8 BufferTMHMMoveName(void) { // 8004 = item ID if (gSpecialVar_0x8004 >= ITEM_TM01 && gSpecialVar_0x8004 <= ITEM_HM08) @@ -2035,7 +2068,7 @@ void RunMassageCooldownStepCounter(void) VarSet(VAR_MASSAGE_COOLDOWN_STEP_COUNTER, count + 1); } -void Special_DaisyMassageServices(void) +void DaisyMassageServices(void) { AdjustFriendship(&gPlayerParty[gSpecialVar_0x8004], 6); VarSet(VAR_MASSAGE_COOLDOWN_STEP_COUNTER, 0); @@ -2093,7 +2126,7 @@ static const u8 sChampionRoomLightingTimers[] = { 8 }; -void Special_PokemonLeagueLightingEffect(void) +void DoPokemonLeagueLightingEffect(void) { u8 taskId = CreateTask(Task_RunPokemonLeagueLightingEffect, 8); s16 *data = gTasks[taskId].data; @@ -2183,36 +2216,36 @@ static const u8 sCapeBrinkCompatibleSpecies[] = { SPECIES_BLASTOISE }; -bool8 Special_CapeBrinkGetMoveToTeachLeadPokemon(void) +bool8 CapeBrinkGetMoveToTeachLeadPokemon(void) { // Returns: // 8005 = Move tutor index // 8006 = Num moves known by lead mon // 8007 = Index of lead mon // to specialvar = whether a move can be taught in the first place - u8 r7 = 0; - u8 r6 = 0; - u8 r8 = GetLeadMonIndex(); - u8 r4; - gSpecialVar_0x8007 = r8; - for (r4 = 0; r4 < NELEMS(sCapeBrinkCompatibleSpecies); r4++) - { - if (GetMonData(&gPlayerParty[r8], MON_DATA_SPECIES2, NULL) == sCapeBrinkCompatibleSpecies[r4]) + u8 tutorMonId = 0; + u8 numMovesKnown = 0; + u8 leadMonSlot = GetLeadMonIndex(); + u8 i; + gSpecialVar_0x8007 = leadMonSlot; + for (i = 0; i < NELEMS(sCapeBrinkCompatibleSpecies); i++) + { + if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_SPECIES2, NULL) == sCapeBrinkCompatibleSpecies[i]) { - r7 = r4; + tutorMonId = i; break; } } - if (r4 == NELEMS(sCapeBrinkCompatibleSpecies) || GetMonData(&gPlayerParty[r8], MON_DATA_FRIENDSHIP) != 255) + if (i == NELEMS(sCapeBrinkCompatibleSpecies) || GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_FRIENDSHIP) != 255) return FALSE; - if (r7 == 0) + if (tutorMonId == 0) { StringCopy(gStringVar2, gMoveNames[MOVE_FRENZY_PLANT]); gSpecialVar_0x8005 = MOVETUTOR_FRENZY_PLANT; if (FlagGet(FLAG_TUTOR_FRENZY_PLANT) == TRUE) return FALSE; } - else if (r7 == 1) + else if (tutorMonId == 1) { StringCopy(gStringVar2, gMoveNames[MOVE_BLAST_BURN]); gSpecialVar_0x8005 = MOVETUTOR_BLAST_BURN; @@ -2226,21 +2259,21 @@ bool8 Special_CapeBrinkGetMoveToTeachLeadPokemon(void) if (FlagGet(FLAG_TUTOR_HYDRO_CANNON) == TRUE) return FALSE; } - if (GetMonData(&gPlayerParty[r8], MON_DATA_MOVE1) != MOVE_NONE) - r6++; - if (GetMonData(&gPlayerParty[r8], MON_DATA_MOVE2) != MOVE_NONE) - r6++; - if (GetMonData(&gPlayerParty[r8], MON_DATA_MOVE3) != MOVE_NONE) - r6++; - if (GetMonData(&gPlayerParty[r8], MON_DATA_MOVE4) != MOVE_NONE) - r6++; - gSpecialVar_0x8006 = r6; + if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_MOVE1) != MOVE_NONE) + numMovesKnown++; + if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_MOVE2) != MOVE_NONE) + numMovesKnown++; + if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_MOVE3) != MOVE_NONE) + numMovesKnown++; + if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_MOVE4) != MOVE_NONE) + numMovesKnown++; + gSpecialVar_0x8006 = numMovesKnown; return TRUE; } -bool8 Special_HasLearnedAllMovesFromCapeBrinkTutor(void) +bool8 HasLearnedAllMovesFromCapeBrinkTutor(void) { - // 8005 is set by Special_CapeBrinkGetMoveToTeachLeadPokemon + // 8005 is set by CapeBrinkGetMoveToTeachLeadPokemon u8 r4 = 0; if (gSpecialVar_0x8005 == MOVETUTOR_FRENZY_PLANT) FlagSet(FLAG_TUTOR_FRENZY_PLANT); @@ -2276,7 +2309,7 @@ bool8 CutMoveRuinValleyCheck(void) void CutMoveOpenDottedHoleDoor(void) { - MapGridSetMetatileIdAt(31, 31, 0x358); + MapGridSetMetatileIdAt(31, 31, METATILE_SeviiIslands67_DottedHoleDoor_Open); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_USED_CUT_ON_RUIN_VALLEY_BRAILLE); @@ -2324,12 +2357,12 @@ static const u8 sDeoxysStepCaps[] = { 3 }; -void DoDeoxysRockInteraction(void) +void DoDeoxysTriangleInteraction(void) { - CreateTask(Task_DoDeoxysRockInteraction, 8); + CreateTask(Task_DoDeoxysTriangleInteraction, 8); } -static void Task_DoDeoxysRockInteraction(u8 taskId) +static void Task_DoDeoxysTriangleInteraction(u8 taskId) { u16 r5; u16 r6; @@ -2415,14 +2448,14 @@ void BirthIslandDeoxysStepCounter(void) } } -void Special_SetDeoxysTriangleObjectPal(void) +void SetDeoxysTrianglePalette(void) { u8 num = VarGet(VAR_DEOXYS_INTERACTION_NUM); LoadPalette(sDeoxysObjectPals[num], 0x1A0, 0x08); sub_8083598(10); } -bool8 Special_BadEggInParty(void) +bool8 IsBadEggInParty(void) { u8 partyCount = CalculatePlayerPartyCount(); u8 i; @@ -2434,7 +2467,7 @@ bool8 Special_BadEggInParty(void) return FALSE; } -bool8 Special_PlayerIsNotInTrainerTowerLobby(void) +bool8 IsPlayerNotInTrainerTowerLobby(void) { if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRAINER_TOWER_LOBBY) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRAINER_TOWER_LOBBY)) return FALSE; @@ -2442,7 +2475,7 @@ bool8 Special_PlayerIsNotInTrainerTowerLobby(void) return TRUE; } -void Special_BrailleCursorToggle(void) +void BrailleCursorToggle(void) { // 8004 = x - 27 // 8005 = y @@ -2476,7 +2509,7 @@ bool8 PlayerPartyContainsSpeciesWithPlayerID(void) * Determines which of Lorelei's doll collection to show * based on how many times you've entered the Hall of Fame. */ -void Special_ComputeLoreleiDollCollection(void) +void UpdateLoreleiDollCollection(void) { u32 numHofClears = GetGameStat(GAME_STAT_ENTERED_HOF); if (numHofClears >= 25) @@ -2499,7 +2532,7 @@ void Special_ComputeLoreleiDollCollection(void) } } -void Special_LoopWingFlapSound(void) +void LoopWingFlapSound(void) { // 8004 = Num flaps // 8005 = Frame delay between flaps diff --git a/src/field_tasks.c b/src/field_tasks.c index cd72e111a..6bd4b6f46 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -13,6 +13,7 @@ #include "task.h" #include "constants/field_tasks.h" #include "constants/flags.h" +#include "constants/metatile_labels.h" #include "constants/songs.h" #include "constants/vars.h" @@ -37,15 +38,15 @@ static const TaskFunc sPerStepCallbacks[] = static const u8 sIcefallCaveIceTileCoords[][2] = { - { 0x08, 0x03 }, - { 0x0a, 0x05 }, - { 0x0f, 0x05 }, - { 0x08, 0x09 }, - { 0x09, 0x09 }, - { 0x10, 0x09 }, - { 0x08, 0x0a }, - { 0x09, 0x0a }, - { 0x08, 0x0e } + { 8, 3 }, + { 10, 5 }, + { 15, 5 }, + { 8, 9 }, + { 9, 9 }, + { 16, 9 }, + { 8, 10 }, + { 9, 10 }, + { 8, 14 } }; static void Task_RunPerStepCallback(u8 taskId) @@ -137,7 +138,7 @@ static void MarkIcefallCaveCoordVisited(s16 x, s16 y) } } -void Special_SetIcefallCaveCrackedIceMetatiles(void) +void SetIcefallCaveCrackedIceMetatiles(void) { u8 i = 0; for (; i < NELEMS(sIcefallCaveIceTileCoords); ++i) @@ -146,7 +147,7 @@ void Special_SetIcefallCaveCrackedIceMetatiles(void) { int x = sIcefallCaveIceTileCoords[i][0] + 7; int y = sIcefallCaveIceTileCoords[i][1] + 7; - MapGridSetMetatileIdAt(x, y, 0x35a); + MapGridSetMetatileIdAt(x, y, METATILE_SeafoamIslands_CrackedIce); } } } @@ -199,7 +200,7 @@ static void IcefallCaveIcePerStepCallback(u8 taskId) x = data[4]; y = data[5]; PlaySE(SE_RU_BARI); - MapGridSetMetatileIdAt(x, y, 0x35a); + MapGridSetMetatileIdAt(x, y, METATILE_SeafoamIslands_CrackedIce); CurrentMapDrawMetatileAt(x, y); data[1] = 1; } @@ -214,7 +215,7 @@ static void IcefallCaveIcePerStepCallback(u8 taskId) x = data[4]; y = data[5]; PlaySE(SE_RU_GASYAN); - MapGridSetMetatileIdAt(x, y, 0x35b); + MapGridSetMetatileIdAt(x, y, METATILE_SeafoamIslands_IceHole); CurrentMapDrawMetatileAt(x, y); VarSet(VAR_TEMP_1, 1); data[1] = 1; diff --git a/src/fldeff_berrytree.c b/src/fldeff_berrytree.c index 90ca36508..3826e1d33 100644 --- a/src/fldeff_berrytree.c +++ b/src/fldeff_berrytree.c @@ -1,4 +1,4 @@ -void nullsub_56(void) +// From R/S, removed +void DoWateringBerryTreeAnim(void) { - } diff --git a/src/help_system.c b/src/help_system.c index d68acbaa1..48483c387 100644 --- a/src/help_system.c +++ b/src/help_system.c @@ -90,7 +90,7 @@ u8 RunHelpSystemCallback(void) HelpSystem_FillPanel2(); HelpSystem_PrintText_Row61(gString_Help); sub_813BD14(1); - if (sub_812B40C() == TRUE) + if (HelpSystem_UpdateHasntSeenIntro() == TRUE) HelpSystemSubroutine_PrintWelcomeMessage(&gHelpSystemListMenu, gHelpSystemListMenuItems); else HelpSystemSubroutine_WelcomeEndGotoMenu(&gHelpSystemListMenu, gHelpSystemListMenuItems); @@ -1184,7 +1184,7 @@ bool8 MoveCursor(u8 by, u8 dirn) HelpSystem_FillPanel1(); PrintListMenuItems(); PlaceListMenuCursor(); - sub_812BDEC(); + HelpSystem_PrintTopicLabel(); sub_813C75C(); } else diff --git a/src/help_system_812B1E0.c b/src/help_system_812B1E0.c index 5b634a273..ee26c6de5 100644 --- a/src/help_system_812B1E0.c +++ b/src/help_system_812B1E0.c @@ -16,17 +16,17 @@ #include "constants/maps.h" #include "constants/songs.h" -static EWRAM_DATA u16 sSomeVariable = 0; -static EWRAM_DATA u8 gUnknown_203B0EE = 0; +static EWRAM_DATA u16 sHelpSystemContextId = 0; +static EWRAM_DATA u8 sSeenHelpSystemIntro = 0; -u8 sHelpSystemState[4]; -u16 gSomeVariableBackup; +u8 gHelpSystemState[4]; +u16 gHelpContextIdBackup; static bool32 IsCurrentMapInArray(const u16 * mapIdxs); static void BuildMainTopicsListAndMoveToH00(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); static void SetHelpSystemSubmenuItems(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); -static bool8 HelpSystem_HasDefeatedBrock(void); -static bool8 HelpSystemSubmenuIndexIsActive(u8); +static bool8 HelpSystem_ShouldShowBasicTerms(void); +static bool8 IsHelpSystemSubmenuEnabled(u8); static bool8 HasGottenAtLeastOneHM(void); static void PrintWelcomeMessageOnPanel1(void); @@ -34,793 +34,1660 @@ static void PrintTextOnPanel2Row52RightAlign(const u8 *); static void ResetHelpSystemCursor(struct HelpSystemListMenu * a0); static void PrintHelpSystemTopicMouseoverDescription(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); -static const u8 *const sHelpSystemTopicPtrs[] = { - gUnknown_81B2DF8, - gUnknown_81B2E1C, - gUnknown_81B2E2E, - gUnknown_81B2E48, - gUnknown_81B2E58, - gUnknown_81B2E6A -}; +#define HELP_NONE 0 +#define HELP_END 0xFF -static const u8 *const sHelpSystemTopicMouseoverDescriptionPtrs[] = { - gUnknown_81B2E88, - gUnknown_81B2EC8, - gUnknown_81B2F00, - gUnknown_81B2F43, - gUnknown_81B2F74, - gUnknown_81B2FA9 +// Help Main Topics +enum +{ + TOPIC_WHAT_TO_DO, + TOPIC_HOW_TO_DO, + TOPIC_TERMS, + TOPIC_ABOUT_GAME, + TOPIC_TYPE_MATCHUP, + TOPIC_EXIT, + TOPIC_COUNT +}; + +static const u8 *const sHelpSystemTopicPtrs[TOPIC_COUNT] = { + [TOPIC_WHAT_TO_DO] = Help_Text_WhatShouldIDo, + [TOPIC_HOW_TO_DO] = Help_Text_HowDoIDoThis, + [TOPIC_TERMS] = Help_Text_WhatDoesThisTermMean, + [TOPIC_ABOUT_GAME] = Help_Text_AboutThisGame, + [TOPIC_TYPE_MATCHUP] = Help_Text_TypeMatchupList, + [TOPIC_EXIT] = Help_Text_Exit +}; + +static const u8 *const sHelpSystemTopicMouseoverDescriptionPtrs[TOPIC_COUNT] = { + [TOPIC_WHAT_TO_DO] = Help_Text_DescWhatShouldIDo, + [TOPIC_HOW_TO_DO] = Help_Text_DescHowDoIDoThis, + [TOPIC_TERMS] = Help_Text_DescWhatDoesThisTermMean, + [TOPIC_ABOUT_GAME] = Help_Text_DescAboutThisGame, + [TOPIC_TYPE_MATCHUP] = Help_Text_DescTypeMatchupList, + [TOPIC_EXIT] = Help_Text_DescExit +}; + +// Submenu IDs for TOPIC_WHAT_TO_DO +enum +{ + HELP_PLAYING_FOR_FIRST_TIME = 1, + HELP_WHAT_SHOULD_I_BE_DOING, + HELP_CANT_GET_OUT_OF_ROOM, + HELP_CANT_FIND_PERSON_I_WANT, + HELP_TALKED_TO_EVERYONE_NOW_WHAT, + HELP_SOMEONE_BLOCKING_MY_WAY, + HELP_I_CANT_GO_ON, + HELP_OUT_OF_THINGS_TO_DO, + HELP_WHAT_HAPPENED_TO_ITEM_I_GOT, + HELP_WHAT_ARE_MY_ADVENTURE_BASICS, + HELP_HOW_ARE_ROADS_FORESTS_DIFFERENT, + HELP_HOW_ARE_CAVES_DIFFERENT, + HELP_HOW_DO_I_PROGRESS, + HELP_WHEN_CAN_I_USE_ITEM, + HELP_WHATS_A_BATTLE, + HELP_HOW_DO_I_PREPARE_FOR_BATTLE, + HELP_WHAT_IS_A_MONS_VITALITY, + HELP_MY_MONS_ARE_HURT, + HELP_WHAT_IS_STATUS_PROBLEM, + HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT, + HELP_CANT_CATCH_MONS, + HELP_RAN_OUT_OF_POTIONS, + HELP_CAN_I_BUY_POKEBALLS, + HELP_WHATS_A_TRAINER, + HELP_HOW_DO_I_WIN_AGAINST_TRAINER, + HELP_WHERE_DO_MONS_APPEAR, + HELP_WHAT_ARE_MOVES, + HELP_WHAT_ARE_HIDDEN_MOVES, + HELP_WHAT_MOVES_SHOULD_I_USE, + HELP_WANT_TO_ADD_MORE_MOVES, + HELP_WANT_TO_MAKE_MON_STRONGER, + HELP_FOE_MONS_TOO_STRONG, + HELP_WHAT_DO_I_DO_IN_CAVE, + HELP_NOTHING_I_WANT_TO_KNOW, + HELP_WHATS_POKEMON_CENTER, + HELP_WHATS_POKEMON_MART, + HELP_WANT_TO_END_GAME, + HELP_WHATS_A_MON, + HELP_WHAT_IS_THAT_PERSON_LIKE, + HELP_WHAT_DOES_HIDDEN_MOVE_DO, + HELP_WHAT_DO_I_DO_IN_SAFARI, + HELP_WHAT_ARE_SAFARI_RULES, + HELP_WANT_TO_END_SAFARI, + HELP_WHAT_IS_A_GYM, }; static const u8 *const sHelpSystemSpecializedQuestionTextPtrs[] = { - NULL, - gUnknown_81B3083, - gUnknown_81B30A9, - gUnknown_81B30C1, - gUnknown_81B30DC, - gUnknown_81B30FC, - gUnknown_81B311F, - gUnknown_81B3140, - gUnknown_81B314F, - gUnknown_81B3168, - gUnknown_81B3189, - gUnknown_81B31AE, - gUnknown_81B31D3, - gUnknown_81B31EC, - gUnknown_81B31FF, - gUnknown_81B3215, - gUnknown_81B3226, - gUnknown_81B3243, - gUnknown_81B3261, - gUnknown_81B3276, - gUnknown_81B3290, - gUnknown_81B32B6, - gUnknown_81B32CD, - gUnknown_81B32E3, - gUnknown_81B32F9, - gUnknown_81B330B, - gUnknown_81B332B, - gUnknown_81B3344, - gUnknown_81B335C, - gUnknown_81B3373, - gUnknown_81B338C, - gUnknown_81B33A6, - gUnknown_81B33CA, - gUnknown_81B33EA, - gUnknown_81B3402, - gUnknown_81B3427, - gUnknown_81B3440, - gUnknown_81B3457, - gUnknown_81B346F, - gUnknown_81B3481, - gUnknown_81B349B, - gUnknown_81B34B7, - gUnknown_81B34D6, - gUnknown_81B34F6, - gUnknown_81B3516 + [HELP_NONE] = NULL, + [HELP_PLAYING_FOR_FIRST_TIME] = Help_Text_PlayingForFirstTime, + [HELP_WHAT_SHOULD_I_BE_DOING] = Help_Text_WhatShouldIBeDoing, + [HELP_CANT_GET_OUT_OF_ROOM] = Help_Text_CantGetOutOfRoom, + [HELP_CANT_FIND_PERSON_I_WANT] = Help_Text_CantFindPersonIWant, + [HELP_TALKED_TO_EVERYONE_NOW_WHAT] = Help_Text_TalkedToEveryoneNowWhat, + [HELP_SOMEONE_BLOCKING_MY_WAY] = Help_Text_SomeoneBlockingMyWay, + [HELP_I_CANT_GO_ON] = Help_Text_ICantGoOn, + [HELP_OUT_OF_THINGS_TO_DO] = Help_Text_OutOfThingsToDo, + [HELP_WHAT_HAPPENED_TO_ITEM_I_GOT] = Help_Text_WhatHappenedToItemIGot, + [HELP_WHAT_ARE_MY_ADVENTURE_BASICS] = Help_Text_WhatAreMyAdventureBasics, + [HELP_HOW_ARE_ROADS_FORESTS_DIFFERENT] = Help_Text_HowAreRoadsForestsDifferent, + [HELP_HOW_ARE_CAVES_DIFFERENT] = Help_Text_HowAreCavesDifferent, + [HELP_HOW_DO_I_PROGRESS] = Help_Text_HowDoIProgress, + [HELP_WHEN_CAN_I_USE_ITEM] = Help_Text_WhenCanIUseItem, + [HELP_WHATS_A_BATTLE] = Help_Text_WhatsABattle, + [HELP_HOW_DO_I_PREPARE_FOR_BATTLE] = Help_Text_HowDoIPrepareForBattle, + [HELP_WHAT_IS_A_MONS_VITALITY] = Help_Text_WhatIsAMonsVitality, + [HELP_MY_MONS_ARE_HURT] = Help_Text_MyMonsAreHurt, + [HELP_WHAT_IS_STATUS_PROBLEM] = Help_Text_WhatIsStatusProblem, + [HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT] = Help_Text_WhatHappensIfAllMyMonsFaint, + [HELP_CANT_CATCH_MONS] = Help_Text_CantCatchMons, + [HELP_RAN_OUT_OF_POTIONS] = Help_Text_RanOutOfPotions, + [HELP_CAN_I_BUY_POKEBALLS] = Help_Text_CanIBuyPokeBalls, + [HELP_WHATS_A_TRAINER] = Help_Text_WhatsATrainer, + [HELP_HOW_DO_I_WIN_AGAINST_TRAINER] = Help_Text_HowDoIWinAgainstTrainer, + [HELP_WHERE_DO_MONS_APPEAR] = Help_Text_WhereDoMonsAppear, + [HELP_WHAT_ARE_MOVES] = Help_Text_WhatAreMoves, + [HELP_WHAT_ARE_HIDDEN_MOVES] = Help_Text_WhatAreHiddenMoves, + [HELP_WHAT_MOVES_SHOULD_I_USE] = Help_Text_WhatMovesShouldIUse, + [HELP_WANT_TO_ADD_MORE_MOVES] = Help_Text_WantToAddMoreMoves, + [HELP_WANT_TO_MAKE_MON_STRONGER] = Help_Text_WantToMakeMonStronger, + [HELP_FOE_MONS_TOO_STRONG] = Help_Text_FoeMonsTooStrong, + [HELP_WHAT_DO_I_DO_IN_CAVE] = Help_Text_WhatDoIDoInCave, + [HELP_NOTHING_I_WANT_TO_KNOW] = Help_Text_NothingIWantToKnow, + [HELP_WHATS_POKEMON_CENTER] = Help_Text_WhatsPokemonCenter, + [HELP_WHATS_POKEMON_MART] = Help_Text_WhatsPokemonMart, + [HELP_WANT_TO_END_GAME] = Help_Text_WantToEndGame, + [HELP_WHATS_A_MON] = Help_Text_WhatsAMon, + [HELP_WHAT_IS_THAT_PERSON_LIKE] = Help_Text_WhatIsThatPersonLike, + [HELP_WHAT_DOES_HIDDEN_MOVE_DO] = Help_Text_WhatDoesHiddenMoveDo, + [HELP_WHAT_DO_I_DO_IN_SAFARI] = Help_Text_WhatDoIDoInSafari, + [HELP_WHAT_ARE_SAFARI_RULES] = Help_Text_WhatAreSafariRules, + [HELP_WANT_TO_END_SAFARI] = Help_Text_WantToEndSafari, + [HELP_WHAT_IS_A_GYM] = Help_Text_WhatIsAGym }; static const u8 *const sHelpSystemSpecializedAnswerTextPtrs[] = { - NULL, - gUnknown_81B3525, - gUnknown_81B35E6, - gUnknown_81B36EB, - gUnknown_81B379A, - gUnknown_81B3849, - gUnknown_81B3876, - gUnknown_81B3972, - gUnknown_81B3A51, - gUnknown_81B3ACC, - gUnknown_81B3BB6, - gUnknown_81B3C99, - gUnknown_81B3D1B, - gUnknown_81B3DE3, - gUnknown_81B3EBC, - gUnknown_81B3F7F, - gUnknown_81B406C, - gUnknown_81B410B, - gUnknown_81B41D7, - gUnknown_81B42B3, - gUnknown_81B439D, - gUnknown_81B4483, - gUnknown_81B457C, - gUnknown_81B4645, - gUnknown_81B470A, - gUnknown_81B47F0, - gUnknown_81B48C6, - gUnknown_81B497A, - gUnknown_81B4A72, - gUnknown_81B4B65, - gUnknown_81B4C54, - gUnknown_81B4D26, - gUnknown_81B4E0B, - gUnknown_81B4ED8, - gUnknown_81B4FB2, - gUnknown_81B4FFD, - gUnknown_81B50FF, - gUnknown_81B51B1, - gUnknown_81B5272, - gUnknown_81B5325, - gUnknown_81B5382, - gUnknown_81B547C, - gUnknown_81B54E1, - gUnknown_81B5589, - gUnknown_81B55F4 + [HELP_NONE] = NULL, + [HELP_PLAYING_FOR_FIRST_TIME] = Help_Text_AnswerPlayingForFirstTime, + [HELP_WHAT_SHOULD_I_BE_DOING] = Help_Text_AnswerWhatShouldIBeDoing, + [HELP_CANT_GET_OUT_OF_ROOM] = Help_Text_AnswerCantGetOutOfRoom, + [HELP_CANT_FIND_PERSON_I_WANT] = Help_Text_AnswerCantFindPersonIWant, + [HELP_TALKED_TO_EVERYONE_NOW_WHAT] = Help_Text_AnswerTalkedToEveryoneNowWhat, + [HELP_SOMEONE_BLOCKING_MY_WAY] = Help_Text_AnswerSomeoneBlockingMyWay, + [HELP_I_CANT_GO_ON] = Help_Text_AnswerICantGoOn, + [HELP_OUT_OF_THINGS_TO_DO] = Help_Text_AnswerOutOfThingsToDo, + [HELP_WHAT_HAPPENED_TO_ITEM_I_GOT] = Help_Text_AnswerWhatHappenedToItemIGot, + [HELP_WHAT_ARE_MY_ADVENTURE_BASICS] = Help_Text_AnswerWhatAreMyAdventureBasics, + [HELP_HOW_ARE_ROADS_FORESTS_DIFFERENT] = Help_Text_AnswerHowAreRoadsForestsDifferent, + [HELP_HOW_ARE_CAVES_DIFFERENT] = Help_Text_AnswerHowAreCavesDifferent, + [HELP_HOW_DO_I_PROGRESS] = Help_Text_AnswerHowDoIProgress, + [HELP_WHEN_CAN_I_USE_ITEM] = Help_Text_AnswerWhenCanIUseItem, + [HELP_WHATS_A_BATTLE] = Help_Text_AnswerWhatsABattle, + [HELP_HOW_DO_I_PREPARE_FOR_BATTLE] = Help_Text_AnswerHowDoIPrepareForBattle, + [HELP_WHAT_IS_A_MONS_VITALITY] = Help_Text_AnswerWhatIsAMonsVitality, + [HELP_MY_MONS_ARE_HURT] = Help_Text_AnswerMyMonsAreHurt, + [HELP_WHAT_IS_STATUS_PROBLEM] = Help_Text_AnswerWhatIsStatusProblem, + [HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT] = Help_Text_AnswerWhatHappensIfAllMyMonsFaint, + [HELP_CANT_CATCH_MONS] = Help_Text_AnswerCantCatchMons, + [HELP_RAN_OUT_OF_POTIONS] = Help_Text_AnswerRanOutOfPotions, + [HELP_CAN_I_BUY_POKEBALLS] = Help_Text_AnswerCanIBuyPokeBalls, + [HELP_WHATS_A_TRAINER] = Help_Text_AnswerWhatsATrainer, + [HELP_HOW_DO_I_WIN_AGAINST_TRAINER] = Help_Text_AnswerHowDoIWinAgainstTrainer, + [HELP_WHERE_DO_MONS_APPEAR] = Help_Text_AnswerWhereDoMonsAppear, + [HELP_WHAT_ARE_MOVES] = Help_Text_AnswerWhatAreMoves, + [HELP_WHAT_ARE_HIDDEN_MOVES] = Help_Text_AnswerWhatAreHiddenMoves, + [HELP_WHAT_MOVES_SHOULD_I_USE] = Help_Text_AnswerWhatMovesShouldIUse, + [HELP_WANT_TO_ADD_MORE_MOVES] = Help_Text_AnswerWantToAddMoreMoves, + [HELP_WANT_TO_MAKE_MON_STRONGER] = Help_Text_AnswerWantToMakeMonStronger, + [HELP_FOE_MONS_TOO_STRONG] = Help_Text_AnswerFoeMonsTooStrong, + [HELP_WHAT_DO_I_DO_IN_CAVE] = Help_Text_AnswerWhatDoIDoInCave, + [HELP_NOTHING_I_WANT_TO_KNOW] = Help_Text_AnswerNothingIWantToKnow, + [HELP_WHATS_POKEMON_CENTER] = Help_Text_AnswerWhatsPokemonCenter, + [HELP_WHATS_POKEMON_MART] = Help_Text_AnswerWhatsPokemonMart, + [HELP_WANT_TO_END_GAME] = Help_Text_AnswerWantToEndGame, + [HELP_WHATS_A_MON] = Help_Text_AnswerWhatsAMon, + [HELP_WHAT_IS_THAT_PERSON_LIKE] = Help_Text_AnswerWhatIsThatPersonLike, + [HELP_WHAT_DOES_HIDDEN_MOVE_DO] = Help_Text_AnswerWhatDoesHiddenMoveDo, + [HELP_WHAT_DO_I_DO_IN_SAFARI] = Help_Text_AnswerWhatDoIDoInSafari, + [HELP_WHAT_ARE_SAFARI_RULES] = Help_Text_AnswerWhatAreSafariRules, + [HELP_WANT_TO_END_SAFARI] = Help_Text_AnswerWantToEndSafari, + [HELP_WHAT_IS_A_GYM] = Help_Text_AnswerWhatIsAGym +}; + +// Submenu IDs for TOPIC_HOW_TO_DO +enum +{ + HELP_USING_POKEDEX = 1, + HELP_USING_POKEMON, + HELP_USING_SUMMARY, + HELP_USING_SWITCH, + HELP_USING_ITEM, + HELP_USING_BAG, + HELP_USING_AN_ITEM, + HELP_USING_KEYITEM, + HELP_USING_POKEBALL, + HELP_USING_PLAYER, + HELP_USING_SAVE, + HELP_USING_OPTION, + HELP_USING_POTION, + HELP_USING_TOWN_MAP, + HELP_USING_TM, + HELP_USING_HM, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_RIDING_BICYCLE, + HELP_ENTERING_NAME, + HELP_USING_PC, + HELP_USING_BILLS_PC, + HELP_USING_WITHDRAW, + HELP_USING_DEPOSIT, + HELP_USING_MOVE, + HELP_MOVING_ITEMS, + HELP_USING_PLAYERS_PC, + HELP_USING_WITHDRAW_ITEM, + HELP_USING_DEPOSIT_ITEM, + HELP_USING_MAILBOX, + HELP_USING_PROF_OAKS_PC, + HELP_OPENING_MENU, + HELP_USING_FIGHT, + HELP_USING_POKEMON2, + HELP_USING_SHIFT, + HELP_USING_SUMMARY2, + HELP_USING_BAG2, + HELP_READING_POKEDEX, + HELP_USING_HOME_PC, + HELP_USING_ITEM_STORAGE, + HELP_USING_WITHDRAW_ITEM2, + HELP_USING_DEPOSIT_ITEM2, + HELP_USING_MAILBOX2, + HELP_USING_RUN, + HELP_REGISTER_KEY_ITEM, + HELP_USING_BALL, + HELP_USING_BAIT, + HELP_USING_ROCK, + HELP_USING_HALL_OF_FAME, }; static const u8 *const sHelpSystemMenuTopicTextPtrs[] = { - NULL, - gUnknown_81B56E3, - gUnknown_81B56F4, - gUnknown_81B5705, - gUnknown_81B5717, - gUnknown_81B5728, - gUnknown_81B5737, - gUnknown_81B5744, - gUnknown_81B5754, - gUnknown_81B5767, - gUnknown_81B577B, - gUnknown_81B5787, - gUnknown_81B5795, - gUnknown_81B57A5, - gUnknown_81B57B8, - gUnknown_81B57CF, - gUnknown_81B57DE, - gUnknown_81B57EE, - gUnknown_81B580D, - gUnknown_81B5824, - gUnknown_81B5834, - gUnknown_81B583F, - gUnknown_81B5850, - gUnknown_81B5863, - gUnknown_81B5875, - gUnknown_81B5884, - gUnknown_81B5893, - gUnknown_81B58A4, - gUnknown_81B58BC, - gUnknown_81B58D3, - gUnknown_81B58E5, - gUnknown_81B58FD, - gUnknown_81B590E, - gUnknown_81B591D, - gUnknown_81B592E, - gUnknown_81B593E, - gUnknown_81B5950, - gUnknown_81B595D, - gUnknown_81B5974, - gUnknown_81B5989, - gUnknown_81B59A7, - gUnknown_81B59BF, - gUnknown_81B59D6, - gUnknown_81B59E8, - gUnknown_81B59F5, - gUnknown_81B5A0D, - gUnknown_81B5A1B, - gUnknown_81B5A29, - gUnknown_81B5A37 -}; - -static const u8 *const sHelpSystemSpecializedControlsTextPtrs[] = { - NULL, - gUnknown_81B5A4D, - gUnknown_81B5B0C, - gUnknown_81B5B7D, - gUnknown_81B5C13, - gUnknown_81B5CDF, - gUnknown_81B5D87, - gUnknown_81B5E41, - gUnknown_81B5F10, - gUnknown_81B5FA6, - gUnknown_81B606C, - gUnknown_81B6140, - gUnknown_81B6203, - gUnknown_81B62E4, - gUnknown_81B6397, - gUnknown_81B6478, - gUnknown_81B6525, - gUnknown_81B65E7, - gUnknown_81B66BA, - gUnknown_81B678E, - gUnknown_81B6883, - gUnknown_81B68CD, - gUnknown_81B69B9, - gUnknown_81B6A9A, - gUnknown_81B6B6E, - gUnknown_81B6C4F, - gUnknown_81B6D4A, - gUnknown_81B6E02, - gUnknown_81B6EC1, - gUnknown_81B6FA8, - gUnknown_81B7075, - gUnknown_81B7108, - gUnknown_81B71EA, - gUnknown_81B723B, - gUnknown_81B7319, - gUnknown_81B73E8, - gUnknown_81B747E, - gUnknown_81B752C, - gUnknown_81B7611, - gUnknown_81B7692, - gUnknown_81B771E, - gUnknown_81B77DD, - gUnknown_81B7884, - gUnknown_81B7931, - gUnknown_81B79CB, - gUnknown_81B7A60, - gUnknown_81B7AEE, - gUnknown_81B7BBE, - gUnknown_81B7C57 -}; - -static const u8 *const sHelpSystemSpecializedStringsTextPtrs[] = { - NULL, - gUnknown_81B7CC1, - gUnknown_81B7CC4, - gUnknown_81B7CD9, - gUnknown_81B7CDF, - gUnknown_81B7CE6, - gUnknown_81B7CEE, - gUnknown_81B7CF6, - gUnknown_81B7CFE, - gUnknown_81B7D04, - gUnknown_81B7D12, - gUnknown_81B7D17, - gUnknown_81B7D1A, - gUnknown_81B7D1F, - gUnknown_81B7D27, - gUnknown_81B7D2D, - gUnknown_81B7D37, - gUnknown_81B7D3E, - gUnknown_81B7D45, - gUnknown_81B7D48, - gUnknown_81B7D4E, - gUnknown_81B7D57, - gUnknown_81B7D5B, - gUnknown_81B7D61, - gUnknown_81B7D6B, - gUnknown_81B7D76, - gUnknown_81B7D7E, - gUnknown_81B7D88, - gUnknown_81B7D8F, - gUnknown_81B7D9A, - gUnknown_81B7DA7, - gUnknown_81B7DB4, - gUnknown_81B7DBA, - gUnknown_81B7DC6, - gUnknown_81B7DCC, - gUnknown_81B7DD3, - gUnknown_81B7DD6, - gUnknown_81B7DD9, - gUnknown_81B7DE1, - gUnknown_81B7DEB, - gUnknown_81B7DFA, - gUnknown_81B7E02, - gUnknown_81B7E09, - gUnknown_81B7E0F -}; - -static const u8 *const sHelpSystemSpecializedStringDefinitionsTextPtrs[] = { - NULL, - gUnknown_81B7E16, - gUnknown_81B7F0A, - gUnknown_81B800A, - gUnknown_81B80EC, - gUnknown_81B81C2, - gUnknown_81B8256, - gUnknown_81B8348, - gUnknown_81B83EF, - gUnknown_81B847B, - gUnknown_81B8550, - gUnknown_81B8647, - gUnknown_81B86E2, - gUnknown_81B87B8, - gUnknown_81B8897, - gUnknown_81B8924, - gUnknown_81B8A04, - gUnknown_81B8A84, - gUnknown_81B8B62, - gUnknown_81B8C18, - gUnknown_81B8C94, - gUnknown_81B8D1D, - gUnknown_81B8DD4, - gUnknown_81B8E67, - gUnknown_81B8F4D, - gUnknown_81B901B, - gUnknown_81B90A7, - gUnknown_81B90E8, - gUnknown_81B9170, - gUnknown_81B91C2, - gUnknown_81B91F9, - gUnknown_81B92B8, - gUnknown_81B92ED, - gUnknown_81B93D8, - gUnknown_81B9439, - gUnknown_81B9497, - gUnknown_81B9560, - gUnknown_81B9656, - gUnknown_81B9749, - gUnknown_81B984F, - gUnknown_81B991C, - gUnknown_81B99C4, - gUnknown_81B9AA2, - gUnknown_81B9B2F + [HELP_NONE] = NULL, + [HELP_USING_POKEDEX] = Help_Text_UsingPokedex, + [HELP_USING_POKEMON] = Help_Text_UsingPokemon, + [HELP_USING_SUMMARY] = Help_Text_UsingSummary, + [HELP_USING_SWITCH] = Help_Text_UsingSwitch, + [HELP_USING_ITEM] = Help_Text_UsingItem, + [HELP_USING_BAG] = Help_Text_UsingBag, + [HELP_USING_AN_ITEM] = Help_Text_UsingAnItem, + [HELP_USING_KEYITEM] = Help_Text_UsingKeyItem, + [HELP_USING_POKEBALL] = Help_Text_UsingPokeBall, + [HELP_USING_PLAYER] = Help_Text_UsingPlayer, + [HELP_USING_SAVE] = Help_Text_UsingSave, + [HELP_USING_OPTION] = Help_Text_UsingOption, + [HELP_USING_POTION] = Help_Text_UsingPotion, + [HELP_USING_TOWN_MAP] = Help_Text_UsingTownMap, + [HELP_USING_TM] = Help_Text_UsingTM, + [HELP_USING_HM] = Help_Text_UsingHM, + [HELP_USING_MOVE_OUTSIDE_OF_BATTLE] = Help_Text_UsingMoveOutsideOfBattle, + [HELP_RIDING_BICYCLE] = Help_Text_RidingBicycle, + [HELP_ENTERING_NAME] = Help_Text_EnteringName, + [HELP_USING_PC] = Help_Text_UsingPC, + [HELP_USING_BILLS_PC] = Help_Text_UsingBillsPC, + [HELP_USING_WITHDRAW] = Help_Text_UsingWithdraw, + [HELP_USING_DEPOSIT] = Help_Text_UsingDeposit, + [HELP_USING_MOVE] = Help_Text_UsingMove, + [HELP_MOVING_ITEMS] = Help_Text_MovingItems, + [HELP_USING_PLAYERS_PC] = Help_Text_UsingPlayersPC, + [HELP_USING_WITHDRAW_ITEM] = Help_Text_UsingWithdrawItem, + [HELP_USING_DEPOSIT_ITEM] = Help_Text_UsingDepositItem, + [HELP_USING_MAILBOX] = Help_Text_UsingMailbox, + [HELP_USING_PROF_OAKS_PC] = Help_Text_UsingProfOaksPC, + [HELP_OPENING_MENU] = Help_Text_OpeningMenu, + [HELP_USING_FIGHT] = Help_Text_UsingFight, + [HELP_USING_POKEMON2] = Help_Text_UsingPokemon2, + [HELP_USING_SHIFT] = Help_Text_UsingShift, + [HELP_USING_SUMMARY2] = Help_Text_UsingSummary2, + [HELP_USING_BAG2] = Help_Text_UsingBag2, + [HELP_READING_POKEDEX] = Help_Text_ReadingPokedex, + [HELP_USING_HOME_PC] = Help_Text_UsingHomePC, + [HELP_USING_ITEM_STORAGE] = Help_Text_UsingItemStorage, + [HELP_USING_WITHDRAW_ITEM2] = Help_Text_UsingWithdrawItem2, + [HELP_USING_DEPOSIT_ITEM2] = Help_Text_UsingDepositItem2, + [HELP_USING_MAILBOX2] = Help_Text_UsingMailbox2, + [HELP_USING_RUN] = Help_Text_UsingRun, + [HELP_REGISTER_KEY_ITEM] = Help_Text_RegisterKeyItem, + [HELP_USING_BALL] = Help_Text_UsingBall, + [HELP_USING_BAIT] = Help_Text_UsingBait, + [HELP_USING_ROCK] = Help_Text_UsingRock, + [HELP_USING_HALL_OF_FAME] = Help_Text_UsingHallOfFame +}; + +static const u8 *const sHelpSystemHowToUseMenuTextPtrs[] = { + [HELP_NONE] = NULL, + [HELP_USING_POKEDEX] = Help_Text_HowToUsePokedex, + [HELP_USING_POKEMON] = Help_Text_HowToUsePokemon, + [HELP_USING_SUMMARY] = Help_Text_HowToUseSummary, + [HELP_USING_SWITCH] = Help_Text_HowToUseSwitch, + [HELP_USING_ITEM] = Help_Text_HowToUseItem, + [HELP_USING_BAG] = Help_Text_HowToUseBag, + [HELP_USING_AN_ITEM] = Help_Text_HowToUseAnItem, + [HELP_USING_KEYITEM] = Help_Text_HowToUseKeyItem, + [HELP_USING_POKEBALL] = Help_Text_HowToUsePokeBall, + [HELP_USING_PLAYER] = Help_Text_HowToUsePlayer, + [HELP_USING_SAVE] = Help_Text_HowToUseSave, + [HELP_USING_OPTION] = Help_Text_HowToUseOption, + [HELP_USING_POTION] = Help_Text_HowToUsePotion, + [HELP_USING_TOWN_MAP] = Help_Text_HowToUseTownMap, + [HELP_USING_TM] = Help_Text_HowToUseTM, + [HELP_USING_HM] = Help_Text_HowToUseHM, + [HELP_USING_MOVE_OUTSIDE_OF_BATTLE] = Help_Text_HowToUseMoveOutsideOfBattle, + [HELP_RIDING_BICYCLE] = Help_Text_HowToRideBicycle, + [HELP_ENTERING_NAME] = Help_Text_HowToEnterName, + [HELP_USING_PC] = Help_Text_HowToUsePC, + [HELP_USING_BILLS_PC] = Help_Text_HowToUseBillsPC, + [HELP_USING_WITHDRAW] = Help_Text_HowToUseWithdraw, + [HELP_USING_DEPOSIT] = Help_Text_HowToUseDeposit, + [HELP_USING_MOVE] = Help_Text_HowToUseMove, + [HELP_MOVING_ITEMS] = Help_Text_HowToMoveItems, + [HELP_USING_PLAYERS_PC] = Help_Text_HowToUsePlayersPC, + [HELP_USING_WITHDRAW_ITEM] = Help_Text_HowToUseWithdrawItem, + [HELP_USING_DEPOSIT_ITEM] = Help_Text_HowToUseDepositItem, + [HELP_USING_MAILBOX] = Help_Text_HowToUseMailbox, + [HELP_USING_PROF_OAKS_PC] = Help_Text_HowToUseProfOaksPC, + [HELP_OPENING_MENU] = Help_Text_HowToOpenMenu, + [HELP_USING_FIGHT] = Help_Text_HowToUseFight, + [HELP_USING_POKEMON2] = Help_Text_HowToUsePokemon2, + [HELP_USING_SHIFT] = Help_Text_HowToUseShift, + [HELP_USING_SUMMARY2] = Help_Text_HowToUseSummary2, + [HELP_USING_BAG2] = Help_Text_HowToUseBag2, + [HELP_READING_POKEDEX] = Help_Text_HowToReadPokedex, + [HELP_USING_HOME_PC] = Help_Text_HowToUseHomePC, + [HELP_USING_ITEM_STORAGE] = Help_Text_HowToUseItemStorage, + [HELP_USING_WITHDRAW_ITEM2] = Help_Text_HowToUseWithdrawItem2, + [HELP_USING_DEPOSIT_ITEM2] = Help_Text_HowToUseDepositItem2, + [HELP_USING_MAILBOX2] = Help_Text_HowToUseMailbox2, + [HELP_USING_RUN] = Help_Text_HowToUseRun, + [HELP_REGISTER_KEY_ITEM] = Help_Text_HowToRegisterKeyItem, + [HELP_USING_BALL] = Help_Text_HowToUseBall, + [HELP_USING_BAIT] = Help_Text_HowToUseBait, + [HELP_USING_ROCK] = Help_Text_HowToUseRock, + [HELP_USING_HALL_OF_FAME] = Help_Text_HowToUseHallOfFame +}; + +// Submenu IDs for TOPIC_TERMS +enum +{ + HELP_TERM_HP = 1, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_ATTACK, + HELP_TERM_DEFENSE, + HELP_TERM_SPATK, + HELP_TERM_SPDEF, + HELP_TERM_SPEED, + HELP_TERM_LEVEL, + HELP_TERM_TYPE, + HELP_TERM_OT, + HELP_TERM_ITEM, + HELP_TERM_ABILITY, + HELP_TERM_MONEY, + HELP_TERM_MOVE_TYPE, + HELP_TERM_NATURE, + HELP_TERM_ID_NO, + HELP_TERM_PP, + HELP_TERM_POWER, + HELP_TERM_ACCURACY, + HELP_TERM_FNT, + HELP_TERM_ITEMS, + HELP_TERM_KEYITEMS, + HELP_TERM_POKEBALLS, + HELP_TERM_POKEDEX, + HELP_TERM_PLAY_TIME, + HELP_TERM_BADGES, + HELP_TERM_TEXT_SPEED, + HELP_TERM_BATTLE_SCENE, + HELP_TERM_BATTLE_STYLE, + HELP_TERM_SOUND, + HELP_TERM_BUTTON_MODE, + HELP_TERM_FRAME, + HELP_TERM_CANCEL, + HELP_TERM_TM, + HELP_TERM_HM, + HELP_TERM_HM_MOVE, + HELP_TERM_EVOLUTION, + HELP_TERM_STATUS_PROBLEM, + HELP_TERM_POKEMON, + HELP_TERM_ID_NO2, + HELP_TERM_MONEY2, + HELP_TERM_BADGES2, +}; + +static const u8 *const sHelpSystemTermTextPtrs[] = { + [HELP_NONE] = NULL, + [HELP_TERM_HP] = Help_Text_HP, + [HELP_TERM_EXP] = Help_Text_EXP, + [HELP_TERM_MOVES] = Help_Text_Moves, + [HELP_TERM_ATTACK] = Help_Text_Attack, + [HELP_TERM_DEFENSE] = Help_Text_Defense, + [HELP_TERM_SPATK] = Help_Text_SpAtk, + [HELP_TERM_SPDEF] = Help_Text_SpDef, + [HELP_TERM_SPEED] = Help_Text_Speed, + [HELP_TERM_LEVEL] = Help_Text_Level, + [HELP_TERM_TYPE] = Help_Text_Type, + [HELP_TERM_OT] = Help_Text_OT, + [HELP_TERM_ITEM] = Help_Text_Item, + [HELP_TERM_ABILITY] = Help_Text_Ability, + [HELP_TERM_MONEY] = Help_Text_Money, + [HELP_TERM_MOVE_TYPE] = Help_Text_MoveType, + [HELP_TERM_NATURE] = Help_Text_Nature, + [HELP_TERM_ID_NO] = Help_Text_IDNo, + [HELP_TERM_PP] = Help_Text_PP, + [HELP_TERM_POWER] = Help_Text_Power, + [HELP_TERM_ACCURACY] = Help_Text_Accuracy, + [HELP_TERM_FNT] = Help_Text_FNT, + [HELP_TERM_ITEMS] = Help_Text_Items, + [HELP_TERM_KEYITEMS] = Help_Text_KeyItems, + [HELP_TERM_POKEBALLS] = Help_Text_PokeBalls, + [HELP_TERM_POKEDEX] = Help_Text_Pokedex, + [HELP_TERM_PLAY_TIME] = Help_Text_PlayTime, + [HELP_TERM_BADGES] = Help_Text_Badges, + [HELP_TERM_TEXT_SPEED] = Help_Text_TextSpeed, + [HELP_TERM_BATTLE_SCENE] = Help_Text_BattleScene, + [HELP_TERM_BATTLE_STYLE] = Help_Text_BattleStyle, + [HELP_TERM_SOUND] = Help_Text_Sound, + [HELP_TERM_BUTTON_MODE] = Help_Text_ButtonMode, + [HELP_TERM_FRAME] = Help_Text_Frame, + [HELP_TERM_CANCEL] = Help_Text_Cancel2, + [HELP_TERM_TM] = Help_Text_TM, + [HELP_TERM_HM] = Help_Text_HM, + [HELP_TERM_HM_MOVE] = Help_Text_HMMove, + [HELP_TERM_EVOLUTION] = Help_Text_Evolution, + [HELP_TERM_STATUS_PROBLEM] = Help_Text_StatusProblem, + [HELP_TERM_POKEMON] = Help_Text_Pokemon, + [HELP_TERM_ID_NO2] = Help_Text_IDNo2, + [HELP_TERM_MONEY2] = Help_Text_Money2, + [HELP_TERM_BADGES2] = Help_Text_Badges2 +}; + +static const u8 *const sHelpSystemTermDefinitionsTextPtrs[] = { + [HELP_NONE] = NULL, + [HELP_TERM_HP] = Help_Text_DefineHP, + [HELP_TERM_EXP] = Help_Text_DefineEXP, + [HELP_TERM_MOVES] = Help_Text_DefineMoves, + [HELP_TERM_ATTACK] = Help_Text_DefineAttack, + [HELP_TERM_DEFENSE] = Help_Text_DefineDefense, + [HELP_TERM_SPATK] = Help_Text_DefineSpAtk, + [HELP_TERM_SPDEF] = Help_Text_DefineSpDef, + [HELP_TERM_SPEED] = Help_Text_DefineSpeed, + [HELP_TERM_LEVEL] = Help_Text_DefineLevel, + [HELP_TERM_TYPE] = Help_Text_DefineType, + [HELP_TERM_OT] = Help_Text_DefineOT, + [HELP_TERM_ITEM] = Help_Text_DefineItem, + [HELP_TERM_ABILITY] = Help_Text_DefineAbility, + [HELP_TERM_MONEY] = Help_Text_DefineMoney, + [HELP_TERM_MOVE_TYPE] = Help_Text_DefineMoveType, + [HELP_TERM_NATURE] = Help_Text_DefineNature, + [HELP_TERM_ID_NO] = Help_Text_DefineIDNo, + [HELP_TERM_PP] = Help_Text_DefinePP, + [HELP_TERM_POWER] = Help_Text_DefinePower, + [HELP_TERM_ACCURACY] = Help_Text_DefineAccuracy, + [HELP_TERM_FNT] = Help_Text_DefineFNT, + [HELP_TERM_ITEMS] = Help_Text_DefineItems, + [HELP_TERM_KEYITEMS] = Help_Text_DefineKeyItems, + [HELP_TERM_POKEBALLS] = Help_Text_DefinePokeBalls, + [HELP_TERM_POKEDEX] = Help_Text_DefinePokedex, + [HELP_TERM_PLAY_TIME] = Help_Text_DefinePlayTime, + [HELP_TERM_BADGES] = Help_Text_DefineBadges, + [HELP_TERM_TEXT_SPEED] = Help_Text_DefineTextSpeed, + [HELP_TERM_BATTLE_SCENE] = Help_Text_DefineBattleScene, + [HELP_TERM_BATTLE_STYLE] = Help_Text_DefineBattleStyle, + [HELP_TERM_SOUND] = Help_Text_DefineSound, + [HELP_TERM_BUTTON_MODE] = Help_Text_DefineButtonMode, + [HELP_TERM_FRAME] = Help_Text_DefineFrame, + [HELP_TERM_CANCEL] = Help_Text_DefineCancel2, + [HELP_TERM_TM] = Help_Text_DefineTM, + [HELP_TERM_HM] = Help_Text_DefineHM, + [HELP_TERM_HM_MOVE] = Help_Text_DefineHMMove, + [HELP_TERM_EVOLUTION] = Help_Text_DefineEvolution, + [HELP_TERM_STATUS_PROBLEM] = Help_Text_DefineStatusProblem, + [HELP_TERM_POKEMON] = Help_Text_DefinePokemon, + [HELP_TERM_ID_NO2] = Help_Text_DefineIDNo2, + [HELP_TERM_MONEY2] = Help_Text_DefineMoney2, + [HELP_TERM_BADGES2] = Help_Text_DefineBadges2 +}; + +// Submenu IDs for TOPIC_ABOUT_GAME +enum +{ + HELP_THE_HELP_SYSTEM = 1, + HELP_THE_GAME, + HELP_WIRELESS_ADAPTER, + HELP_GAME_FUNDAMENTALS_1, + HELP_GAME_FUNDAMENTALS_2, + HELP_GAME_FUNDAMENTALS_3, + HELP_WHAT_ARE_POKEMON, }; static const u8 *const sHelpSystemGeneralTopicTextPtrs[] = { - NULL, - gUnknown_81B9BB7, - gUnknown_81B9BC7, - gUnknown_81B9BD0, - gUnknown_81B9BE1, - gUnknown_81B9BF5, - gUnknown_81B9C09, - gUnknown_81B9C1D + [HELP_NONE] = NULL, + [HELP_THE_HELP_SYSTEM] = Help_Text_TheHelpSystem, + [HELP_THE_GAME] = Help_Text_TheGame, + [HELP_WIRELESS_ADAPTER] = Help_Text_WirelessAdapter, + [HELP_GAME_FUNDAMENTALS_1] = Help_Text_GameFundamentals1, + [HELP_GAME_FUNDAMENTALS_2] = Help_Text_GameFundamentals2, + [HELP_GAME_FUNDAMENTALS_3] = Help_Text_GameFundamentals3, + [HELP_WHAT_ARE_POKEMON] = Help_Text_WhatArePokemon }; static const u8 *const sHelpSystemGeneralTopicDescriptionTextPtrs[] = { - NULL, - gUnknown_81B9C2F, - gUnknown_81B9D04, - gUnknown_81B9DC5, - gUnknown_81B9E75, - gUnknown_81B9F09, - gUnknown_81B9FCE, - gUnknown_81BA027 -}; + [HELP_NONE] = NULL, + [HELP_THE_HELP_SYSTEM] = Help_Text_DescTheHelpSystem, + [HELP_THE_GAME] = Help_Text_DescTheGame, + [HELP_WIRELESS_ADAPTER] = Help_Text_DescWirelessAdapter, + [HELP_GAME_FUNDAMENTALS_1] = Help_Text_DescGameFundamentals1, + [HELP_GAME_FUNDAMENTALS_2] = Help_Text_DescGameFundamentals2, + [HELP_GAME_FUNDAMENTALS_3] = Help_Text_DescGameFundamentals3, + [HELP_WHAT_ARE_POKEMON] = Help_Text_DescWhatArePokemon +}; + +// An enum for the type matchups isn't necessary, when used they're always used in their entirety +// Macro below is used to reference the entire group at once +#define HELP_TYPE_MATCHUPS \ + 1, \ + 2, 3, \ + 4, 5, \ + 6, 7, \ + 8, 9, \ + 10, 11, \ + 12, 13, \ + 14, 15, \ + 16, 17, \ + 18, 19, \ + 20, 21, \ + 22, 23, \ + 24, 25, \ + 26, 27, \ + 28, 29, \ + 30, 31, \ + 32, 33, \ + 34, 35 \ static const u8 *const sHelpSystemTypeMatchupTextPtrs[] = { - NULL, - gUnknown_81BA0F1, - gUnknown_81BA10D, - gUnknown_81BA121, - gUnknown_81BA138, - gUnknown_81BA14C, - gUnknown_81BA163, - gUnknown_81BA17A, - gUnknown_81BA194, - gUnknown_81BA1AC, - gUnknown_81BA1C7, - gUnknown_81BA1DC, - gUnknown_81BA1F4, - gUnknown_81BA209, - gUnknown_81BA221, - gUnknown_81BA234, - gUnknown_81BA24A, - gUnknown_81BA260, - gUnknown_81BA279, - gUnknown_81BA291, - gUnknown_81BA2AC, - gUnknown_81BA2C2, - gUnknown_81BA2DB, - gUnknown_81BA2F1, - gUnknown_81BA30A, - gUnknown_81BA320, - gUnknown_81BA339, - gUnknown_81BA34E, - gUnknown_81BA366, - gUnknown_81BA37C, - gUnknown_81BA395, - gUnknown_81BA3A9, - gUnknown_81BA3C0, - gUnknown_81BA3D5, - gUnknown_81BA3ED, - gUnknown_81BA400 + [HELP_NONE] = NULL, + [1] = Help_Text_UsingTypeMatchupList, + [2] = Help_Text_OwnMoveDark, + [3] = Help_Text_OwnPokemonDark, + [4] = Help_Text_OwnMoveRock, + [5] = Help_Text_OwnPokemonRock, + [6] = Help_Text_OwnMovePsychic, + [7] = Help_Text_OwnPokemonPsychic, + [8] = Help_Text_OwnMoveFighting, + [9] = Help_Text_OwnPokemonFighting, + [10] = Help_Text_OwnMoveGrass, + [11] = Help_Text_OwnPokemonGrass, + [12] = Help_Text_OwnMoveGhost, + [13] = Help_Text_OwnPokemonGhost, + [14] = Help_Text_OwnMoveIce, + [15] = Help_Text_OwnPokemonIce, + [16] = Help_Text_OwnMoveGround, + [17] = Help_Text_OwnPokemonGround, + [18] = Help_Text_OwnMoveElectric, + [19] = Help_Text_OwnPokemonElectric, + [20] = Help_Text_OwnMovePoison, + [21] = Help_Text_OwnPokemonPoison, + [22] = Help_Text_OwnMoveDragon, + [23] = Help_Text_OwnPokemonDragon, + [24] = Help_Text_OwnMoveNormal, + [25] = Help_Text_OwnPokemonNormal, + [26] = Help_Text_OwnMoveSteel, + [27] = Help_Text_OwnPokemonSteel, + [28] = Help_Text_OwnMoveFlying, + [29] = Help_Text_OwnPokemonFlying, + [30] = Help_Text_OwnMoveFire, + [31] = Help_Text_OwnPokemonFire, + [32] = Help_Text_OwnMoveWater, + [33] = Help_Text_OwnPokemonWater, + [34] = Help_Text_OwnMoveBug, + [35] = Help_Text_OwnPokemonBug }; static const u8 *const sHelpSystemTypeMatchupDescriptionTextPtrs[] = { - NULL, - gUnknown_81BA416, - gUnknown_81BA4E6, - gUnknown_81BA539, - gUnknown_81BA595, - gUnknown_81BA5F2, - gUnknown_81BA66F, - gUnknown_81BA6C9, - gUnknown_81BA71F, - gUnknown_81BA796, - gUnknown_81BA7E9, - gUnknown_81BA862, - gUnknown_81BA8D3, - gUnknown_81BA92A, - gUnknown_81BA98D, - gUnknown_81BA9F1, - gUnknown_81BAA44, - gUnknown_81BAAB6, - gUnknown_81BAB18, - gUnknown_81BAB7A, - gUnknown_81BABCC, - gUnknown_81BAC29, - gUnknown_81BAC89, - gUnknown_81BACC4, - gUnknown_81BAD20, - gUnknown_81BAD60, - gUnknown_81BADA2, - gUnknown_81BADF7, - gUnknown_81BAEA8, - gUnknown_81BAF01, - gUnknown_81BAF6B, - gUnknown_81BAFCA, - gUnknown_81BB02E, - gUnknown_81BB084, - gUnknown_81BB0DF, - gUnknown_81BB156 -}; - -static const u8 gUnknown_845B660[] = { - 0x01, 0x02, 0x03, 0xff -}; - -static const u8 gUnknown_845B664[] = { - 0x01, 0x02, 0x03, 0xff -}; - -static const u8 gUnknown_845B668[] = { - 0x13, 0xff -}; - -static const u8 gUnknown_845B66A[] = { - 0x01, 0x02, 0x03, 0xff -}; - -static const u8 gUnknown_845B66E[] = { - 0x01, 0x25, 0xff -}; - -static const u8 gUnknown_845B671[] = { - 0x02, 0x03, 0x04, 0x05, 0x11, 0xff -}; - -static const u8 gUnknown_845B677[] = { - 0x09, 0x01, 0xff -}; - -static const u8 gUnknown_845B67A[] = { - 0x02, 0x03, 0xff -}; - -static const u8 gUnknown_845B67D[] = { - 0x09, 0x0a, 0x0b, 0x11, 0x0c, 0x10, 0xff -}; - -static const u8 gUnknown_845B684[] = { - 0x09, 0x01, 0x04, 0x05, 0x06, 0x07, 0x08, 0x02, 0x0d, 0xff -}; - -static const u8 gUnknown_845B68E[] = { - 0x09, 0x03, 0x0a, 0x0f, 0x12, 0x13, 0x14, 0xff -}; - -static const u8 gUnknown_845B696[] = { - 0x06, 0x07, 0x08, 0x2c, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x12, 0xff -}; - -static const u8 gUnknown_845B6A1[] = { - 0x16, 0x17, 0x18, 0xff -}; - -static const u8 gUnknown_845B6A5[] = { - 0x0a, 0xff -}; - -static const u8 gUnknown_845B6A7[] = { - 0x11, 0x0e, 0x19, 0x1a, 0x1b, 0xff -}; - -static const u8 gUnknown_845B6AD[] = { - 0x0a, 0xff -}; - -static const u8 gUnknown_845B6AF[] = { - 0x0b, 0xff -}; - -static const u8 gUnknown_845B6B1[] = { - 0x2b, 0x19, 0x1a, 0xff -}; - -static const u8 gUnknown_845B6B5[] = { - 0x0c, 0xff -}; - -static const u8 gUnknown_845B6B7[] = { - 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0xff -}; - -static const u8 gUnknown_845B6BF[] = { - 0x02, 0x03, 0x04, 0xff -}; - -static const u8 gUnknown_845B6C3[] = { - 0x01, 0x02, 0x03, 0x07, 0xff -}; - -static const u8 gUnknown_845B6C8[] = { - 0x02, 0x04, 0x05, 0x09, 0x25, 0xff -}; - -static const u8 gUnknown_845B6CE[] = { - 0x1f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x2c, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x0a, 0x0b, 0x0c, 0x11, 0xff -}; - -static const u8 gUnknown_845B6E2[] = { - 0x09, 0x01, 0x02, 0x03, 0x0a, 0x28, 0xff -}; - -static const u8 gUnknown_845B6E9[] = { - 0x02, 0x05, 0x06, 0x0a, 0x23, 0x24, 0x09, 0x25, 0xff -}; - -static const u8 gUnknown_845B6F2[] = { - 0x1f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x2c, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x0a, 0x0b, 0x0c, 0x11, 0x14, 0xff -}; - -static const u8 gUnknown_845B707[] = { - 0x09, 0x01, 0x02, 0x03, 0x0a, 0x28, 0xff -}; - -static const u8 gUnknown_845B70E[] = { - 0x03, 0x07, 0x04, 0x05, 0x06, 0xff -}; - -static const u8 gUnknown_845B714[] = { - 0x02, 0x05, 0x06, 0x0a, 0x23, 0x24, 0x09, 0x25, 0xff -}; - -static const u8 gUnknown_845B71D[] = { - 0x1f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x2c, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x0a, 0x0b, 0x0c, 0x11, 0xff -}; - -static const u8 gUnknown_845B731[] = { - 0x09, 0x01, 0x02, 0x03, 0x0a, 0x0c, 0x0e, 0x16, 0x17, 0x18, 0x15, 0xff -}; - -static const u8 gUnknown_845B73D[] = { - 0x06, 0x0a, 0x23, 0x24, 0x09, 0x25, 0xff -}; - -static const u8 gUnknown_845B744[] = { - 0x1f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x2c, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x0a, 0x0b, 0x0c, 0x11, 0xff -}; - -static const u8 gUnknown_845B758[] = { - 0x09, 0x01, 0x02, 0x03, 0x0a, 0x15, 0xff -}; - -static const u8 gUnknown_845B75F[] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0xff -}; - -static const u8 gUnknown_845B783[] = { - 0x02, 0x0a, 0x04, 0x05, 0x06, 0x07, 0x0d, 0x27, 0x08, 0x0b, 0x21, 0x23, 0x24, 0x2c, 0x09, 0x0e, 0x16, 0x17, 0x0f, 0x10, 0x11, 0x1a, 0x15, 0x1f, 0x20, 0x12, 0x13, 0x14, 0x18, 0x19, 0x1b, 0x1e, 0x1c, 0x28, 0x25, 0xff -}; - -static const u8 gUnknown_845B7A7[] = { - 0x1f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x2c, 0x09, 0x0d, 0x0e, 0x0f, 0x10, 0x0a, 0x0b, 0x0c, 0x11, 0xff -}; - -static const u8 gUnknown_845B7BB[] = { - 0x09, 0x01, 0x02, 0x0a, 0x0b, 0x0c, 0x0d, 0x15, 0xff -}; - -static const u8 gUnknown_845B7C4[] = { - 0x02, 0x0a, 0x04, 0x05, 0x06, 0x07, 0x0d, 0x27, 0x08, 0x0b, 0x21, 0x23, 0x24, 0x2c, 0x09, 0x0e, 0x16, 0x17, 0x0f, 0x10, 0x11, 0x1a, 0x15, 0x1f, 0x20, 0x12, 0x13, 0x14, 0x18, 0x19, 0x1b, 0x1e, 0x1c, 0x28, 0x25, 0xff -}; - -static const u8 gUnknown_845B7E8[] = { - 0x1f, 0x01, 0x02, 0x06, 0x0a, 0x0b, 0x0c, 0x11, 0xff -}; - -static const u8 gUnknown_845B7F1[] = { - 0x09, 0x01, 0x02, 0x0a, 0x0b, 0x0c, 0x0d, 0x15, 0x28, 0xff -}; - -static const u8 gUnknown_845B7FB[] = { - 0x0a, 0x07, 0x0d, 0x27, 0x08, 0x0b, 0x21, 0x23, 0x24, 0x2c, 0x09, 0x0e, 0x16, 0x0f, 0x10, 0x11, 0x1a, 0x15, 0x1f, 0x20, 0x12, 0x13, 0x14, 0x18, 0x19, 0x1b, 0x1e, 0x1c, 0x28, 0x25, 0xff -}; - -static const u8 gUnknown_845B81A[] = { - 0x1f, 0x01, 0x02, 0x06, 0x0a, 0x0b, 0x0c, 0x11, 0xff -}; - -static const u8 gUnknown_845B823[] = { - 0x09, 0x01, 0x02, 0x0a, 0x0b, 0x0c, 0x0d, 0x15, 0xff -}; - -static const u8 gUnknown_845B82C[] = { - 0x07, 0x27, 0x08, 0x2c, 0x15, 0x1f, 0x20, 0x12, 0x13, 0x14, 0x18, 0x19, 0x1b, 0x1e, 0x1c, 0x28, 0x25, 0xff -}; - -static const u8 gUnknown_845B83E[] = { - 0x1f, 0x01, 0x02, 0x06, 0x0a, 0x0b, 0x0c, 0x11, 0xff -}; - -static const u8 gUnknown_845B847[] = { - 0x09, 0x01, 0x02, 0x0a, 0x0b, 0x0c, 0x0d, 0x15, 0xff -}; - -static const u8 gUnknown_845B850[] = { - 0x0f, 0x1b, 0x1d, 0x11, 0x12, 0x15, 0x17, 0x16, 0x1f, 0x20, 0x13, 0x14, 0xff -}; - -static const u8 gUnknown_845B85D[] = { - 0x20, 0x21, 0x22, 0x23, 0x24, 0x07, 0x09, 0x2b, 0xff -}; - -static const u8 gUnknown_845B866[] = { - 0x09, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x0a, 0x0d, 0x0f, 0x12, 0x13, 0x14, 0x27, 0x15, 0xff -}; - -static const u8 gUnknown_845B878[] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0xff -}; - -static const u8 gUnknown_845B89C[] = { - 0x0f, 0x1b, 0x1d, 0x11, 0x12, 0x16, 0x1f, 0x20, 0x13, 0x14, 0xff -}; - -static const u8 gUnknown_845B8A7[] = { - 0x20, 0x21, 0x22, 0x23, 0x24, 0x07, 0x2b, 0xff -}; - -static const u8 gUnknown_845B8AF[] = { - 0x09, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x0a, 0x0d, 0x0f, 0x12, 0x13, 0x14, 0x27, 0x15, 0xff -}; - -static const u8 gUnknown_845B8C1[] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0xff -}; - -static const u8 gUnknown_845B8E5[] = { - 0x0f, 0x1b, 0x1d, 0x11, 0x12, 0x16, 0x1f, 0x20, 0x13, 0x14, 0xff -}; - -static const u8 gUnknown_845B8F0[] = { - 0x20, 0x21, 0x22, 0x23, 0x24, 0x07, 0x2b, 0xff -}; - -static const u8 gUnknown_845B8F8[] = { - 0x09, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x0a, 0x0d, 0x0f, 0x12, 0x13, 0x14, 0x27, 0x15, 0xff -}; - -static const u8 gUnknown_845B90A[] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0xff -}; - -static const u8 gUnknown_845B92E[] = { - 0x29, 0x2a, 0x2b, 0xff -}; - -static const u8 gUnknown_845B932[] = { - 0x2d, 0x2e, 0x2f, 0x2b, 0xff -}; - -static const u8 gUnknown_845B937[] = { - 0x09, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x0a, 0x0d, 0x0f, 0x12, 0x13, 0x14, 0xff -}; - -static const u8 gUnknown_845B947[] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0xff -}; - -static const u8 gUnknown_845B96B[] = { - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x30, 0xff -}; - -static const u8 gUnknown_845B978[] = { - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x30, 0xff -}; - -static const u8 gUnknown_845B985[] = { - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x30, 0xff -}; - -static const u8 gUnknown_845B992[] = { - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x30, 0xff -}; - -static const u8 gUnknown_845B99F[] = { - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x30, 0xff -}; - -static const u8 gUnknown_845B9AC[] = { - 0x26, 0x27, 0x28, 0x29, 0x2a, 0xff -}; - -static const u8 gUnknown_845B9B2[] = { - 0x26, 0x27, 0x28, 0x29, 0x2a, 0xff -}; - -static const u8 gUnknown_845B9B8[] = { - 0x26, 0x27, 0x28, 0x29, 0x2a, 0xff -}; - -static const u8 gUnknown_845B9BE[] = { - 0x09, 0x01, 0x02, 0x03, 0x23, 0x25, 0x24, 0x04, 0x05, 0x06, 0x07, 0x08, 0x0a, 0x0b, 0x0c, 0x0d, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x27, 0x15, 0x26, 0x16, 0x17, 0x18, 0x1a, 0x0e, 0x1b, 0xff -}; - -static const u8 *const sHelpSystemSubmenuIndexPointers[] = { - NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, gUnknown_845B660, NULL, - NULL, NULL, NULL, gUnknown_845B664, NULL, - NULL, gUnknown_845B668, NULL, gUnknown_845B66A, NULL, - NULL, gUnknown_845B66E, NULL, NULL, NULL, - NULL, gUnknown_845B671, gUnknown_845B677, NULL, NULL, - NULL, gUnknown_845B67A, gUnknown_845B67D, NULL, NULL, - NULL, NULL, gUnknown_845B684, NULL, NULL, - NULL, NULL, gUnknown_845B68E, NULL, NULL, - NULL, gUnknown_845B696, gUnknown_845B6A1, NULL, NULL, - NULL, gUnknown_845B6A5, gUnknown_845B6A7, NULL, NULL, - NULL, gUnknown_845B6AD, NULL, NULL, NULL, - NULL, gUnknown_845B6AF, gUnknown_845B6B1, NULL, NULL, - NULL, gUnknown_845B6B5, gUnknown_845B6B7, NULL, NULL, - gUnknown_845B6BF, NULL, NULL, gUnknown_845B6C3, NULL, - gUnknown_845B6C8, gUnknown_845B6CE, gUnknown_845B6E2, NULL, NULL, - gUnknown_845B6E9, gUnknown_845B6F2, gUnknown_845B707, gUnknown_845B70E, NULL, - gUnknown_845B714, gUnknown_845B71D, gUnknown_845B731, NULL, NULL, - gUnknown_845B73D, gUnknown_845B744, gUnknown_845B758, NULL, gUnknown_845B75F, - gUnknown_845B783, gUnknown_845B7A7, gUnknown_845B7BB, NULL, NULL, - gUnknown_845B7C4, gUnknown_845B7E8, gUnknown_845B7F1, NULL, NULL, - gUnknown_845B7FB, gUnknown_845B81A, gUnknown_845B823, NULL, NULL, - gUnknown_845B82C, gUnknown_845B83E, gUnknown_845B847, NULL, NULL, - gUnknown_845B850, gUnknown_845B85D, gUnknown_845B866, NULL, gUnknown_845B878, - gUnknown_845B89C, gUnknown_845B8A7, gUnknown_845B8AF, NULL, gUnknown_845B8C1, - gUnknown_845B8E5, gUnknown_845B8F0, gUnknown_845B8F8, NULL, gUnknown_845B90A, - gUnknown_845B92E, gUnknown_845B932, gUnknown_845B937, NULL, gUnknown_845B947, - NULL, gUnknown_845B96B, NULL, NULL, NULL, - NULL, gUnknown_845B978, NULL, NULL, NULL, - NULL, gUnknown_845B985, NULL, NULL, NULL, - NULL, gUnknown_845B992, NULL, NULL, NULL, - NULL, gUnknown_845B99F, NULL, NULL, NULL, - NULL, gUnknown_845B9AC, NULL, NULL, NULL, - NULL, gUnknown_845B9B2, NULL, NULL, NULL, - NULL, gUnknown_845B9B8, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL + [HELP_NONE] = NULL, + [1] = Help_Text_HowToUseTypeMatchupList, + [2] = Help_Text_TypeMatchupOwnMoveDark, + [3] = Help_Text_TypeMatchupOwnPokemonDark, + [4] = Help_Text_TypeMatchupOwnMoveRock, + [5] = Help_Text_TypeMatchupOwnPokemonRock, + [6] = Help_Text_TypeMatchupOwnMovePsychic, + [7] = Help_Text_TypeMatchupOwnPokemonPsychic, + [8] = Help_Text_TypeMatchupOwnMoveFighting, + [9] = Help_Text_TypeMatchupOwnPokemonFighting, + [10] = Help_Text_TypeMatchupOwnMoveGrass, + [11] = Help_Text_TypeMatchupOwnPokemonGrass, + [12] = Help_Text_TypeMatchupOwnMoveGhost, + [13] = Help_Text_TypeMatchupOwnPokemonGhost, + [14] = Help_Text_TypeMatchupOwnMoveIce, + [15] = Help_Text_TypeMatchupOwnPokemonIce, + [16] = Help_Text_TypeMatchupOwnMoveGround, + [17] = Help_Text_TypeMatchupOwnPokemonGround, + [18] = Help_Text_TypeMatchupOwnMoveElectric, + [19] = Help_Text_TypeMatchupOwnPokemonElectric, + [20] = Help_Text_TypeMatchupOwnMovePoison, + [21] = Help_Text_TypeMatchupOwnPokemonPoison, + [22] = Help_Text_TypeMatchupOwnMoveDragon, + [23] = Help_Text_TypeMatchupOwnPokemonDragon, + [24] = Help_Text_TypeMatchupOwnMoveNormal, + [25] = Help_Text_TypeMatchupOwnPokemonNormal, + [26] = Help_Text_TypeMatchupOwnMoveSteel, + [27] = Help_Text_TypeMatchupOwnPokemonSteel, + [28] = Help_Text_TypeMatchupOwnMoveFlying, + [29] = Help_Text_TypeMatchupOwnPokemonFlying, + [30] = Help_Text_TypeMatchupOwnMoveFire, + [31] = Help_Text_TypeMatchupOwnPokemonFire, + [32] = Help_Text_TypeMatchupOwnMoveWater, + [33] = Help_Text_TypeMatchupOwnPokemonWater, + [34] = Help_Text_TypeMatchupOwnMoveBug, + [35] = Help_Text_TypeMatchupOwnPokemonBug +}; + +static const u8 sAboutGame_TitleScreen[] = { + HELP_THE_HELP_SYSTEM, + HELP_THE_GAME, + HELP_WIRELESS_ADAPTER, + HELP_END +}; + +static const u8 sAboutGame_NewGame[] = { + HELP_THE_HELP_SYSTEM, + HELP_THE_GAME, + HELP_WIRELESS_ADAPTER, + HELP_END +}; + +static const u8 sHowTo_NamingScreen[] = { + HELP_ENTERING_NAME, + HELP_END +}; + +static const u8 sAboutGame_NamingScreen[] = { + HELP_THE_HELP_SYSTEM, + HELP_THE_GAME, + HELP_WIRELESS_ADAPTER, + HELP_END +}; + +static const u8 sHowTo_Pokedex[] = { + HELP_USING_POKEDEX, + HELP_READING_POKEDEX, + HELP_END +}; + +static const u8 sHowTo_PartyMenu[] = { + HELP_USING_POKEMON, + HELP_USING_SUMMARY, + HELP_USING_SWITCH, + HELP_USING_ITEM, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_END +}; + +static const u8 sTerms_PartyMenu[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_END +}; + +static const u8 sHowTo_PokemonInfo[] = { + HELP_USING_POKEMON, + HELP_USING_SUMMARY, + HELP_END +}; + +static const u8 sTerms_PokemonInfo[] = { + HELP_TERM_LEVEL, + HELP_TERM_TYPE, + HELP_TERM_OT, + HELP_TERM_ID_NO, + HELP_TERM_ITEM, + HELP_TERM_NATURE, + HELP_END +}; + +static const u8 sTerms_PokemonSkills[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_ATTACK, + HELP_TERM_DEFENSE, + HELP_TERM_SPATK, + HELP_TERM_SPDEF, + HELP_TERM_SPEED, + HELP_TERM_EXP, + HELP_TERM_ABILITY, + HELP_END +}; + +static const u8 sTerms_PokemonMoves[] = { + HELP_TERM_LEVEL, + HELP_TERM_MOVES, + HELP_TERM_TYPE, + HELP_TERM_MOVE_TYPE, + HELP_TERM_PP, + HELP_TERM_POWER, + HELP_TERM_ACCURACY, + HELP_END +}; + +static const u8 sHowTo_Bag[] = { + HELP_USING_BAG, + HELP_USING_AN_ITEM, + HELP_USING_KEYITEM, + HELP_REGISTER_KEY_ITEM, + HELP_USING_POKEBALL, + HELP_USING_POTION, + HELP_USING_TOWN_MAP, + HELP_USING_TM, + HELP_USING_HM, + HELP_RIDING_BICYCLE, + HELP_END +}; + +static const u8 sTerms_Bag[] = { + HELP_TERM_ITEMS, + HELP_TERM_KEYITEMS, + HELP_TERM_POKEBALLS, + HELP_END +}; + +static const u8 sHowTo_TrainerCardFront[] = { + HELP_USING_PLAYER, + HELP_END +}; + +static const u8 sTerms_TrainerCardFront[] = { + HELP_TERM_ID_NO, + HELP_TERM_MONEY, + HELP_TERM_POKEDEX, + HELP_TERM_PLAY_TIME, + HELP_TERM_BADGES, + HELP_END +}; + +static const u8 sHowTo_TrainerCardBack[] = { + HELP_USING_PLAYER, + HELP_END +}; + +static const u8 sHowTo_Save[] = { + HELP_USING_SAVE, + HELP_END +}; + +static const u8 sTerms_Save[] = { + HELP_TERM_BADGES2, + HELP_TERM_POKEDEX, + HELP_TERM_PLAY_TIME, + HELP_END +}; + +static const u8 sHowTo_Options[] = { + HELP_USING_OPTION, + HELP_END +}; + +static const u8 sTerms_Options[] = { + HELP_TERM_TEXT_SPEED, + HELP_TERM_BATTLE_SCENE, + HELP_TERM_BATTLE_STYLE, + HELP_TERM_SOUND, + HELP_TERM_BUTTON_MODE, + HELP_TERM_FRAME, + HELP_TERM_CANCEL, + HELP_END +}; + +static const u8 sWhatToDo_PlayersHouse[] = { + HELP_WHAT_SHOULD_I_BE_DOING, + HELP_CANT_GET_OUT_OF_ROOM, + HELP_CANT_FIND_PERSON_I_WANT, + HELP_END +}; + +static const u8 sAboutGame_PlayersHouse[] = { + HELP_THE_HELP_SYSTEM, + HELP_THE_GAME, + HELP_WIRELESS_ADAPTER, + HELP_WHAT_ARE_POKEMON, + HELP_END +}; + +static const u8 sWhatToDo_OaksLab[] = { + HELP_WHAT_SHOULD_I_BE_DOING, + HELP_CANT_FIND_PERSON_I_WANT, + HELP_TALKED_TO_EVERYONE_NOW_WHAT, + HELP_WHAT_HAPPENED_TO_ITEM_I_GOT, + HELP_WANT_TO_END_GAME, + HELP_END +}; + +static const u8 sHowTo_OaksLab[] = { + HELP_OPENING_MENU, + HELP_USING_POKEDEX, + HELP_USING_POKEMON, + HELP_USING_SUMMARY, + HELP_USING_SWITCH, + HELP_USING_ITEM, + HELP_USING_BAG, + HELP_USING_AN_ITEM, + HELP_USING_KEYITEM, + HELP_REGISTER_KEY_ITEM, + HELP_USING_POKEBALL, + HELP_USING_POTION, + HELP_USING_TOWN_MAP, + HELP_USING_TM, + HELP_USING_HM, + HELP_USING_PLAYER, + HELP_USING_SAVE, + HELP_USING_OPTION, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_END +}; + +static const u8 sTerms_OaksLab[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_TYPE, + HELP_TERM_POKEMON, + HELP_END +}; + +static const u8 sWhatToDo_PokeCenter[] = { + HELP_WHAT_SHOULD_I_BE_DOING, + HELP_TALKED_TO_EVERYONE_NOW_WHAT, + HELP_SOMEONE_BLOCKING_MY_WAY, + HELP_WHAT_ARE_MY_ADVENTURE_BASICS, + HELP_WHATS_POKEMON_CENTER, + HELP_WHATS_POKEMON_MART, + HELP_WHAT_HAPPENED_TO_ITEM_I_GOT, + HELP_WANT_TO_END_GAME, + HELP_END +}; + +static const u8 sHowTo_PokeCenter[] = { + HELP_OPENING_MENU, + HELP_USING_POKEDEX, + HELP_USING_POKEMON, + HELP_USING_SUMMARY, + HELP_USING_SWITCH, + HELP_USING_ITEM, + HELP_USING_BAG, + HELP_USING_AN_ITEM, + HELP_USING_KEYITEM, + HELP_REGISTER_KEY_ITEM, + HELP_USING_POKEBALL, + HELP_USING_POTION, + HELP_USING_TOWN_MAP, + HELP_USING_TM, + HELP_USING_HM, + HELP_USING_PLAYER, + HELP_USING_SAVE, + HELP_USING_OPTION, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_USING_PC, + HELP_END +}; + +static const u8 sTerms_PokeCenter[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_TYPE, + HELP_TERM_POKEMON, + HELP_END +}; + +static const u8 sAboutGame_PokeCenter[] = { + HELP_WIRELESS_ADAPTER, + HELP_WHAT_ARE_POKEMON, + HELP_GAME_FUNDAMENTALS_1, + HELP_GAME_FUNDAMENTALS_2, + HELP_GAME_FUNDAMENTALS_3, + HELP_END +}; + +static const u8 sWhatToDo_Mart[] = { + HELP_WHAT_SHOULD_I_BE_DOING, + HELP_TALKED_TO_EVERYONE_NOW_WHAT, + HELP_SOMEONE_BLOCKING_MY_WAY, + HELP_WHAT_ARE_MY_ADVENTURE_BASICS, + HELP_WHATS_POKEMON_CENTER, + HELP_WHATS_POKEMON_MART, + HELP_WHAT_HAPPENED_TO_ITEM_I_GOT, + HELP_WANT_TO_END_GAME, + HELP_END +}; + +static const u8 sHowTo_Mart[] = { + HELP_OPENING_MENU, + HELP_USING_POKEDEX, + HELP_USING_POKEMON, + HELP_USING_SUMMARY, + HELP_USING_SWITCH, + HELP_USING_ITEM, + HELP_USING_BAG, + HELP_USING_AN_ITEM, + HELP_USING_KEYITEM, + HELP_REGISTER_KEY_ITEM, + HELP_USING_POKEBALL, + HELP_USING_POTION, + HELP_USING_TOWN_MAP, + HELP_USING_TM, + HELP_USING_HM, + HELP_USING_PLAYER, + HELP_USING_SAVE, + HELP_USING_OPTION, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_END +}; + +static const u8 sTerms_Mart[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_TYPE, + HELP_TERM_ITEM, + HELP_TERM_MONEY, + HELP_TERM_ITEMS, + HELP_TERM_KEYITEMS, + HELP_TERM_POKEBALLS, + HELP_TERM_FNT, + HELP_END +}; + +static const u8 sWhatToDo_Gym[] = { + HELP_SOMEONE_BLOCKING_MY_WAY, + HELP_WHAT_ARE_MY_ADVENTURE_BASICS, + HELP_WHATS_POKEMON_CENTER, + HELP_WHATS_POKEMON_MART, + HELP_WHAT_HAPPENED_TO_ITEM_I_GOT, + HELP_WANT_TO_END_GAME, + HELP_END +}; + +static const u8 sHowTo_Gym[] = { + HELP_OPENING_MENU, + HELP_USING_POKEDEX, + HELP_USING_POKEMON, + HELP_USING_SUMMARY, + HELP_USING_SWITCH, + HELP_USING_ITEM, + HELP_USING_BAG, + HELP_USING_AN_ITEM, + HELP_USING_KEYITEM, + HELP_REGISTER_KEY_ITEM, + HELP_USING_POKEBALL, + HELP_USING_POTION, + HELP_USING_TOWN_MAP, + HELP_USING_TM, + HELP_USING_HM, + HELP_USING_PLAYER, + HELP_USING_SAVE, + HELP_USING_OPTION, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_END +}; + +static const u8 sTerms_Gym[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_TYPE, + HELP_TERM_FNT, + HELP_END +}; + +static const u8 sTypeMatchups_Gym[] = { + HELP_TYPE_MATCHUPS, + HELP_END +}; + +static const u8 sWhatToDo_Indoors[] = { + HELP_WHAT_SHOULD_I_BE_DOING, + HELP_WHAT_ARE_MY_ADVENTURE_BASICS, + HELP_CANT_FIND_PERSON_I_WANT, + HELP_TALKED_TO_EVERYONE_NOW_WHAT, + HELP_SOMEONE_BLOCKING_MY_WAY, + HELP_I_CANT_GO_ON, + HELP_HOW_DO_I_PROGRESS, + HELP_WHAT_IS_THAT_PERSON_LIKE, + HELP_OUT_OF_THINGS_TO_DO, + HELP_HOW_ARE_ROADS_FORESTS_DIFFERENT, + HELP_WHAT_DO_I_DO_IN_CAVE, + HELP_WHATS_POKEMON_CENTER, + HELP_WHATS_POKEMON_MART, + HELP_WHAT_IS_A_GYM, + HELP_WHAT_HAPPENED_TO_ITEM_I_GOT, + HELP_WHEN_CAN_I_USE_ITEM, + HELP_RAN_OUT_OF_POTIONS, + HELP_CAN_I_BUY_POKEBALLS, + HELP_WHATS_A_BATTLE, + HELP_HOW_DO_I_PREPARE_FOR_BATTLE, + HELP_WHAT_IS_A_MONS_VITALITY, + HELP_WHERE_DO_MONS_APPEAR, + HELP_CANT_CATCH_MONS, + HELP_WANT_TO_MAKE_MON_STRONGER, + HELP_FOE_MONS_TOO_STRONG, + HELP_MY_MONS_ARE_HURT, + HELP_WHAT_IS_STATUS_PROBLEM, + HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT, + HELP_WHATS_A_TRAINER, + HELP_HOW_DO_I_WIN_AGAINST_TRAINER, + HELP_WHAT_ARE_MOVES, + HELP_WANT_TO_ADD_MORE_MOVES, + HELP_WHAT_ARE_HIDDEN_MOVES, + HELP_WHAT_DOES_HIDDEN_MOVE_DO, + HELP_WANT_TO_END_GAME, + HELP_END +}; + +static const u8 sHowTo_Indoors[] = { + HELP_OPENING_MENU, + HELP_USING_POKEDEX, + HELP_USING_POKEMON, + HELP_USING_SUMMARY, + HELP_USING_SWITCH, + HELP_USING_ITEM, + HELP_USING_BAG, + HELP_USING_AN_ITEM, + HELP_USING_KEYITEM, + HELP_REGISTER_KEY_ITEM, + HELP_USING_POKEBALL, + HELP_USING_POTION, + HELP_USING_TOWN_MAP, + HELP_USING_TM, + HELP_USING_HM, + HELP_USING_PLAYER, + HELP_USING_SAVE, + HELP_USING_OPTION, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_END +}; + +static const u8 sTerms_Indoors[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_TYPE, + HELP_TERM_OT, + HELP_TERM_ITEM, + HELP_TERM_ABILITY, + HELP_TERM_FNT, + HELP_END +}; + +static const u8 sWhatToDo_Overworld[] = { + HELP_WHAT_SHOULD_I_BE_DOING, + HELP_WHAT_ARE_MY_ADVENTURE_BASICS, + HELP_CANT_FIND_PERSON_I_WANT, + HELP_TALKED_TO_EVERYONE_NOW_WHAT, + HELP_SOMEONE_BLOCKING_MY_WAY, + HELP_I_CANT_GO_ON, + HELP_HOW_DO_I_PROGRESS, + HELP_WHAT_IS_THAT_PERSON_LIKE, + HELP_OUT_OF_THINGS_TO_DO, + HELP_HOW_ARE_ROADS_FORESTS_DIFFERENT, + HELP_WHAT_DO_I_DO_IN_CAVE, + HELP_WHATS_POKEMON_CENTER, + HELP_WHATS_POKEMON_MART, + HELP_WHAT_IS_A_GYM, + HELP_WHAT_HAPPENED_TO_ITEM_I_GOT, + HELP_WHEN_CAN_I_USE_ITEM, + HELP_RAN_OUT_OF_POTIONS, + HELP_CAN_I_BUY_POKEBALLS, + HELP_WHATS_A_BATTLE, + HELP_HOW_DO_I_PREPARE_FOR_BATTLE, + HELP_WHAT_IS_A_MONS_VITALITY, + HELP_WHERE_DO_MONS_APPEAR, + HELP_CANT_CATCH_MONS, + HELP_WANT_TO_MAKE_MON_STRONGER, + HELP_FOE_MONS_TOO_STRONG, + HELP_MY_MONS_ARE_HURT, + HELP_WHAT_IS_STATUS_PROBLEM, + HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT, + HELP_WHATS_A_TRAINER, + HELP_HOW_DO_I_WIN_AGAINST_TRAINER, + HELP_WHAT_ARE_MOVES, + HELP_WANT_TO_ADD_MORE_MOVES, + HELP_WHAT_ARE_HIDDEN_MOVES, + HELP_WHAT_DOES_HIDDEN_MOVE_DO, + HELP_WANT_TO_END_GAME, + HELP_END +}; + +static const u8 sHowTo_Overworld[] = { + HELP_OPENING_MENU, + HELP_USING_POKEDEX, + HELP_USING_POKEMON, + HELP_USING_BAG, + HELP_USING_PLAYER, + HELP_USING_SAVE, + HELP_USING_OPTION, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_END +}; + +static const u8 sTerms_Overworld[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_TYPE, + HELP_TERM_OT, + HELP_TERM_ITEM, + HELP_TERM_ABILITY, + HELP_TERM_FNT, + HELP_TERM_POKEMON, + HELP_END +}; + +static const u8 sWhatToDo_Dungeon[] = { + HELP_WHAT_ARE_MY_ADVENTURE_BASICS, + HELP_I_CANT_GO_ON, + HELP_HOW_DO_I_PROGRESS, + HELP_WHAT_IS_THAT_PERSON_LIKE, + HELP_OUT_OF_THINGS_TO_DO, + HELP_HOW_ARE_ROADS_FORESTS_DIFFERENT, + HELP_WHAT_DO_I_DO_IN_CAVE, + HELP_WHATS_POKEMON_CENTER, + HELP_WHATS_POKEMON_MART, + HELP_WHAT_IS_A_GYM, + HELP_WHAT_HAPPENED_TO_ITEM_I_GOT, + HELP_WHEN_CAN_I_USE_ITEM, + HELP_RAN_OUT_OF_POTIONS, + HELP_WHATS_A_BATTLE, + HELP_HOW_DO_I_PREPARE_FOR_BATTLE, + HELP_WHAT_IS_A_MONS_VITALITY, + HELP_WHERE_DO_MONS_APPEAR, + HELP_CANT_CATCH_MONS, + HELP_WANT_TO_MAKE_MON_STRONGER, + HELP_FOE_MONS_TOO_STRONG, + HELP_MY_MONS_ARE_HURT, + HELP_WHAT_IS_STATUS_PROBLEM, + HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT, + HELP_WHATS_A_TRAINER, + HELP_HOW_DO_I_WIN_AGAINST_TRAINER, + HELP_WHAT_ARE_MOVES, + HELP_WANT_TO_ADD_MORE_MOVES, + HELP_WHAT_ARE_HIDDEN_MOVES, + HELP_WHAT_DOES_HIDDEN_MOVE_DO, + HELP_WANT_TO_END_GAME, + HELP_END +}; + +static const u8 sHowTo_Dungeon[] = { + HELP_OPENING_MENU, + HELP_USING_POKEDEX, + HELP_USING_POKEMON, + HELP_USING_BAG, + HELP_USING_PLAYER, + HELP_USING_SAVE, + HELP_USING_OPTION, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_END +}; + +static const u8 sTerms_Dungeon[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_TYPE, + HELP_TERM_OT, + HELP_TERM_ITEM, + HELP_TERM_ABILITY, + HELP_TERM_FNT, + HELP_END +}; + +static const u8 sWhatToDo_Surfing[] = { + HELP_I_CANT_GO_ON, + HELP_WHAT_IS_THAT_PERSON_LIKE, + HELP_OUT_OF_THINGS_TO_DO, + HELP_WHAT_IS_A_GYM, + HELP_CANT_CATCH_MONS, + HELP_WANT_TO_MAKE_MON_STRONGER, + HELP_FOE_MONS_TOO_STRONG, + HELP_MY_MONS_ARE_HURT, + HELP_WHAT_IS_STATUS_PROBLEM, + HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT, + HELP_WHATS_A_TRAINER, + HELP_HOW_DO_I_WIN_AGAINST_TRAINER, + HELP_WHAT_ARE_MOVES, + HELP_WANT_TO_ADD_MORE_MOVES, + HELP_WHAT_ARE_HIDDEN_MOVES, + HELP_WHAT_DOES_HIDDEN_MOVE_DO, + HELP_WANT_TO_END_GAME, + HELP_END +}; + +static const u8 sHowTo_Surfing[] = { + HELP_OPENING_MENU, + HELP_USING_POKEDEX, + HELP_USING_POKEMON, + HELP_USING_BAG, + HELP_USING_PLAYER, + HELP_USING_SAVE, + HELP_USING_OPTION, + HELP_USING_MOVE_OUTSIDE_OF_BATTLE, + HELP_END +}; + +static const u8 sTerms_Surfing[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_TYPE, + HELP_TERM_OT, + HELP_TERM_ITEM, + HELP_TERM_ABILITY, + HELP_TERM_FNT, + HELP_END +}; + +static const u8 sWhatToDo_WildBattle[] = { + HELP_WHATS_A_BATTLE, + HELP_WHAT_ARE_MOVES, + HELP_WHAT_MOVES_SHOULD_I_USE, + HELP_WHAT_IS_A_MONS_VITALITY, + HELP_MY_MONS_ARE_HURT, + HELP_CANT_CATCH_MONS, + HELP_CAN_I_BUY_POKEBALLS, + HELP_RAN_OUT_OF_POTIONS, + HELP_WANT_TO_MAKE_MON_STRONGER, + HELP_FOE_MONS_TOO_STRONG, + HELP_WHAT_IS_STATUS_PROBLEM, + HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT, + HELP_END +}; + +static const u8 sHowTo_WildBattle[] = { + HELP_USING_FIGHT, + HELP_USING_POKEMON2, + HELP_USING_SHIFT, + HELP_USING_SUMMARY2, + HELP_USING_BAG2, + HELP_USING_AN_ITEM, + HELP_USING_POKEBALL, + HELP_USING_RUN, + HELP_END +}; + +static const u8 sTerms_WildBattle[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_ATTACK, + HELP_TERM_DEFENSE, + HELP_TERM_SPATK, + HELP_TERM_SPDEF, + HELP_TERM_SPEED, + HELP_TERM_TYPE, + HELP_TERM_ABILITY, + HELP_TERM_MOVE_TYPE, + HELP_TERM_PP, + HELP_TERM_POWER, + HELP_TERM_ACCURACY, + HELP_TERM_STATUS_PROBLEM, + HELP_TERM_FNT, + HELP_END +}; + +static const u8 sTypeMatchups_WildBattle[] = { + HELP_TYPE_MATCHUPS, + HELP_END +}; + +static const u8 sWhatToDo_TrainerBattleSingle[] = { + HELP_WHATS_A_BATTLE, + HELP_WHAT_ARE_MOVES, + HELP_WHAT_MOVES_SHOULD_I_USE, + HELP_WHAT_IS_A_MONS_VITALITY, + HELP_MY_MONS_ARE_HURT, + HELP_RAN_OUT_OF_POTIONS, + HELP_WANT_TO_MAKE_MON_STRONGER, + HELP_FOE_MONS_TOO_STRONG, + HELP_WHAT_IS_STATUS_PROBLEM, + HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT, + HELP_END +}; + +static const u8 sHowTo_TrainerBattleSingle[] = { + HELP_USING_FIGHT, + HELP_USING_POKEMON2, + HELP_USING_SHIFT, + HELP_USING_SUMMARY2, + HELP_USING_BAG2, + HELP_USING_AN_ITEM, + HELP_USING_RUN, + HELP_END +}; + +static const u8 sTerms_TrainerBattleSingle[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_ATTACK, + HELP_TERM_DEFENSE, + HELP_TERM_SPATK, + HELP_TERM_SPDEF, + HELP_TERM_SPEED, + HELP_TERM_TYPE, + HELP_TERM_ABILITY, + HELP_TERM_MOVE_TYPE, + HELP_TERM_PP, + HELP_TERM_POWER, + HELP_TERM_ACCURACY, + HELP_TERM_STATUS_PROBLEM, + HELP_TERM_FNT, + HELP_END +}; + +static const u8 sTypeMatchups_TrainerBattleSingle[] = { + HELP_TYPE_MATCHUPS, + HELP_END +}; + +static const u8 sWhatToDo_TrainerBattleDouble[] = { + HELP_WHATS_A_BATTLE, + HELP_WHAT_ARE_MOVES, + HELP_WHAT_MOVES_SHOULD_I_USE, + HELP_WHAT_IS_A_MONS_VITALITY, + HELP_MY_MONS_ARE_HURT, + HELP_RAN_OUT_OF_POTIONS, + HELP_WANT_TO_MAKE_MON_STRONGER, + HELP_FOE_MONS_TOO_STRONG, + HELP_WHAT_IS_STATUS_PROBLEM, + HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT, + HELP_END +}; + +static const u8 sHowTo_TrainerBattleDouble[] = { + HELP_USING_FIGHT, + HELP_USING_POKEMON2, + HELP_USING_SHIFT, + HELP_USING_SUMMARY2, + HELP_USING_BAG2, + HELP_USING_AN_ITEM, + HELP_USING_RUN, + HELP_END +}; + +static const u8 sTerms_TrainerBattleDouble[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_ATTACK, + HELP_TERM_DEFENSE, + HELP_TERM_SPATK, + HELP_TERM_SPDEF, + HELP_TERM_SPEED, + HELP_TERM_TYPE, + HELP_TERM_ABILITY, + HELP_TERM_MOVE_TYPE, + HELP_TERM_PP, + HELP_TERM_POWER, + HELP_TERM_ACCURACY, + HELP_TERM_STATUS_PROBLEM, + HELP_TERM_FNT, + HELP_END +}; + +static const u8 sTypeMatchups_TrainerBattleDouble[] = { + HELP_TYPE_MATCHUPS, + HELP_END +}; + +static const u8 sWhatToDo_SafariBattle[] = { + HELP_WHAT_DO_I_DO_IN_SAFARI, + HELP_WHAT_ARE_SAFARI_RULES, + HELP_WANT_TO_END_SAFARI, + HELP_END +}; + +static const u8 sHowTo_SafariBattle[] = { + HELP_USING_BALL, + HELP_USING_BAIT, + HELP_USING_ROCK, + HELP_USING_RUN, + HELP_END +}; + +static const u8 sTerms_SafariBattle[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_ATTACK, + HELP_TERM_DEFENSE, + HELP_TERM_SPATK, + HELP_TERM_SPDEF, + HELP_TERM_SPEED, + HELP_TERM_TYPE, + HELP_TERM_ABILITY, + HELP_TERM_MOVE_TYPE, + HELP_TERM_PP, + HELP_TERM_POWER, + HELP_TERM_ACCURACY, + HELP_END +}; + +static const u8 sTypeMatchups_SafariBattle[] = { + HELP_TYPE_MATCHUPS, + HELP_END +}; + +static const u8 sHowTo_PC[] = { + HELP_USING_PC, + HELP_USING_BILLS_PC, + HELP_USING_WITHDRAW, + HELP_USING_DEPOSIT, + HELP_USING_MOVE, + HELP_MOVING_ITEMS, + HELP_USING_PLAYERS_PC, + HELP_USING_WITHDRAW_ITEM, + HELP_USING_DEPOSIT_ITEM, + HELP_USING_MAILBOX, + HELP_USING_PROF_OAKS_PC, + HELP_USING_HALL_OF_FAME, + HELP_END +}; + +static const u8 sHowTo_BillsPC[] = { + HELP_USING_PC, + HELP_USING_BILLS_PC, + HELP_USING_WITHDRAW, + HELP_USING_DEPOSIT, + HELP_USING_MOVE, + HELP_MOVING_ITEMS, + HELP_USING_PLAYERS_PC, + HELP_USING_WITHDRAW_ITEM, + HELP_USING_DEPOSIT_ITEM, + HELP_USING_MAILBOX, + HELP_USING_PROF_OAKS_PC, + HELP_USING_HALL_OF_FAME, + HELP_END +}; + +static const u8 sHowTo_PlayersPCItems[] = { + HELP_USING_PC, + HELP_USING_BILLS_PC, + HELP_USING_WITHDRAW, + HELP_USING_DEPOSIT, + HELP_USING_MOVE, + HELP_MOVING_ITEMS, + HELP_USING_PLAYERS_PC, + HELP_USING_WITHDRAW_ITEM, + HELP_USING_DEPOSIT_ITEM, + HELP_USING_MAILBOX, + HELP_USING_PROF_OAKS_PC, + HELP_USING_HALL_OF_FAME, + HELP_END +}; + +static const u8 sHowTo_PlayersPCMailbox[] = { + HELP_USING_PC, + HELP_USING_BILLS_PC, + HELP_USING_WITHDRAW, + HELP_USING_DEPOSIT, + HELP_USING_MOVE, + HELP_MOVING_ITEMS, + HELP_USING_PLAYERS_PC, + HELP_USING_WITHDRAW_ITEM, + HELP_USING_DEPOSIT_ITEM, + HELP_USING_MAILBOX, + HELP_USING_PROF_OAKS_PC, + HELP_USING_HALL_OF_FAME, + HELP_END +}; + +static const u8 sHowTo_PCMisc[] = { + HELP_USING_PC, + HELP_USING_BILLS_PC, + HELP_USING_WITHDRAW, + HELP_USING_DEPOSIT, + HELP_USING_MOVE, + HELP_MOVING_ITEMS, + HELP_USING_PLAYERS_PC, + HELP_USING_WITHDRAW_ITEM, + HELP_USING_DEPOSIT_ITEM, + HELP_USING_MAILBOX, + HELP_USING_PROF_OAKS_PC, + HELP_USING_HALL_OF_FAME, + HELP_END +}; + +static const u8 sHowTo_BedroomPC[] = { + HELP_USING_HOME_PC, + HELP_USING_ITEM_STORAGE, + HELP_USING_WITHDRAW_ITEM2, + HELP_USING_DEPOSIT_ITEM2, + HELP_USING_MAILBOX2, + HELP_END +}; + +static const u8 sHowTo_BedroomPCItems[] = { + HELP_USING_HOME_PC, + HELP_USING_ITEM_STORAGE, + HELP_USING_WITHDRAW_ITEM2, + HELP_USING_DEPOSIT_ITEM2, + HELP_USING_MAILBOX2, + HELP_END +}; + +static const u8 sHowTo_BedroomPCMailbox[] = { + HELP_USING_HOME_PC, + HELP_USING_ITEM_STORAGE, + HELP_USING_WITHDRAW_ITEM2, + HELP_USING_DEPOSIT_ITEM2, + HELP_USING_MAILBOX2, + HELP_END +}; + +static const u8 sTerms_Basic[] = { + HELP_TERM_LEVEL, + HELP_TERM_HP, + HELP_TERM_EXP, + HELP_TERM_MOVES, + HELP_TERM_TM, + HELP_TERM_HM_MOVE, + HELP_TERM_HM, + HELP_TERM_ATTACK, + HELP_TERM_DEFENSE, + HELP_TERM_SPATK, + HELP_TERM_SPDEF, + HELP_TERM_SPEED, + HELP_TERM_TYPE, + HELP_TERM_OT, + HELP_TERM_ITEM, + HELP_TERM_ABILITY, + HELP_TERM_MOVE_TYPE, + HELP_TERM_NATURE, + HELP_TERM_ID_NO, + HELP_TERM_PP, + HELP_TERM_POWER, + HELP_TERM_ACCURACY, + HELP_TERM_STATUS_PROBLEM, + HELP_TERM_FNT, + HELP_TERM_EVOLUTION, + HELP_TERM_ITEMS, + HELP_TERM_KEYITEMS, + HELP_TERM_POKEBALLS, + HELP_TERM_PLAY_TIME, + HELP_TERM_MONEY, + HELP_TERM_BADGES, + HELP_END +}; + + +// Cant get this to match as a 2D array but it probably should be one, [HELPCONTEXT_COUNT][TOPIC_COUNT - 1] (Excludes TOPIC_EXIT) +static const u8 *const sHelpSystemSubmenuItemLists[HELPCONTEXT_COUNT * (TOPIC_COUNT - 1)] = { + NULL, NULL, NULL, NULL, NULL, // HELPCONTEXT_NONE + NULL, NULL, NULL, sAboutGame_TitleScreen, NULL, // HELPCONTEXT_TITLE_SCREEN + NULL, NULL, NULL, sAboutGame_NewGame, NULL, // HELPCONTEXT_NEW_GAME + NULL, sHowTo_NamingScreen, NULL, sAboutGame_NamingScreen, NULL, // HELPCONTEXT_NAMING_SCREEN + NULL, sHowTo_Pokedex, NULL, NULL, NULL, // HELPCONTEXT_POKEDEX + NULL, sHowTo_PartyMenu, sTerms_PartyMenu, NULL, NULL, // HELPCONTEXT_PARTY_MENU + NULL, sHowTo_PokemonInfo, sTerms_PokemonInfo, NULL, NULL, // HELPCONTEXT_POKEMON_INFO + NULL, NULL, sTerms_PokemonSkills, NULL, NULL, // HELPCONTEXT_POKEMON_SKILLS + NULL, NULL, sTerms_PokemonMoves, NULL, NULL, // HELPCONTEXT_POKEMON_MOVES + NULL, sHowTo_Bag, sTerms_Bag, NULL, NULL, // HELPCONTEXT_BAG + NULL, sHowTo_TrainerCardFront, sTerms_TrainerCardFront, NULL, NULL, // HELPCONTEXT_TRAINER_CARD_FRONT + NULL, sHowTo_TrainerCardBack, NULL, NULL, NULL, // HELPCONTEXT_TRAINER_CARD_BACK + NULL, sHowTo_Save, sTerms_Save, NULL, NULL, // HELPCONTEXT_SAVE + NULL, sHowTo_Options, sTerms_Options, NULL, NULL, // HELPCONTEXT_OPTIONS + sWhatToDo_PlayersHouse, NULL, NULL, sAboutGame_PlayersHouse, NULL, // HELPCONTEXT_PLAYERS_HOUSE + sWhatToDo_OaksLab, sHowTo_OaksLab, sTerms_OaksLab, NULL, NULL, // HELPCONTEXT_OAKS_LAB + sWhatToDo_PokeCenter, sHowTo_PokeCenter, sTerms_PokeCenter, sAboutGame_PokeCenter, NULL, // HELPCONTEXT_POKECENTER + sWhatToDo_Mart, sHowTo_Mart, sTerms_Mart, NULL, NULL, // HELPCONTEXT_MART + sWhatToDo_Gym, sHowTo_Gym, sTerms_Gym, NULL, sTypeMatchups_Gym, // HELPCONTEXT_GYM + sWhatToDo_Indoors, sHowTo_Indoors, sTerms_Indoors, NULL, NULL, // HELPCONTEXT_INDOORS + sWhatToDo_Overworld, sHowTo_Overworld, sTerms_Overworld, NULL, NULL, // HELPCONTEXT_OVERWORLD + sWhatToDo_Dungeon, sHowTo_Dungeon, sTerms_Dungeon, NULL, NULL, // HELPCONTEXT_DUNGEON + sWhatToDo_Surfing, sHowTo_Surfing, sTerms_Surfing, NULL, NULL, // HELPCONTEXT_SURFING + sWhatToDo_WildBattle, sHowTo_WildBattle, sTerms_WildBattle, NULL, sTypeMatchups_WildBattle, // HELPCONTEXT_WILD_BATTLE + sWhatToDo_TrainerBattleSingle, sHowTo_TrainerBattleSingle, sTerms_TrainerBattleSingle, NULL, sTypeMatchups_TrainerBattleSingle, // HELPCONTEXT_TRAINER_BATTLE_SINGLE + sWhatToDo_TrainerBattleDouble, sHowTo_TrainerBattleDouble, sTerms_TrainerBattleDouble, NULL, sTypeMatchups_TrainerBattleDouble, // HELPCONTEXT_TRAINER_BATTLE_DOUBLE + sWhatToDo_SafariBattle, sHowTo_SafariBattle, sTerms_SafariBattle, NULL, sTypeMatchups_SafariBattle, // HELPCONTEXT_SAFARI_BATTLE + NULL, sHowTo_PC, NULL, NULL, NULL, // HELPCONTEXT_PC + NULL, sHowTo_BillsPC, NULL, NULL, NULL, // HELPCONTEXT_BILLS_PC + NULL, sHowTo_PlayersPCItems, NULL, NULL, NULL, // HELPCONTEXT_PLAYERS_PC_ITEMS + NULL, sHowTo_PlayersPCMailbox, NULL, NULL, NULL, // HELPCONTEXT_PLAYERS_PC_MAILBOX + NULL, sHowTo_PCMisc, NULL, NULL, NULL, // HELPCONTEXT_PC_MISC + NULL, sHowTo_BedroomPC, NULL, NULL, NULL, // HELPCONTEXT_BEDROOM_PC + NULL, sHowTo_BedroomPCItems, NULL, NULL, NULL, // HELPCONTEXT_BEDROOM_PC_ITEMS + NULL, sHowTo_BedroomPCMailbox, NULL, NULL, NULL, // HELPCONTEXT_BEDROOM_PC_MAILBOX + NULL, NULL, NULL, NULL, NULL // HELPCONTEXT_UNUSED }; static const u16 unref_845BCB0[] = INCBIN_U16("graphics/help_system/unk_845BCB0.bin"); -static const u8 sHelpSystemContextTopicOrder[] = { - 3, 0, 1, 2, 4, 5 -}; - -static const bool8 sHelpSystemContextTopicFlags[][6] = { - {FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, FALSE, FALSE, TRUE, FALSE, TRUE }, - {FALSE, FALSE, FALSE, TRUE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, TRUE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {FALSE, FALSE, TRUE, FALSE, FALSE, TRUE }, - {FALSE, FALSE, TRUE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {TRUE, FALSE, FALSE, TRUE, FALSE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {TRUE, TRUE, TRUE, TRUE, FALSE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, TRUE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, FALSE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, TRUE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, TRUE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, TRUE, TRUE }, - {TRUE, TRUE, TRUE, FALSE, TRUE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, TRUE, FALSE, FALSE, FALSE, TRUE }, - {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}, - {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE} +static const u8 sHelpSystemContextTopicOrder[TOPIC_COUNT] = { + TOPIC_ABOUT_GAME, + TOPIC_WHAT_TO_DO, + TOPIC_HOW_TO_DO, + TOPIC_TERMS, + TOPIC_TYPE_MATCHUP, + TOPIC_EXIT +}; + +#define CONTEXT_TOPIC_FLAGS(whatToDo, howToDo, terms, aboutGame, typeMatchup, exit) \ + { \ + [TOPIC_WHAT_TO_DO] = whatToDo, \ + [TOPIC_HOW_TO_DO] = howToDo, \ + [TOPIC_TERMS] = terms, \ + [TOPIC_ABOUT_GAME] = aboutGame, \ + [TOPIC_TYPE_MATCHUP] = typeMatchup, \ + [TOPIC_EXIT] = exit \ + } \ + +static const bool8 sHelpSystemContextTopicFlags[HELPCONTEXT_COUNT + 1][TOPIC_COUNT] = { + [HELPCONTEXT_NONE] = CONTEXT_TOPIC_FLAGS(FALSE, FALSE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_TITLE_SCREEN] = CONTEXT_TOPIC_FLAGS(FALSE, FALSE, FALSE, TRUE, FALSE, TRUE), + [HELPCONTEXT_NEW_GAME] = CONTEXT_TOPIC_FLAGS(FALSE, FALSE, FALSE, TRUE, FALSE, TRUE), + [HELPCONTEXT_NAMING_SCREEN] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, TRUE, FALSE, TRUE), + [HELPCONTEXT_POKEDEX] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_PARTY_MENU] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_POKEMON_INFO] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_POKEMON_SKILLS] = CONTEXT_TOPIC_FLAGS(FALSE, FALSE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_POKEMON_MOVES] = CONTEXT_TOPIC_FLAGS(FALSE, FALSE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_BAG] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_TRAINER_CARD_FRONT] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_TRAINER_CARD_BACK] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_SAVE] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_OPTIONS] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_PLAYERS_HOUSE] = CONTEXT_TOPIC_FLAGS( TRUE, FALSE, FALSE, TRUE, FALSE, TRUE), + [HELPCONTEXT_OAKS_LAB] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_POKECENTER] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, TRUE, FALSE, TRUE), + [HELPCONTEXT_MART] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_GYM] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, TRUE, TRUE), + [HELPCONTEXT_INDOORS] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_OVERWORLD] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_DUNGEON] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_SURFING] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, FALSE, TRUE), + [HELPCONTEXT_WILD_BATTLE] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, TRUE, TRUE), + [HELPCONTEXT_TRAINER_BATTLE_SINGLE] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, TRUE, TRUE), + [HELPCONTEXT_TRAINER_BATTLE_DOUBLE] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, TRUE, TRUE), + [HELPCONTEXT_SAFARI_BATTLE] = CONTEXT_TOPIC_FLAGS( TRUE, TRUE, TRUE, FALSE, TRUE, TRUE), + [HELPCONTEXT_PC] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_BILLS_PC] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_PLAYERS_PC_ITEMS] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_PLAYERS_PC_MAILBOX] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_PC_MISC] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_BEDROOM_PC] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_BEDROOM_PC_ITEMS] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_BEDROOM_PC_MAILBOX] = CONTEXT_TOPIC_FLAGS(FALSE, TRUE, FALSE, FALSE, FALSE, TRUE), + [HELPCONTEXT_UNUSED] = {}, + [HELPCONTEXT_COUNT] = {} }; static const u16 sMartMaps[] = { @@ -877,41 +1744,45 @@ static const u8 sDungeonMaps[][3] = { { MAP_GROUP(SEVEN_ISLAND_TANOBY_RUINS_MONEAN_CHAMBER), MAP_NUM(SEVEN_ISLAND_TANOBY_RUINS_MONEAN_CHAMBER), 7 } }; -void HelpSystem_SetSomeVariable(u8 a0) +void SetHelpContextDontCheckBattle(u8 contextId) { - sSomeVariable = a0; + sHelpSystemContextId = contextId; } -void HelpSystem_SetSomeVariable2(u8 a0) +void SetHelpContext(u8 contextId) { - switch (sSomeVariable) + switch (sHelpSystemContextId) { - case 23: - case 24: - case 25: - case 26: - if (a0 == 9 || a0 == 5 || a0 == 6 || a0 == 7 || a0 == 8) + case HELPCONTEXT_WILD_BATTLE: + case HELPCONTEXT_TRAINER_BATTLE_SINGLE: + case HELPCONTEXT_TRAINER_BATTLE_DOUBLE: + case HELPCONTEXT_SAFARI_BATTLE: + if (contextId == HELPCONTEXT_BAG + || contextId == HELPCONTEXT_PARTY_MENU + || contextId == HELPCONTEXT_POKEMON_INFO + || contextId == HELPCONTEXT_POKEMON_SKILLS + || contextId == HELPCONTEXT_POKEMON_MOVES) break; // fallthrough default: - sSomeVariable = a0; + sHelpSystemContextId = contextId; break; } } -void Special_SetSomeVariable(void) +void Script_SetHelpContext(void) { - sSomeVariable = gSpecialVar_0x8004; + sHelpSystemContextId = gSpecialVar_0x8004; } -void HelpSystem_BackupSomeVariable(void) +void BackupHelpContext(void) { - gSomeVariableBackup = sSomeVariable; + gHelpContextIdBackup = sHelpSystemContextId; } -void HelpSystem_RestoreSomeVariable(void) +void RestoreHelpContext(void) { - sSomeVariable = gSomeVariableBackup; + sHelpSystemContextId = gHelpContextIdBackup; } static bool32 IsInMartMap(void) @@ -942,7 +1813,7 @@ static bool8 IsInDungeonMap(void) { u8 i, j; - for (i = 0; i < 16; i++) + for (i = 0; i < NELEMS(sDungeonMaps); i++) { for (j = 0; j < sDungeonMaps[i][2]; j++) { @@ -958,42 +1829,52 @@ static bool8 IsInDungeonMap(void) return FALSE; } -void sub_812B35C(void) +#define IN_PLAYERS_HOUSE \ + ((gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(PALLET_TOWN_PLAYERS_HOUSE_1F) \ + && gSaveBlock1Ptr->location.mapNum == MAP_NUM(PALLET_TOWN_PLAYERS_HOUSE_1F)) \ + || (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(PALLET_TOWN_PLAYERS_HOUSE_2F) \ + && gSaveBlock1Ptr->location.mapNum == MAP_NUM(PALLET_TOWN_PLAYERS_HOUSE_2F))) \ + + #define IN_OAKS_LAB \ + (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(PALLET_TOWN_PROFESSOR_OAKS_LAB) \ + && gSaveBlock1Ptr->location.mapNum == MAP_NUM(PALLET_TOWN_PROFESSOR_OAKS_LAB)) \ + +void SetHelpContextForMap(void) { HelpSystem_EnableToggleWithRButton(); if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING)) - HelpSystem_SetSomeVariable2(0x16); + SetHelpContext(HELPCONTEXT_SURFING); else if (IsInDungeonMap()) - HelpSystem_SetSomeVariable2(0x15); + SetHelpContext(HELPCONTEXT_DUNGEON); else if (IsMapTypeIndoors(gMapHeader.mapType)) { - if ((gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(PALLET_TOWN_PLAYERS_HOUSE_1F) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(PALLET_TOWN_PLAYERS_HOUSE_1F)) || (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(PALLET_TOWN_PLAYERS_HOUSE_2F) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(PALLET_TOWN_PLAYERS_HOUSE_2F))) - HelpSystem_SetSomeVariable2(0x0E); - else if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(PALLET_TOWN_PROFESSOR_OAKS_LAB) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(PALLET_TOWN_PROFESSOR_OAKS_LAB)) - HelpSystem_SetSomeVariable2(0x0F); + if (IN_PLAYERS_HOUSE) + SetHelpContext(HELPCONTEXT_PLAYERS_HOUSE); + else if (IN_OAKS_LAB) + SetHelpContext(HELPCONTEXT_OAKS_LAB); else if (IsCurMapPokeCenter() == TRUE) - HelpSystem_SetSomeVariable2(0x10); + SetHelpContext(HELPCONTEXT_POKECENTER); else if (IsInMartMap() == TRUE) - HelpSystem_SetSomeVariable2(0x11); + SetHelpContext(HELPCONTEXT_MART); else if (IsInGymMap() == TRUE) - HelpSystem_SetSomeVariable2(0x12); + SetHelpContext(HELPCONTEXT_GYM); else - HelpSystem_SetSomeVariable2(0x13); + SetHelpContext(HELPCONTEXT_INDOORS); } else - HelpSystem_SetSomeVariable2(0x14); + SetHelpContext(HELPCONTEXT_OVERWORLD); } -bool8 sub_812B40C(void) +bool8 HelpSystem_UpdateHasntSeenIntro(void) { - if (gUnknown_203B0EE == 1) + if (sSeenHelpSystemIntro == TRUE) return FALSE; if (gSaveFileStatus != SAVE_STATUS_EMPTY && gSaveFileStatus != SAVE_STATUS_INVALID && FlagGet(FLAG_SYS_SAW_HELP_SYSTEM_INTRO)) return FALSE; FlagSet(FLAG_SYS_SAW_HELP_SYSTEM_INTRO); - gUnknown_203B0EE = 1; + sSeenHelpSystemIntro = TRUE; return TRUE; } @@ -1042,7 +1923,7 @@ static void BuildAndPrintMainTopicsListMenu(struct HelpSystemListMenu * helpList ResetHelpSystemListMenu(helpListMenu, listMenuItemsBuffer); BuildMainTopicsListAndMoveToH00(helpListMenu, listMenuItemsBuffer); PrintTextOnPanel2Row52RightAlign(gUnknown_841DFAC); - HelpSystem_InitListMenuController(helpListMenu, 0, sHelpSystemState[2]); + HelpSystem_InitListMenuController(helpListMenu, 0, gHelpSystemState[2]); PrintHelpSystemTopicMouseoverDescription(helpListMenu, listMenuItemsBuffer); sub_813BDA4(1); sub_813BD5C(1); @@ -1052,9 +1933,9 @@ static void BuildMainTopicsListAndMoveToH00(struct HelpSystemListMenu * helpList { u8 i; u8 totalItems = 0; - for (i = 0; i < 6; i++) + for (i = 0; i < TOPIC_COUNT; i++) { - if (sHelpSystemContextTopicFlags[sSomeVariable][sHelpSystemContextTopicOrder[i]] == TRUE) + if (sHelpSystemContextTopicFlags[sHelpSystemContextId][sHelpSystemContextTopicOrder[i]] == TRUE) { listMenuItemsBuffer[totalItems].label = sHelpSystemTopicPtrs[sHelpSystemContextTopicOrder[i]]; listMenuItemsBuffer[totalItems].index = sHelpSystemContextTopicOrder[i]; @@ -1076,7 +1957,7 @@ static void BuildAndPrintSubmenuList(struct HelpSystemListMenu * helpListMenu, s SetHelpSystemSubmenuItems(helpListMenu, listMenuItemsBuffer); PrintTextOnPanel2Row52RightAlign(gUnknown_841DFC9); HelpSystem_InitListMenuController(helpListMenu, helpListMenu->itemsAbove, helpListMenu->cursorPos); - HelpSystem_PrintTextAt(sHelpSystemTopicPtrs[sHelpSystemState[1]], 0, 0); + HelpSystem_PrintTextAt(sHelpSystemTopicPtrs[gHelpSystemState[1]], 0, 0); sub_813BDA4(1); sub_813BD5C(1); } @@ -1084,36 +1965,36 @@ static void BuildAndPrintSubmenuList(struct HelpSystemListMenu * helpListMenu, s static void SetHelpSystemSubmenuItems(struct HelpSystemListMenu * helpListMenu, struct ListMenuItem * listMenuItemsBuffer) { u8 totalItems = 0; - const u8 * indexPtr = sHelpSystemSubmenuIndexPointers[sSomeVariable * 5 + sHelpSystemState[1]]; + const u8 * submenuItems = sHelpSystemSubmenuItemLists[sHelpSystemContextId * 5 + gHelpSystemState[1]]; // accessing as 2D array u8 i; - for (i = 0; indexPtr[i] != 0xFF; i++) + for (i = 0; submenuItems[i] != HELP_END; i++) { - if (HelpSystemSubmenuIndexIsActive(indexPtr[i]) == TRUE) + if (IsHelpSystemSubmenuEnabled(submenuItems[i]) == TRUE) { - if (sHelpSystemState[1] == 0) - listMenuItemsBuffer[totalItems].label = sHelpSystemSpecializedQuestionTextPtrs[indexPtr[i]]; - else if (sHelpSystemState[1] == 1) - listMenuItemsBuffer[totalItems].label = sHelpSystemMenuTopicTextPtrs[indexPtr[i]]; - else if (sHelpSystemState[1] == 2) - listMenuItemsBuffer[totalItems].label = sHelpSystemSpecializedStringsTextPtrs[indexPtr[i]]; - else if (sHelpSystemState[1] == 3) - listMenuItemsBuffer[totalItems].label = sHelpSystemGeneralTopicTextPtrs[indexPtr[i]]; - else - listMenuItemsBuffer[totalItems].label = sHelpSystemTypeMatchupTextPtrs[indexPtr[i]]; - listMenuItemsBuffer[totalItems].index = indexPtr[i]; + if (gHelpSystemState[1] == TOPIC_WHAT_TO_DO) + listMenuItemsBuffer[totalItems].label = sHelpSystemSpecializedQuestionTextPtrs[submenuItems[i]]; + else if (gHelpSystemState[1] == TOPIC_HOW_TO_DO) + listMenuItemsBuffer[totalItems].label = sHelpSystemMenuTopicTextPtrs[submenuItems[i]]; + else if (gHelpSystemState[1] == TOPIC_TERMS) + listMenuItemsBuffer[totalItems].label = sHelpSystemTermTextPtrs[submenuItems[i]]; + else if (gHelpSystemState[1] == TOPIC_ABOUT_GAME) + listMenuItemsBuffer[totalItems].label = sHelpSystemGeneralTopicTextPtrs[submenuItems[i]]; + else // TOPIC_TYPE_MATCHUP + listMenuItemsBuffer[totalItems].label = sHelpSystemTypeMatchupTextPtrs[submenuItems[i]]; + listMenuItemsBuffer[totalItems].index = submenuItems[i]; totalItems++; } } - if (HelpSystem_HasDefeatedBrock() == TRUE) + if (HelpSystem_ShouldShowBasicTerms() == TRUE) { - for (i = 0, indexPtr = gUnknown_845B9BE; indexPtr[i] != 0xFF; i++) + for (i = 0, submenuItems = sTerms_Basic; submenuItems[i] != HELP_END; i++) { - listMenuItemsBuffer[totalItems].label = sHelpSystemSpecializedStringsTextPtrs[indexPtr[i]]; - listMenuItemsBuffer[totalItems].index = indexPtr[i]; + listMenuItemsBuffer[totalItems].label = sHelpSystemTermTextPtrs[submenuItems[i]]; + listMenuItemsBuffer[totalItems].index = submenuItems[i]; totalItems++; } } - listMenuItemsBuffer[totalItems].label = gUnknown_81B2E6F; + listMenuItemsBuffer[totalItems].label = Help_Text_Cancel; listMenuItemsBuffer[totalItems].index = -2; totalItems++; helpListMenu->sub.totalItems = totalItems; @@ -1122,215 +2003,218 @@ static void SetHelpSystemSubmenuItems(struct HelpSystemListMenu * helpListMenu, helpListMenu->sub.top = 21; } -static bool8 HelpSystem_HasDefeatedBrock(void) +static bool8 HelpSystem_ShouldShowBasicTerms(void) { - if (FlagGet(FLAG_DEFEATED_BROCK) == TRUE && sHelpSystemState[1] == 2) + if (FlagGet(FLAG_DEFEATED_BROCK) == TRUE && gHelpSystemState[1] == TOPIC_TERMS) return TRUE; return FALSE; } -static bool8 HelpSystemSubmenuIndexIsActive(u8 id) +static bool8 IsHelpSystemSubmenuEnabled(u8 id) { u8 i = 0; - if (sHelpSystemState[1] == 0) + if (gHelpSystemState[1] == TOPIC_WHAT_TO_DO) { switch (id) { - case 1: - case 2: - case 3: - case 5: - case 8: - case 34: - case 38: - case 41: - case 42: - case 43: + case HELP_PLAYING_FOR_FIRST_TIME: + case HELP_WHAT_SHOULD_I_BE_DOING: + case HELP_CANT_GET_OUT_OF_ROOM: + case HELP_TALKED_TO_EVERYONE_NOW_WHAT: + case HELP_OUT_OF_THINGS_TO_DO: + case HELP_NOTHING_I_WANT_TO_KNOW: + case HELP_WHATS_A_MON: + case HELP_WHAT_DO_I_DO_IN_SAFARI: + case HELP_WHAT_ARE_SAFARI_RULES: + case HELP_WANT_TO_END_SAFARI: return TRUE; - case 4: + case HELP_CANT_FIND_PERSON_I_WANT: return FlagGet(FLAG_VISITED_OAKS_LAB); - case 6: - case 10: - case 16: - case 19: - case 22: - case 35: - case 36: + case HELP_SOMEONE_BLOCKING_MY_WAY: + case HELP_WHAT_ARE_MY_ADVENTURE_BASICS: + case HELP_HOW_DO_I_PREPARE_FOR_BATTLE: + case HELP_WHAT_IS_STATUS_PROBLEM: + case HELP_RAN_OUT_OF_POTIONS: + case HELP_WHATS_POKEMON_CENTER: + case HELP_WHATS_POKEMON_MART: return FlagGet(FLAG_WORLD_MAP_VIRIDIAN_CITY); - case 7: + case HELP_I_CANT_GO_ON: return FlagGet(FLAG_WORLD_MAP_VERMILION_CITY); - case 11: - case 24: + case HELP_HOW_ARE_ROADS_FORESTS_DIFFERENT: + case HELP_WHATS_A_TRAINER: return FlagGet(FLAG_WORLD_MAP_VIRIDIAN_FOREST); - case 9: - case 13: - case 14: - case 15: - case 17: - case 18: - case 20: - case 26: - case 29: - case 31: - case 37: + case HELP_WHAT_HAPPENED_TO_ITEM_I_GOT: + case HELP_WHEN_CAN_I_USE_ITEM: + case HELP_HOW_DO_I_PROGRESS: + case HELP_WHATS_A_BATTLE: + case HELP_WHAT_IS_A_MONS_VITALITY: + case HELP_MY_MONS_ARE_HURT: + case HELP_WHAT_HAPPENS_IF_ALL_MY_MONS_FAINT: + case HELP_WHERE_DO_MONS_APPEAR: + case HELP_WHAT_MOVES_SHOULD_I_USE: + case HELP_WANT_TO_MAKE_MON_STRONGER: + case HELP_WANT_TO_END_GAME: return FlagGet(FLAG_SYS_POKEMON_GET); - case 21: - case 23: + case HELP_CANT_CATCH_MONS: + case HELP_CAN_I_BUY_POKEBALLS: return FlagGet(FLAG_SYS_POKEDEX_GET); - case 12: - case 25: - case 27: - case 30: - case 32: - case 33: + case HELP_HOW_ARE_CAVES_DIFFERENT: + case HELP_WHAT_DO_I_DO_IN_CAVE: + case HELP_HOW_DO_I_WIN_AGAINST_TRAINER: + case HELP_FOE_MONS_TOO_STRONG: + case HELP_WHAT_ARE_MOVES: + case HELP_WANT_TO_ADD_MORE_MOVES: return FlagGet(FLAG_BADGE01_GET); - case 28: - case 40: + case HELP_WHAT_ARE_HIDDEN_MOVES: + case HELP_WHAT_DOES_HIDDEN_MOVE_DO: return HasGottenAtLeastOneHM(); - case 39: + case HELP_WHAT_IS_THAT_PERSON_LIKE: return FlagGet(FLAG_GOT_FAME_CHECKER); - case 44: + case HELP_WHAT_IS_A_GYM: return FlagGet(FLAG_WORLD_MAP_PEWTER_CITY); } return FALSE; } - if (sHelpSystemState[1] == 1) + if (gHelpSystemState[1] == TOPIC_HOW_TO_DO) { switch (id) { - case 06: - case 10: - case 11: - case 12: - case 19: - case 20: - case 21: - case 22: - case 23: - case 24: - case 25: - case 26: - case 27: - case 28: - case 29: - case 31: - case 36: - case 38: - case 39: - case 40: - case 41: - case 42: - case 45: - case 46: - case 47: + case HELP_USING_BAG: + case HELP_USING_PLAYER: + case HELP_USING_SAVE: + case HELP_USING_OPTION: + case HELP_ENTERING_NAME: + case HELP_USING_PC: + case HELP_USING_BILLS_PC: + case HELP_USING_WITHDRAW: + case HELP_USING_DEPOSIT: + case HELP_USING_MOVE: + case HELP_MOVING_ITEMS: + case HELP_USING_PLAYERS_PC: + case HELP_USING_WITHDRAW_ITEM: + case HELP_USING_DEPOSIT_ITEM: + case HELP_USING_MAILBOX: + case HELP_OPENING_MENU: + case HELP_USING_BAG2: + case HELP_USING_HOME_PC: + case HELP_USING_ITEM_STORAGE: + case HELP_USING_WITHDRAW_ITEM2: + case HELP_USING_DEPOSIT_ITEM2: + case HELP_USING_MAILBOX2: + case HELP_USING_BALL: + case HELP_USING_BAIT: + case HELP_USING_ROCK: return TRUE; - case 1: - case 30: - case 37: + case HELP_USING_POKEDEX: + case HELP_USING_PROF_OAKS_PC: + case HELP_READING_POKEDEX: return FlagGet(FLAG_SYS_POKEDEX_GET); - case 14: + case HELP_USING_TOWN_MAP: return CheckBagHasItem(ITEM_TOWN_MAP, 1); - case 2: - case 3: - case 5: - case 7: - case 8: - case 9: - case 13: - case 32: - case 33: - case 35: - case 43: - case 44: + case HELP_USING_POKEMON: + case HELP_USING_SUMMARY: + case HELP_USING_ITEM: + case HELP_USING_AN_ITEM: + case HELP_USING_KEYITEM: + case HELP_USING_POKEBALL: + case HELP_USING_POTION: + case HELP_USING_FIGHT: + case HELP_USING_POKEMON2: + case HELP_USING_SUMMARY2: + case HELP_USING_RUN: + case HELP_REGISTER_KEY_ITEM: return FlagGet(FLAG_SYS_POKEMON_GET); - case 4: - case 34: + case HELP_USING_SWITCH: + case HELP_USING_SHIFT: + // Only show if player has caught mon after starter if (GetKantoPokedexCount(1) > 1) return TRUE; return FALSE; - case 15: + case HELP_USING_TM: return FlagGet(FLAG_BADGE01_GET); - case 16: - case 17: + case HELP_USING_HM: + case HELP_USING_MOVE_OUTSIDE_OF_BATTLE: return HasGottenAtLeastOneHM(); - case 18: + case HELP_RIDING_BICYCLE: return FlagGet(FLAG_GOT_BICYCLE); - case 48: + case HELP_USING_HALL_OF_FAME: return FlagGet(FLAG_SYS_GAME_CLEAR); } return FALSE; } - if (sHelpSystemState[1] == 2) + if (gHelpSystemState[1] == TOPIC_TERMS) { - if (HelpSystem_HasDefeatedBrock() == TRUE) + if (HelpSystem_ShouldShowBasicTerms() == TRUE) { - for (i = 0; gUnknown_845B9BE[i] != 0xFF; i++) + // After defeating Brock, all basic terms are added + // This checks to make sure they arent added twice + for (i = 0; sTerms_Basic[i] != HELP_END; i++) { - if (gUnknown_845B9BE[i] == id) + if (sTerms_Basic[i] == id) return FALSE; } } switch (id) { - case 14: - case 17: - case 22: - case 23: - case 24: - case 25: - case 26: - case 27: - case 28: - case 29: - case 30: - case 31: - case 32: - case 33: - case 34: - case 35: - case 38: + case HELP_TERM_MONEY: + case HELP_TERM_ID_NO: + case HELP_TERM_ITEMS: + case HELP_TERM_KEYITEMS: + case HELP_TERM_POKEBALLS: + case HELP_TERM_POKEDEX: + case HELP_TERM_PLAY_TIME: + case HELP_TERM_BADGES: + case HELP_TERM_TEXT_SPEED: + case HELP_TERM_BATTLE_SCENE: + case HELP_TERM_BATTLE_STYLE: + case HELP_TERM_SOUND: + case HELP_TERM_BUTTON_MODE: + case HELP_TERM_FRAME: + case HELP_TERM_CANCEL: + case HELP_TERM_TM: + case HELP_TERM_EVOLUTION: return TRUE; - case 1: - case 2: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 16: - case 19: - case 20: - case 21: + case HELP_TERM_HP: + case HELP_TERM_EXP: + case HELP_TERM_ATTACK: + case HELP_TERM_DEFENSE: + case HELP_TERM_SPATK: + case HELP_TERM_SPDEF: + case HELP_TERM_SPEED: + case HELP_TERM_LEVEL: + case HELP_TERM_TYPE: + case HELP_TERM_OT: + case HELP_TERM_ITEM: + case HELP_TERM_ABILITY: + case HELP_TERM_NATURE: + case HELP_TERM_POWER: + case HELP_TERM_ACCURACY: + case HELP_TERM_FNT: return FlagGet(FLAG_SYS_POKEMON_GET); - case 36: - case 37: + case HELP_TERM_HM: + case HELP_TERM_HM_MOVE: return HasGottenAtLeastOneHM(); - case 3: - case 15: - case 18: - case 39: + case HELP_TERM_MOVES: + case HELP_TERM_MOVE_TYPE: + case HELP_TERM_PP: + case HELP_TERM_STATUS_PROBLEM: return FlagGet(FLAG_WORLD_MAP_VIRIDIAN_FOREST); } return TRUE; } - if (sHelpSystemState[1] == 3) + if (gHelpSystemState[1] == TOPIC_ABOUT_GAME) { switch (id) { - case 5: + case HELP_GAME_FUNDAMENTALS_2: return FlagGet(FLAG_BADGE01_GET); - case 6: + case HELP_GAME_FUNDAMENTALS_3: return FlagGet(FLAG_BADGE02_GET); } return TRUE; } - if (sHelpSystemState[1] == 4) + if (gHelpSystemState[1] == TOPIC_TYPE_MATCHUP) { return TRUE; } @@ -1407,7 +2291,7 @@ bool8 HelpSystemSubroutine_WelcomeWaitButton(struct HelpSystemListMenu * helpLis bool8 HelpSystemSubroutine_WelcomeEndGotoMenu(struct HelpSystemListMenu * helpListMenu, struct ListMenuItem * listMenuItemsBuffer) { - sHelpSystemState[2] = 0; + gHelpSystemState[2] = 0; ResetHelpSystemCursor(helpListMenu); BuildAndPrintMainTopicsListMenu(helpListMenu, listMenuItemsBuffer); helpListMenu->state = 0; @@ -1416,8 +2300,8 @@ bool8 HelpSystemSubroutine_WelcomeEndGotoMenu(struct HelpSystemListMenu * helpLi bool8 HelpSystemSubroutine_MenuInputHandlerMain(struct HelpSystemListMenu * helpListMenu, struct ListMenuItem * listMenuItemsBuffer) { - s32 v0 = HelpSystem_GetMenuInput(); - switch (v0) + s32 input = HelpSystem_GetMenuInput(); + switch (input) { case -6: case -2: @@ -1430,7 +2314,7 @@ bool8 HelpSystemSubroutine_MenuInputHandlerMain(struct HelpSystemListMenu * help case -1: break; default: - sHelpSystemState[1] = v0; + gHelpSystemState[1] = input; helpListMenu->state = 1; break; } @@ -1439,8 +2323,8 @@ bool8 HelpSystemSubroutine_MenuInputHandlerMain(struct HelpSystemListMenu * help bool8 HelpMenuSubroutine_InitSubmenu(struct HelpSystemListMenu * helpListMenu, struct ListMenuItem * listMenuItemsBuffer) { - sHelpSystemState[0] = 1; - sHelpSystemState[2] = helpListMenu->cursorPos; + gHelpSystemState[0] = 1; + gHelpSystemState[2] = helpListMenu->cursorPos; ResetHelpSystemCursor(helpListMenu); BuildAndPrintSubmenuList(helpListMenu, listMenuItemsBuffer); sub_813C75C(); @@ -1453,7 +2337,7 @@ bool8 HelpMenuSubroutine_ReturnFromSubmenu(struct HelpSystemListMenu * helpListM { sub_813C004(0, 0); sub_813C004(1, 0); - sHelpSystemState[0] = 0; + gHelpSystemState[0] = 0; BuildAndPrintMainTopicsListMenu(helpListMenu, listMenuItemsBuffer); helpListMenu->state = 0; return TRUE; @@ -1461,8 +2345,8 @@ bool8 HelpMenuSubroutine_ReturnFromSubmenu(struct HelpSystemListMenu * helpListM bool8 HelpMenuSubroutine_SubmenuInputHandler(struct HelpSystemListMenu * helpListMenu, struct ListMenuItem * listMenuItemsBuffer) { - s32 v0 = HelpSystem_GetMenuInput(); - switch (v0) + s32 input = HelpSystem_GetMenuInput(); + switch (input) { case -6: return FALSE; @@ -1475,46 +2359,46 @@ bool8 HelpMenuSubroutine_SubmenuInputHandler(struct HelpSystemListMenu * helpLis case -1: break; default: - sHelpSystemState[3] = v0; + gHelpSystemState[3] = input; helpListMenu->state = 4; break; } return TRUE; } -void sub_812BDEC(void) +void HelpSystem_PrintTopicLabel(void) { - HelpSystem_PrintTextAt(sHelpSystemTopicPtrs[sHelpSystemState[1]], 0, 0); + HelpSystem_PrintTextAt(sHelpSystemTopicPtrs[gHelpSystemState[1]], 0, 0); } bool8 HelpMenuSubroutine_HelpItemPrint(struct HelpSystemListMenu * helpListMenu, struct ListMenuItem * listMenuItemsBuffer) { - sHelpSystemState[0] = 2; + gHelpSystemState[0] = 2; sub_813BDA4(0); HelpSystem_FillPanel1(); PrintTextOnPanel2Row52RightAlign(gUnknown_841DFBE); sub_813BDE8(1); sub_813BEE4(1); - if (sHelpSystemState[1] == 0) + if (gHelpSystemState[1] == TOPIC_WHAT_TO_DO) { - HelpSystem_PrintTwoStrings(sHelpSystemSpecializedQuestionTextPtrs[sHelpSystemState[3]], sHelpSystemSpecializedAnswerTextPtrs[sHelpSystemState[3]]); + HelpSystem_PrintTwoStrings(sHelpSystemSpecializedQuestionTextPtrs[gHelpSystemState[3]], sHelpSystemSpecializedAnswerTextPtrs[gHelpSystemState[3]]); } - else if (sHelpSystemState[1] == 1) + else if (gHelpSystemState[1] == TOPIC_HOW_TO_DO) { - HelpSystem_PrintTwoStrings(sHelpSystemMenuTopicTextPtrs[sHelpSystemState[3]], sHelpSystemSpecializedControlsTextPtrs[sHelpSystemState[3]]); + HelpSystem_PrintTwoStrings(sHelpSystemMenuTopicTextPtrs[gHelpSystemState[3]], sHelpSystemHowToUseMenuTextPtrs[gHelpSystemState[3]]); } - else if (sHelpSystemState[1] == 2) + else if (gHelpSystemState[1] == TOPIC_TERMS) { - HelpSystem_PrintTwoStrings(sHelpSystemSpecializedStringsTextPtrs[sHelpSystemState[3]], sHelpSystemSpecializedStringDefinitionsTextPtrs[sHelpSystemState[3]]); + HelpSystem_PrintTwoStrings(sHelpSystemTermTextPtrs[gHelpSystemState[3]], sHelpSystemTermDefinitionsTextPtrs[gHelpSystemState[3]]); } - else if (sHelpSystemState[1] == 3) + else if (gHelpSystemState[1] == TOPIC_ABOUT_GAME) { - HelpSystem_PrintTwoStrings(sHelpSystemGeneralTopicTextPtrs[sHelpSystemState[3]], sHelpSystemGeneralTopicDescriptionTextPtrs[sHelpSystemState[3]]); + HelpSystem_PrintTwoStrings(sHelpSystemGeneralTopicTextPtrs[gHelpSystemState[3]], sHelpSystemGeneralTopicDescriptionTextPtrs[gHelpSystemState[3]]); } - else + else // TOPIC_TYPE_MATCHUP { - HelpSystem_PrintTwoStrings(sHelpSystemTypeMatchupTextPtrs[sHelpSystemState[3]], sHelpSystemTypeMatchupDescriptionTextPtrs[sHelpSystemState[3]]); + HelpSystem_PrintTwoStrings(sHelpSystemTypeMatchupTextPtrs[gHelpSystemState[3]], sHelpSystemTypeMatchupDescriptionTextPtrs[gHelpSystemState[3]]); } sub_813BDA4(1); sub_813BD5C(1); @@ -1524,7 +2408,7 @@ bool8 HelpMenuSubroutine_HelpItemPrint(struct HelpSystemListMenu * helpListMenu, bool8 HelpMenuSubroutine_ReturnFromHelpItem(struct HelpSystemListMenu * helpListMenu, struct ListMenuItem * listMenuItemsBuffer) { - sHelpSystemState[0] = 1; + gHelpSystemState[0] = 1; BuildAndPrintSubmenuList(helpListMenu, listMenuItemsBuffer); sub_813C75C(); HelpSystem_SetInputDelay(2); @@ -1548,7 +2432,7 @@ bool8 HelpMenuSubroutine_HelpItemWaitButton(struct HelpSystemListMenu * helpList static void PrintWelcomeMessageOnPanel1(void) { HelpSystem_FillPanel1(); - HelpSystem_PrintTextAt(gUnknown_81B2FC9, 0, 0); + HelpSystem_PrintTextAt(Help_Text_Greetings, 0, 0); } static void PrintTextOnPanel2Row52RightAlign(const u8 * str) @@ -1559,7 +2443,7 @@ static void PrintTextOnPanel2Row52RightAlign(const u8 * str) u8 sub_812BF88(void) { - return sHelpSystemState[0]; + return gHelpSystemState[0]; } static void ResetHelpSystemCursor(struct HelpSystemListMenu * helpListMenu) diff --git a/src/hof_pc.c b/src/hof_pc.c index 353c067c2..173625774 100644 --- a/src/hof_pc.c +++ b/src/hof_pc.c @@ -39,7 +39,7 @@ static void ReshowPCMenuAfterHallOfFamePC(void) { ScriptContext2_Enable(); Overworld_PlaySpecialMapMusic(); - ScrSpecial_CreatePCMenu(); + CreatePCMenu(); ScriptMenu_DisplayPCStartupPrompt(); BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK); CreateTask(Task_WaitForPaletteFade, 10); diff --git a/src/item_menu.c b/src/item_menu.c index a407c582f..ed2988fd2 100644 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -496,9 +496,9 @@ static bool8 LoadBagMenuGraphics(void) break; case 19: if (gBagMenuState.location == ITEMMENULOCATION_ITEMPC) - HelpSystem_SetSomeVariable2(29); + SetHelpContext(HELPCONTEXT_PLAYERS_PC_ITEMS); else - HelpSystem_SetSomeVariable2(9); + SetHelpContext(HELPCONTEXT_BAG); gPaletteFade.bufferTransferDisabled = FALSE; gMain.state++; break; diff --git a/src/item_pc.c b/src/item_pc.c index 7c7abdce3..54378b840 100644 --- a/src/item_pc.c +++ b/src/item_pc.c @@ -361,7 +361,7 @@ static bool8 ItemPc_DoGfxSetup(void) gMain.state++; break; case 17: - HelpSystem_SetSomeVariable2(29); + SetHelpContext(HELPCONTEXT_PLAYERS_PC_ITEMS); gMain.state++; break; case 18: diff --git a/src/mail.c b/src/mail.c index dbdf48ac7..b5c0343b3 100644 --- a/src/mail.c +++ b/src/mail.c @@ -506,10 +506,10 @@ static bool8 DoInitMailView(void) SetVBlankCallback(NULL); ScanlineEffect_Stop(); SetGpuReg(REG_OFFSET_DISPCNT, 0); - if (gPlayerPcMenuManager.unk_9 == 0) - HelpSystem_SetSomeVariable2(34); + if (gPlayerPcMenuManager.notInRoom == FALSE) + SetHelpContext(HELPCONTEXT_BEDROOM_PC_MAILBOX); else - HelpSystem_SetSomeVariable2(30); + SetHelpContext(HELPCONTEXT_PLAYERS_PC_MAILBOX); break; case 1: CpuFill16(0, (void *)OAM, OAM_SIZE); diff --git a/src/menews_jisan.c b/src/menews_jisan.c index d8971f6a2..f3b8fca78 100644 --- a/src/menews_jisan.c +++ b/src/menews_jisan.c @@ -54,7 +54,7 @@ void MENewsJisanStepCounter(void) } } -u16 Special_GetMENewsJisanItemAndState(void) +u16 GetMENewsJisanItemAndState(void) { u16 *r6 = &gSpecialVar_Result; struct MENewsJisanStruct *r4 = GetMENewsJisanStructPtr(); diff --git a/src/oak_speech.c b/src/oak_speech.c index f7ec9a531..871a73783 100644 --- a/src/oak_speech.c +++ b/src/oak_speech.c @@ -512,7 +512,7 @@ static void Task_OaksSpeech1(u8 taskId) ResetSpriteData(); FreeAllSpritePalettes(); ResetTempTileDataBuffers(); - HelpSystem_SetSomeVariable2(2); + SetHelpContext(HELPCONTEXT_NEW_GAME); break; case 1: sOakSpeechResources = AllocZeroed(sizeof(*sOakSpeechResources)); diff --git a/src/option_menu.c b/src/option_menu.c index 5453dfa9e..56a4ec877 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -224,7 +224,7 @@ void CB2_OptionsMenuFromStartMenu(void) if (sOptionMenuPtr->option[i] > (sOptionMenuItemCounts[i]) - 1) sOptionMenuPtr->option[i] = 0; } - HelpSystem_SetSomeVariable2(0xD); + SetHelpContext(HELPCONTEXT_OPTIONS); SetMainCallback2(CB2_OptionMenu); } diff --git a/src/party_menu.c b/src/party_menu.c index 626ce70f8..edf7e96f6 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -566,7 +566,7 @@ static bool8 ShowPartyMenu(void) ++gMain.state; break; case 19: - HelpSystem_SetSomeVariable2(5); + SetHelpContext(HELPCONTEXT_PARTY_MENU); ++gMain.state; break; case 20: diff --git a/src/party_menu_specials.c b/src/party_menu_specials.c index 242422f7b..aba11a534 100644 --- a/src/party_menu_specials.c +++ b/src/party_menu_specials.c @@ -13,7 +13,7 @@ static void sub_80BF97C(u8 taskId); -void Special_ChooseMonFromParty(void) +void ChoosePartyMon(void) { u8 taskId; @@ -23,7 +23,7 @@ void Special_ChooseMonFromParty(void) BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); } -void Special_SelectMoveTutorMon(void) +void SelectMoveTutorMon(void) { u8 taskId; @@ -43,14 +43,14 @@ static void sub_80BF97C(u8 taskId) } } -void Special_SelectMove(void) +void SelectMoveDeleterMove(void) { ShowSelectMovePokemonSummaryScreen(gPlayerParty, gSpecialVar_0x8004, gPlayerPartyCount - 1, CB2_ReturnToField, 0); sub_8138B38(3); gFieldCallback = FieldCallback_ReturnToEventScript2; } -void Special_GetNumMovesSelectedMonHas(void) +void GetNumMovesSelectedMonHas(void) { u8 i; @@ -60,7 +60,7 @@ void Special_GetNumMovesSelectedMonHas(void) ++gSpecialVar_Result; } -void Special_BufferMoveDeleterNicknameAndMove(void) +void BufferMoveDeleterNicknameAndMove(void) { struct Pokemon *mon = &gPlayerParty[gSpecialVar_0x8004]; u16 move = GetMonData(mon, MON_DATA_MOVE1 + gSpecialVar_0x8005); @@ -91,7 +91,7 @@ static void ShiftMoveSlot(struct Pokemon *mon, u8 slotTo, u8 slotFrom) SetMonData(mon, MON_DATA_PP_BONUSES, &ppBonuses); } -void Special_MoveDeleterForgetMove(void) +void MoveDeleterForgetMove(void) { u16 i; @@ -101,7 +101,7 @@ void Special_MoveDeleterForgetMove(void) ShiftMoveSlot(&gPlayerParty[gSpecialVar_0x8004], i, i + 1); } -void Special_IsSelectedMonEgg(void) +void IsSelectedMonEgg(void) { if (GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_IS_EGG)) gSpecialVar_Result = TRUE; diff --git a/src/player_pc.c b/src/player_pc.c index 8943e0796..62a899e39 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -153,8 +153,8 @@ void BedroomPC(void) { u8 taskId; - gPlayerPcMenuManager.unk_9 = 0; - HelpSystem_BackupSomeVariable(); + gPlayerPcMenuManager.notInRoom = FALSE; + BackupHelpContext(); sItemOrder = gUnknown_8402200; sTopMenuItemCount = 3; taskId = CreateTask(TaskDummy, 0); @@ -165,8 +165,8 @@ void PlayerPC(void) { u8 taskId; - gPlayerPcMenuManager.unk_9 = 1; - HelpSystem_BackupSomeVariable(); + gPlayerPcMenuManager.notInRoom = TRUE; + BackupHelpContext(); sItemOrder = gUnknown_8402203; sTopMenuItemCount = 3; taskId = CreateTask(TaskDummy, 0); @@ -215,7 +215,7 @@ static void Task_TopMenuHandleInput(u8 taskId) static void Task_ReturnToTopMenu(u8 taskId) { - HelpSystem_RestoreSomeVariable(); + RestoreHelpContext(); DisplayItemMessageOnField(taskId, 2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu); } @@ -238,10 +238,10 @@ static void Task_PlayerPcMailbox(u8 taskId) gPlayerPcMenuManager.itemsAbove = 0; PCMailCompaction(); Task_SetPageItemVars(taskId); - if (gPlayerPcMenuManager.unk_9 == 0) - HelpSystem_SetSomeVariable2(34); + if (gPlayerPcMenuManager.notInRoom == FALSE) + SetHelpContext(HELPCONTEXT_BEDROOM_PC_MAILBOX); else - HelpSystem_SetSomeVariable2(30); + SetHelpContext(HELPCONTEXT_PLAYERS_PC_MAILBOX); if (MailboxPC_InitBuffers(gPlayerPcMenuManager.count) == TRUE) { ClearDialogWindowAndFrame(0, FALSE); @@ -257,7 +257,7 @@ static void Task_PlayerPcMailbox(u8 taskId) static void Task_PlayerPcTurnOff(u8 taskId) { - if (gPlayerPcMenuManager.unk_9 == 0) + if (gPlayerPcMenuManager.notInRoom == FALSE) ScriptContext1_SetupScript(EventScript_PalletTown_PlayersHouse_2F_ShutDownPC); else EnableBothScriptContexts(); @@ -267,10 +267,10 @@ static void Task_PlayerPcTurnOff(u8 taskId) static void Task_CreateItemStorageSubmenu(u8 taskId, u8 cursorPos) { s16 *data = gTasks[taskId].data; - if (gPlayerPcMenuManager.unk_9 == 0) - HelpSystem_SetSomeVariable2(33); + if (gPlayerPcMenuManager.notInRoom == FALSE) + SetHelpContext(HELPCONTEXT_BEDROOM_PC_ITEMS); else - HelpSystem_SetSomeVariable2(29); + SetHelpContext(HELPCONTEXT_PLAYERS_PC_ITEMS); tWindowId = AddWindow(&sWindowTemplate_ItemStorageSubmenu); SetStdWindowBorderStyle(tWindowId, FALSE); PrintTextArray(tWindowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, 16, 3, sMenuActions_ItemPc); @@ -580,10 +580,10 @@ static void Task_WaitFadeAndReturnToMailboxPcInputHandler(u8 taskId) static void CB2_ReturnToMailbox(void) { u8 taskId; - if (gPlayerPcMenuManager.unk_9 == 0) - HelpSystem_SetSomeVariable2(34); + if (gPlayerPcMenuManager.notInRoom == FALSE) + SetHelpContext(HELPCONTEXT_BEDROOM_PC_MAILBOX); else - HelpSystem_SetSomeVariable2(30); + SetHelpContext(HELPCONTEXT_PLAYERS_PC_MAILBOX); LoadStdWindowFrameGfx(); taskId = CreateTask(Task_WaitFadeAndReturnToMailboxPcInputHandler, 0); if (MailboxPC_InitBuffers(gPlayerPcMenuManager.count) == TRUE) @@ -683,10 +683,10 @@ static void CB2_ReturnToMailboxPc_UpdateScrollVariables(void) { u8 taskId; u8 count; - if (gPlayerPcMenuManager.unk_9 == 0) - HelpSystem_SetSomeVariable2(34); + if (gPlayerPcMenuManager.notInRoom == FALSE) + SetHelpContext(HELPCONTEXT_BEDROOM_PC_MAILBOX); else - HelpSystem_SetSomeVariable2(30); + SetHelpContext(HELPCONTEXT_PLAYERS_PC_MAILBOX); taskId = CreateTask(Task_WaitFadeAndReturnToMailboxPcInputHandler, 0); count = gPlayerPcMenuManager.count; gPlayerPcMenuManager.count = CountPCMail(); diff --git a/src/pokedex_screen.c b/src/pokedex_screen.c index cd201a884..0219ca466 100644 --- a/src/pokedex_screen.c +++ b/src/pokedex_screen.c @@ -302,7 +302,7 @@ void CB2_OpenPokedexFromStartMenu(void) SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0); SetMainCallback2(sub_81024D4); - HelpSystem_SetSomeVariable2(4); + SetHelpContext(HELPCONTEXT_POKEDEX); } #define FREE_IF_NOT_NULL(ptr0) ({ void * ptr = (ptr0); if (ptr) Free(ptr); }) diff --git a/src/post_battle_event_funcs.c b/src/post_battle_event_funcs.c index 72d4266c8..b564e74ce 100644 --- a/src/post_battle_event_funcs.c +++ b/src/post_battle_event_funcs.c @@ -8,7 +8,7 @@ #include "constants/flags.h" #include "constants/spawn_points.h" -bool8 Special_HallOfFame(void) +bool8 EnterHallOfFame(void) { bool8 ribbonState; bool8 *r7; @@ -52,7 +52,7 @@ bool8 Special_HallOfFame(void) return FALSE; } -bool8 SetCB2Whiteout(void) +bool8 SetCB2WhiteOut(void) { SetMainCallback2(CB2_WhiteOut); return FALSE; diff --git a/src/prof_pc.c b/src/prof_pc.c index ce81d9ce8..c7eed8878 100644 --- a/src/prof_pc.c +++ b/src/prof_pc.c @@ -21,7 +21,7 @@ extern const u8 PokedexRating_Text_LessThan140[]; extern const u8 PokedexRating_Text_LessThan150[]; extern const u8 PokedexRating_Text_Complete[]; -u16 Special_GetPokedexCount(void) +u16 GetPokedexCount(void) { if (gSpecialVar_0x8004 == 0) { @@ -104,7 +104,7 @@ static const u8 *GetProfOaksRatingMessageByCount(u16 count) return PokedexRating_Text_LessThan10; } -void Special_GetProfOaksRatingMessage(void) +void GetProfOaksRatingMessage(void) { ShowFieldMessage(GetProfOaksRatingMessageByCount(gSpecialVar_0x8004)); } diff --git a/src/quest_log.c b/src/quest_log.c index c9a930032..caac29f5a 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -526,7 +526,7 @@ static void sub_8110A3C(void) } } -void Special_GetQuestLogState(void) +void GetQuestLogState(void) { gSpecialVar_Result = gQuestLogState; } @@ -2151,7 +2151,7 @@ void ResetTrainerFanClub(void) VarSet(VAR_FANCLUB_LOSE_FAN_TIMER, 0); } -void Special_TryLoseFansFromPlayTimeAfterLinkBattle(void) +void Script_TryLoseFansFromPlayTimeAfterLinkBattle(void) { TryLoseFansFromPlayTimeAfterLinkBattle(TRAINER_FAN_CLUB); } @@ -2165,7 +2165,7 @@ static void TryLoseFansFromPlayTimeAfterLinkBattle(struct TrainerFanClub *fanClu } } -void Special_UpdateTrainerFanClubGameClear(void) +void Script_UpdateTrainerFanClubGameClear(void) { UpdateTrainerFanClubGameClear(TRAINER_FAN_CLUB); } @@ -2282,7 +2282,7 @@ static u8 PlayerLoseRandomTrainerFan(struct TrainerFanClub *fanClub) return sFanClubMemberIds[idx]; } -u16 Special_GetNumFansOfPlayerInTrainerFanClub(void) +u16 Script_GetNumFansOfPlayerInTrainerFanClub(void) { return GetNumFansOfPlayerInTrainerFanClub(TRAINER_FAN_CLUB); } @@ -2301,7 +2301,7 @@ static u16 GetNumFansOfPlayerInTrainerFanClub(struct TrainerFanClub *fanClub) return count; } -void Special_TryLoseFansFromPlayTime(void) +void Script_TryLoseFansFromPlayTime(void) { TryLoseFansFromPlayTime(TRAINER_FAN_CLUB); } @@ -2335,7 +2335,7 @@ static void TryLoseFansFromPlayTime(struct TrainerFanClub *fanClub) } } -bool16 Special_IsFanClubMemberFanOfPlayer(void) +bool16 Script_IsFanClubMemberFanOfPlayer(void) { return IsFanClubMemberFanOfPlayer(TRAINER_FAN_CLUB); } @@ -2352,7 +2352,7 @@ static void SetInitialFansOfPlayer(struct TrainerFanClub *fanClub) SET_TRAINER_FAN_CLUB_FLAG(FANCLUB_MEMBER3); } -void Special_BufferFanClubTrainerName(void) +void Script_BufferFanClubTrainerName(void) { u8 whichLinkTrainer = 0; u8 whichNPCTrainer = 0; @@ -2446,7 +2446,7 @@ static bool8 DidPlayerGetFirstFans(struct TrainerFanClub *fanClub) return fanClub->gotInitialFans; } -void Special_SetPlayerGotFirstFans(void) +void Script_SetPlayerGotFirstFans(void) { SetPlayerGotFirstFans(TRAINER_FAN_CLUB); } @@ -2456,7 +2456,7 @@ static void SetPlayerGotFirstFans(struct TrainerFanClub *fanClub) fanClub->gotInitialFans = TRUE; } -u8 Special_TryGainNewFanFromCounter(void) +u8 Script_TryGainNewFanFromCounter(void) { return TryGainNewFanFromCounter(TRAINER_FAN_CLUB, gSpecialVar_0x8004); } diff --git a/src/reshow_battle_screen.c b/src/reshow_battle_screen.c index 8eeb3bb55..25470fc43 100644 --- a/src/reshow_battle_screen.c +++ b/src/reshow_battle_screen.c @@ -36,17 +36,17 @@ void ReshowBattleScreenAfterMenu(void) if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) { if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - HelpSystem_SetSomeVariable2(0x19); + SetHelpContext(HELPCONTEXT_TRAINER_BATTLE_DOUBLE); else - HelpSystem_SetSomeVariable2(0x18); + SetHelpContext(HELPCONTEXT_TRAINER_BATTLE_SINGLE); } else if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) { - HelpSystem_SetSomeVariable2(0x1A); + SetHelpContext(HELPCONTEXT_SAFARI_BATTLE); } else { - HelpSystem_SetSomeVariable2(0x17); + SetHelpContext(HELPCONTEXT_WILD_BATTLE); } } SetMainCallback2(CB2_ReshowBattleScreenAfterMenu); diff --git a/src/roamer.c b/src/roamer.c index cf30dc3d2..25b5109b0 100644 --- a/src/roamer.c +++ b/src/roamer.c @@ -61,7 +61,7 @@ void ClearRoamerData(void) #define GetRoamerSpecies() ({\ u16 a;\ - switch (ScrSpecial_GetStarter())\ + switch (GetStarterSpecies())\ {\ default:\ a = SPECIES_RAIKOU;\ diff --git a/src/scrcmd.c b/src/scrcmd.c index 77b87aaa8..3f1927cbf 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1892,7 +1892,7 @@ bool8 ScrCmd_trainerbattle(struct ScriptContext *ctx) bool8 ScrCmd_dotrainerbattle(struct ScriptContext *ctx) { - BattleSetup_StartTrainerBattle(); + StartTrainerBattle(); return TRUE; } @@ -1944,7 +1944,7 @@ bool8 ScrCmd_setwildbattle(struct ScriptContext *ctx) bool8 ScrCmd_dowildbattle(struct ScriptContext *ctx) { - BattleSetup_StartScriptedWildBattle(); + StartScriptedWildBattle(); ScriptContext1_Stop(); return TRUE; } @@ -2111,7 +2111,7 @@ bool8 ScrCmd_setmetatile(struct ScriptContext *ctx) if (!v8) MapGridSetMetatileIdAt(x, y, tileId); else - MapGridSetMetatileIdAt(x, y, tileId | 0xC00); + MapGridSetMetatileIdAt(x, y, tileId | METATILE_COLLISION_MASK); return FALSE; } diff --git a/src/script_menu.c b/src/script_menu.c index 12e89832c..a4745ee10 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -944,7 +944,7 @@ static void Hask_MultichoiceGridMenu_HandleInput(u8 taskId) EnableBothScriptContexts(); } -bool8 ScrSpecial_CreatePCMenu(void) +bool8 CreatePCMenu(void) { if (FuncIsActiveTask(Task_MultichoiceMenu_HandleInput) == TRUE) return FALSE; @@ -1116,7 +1116,7 @@ void Task_WaitMuseumFossilPic(u8 taskId) } } -bool8 Special_OpenMuseumFossilPic(void) +bool8 OpenMuseumFossilPic(void) { u8 spriteId; u8 taskId; @@ -1149,7 +1149,7 @@ bool8 Special_OpenMuseumFossilPic(void) return TRUE; } -bool8 Special_CloseMuseumFossilPic(void) +bool8 CloseMuseumFossilPic(void) { u8 taskId = FindTaskIdByFunc(Task_WaitMuseumFossilPic); if (taskId == 0xFF) @@ -1197,7 +1197,7 @@ void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void) } } -void Special_DrawSeagallopDestinationMenu(void) +void DrawSeagallopDestinationMenu(void) { // 8004 = Starting location // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) @@ -1249,7 +1249,7 @@ void Special_DrawSeagallopDestinationMenu(void) } } -u16 Special_GetSelectedSeagallopDestination(void) +u16 GetSelectedSeagallopDestination(void) { // 8004 = Starting location // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 7c8604b8e..677759497 100644 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -117,7 +117,7 @@ static bool8 CheckPartyMonHasHeldItem(u16 item) return FALSE; } -bool8 GetNameOfEnigmaBerryInPlayerParty(void) +bool8 DoesPartyHaveEnigmaBerry(void) { bool8 hasItem = CheckPartyMonHasHeldItem(ITEM_ENIGMA_BERRY); if (hasItem == TRUE) diff --git a/src/seagallop.c b/src/seagallop.c index 3257819aa..1e2234b9c 100644 --- a/src/seagallop.c +++ b/src/seagallop.c @@ -16,7 +16,7 @@ #include "field_weather.h" #include "constants/songs.h" #include "constants/maps.h" -#include "seagallop.h" +#include "constants/seagallop.h" #define TILESTAG_FERRY 3000 #define TILESTAG_WAKE 4000 diff --git a/src/ss_anne.c b/src/ss_anne.c index 401f4e235..df04d8c66 100644 --- a/src/ss_anne.c +++ b/src/ss_anne.c @@ -79,7 +79,7 @@ static const struct SpriteTemplate sSmokeSpriteTemplate = { SmokeSpriteCallback }; -void Special_SSAnneDepartureCutscene(void) +void DoSSAnneDepartureCutscene(void) { u8 taskId; diff --git a/src/start_menu.c b/src/start_menu.c index bdcf68b51..cf8be2de9 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -562,8 +562,8 @@ static bool8 StartMenuLinkPlayerCallback(void) static bool8 StartCB_Save1(void) { - HelpSystem_BackupSomeVariable(); - HelpSystem_SetSomeVariable2(12); + BackupHelpContext(); + SetHelpContext(HELPCONTEXT_SAVE); StartMenu_PrepareForSave(); sStartMenuCallback = StartCB_Save2; return FALSE; @@ -579,19 +579,19 @@ static bool8 StartCB_Save2(void) ClearDialogWindowAndFrameToTransparent(0, TRUE); sub_80696C0(); ScriptContext2_Disable(); - HelpSystem_RestoreSomeVariable(); + RestoreHelpContext(); return TRUE; case SAVECB_RETURN_CANCEL: ClearDialogWindowAndFrameToTransparent(0, FALSE); DrawStartMenuInOneGo(); - HelpSystem_RestoreSomeVariable(); + RestoreHelpContext(); sStartMenuCallback = StartCB_HandleInput; break; case SAVECB_RETURN_ERROR: ClearDialogWindowAndFrameToTransparent(0, TRUE); sub_80696C0(); ScriptContext2_Disable(); - HelpSystem_RestoreSomeVariable(); + RestoreHelpContext(); return TRUE; } return FALSE; @@ -614,8 +614,8 @@ static u8 RunSaveDialogCB(void) void Field_AskSaveTheGame(void) { - HelpSystem_BackupSomeVariable(); - HelpSystem_SetSomeVariable2(12); + BackupHelpContext(); + SetHelpContext(HELPCONTEXT_SAVE); StartMenu_PrepareForSave(); CreateTask(task50_save_game, 80); } @@ -645,7 +645,7 @@ static void task50_save_game(u8 taskId) } DestroyTask(taskId); EnableBothScriptContexts(); - HelpSystem_RestoreSomeVariable(); + RestoreHelpContext(); } static void CloseSaveMessageWindow(void) diff --git a/src/teachy_tv.c b/src/teachy_tv.c index 1467131b0..1d49ee3d9 100644 --- a/src/teachy_tv.c +++ b/src/teachy_tv.c @@ -500,7 +500,7 @@ static void TeachyTvMainCallback(void) ScheduleBgCopyTilemapToVram(1); ScheduleBgCopyTilemapToVram(2); ScheduleBgCopyTilemapToVram(3); - HelpSystem_SetSomeVariable(9); // help system something + SetHelpContextDontCheckBattle(HELPCONTEXT_BAG); BlendPalettes(0xFFFFFFFF, 0x10, 0); BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0); SetVBlankCallback(TeachyTvVblankHandler); diff --git a/src/title_screen.c b/src/title_screen.c index af78893b9..0ff0a6b96 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -575,7 +575,7 @@ static void SetTitleScreenScene_Run(s16 * data) switch (data[1]) { case 0: - HelpSystem_SetSomeVariable2(1); + SetHelpContext(HELPCONTEXT_TITLE_SCREEN); CreateTask(Task_TitleScreen_BlinkPressStart, 0); CreateTask(Task_FlameOrLeafSpawner, 5); SetGpuRegsForTitleScreenRun(); diff --git a/src/trainer_card.c b/src/trainer_card.c index 600035613..df116d379 100644 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -570,7 +570,7 @@ static void Task_TrainerCard(u8 taskId) if (JOY_NEW(A_BUTTON)) { - HelpSystem_SetSomeVariable2(11); + SetHelpContext(HELPCONTEXT_TRAINER_CARD_BACK); FlipTrainerCard(); PlaySE(SE_CARD1); sTrainerCardDataPtr->mainState = STATE_WAIT_FLIP_TO_BACK; @@ -609,7 +609,7 @@ static void Task_TrainerCard(u8 taskId) } else { - HelpSystem_SetSomeVariable2(10); + SetHelpContext(HELPCONTEXT_TRAINER_CARD_FRONT); FlipTrainerCard(); sTrainerCardDataPtr->mainState = STATE_WAIT_FLIP_TO_FRONT; PlaySE(SE_CARD1); @@ -1042,7 +1042,7 @@ static void InitBgsAndWindows(void) static void SetTrainerCardCB2(void) { SetMainCallback2(CB2_TrainerCard); - HelpSystem_SetSomeVariable2(10); + SetHelpContext(HELPCONTEXT_TRAINER_CARD_FRONT); } static void SetUpTrainerCardTask(void) diff --git a/src/trainer_see.c b/src/trainer_see.c index 06fd60442..64e2f8e5a 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -544,7 +544,7 @@ void MovementAction_RevealTrainer_RunTrainerSeeFuncList(struct ObjectEvent *var) StoreWordInTwoHalfwords((u16 *)&gTasks[CreateTask(Task_RevealTrainer_RunTrainerSeeFuncList, 0)].data[1], (u32)var); } -void ScrSpecial_EndTrainerApproach(void) +void EndTrainerApproach(void) { StartTrainerApproachWithFollowupTask(Task_DestroyTrainerApproachTask); } diff --git a/src/vs_seeker.c b/src/vs_seeker.c index f60e22f96..b44214ec0 100644 --- a/src/vs_seeker.c +++ b/src/vs_seeker.c @@ -27,6 +27,13 @@ #include "constants/items.h" #include "constants/quest_log.h" +enum +{ + VSSEEKER_NOT_CHARGED, + VSSEEKER_NO_ONE_IN_RANGE, + VSSEEKER_CAN_USE, +}; + typedef enum { VSSEEKER_RESPONSE_NO_RESPONSE, @@ -735,17 +742,17 @@ void Task_VsSeeker_0(u8 taskId) sVsSeeker = AllocZeroed(sizeof(struct VsSeekerStruct)); GatherNearbyTrainerInfo(); respval = CanUseVsSeeker(); - if (respval == 0) + if (respval == VSSEEKER_NOT_CHARGED) { Free(sVsSeeker); - DisplayItemMessageOnField(taskId, 2, gUnknown_81C137C, sub_80A1E0C); + DisplayItemMessageOnField(taskId, 2, VSSeeker_Text_BatteryNotChargedNeedXSteps, sub_80A1E0C); } - else if (respval == 1) + else if (respval == VSSEEKER_NO_ONE_IN_RANGE) { Free(sVsSeeker); - DisplayItemMessageOnField(taskId, 2, gUnknown_81C13D6, sub_80A1E0C); + DisplayItemMessageOnField(taskId, 2, VSSeeker_Text_NoTrainersWithinRange, sub_80A1E0C); } - else if (respval == 2) + else if (respval == VSSEEKER_CAN_USE) { ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, 0, gSpecialVar_ItemId, 0xffff); FieldEffectStart(FLDEFF_USE_VS_SEEKER); @@ -814,13 +821,13 @@ static void Task_VsSeeker_3(u8 taskId) { if (ScriptMovement_IsObjectMovementFinished(0xFF, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup)) { - if (sVsSeeker->responseCode == 0) + if (sVsSeeker->responseCode == VSSEEKER_RESPONSE_NO_RESPONSE) { - DisplayItemMessageOnField(taskId, 2, gUnknown_81C1429, sub_80A1E0C); + DisplayItemMessageOnField(taskId, 2, VSSeeker_Text_TrainersNotReady, sub_80A1E0C); } else { - if (sVsSeeker->responseCode == 2) + if (sVsSeeker->responseCode == VSSEEKER_RESPONSE_FOUND_REMATCHES) StartAllRespondantIdleMovements(); ClearDialogWindowAndFrame(0, 1); sub_80696C0(); @@ -831,20 +838,20 @@ static void Task_VsSeeker_3(u8 taskId) } } -u8 CanUseVsSeeker(void) +static u8 CanUseVsSeeker(void) { u8 vsSeekerChargeSteps = gSaveBlock1Ptr->trainerRematchStepCounter; if (vsSeekerChargeSteps == 100) { if (GetRematchableTrainerLocalId() == 0xFF) - return 1; + return VSSEEKER_NO_ONE_IN_RANGE; else - return 2; + return VSSEEKER_CAN_USE; } else { TV_PrintIntToStringVar(0, 100 - vsSeekerChargeSteps); - return 0; + return VSSEEKER_NOT_CHARGED; } } @@ -928,11 +935,11 @@ static u8 GetVsSeekerResponseInArea(const VsSeekerData * a0) PlaySE(SE_PIN); FlagSet(FLAG_SYS_VS_SEEKER_CHARGING); sub_810C640(); - return 2; + return VSSEEKER_RESPONSE_FOUND_REMATCHES; } if (sVsSeeker->trainerHasNotYetBeenFought) - return 1; - return 0; + return VSSEEKER_RESPONSE_UNFOUGHT_TRAINERS; + return VSSEEKER_RESPONSE_NO_RESPONSE; } void sub_810CB90(void) @@ -1079,7 +1086,7 @@ s32 GetRematchTrainerId(u16 a0) return sVsSeekerData[i].trainerIdxs[j]; } -u8 ScrSpecial_GetTrainerEyeRematchFlag(void) // unreferenced, or reference not disassembled +u8 IsTrainerReadyForRematch(void) { return sub_810CED0(sVsSeekerData, gTrainerBattleOpponent_A); } diff --git a/src/wild_encounter.c b/src/wild_encounter.c index b3605db47..cf495db56 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -387,7 +387,7 @@ bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavi return FALSE; } - BattleSetup_StartRoamerBattle(); + StartRoamerBattle(); return TRUE; } else @@ -396,7 +396,7 @@ bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavi // try a regular wild land encounter if (TryGenerateWildMon(gWildMonHeaders[headerId].landMonsInfo, WILD_AREA_LAND, WILD_CHECK_REPEL) == TRUE) { - BattleSetup_StartWildBattle(); + StartWildBattle(); return TRUE; } else @@ -426,14 +426,14 @@ bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavi return FALSE; } - BattleSetup_StartRoamerBattle(); + StartRoamerBattle(); return TRUE; } else // try a regular surfing encounter { if (TryGenerateWildMon(gWildMonHeaders[headerId].waterMonsInfo, WILD_AREA_WATER, WILD_CHECK_REPEL) == TRUE) { - BattleSetup_StartWildBattle(); + StartWildBattle(); return TRUE; } else @@ -447,7 +447,7 @@ bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavi return FALSE; } -void ScrSpecial_RockSmashWildEncounter(void) +void RockSmashWildEncounter(void) { u16 headerIdx = GetCurrentMapWildMonHeaderId(); if (headerIdx == 0xFFFF) @@ -458,7 +458,7 @@ void ScrSpecial_RockSmashWildEncounter(void) gSpecialVar_Result = FALSE; else if (TryGenerateWildMon(gWildMonHeaders[headerIdx].rockSmashMonsInfo, WILD_AREA_ROCKS, WILD_CHECK_REPEL) == TRUE) { - BattleSetup_StartWildBattle(); + StartWildBattle(); gSpecialVar_Result = TRUE; } else @@ -478,7 +478,7 @@ bool8 SweetScentWildEncounter(void) { if (TryStartRoamerEncounter() == TRUE) { - BattleSetup_StartRoamerBattle(); + StartRoamerBattle(); return TRUE; } @@ -487,14 +487,14 @@ bool8 SweetScentWildEncounter(void) TryGenerateWildMon(gWildMonHeaders[headerId].landMonsInfo, WILD_AREA_LAND, 0); - BattleSetup_StartWildBattle(); + StartWildBattle(); return TRUE; } else if (MapGridGetMetatileAttributeAt(x, y, 4) == 2) { if (TryStartRoamerEncounter() == TRUE) { - BattleSetup_StartRoamerBattle(); + StartRoamerBattle(); return TRUE; } @@ -502,7 +502,7 @@ bool8 SweetScentWildEncounter(void) return FALSE; TryGenerateWildMon(gWildMonHeaders[headerId].waterMonsInfo, WILD_AREA_WATER, 0); - BattleSetup_StartWildBattle(); + StartWildBattle(); return TRUE; } } @@ -524,7 +524,7 @@ void FishingWildEncounter(u8 rod) { GenerateFishingEncounter(gWildMonHeaders[GetCurrentMapWildMonHeaderId()].fishingMonsInfo, rod); IncrementGameStat(GAME_STAT_FISHING_CAPTURES); - BattleSetup_StartWildBattle(); + StartWildBattle(); } u16 GetLocalWildMon(bool8 *isWaterMon) diff --git a/src/wild_pokemon_area.c b/src/wild_pokemon_area.c index 3c5afaf25..28c07abc7 100644 --- a/src/wild_pokemon_area.c +++ b/src/wild_pokemon_area.c @@ -244,7 +244,7 @@ static s32 CountRoamerNests(u16 species, struct Subsprite * subsprites) roamerIdx = GetRoamerIndex(species); if (roamerIdx < 0) return 0; - if (sRoamerPairs[roamerIdx].starter != ScrSpecial_GetStarter()) + if (sRoamerPairs[roamerIdx].starter != GetStarterSpecies()) return 0; roamerLocation = GetRoamerLocationMapSectionId(); dexAreaEntryLUTidx = 0; diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index 7267d4ace..a284a6d16 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -171,7 +171,7 @@ static void VBlankCB_WirelessCommunicationScreen(void) TransferPlttBuffer(); } -void Special_WirelessCommunicationScreen(void) +void ShowWirelessCommunicationScreen(void) { SetMainCallback2(CB2_InitWirelessCommunicationScreen); } |