diff options
Diffstat (limited to 'src')
39 files changed, 7988 insertions, 185 deletions
diff --git a/src/battle_bg.c b/src/battle_bg.c index df3818731..f493bafea 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -17,7 +17,7 @@ #include "strings.h" #include "window.h" #include "text_window.h" -#include "new_menu_helpers.h" +#include "menu.h" #include "battle_setup.h" struct BattleBackground diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index d95527965..290236f4a 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -12,6 +12,7 @@ #include "util.h" #include "main.h" #include "constants/songs.h" +#include "constants/trainers.h" #include "sound.h" #include "window.h" #include "m4a.h" @@ -33,7 +34,7 @@ extern struct UnusedControllerStruct gUnknown_02022D0C; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct BattleMove gBattleMoves[]; -extern const u8 gUnknown_0831F578[]; +extern const u8 gFacilityClassToPicIndex[]; extern void sub_8172EF0(u8 bank, struct Pokemon *mon); extern void sub_806A068(u16, u8); @@ -1256,17 +1257,17 @@ static void LinkOpponentHandleDrawTrainerPic(void) || (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_LEAF_GREEN) { if (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender != 0) - trainerPicId = gUnknown_0831F578[0x4F]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_10]; else - trainerPicId = gUnknown_0831F578[0x4E]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_9]; } else if ((gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_RUBY || (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_SAPPHIRE) { if (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender != 0) - trainerPicId = gUnknown_0831F578[0x51]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_12]; else - trainerPicId = gUnknown_0831F578[0x50]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_11]; } else { @@ -1285,17 +1286,17 @@ static void LinkOpponentHandleDrawTrainerPic(void) || (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_LEAF_GREEN) { if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != 0) - trainerPicId = gUnknown_0831F578[0x4F]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_10]; else - trainerPicId = gUnknown_0831F578[0x4E]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_9]; } else if ((gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_RUBY || (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_SAPPHIRE) { if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != 0) - trainerPicId = gUnknown_0831F578[0x51]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_12]; else - trainerPicId = gUnknown_0831F578[0x50]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_11]; } else { diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index d549856f2..076a4d342 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -19,7 +19,7 @@ extern const union AffineAnimCmd *const gUnknown_082FF694[]; extern const union AnimCmd *const gUnknown_082FF70C[]; extern const union AnimCmd *const *const gMonAnimationsSpriteAnimsPtrTable[NUM_SPECIES]; extern const union AnimCmd *const *const gUnknown_0830536C[]; -extern const u8 gUnknown_0831F578[]; +extern const u8 gFacilityClassToPicIndex[]; // Static type declarations @@ -421,9 +421,9 @@ u8 sub_818D97C(u8 a0, u8 a1) switch (a0) { default: - return gUnknown_0831F578[0x3F]; + return gFacilityClassToPicIndex[0x3F]; case 0: - return gUnknown_0831F578[0x3C]; + return gFacilityClassToPicIndex[0x3C]; } } return a0; diff --git a/src/battle_interface.c b/src/battle_interface.c index 3be01f8dc..c554863c5 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -2561,17 +2561,17 @@ u8 GetHPBarLevel(s16 hp, s16 maxhp) static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 arg3, u32 *windowId) { u16 winId; - struct TextColor color; + u8 color[3]; struct WindowTemplate winTemplate = sHealthboxWindowTemplate; winId = AddWindow(&winTemplate); FillWindowPixelBuffer(winId, (arg3 << 4) | (arg3)); - color.fgColor = arg3; - color.bgColor = 1; - color.shadowColor = 3; + color[0] = arg3; + color[1] = 1; + color[2] = 3; - AddTextPrinterParameterized2(winId, 0, x, y, 0, 0, &color, -1, str); + AddTextPrinterParameterized2(winId, 0, x, y, 0, 0, color, -1, str); *windowId = winId; return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA)); diff --git a/src/battle_message.c b/src/battle_message.c index 36ff3ecc7..ff608b6c5 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2425,7 +2425,7 @@ void BattleHandleAddTextPrinter(const u8 *text, u8 arg1) textSubPrinter.letterSpacing = r8[(12 * arg1) + 4]; textSubPrinter.lineSpacing = r8[(12 * arg1) + 5]; textSubPrinter.fontColor_l = 0; - textSubPrinter.fontColor_h = r8[(12 * arg1) + 7]; + textSubPrinter.fgColor = r8[(12 * arg1) + 7]; textSubPrinter.bgColor = r8[(12 * arg1) + 8]; textSubPrinter.shadowColor = r8[(12 * arg1) + 9]; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e7ee19c23..e8f2a5508 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -891,11 +891,11 @@ static const u16 sRarePickupItems[] = ITEM_FULL_RESTORE, ITEM_ETHER, ITEM_WHITE_HERB, - ITEM_TM44, + ITEM_TM44_REST, ITEM_ELIXIR, - ITEM_TM01, + ITEM_TM01_FOCUS_PUNCH, ITEM_LEFTOVERS, - ITEM_TM26, + ITEM_TM26_EARTHQUAKE, }; static const u8 sPickupProbabilities[] = @@ -6667,7 +6667,7 @@ static void PutLevelAndGenderOnLvlUpBox(void) subPrinter.letterSpacing = 0; subPrinter.lineSpacing = 0; subPrinter.fontColor_l = TEXT_COLOR_TRANSPARENT; - subPrinter.fontColor_h = TEXT_COLOR_WHITE; + subPrinter.fgColor = TEXT_COLOR_WHITE; subPrinter.bgColor = TEXT_COLOR_TRANSPARENT; subPrinter.shadowColor = TEXT_COLOR_DARK_GREY; diff --git a/src/berry_blender.c b/src/berry_blender.c index c7f465967..45e3acd24 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -18,7 +18,6 @@ #include "event_data.h" #include "main.h" #include "link.h" -#include "new_menu_helpers.h" #include "item_menu_icons.h" #include "berry.h" #include "item.h" @@ -3489,7 +3488,7 @@ void ShowBerryBlenderRecordWindow(void) winTemplate = sBlenderRecordWindowTemplate; gResultsWindowId = AddWindow(&winTemplate); - sub_81973FC(gResultsWindowId, 0); + NewMenuHelpers_DrawStdWindowFrame(gResultsWindowId, 0); FillWindowPixelBuffer(gResultsWindowId, 0x11); xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 0x90); @@ -3574,35 +3573,35 @@ static bool32 TryAddContestLinkTvShow(struct Pokeblock *pokeblock, struct TvBlen static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s32 speed, s32 caseId) { - struct TextColor txtColor; + u8 txtColor[3]; u32 letterSpacing = 0; switch (caseId) { case 0: case 3: - txtColor.fgColor = 1; - txtColor.bgColor = 2; - txtColor.shadowColor = 3; + txtColor[0] = 1; + txtColor[1] = 2; + txtColor[2] = 3; break; case 1: - txtColor.fgColor = 0; - txtColor.bgColor = 2; - txtColor.shadowColor = 3; + txtColor[0] = 0; + txtColor[1] = 2; + txtColor[2] = 3; break; case 2: - txtColor.fgColor = 0; - txtColor.bgColor = 4; - txtColor.shadowColor = 5; + txtColor[0] = 0; + txtColor[1] = 4; + txtColor[2] = 5; break; } if (caseId != 3) { - FillWindowPixelBuffer(windowId, txtColor.fgColor | (txtColor.fgColor << 4)); + FillWindowPixelBuffer(windowId, txtColor[0] | (txtColor[0] << 4)); } - AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, 1, &txtColor, speed, string); + AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, 1, txtColor, speed, string); } static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed) diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 542622e89..f6a5895a9 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -133,7 +133,7 @@ extern const u8 gMultiBootProgram_BerryGlitchFix_End[]; // .text -void InitBerryFixProgram(void) +void CB2_InitBerryFixProgram(void) { DisableInterrupts(0xFFFF); EnableInterrupts(0x0001); diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index 1e029bece..f86f350bf 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -93,7 +93,7 @@ static const struct BgTemplate sBackgroundTemplates[] = static const u16 sFontPalette[] = INCBIN_U16("graphics/interface/berry_tag_screen.gbapal"); -static const struct TextColor sTextColors[] = +static const u8 sTextColors[2][3] = { {0, 2, 3}, {15, 14, 13} @@ -343,7 +343,7 @@ static void HandleInitWindows(void) static void PrintTextInBerryTagScreen(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed, u8 colorStructId) { - AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, &sTextColors[colorStructId], speed, text); + AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, sTextColors[colorStructId], speed, text); } static void AddBerryTagTextToBg0(void) diff --git a/src/coins.c b/src/coins.c index 50c31cac0..12e0bd4ef 100644 --- a/src/coins.c +++ b/src/coins.c @@ -4,7 +4,6 @@ #include "window.h" #include "strings.h" #include "string_util.h" -#include "new_menu_helpers.h" #include "menu.h" #include "international_string_util.h" diff --git a/src/daycare.c b/src/daycare.c index 59ee562bd..89c0a48d8 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -43,7 +43,7 @@ extern u16 ItemIdToBattleMoveId(u16); extern s32 ListMenuHandleInputGetItemId(u8); extern void sub_81AE6C8(u8, u16*, u16*); extern void sub_819746C(u8, bool8); -extern void sub_81973FC(u8, bool8); +extern void NewMenuHelpers_DrawStdWindowFrame(u8, bool8); extern void sub_81B9328(void); extern void sub_81AF078(u32, bool8, struct ListMenu *); extern void c2_exit_to_overworld_2_switch(void); @@ -413,7 +413,7 @@ static u16 GetEggSpecies(u16 species) { for (k = 0; k < EVOS_PER_MON; k++) { - if (gEvolutionTable[j].evolutions[k].targetSpecies == species) + if (gEvolutionTable[j][k].targetSpecies == species) { species = j; found = TRUE; @@ -694,7 +694,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru { for (j = 0; j < NUM_TECHNICAL_MACHINES + NUM_HIDDEN_MACHINES; j++) { - if (sHatchedEggFatherMoves[i] == ItemIdToBattleMoveId(ITEM_TM01 + j) && CanMonLearnTMHM(egg, j)) + if (sHatchedEggFatherMoves[i] == ItemIdToBattleMoveId(ITEM_TM01_FOCUS_PUNCH + j) && CanMonLearnTMHM(egg, j)) { if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == 0xffff) DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFatherMoves[i]); @@ -1212,7 +1212,7 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y) gTextFlags.flag_1 = 0; printer.letterSpacing = 0; printer.lineSpacing = 1; - printer.fontColor_h = 2; + printer.fgColor = 2; printer.bgColor = 1; printer.shadowColor = 3; @@ -1296,7 +1296,7 @@ void ShowDaycareLevelMenu(void) u8 daycareMenuTaskId; windowId = AddWindow(&sDaycareLevelMenuWindowTemplate); - sub_81973FC(windowId, FALSE); + NewMenuHelpers_DrawStdWindowFrame(windowId, FALSE); menuTemplate = sDaycareListMenuLevelTemplate; menuTemplate.unk_10 = windowId; diff --git a/src/decoration.c b/src/decoration.c index 68dcb26fb..db19ff4c6 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -20,7 +20,7 @@ #include "field_map_obj.h" #include "list_menu.h" #include "menu_helpers.h" -#include "new_menu_helpers.h" +#include "menu.h" #include "menu_indicators.h" #include "sound.h" #include "event_scripts.h" @@ -727,7 +727,7 @@ void sub_81271CC(u8 taskId) { sub_8126A58(1); sub_8126A88(); - sub_81973C4(0, 0); + NewMenuHelpers_DrawDialogueFrame(0, 0); sub_8126C08(); gTasks[taskId].func = sub_8126B80; } @@ -2712,7 +2712,7 @@ void sub_812A334(void) u8 taskId; pal_fill_black(); - sub_81973C4(0, 1); + NewMenuHelpers_DrawDialogueFrame(0, 1); sub_8126ABC(); taskId = CreateTask(sub_812A2C4, 8); gTasks[taskId].data[2] = 0; diff --git a/src/diploma.c b/src/diploma.c index 89447c5ba..289e0e043 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -17,7 +17,7 @@ extern int decompress_and_copy_tile_data_to_vram(u8 bg_id, void *src, int size, extern bool8 free_temp_tile_data_buffers_if_possible(void); extern void sub_80861E8(void); // rom4 extern bool16 sub_80C0944(void); -extern void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, s8 speed, u8 *str); +extern void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 *color, s8 speed, u8 *str); extern u16 gUnknown_0860F074[]; @@ -208,12 +208,7 @@ static void InitDiplomaWindow(void) static void PrintDiplomaText(u8 *text, u8 var1, u8 var2) { - struct TextColor color = - { - .fgColor = 0, - .bgColor = 2, - .shadowColor = 3, - }; + u8 color[3] = {0, 2, 3}; - AddTextPrinterParameterized2(0, 1, var1, var2, 0, 0, &color, -1, text); + AddTextPrinterParameterized2(0, 1, var1, var2, 0, 0, color, -1, text); } diff --git a/src/dma3_manager.c b/src/dma3_manager.c index 3832c3663..28df9d932 100644 --- a/src/dma3_manager.c +++ b/src/dma3_manager.c @@ -204,7 +204,7 @@ s16 RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode) return -1; // no free DMA request was found } -int CheckForSpaceForDma3Request(s16 index) +s16 CheckForSpaceForDma3Request(s16 index) { int i = 0; diff --git a/src/egg_hatch.c b/src/egg_hatch.c index e8f22e903..5a2fe5ca2 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -41,7 +41,7 @@ struct EggHatchData u8 unused_9; u8 unused_A; u16 species; - struct TextColor textColor; + u8 textColor[3]; }; extern struct SpriteTemplate gUnknown_0202499C; @@ -863,10 +863,10 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) { FillWindowPixelBuffer(windowId, 0xFF); - sEggHatchData->textColor.fgColor = 0; - sEggHatchData->textColor.bgColor = 5; - sEggHatchData->textColor.shadowColor = 6; - AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, &sEggHatchData->textColor, speed, string); + sEggHatchData->textColor[0] = 0; + sEggHatchData->textColor[1] = 5; + sEggHatchData->textColor[2] = 6; + AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, sEggHatchData->textColor, speed, string); } u8 GetEggStepsToSubtract(void) diff --git a/src/evolution_scene.c b/src/evolution_scene.c index e7a9d7cbd..f38f9f19c 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -573,16 +573,16 @@ static void CB2_TradeEvolutionSceneUpdate(void) static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon) { u32 data = 0; - if (gEvolutionTable[preEvoSpecies].evolutions[0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < 6) + if (gEvolutionTable[preEvoSpecies][0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < 6) { s32 i; - struct Pokemon* Shedinja = &gPlayerParty[gPlayerPartyCount]; - const struct EvolutionData* evoTable; - const struct EvolutionData* evos; + struct Pokemon* shedinja = &gPlayerParty[gPlayerPartyCount]; + const struct Evolution *evos; + const struct Evolution *evos2; CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon)); - SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, (&gEvolutionTable[preEvoSpecies].evolutions[1].targetSpecies)); - SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, (gSpeciesNames[gEvolutionTable[preEvoSpecies].evolutions[1].targetSpecies])); + SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, (&gEvolutionTable[preEvoSpecies][1].targetSpecies)); + SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, (gSpeciesNames[gEvolutionTable[preEvoSpecies][1].targetSpecies])); SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, (&data)); SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, (&data)); SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_10, (&data)); @@ -600,15 +600,16 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon) CalculatePlayerPartyCount(); // can't match it otherwise, ehh - evoTable = gEvolutionTable; - evos = evoTable + preEvoSpecies; - GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos->evolutions[1].targetSpecies), FLAG_SET_SEEN); - GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos->evolutions[1].targetSpecies), FLAG_SET_CAUGHT); + evos2 = gEvolutionTable[0]; + evos = evos2 + EVOS_PER_MON * preEvoSpecies; - if (GetMonData(Shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA - && GetMonData(Shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE + GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos[1].targetSpecies), FLAG_SET_SEEN); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos[1].targetSpecies), FLAG_SET_CAUGHT); + + if (GetMonData(shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA + && GetMonData(shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE && GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NINJASK) - SetMonData(Shedinja, MON_DATA_NICKNAME, Text_ShedinjaJapaneseName); + SetMonData(shedinja, MON_DATA_NICKNAME, Text_ShedinjaJapaneseName); } } diff --git a/src/field_message_box.c b/src/field_message_box.c index 9570040eb..8ca291e33 100755 --- a/src/field_message_box.c +++ b/src/field_message_box.c @@ -1,9 +1,10 @@ #include "global.h" -#include "new_menu_helpers.h" +#include "menu.h" #include "string.h" #include "string_util.h" #include "task.h" #include "text.h" +#include "battle_frontier_1.h" EWRAM_DATA u8 gUnknown_020375BC = 0; @@ -30,7 +31,7 @@ void sub_8098154(u8 taskId) task->data[0]++; break; case 1: - sub_81973C4(0, 1); + NewMenuHelpers_DrawDialogueFrame(0, 1); task->data[0]++; break; case 2: @@ -143,7 +144,7 @@ bool8 IsFieldMessageBoxHidden(void) void sub_8098358(void) { task_del_textbox(); - sub_81973FC(0, 1); + NewMenuHelpers_DrawStdWindowFrame(0, 1); gUnknown_020375BC = 0; } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index e7caf9316..6dda6ad9c 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -25,7 +25,7 @@ #include "random.h" #include "event_data.h" #include "overworld.h" -#include "new_menu_helpers.h" +#include "menu.h" struct HallofFameMon { @@ -81,7 +81,7 @@ extern const u8 gText_MainMenuTime[]; extern const u8 gContestConfetti_Gfx[]; extern const u8 gContestConfetti_Pal[]; -extern void sub_81973C4(u8, u8); +extern void NewMenuHelpers_DrawDialogueFrame(u8, u8); extern void sub_8175620(void); extern u8 TrySavingData(u8); extern u8 sub_818D3E4(u16 species, u32 trainerId, u32 personality, u8 flags, s16 x, s16 y, u8, u16); @@ -538,7 +538,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId) } *lastSavedTeam = *sHofMonPtr; - sub_81973C4(0, 0); + NewMenuHelpers_DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_Hof_TrySaveData; @@ -745,7 +745,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); HallOfFame_PrintPlayerInfo(1, 2); - sub_81973C4(0, 0); + NewMenuHelpers_DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, 1, gText_LeagueChamp, 0, NULL, 2, 1, 3); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_Hof_ExitOnKeyPressed; @@ -1114,7 +1114,7 @@ static void Task_HofPC_HandleExit(u8 taskId) static void Task_HofPC_PrintDataIsCorrupted(u8 taskId) { sub_8198180(gText_UnkCtrlF800Exit, 8, 1); - sub_81973C4(0, 0); + NewMenuHelpers_DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, 1, gText_HOFCorrupted, 0, NULL, 2, 1, 3); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_HofPC_ExitOnButtonPress; diff --git a/src/item_use.c b/src/item_use.c index 9a40e0aa5..1fdd925ac 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -780,7 +780,7 @@ void ItemUseOutOfBattle_RareCandy(u8 taskId) void ItemUseOutOfBattle_TMHM(u8 taskId) { - if (gSpecialVar_ItemId >= ITEM_HM01) + if (gSpecialVar_ItemId >= ITEM_HM01_CUT) DisplayItemMessage(taskId, 1, gText_BootedUpHM, sub_80FDF90); // HM else DisplayItemMessage(taskId, 1, gText_BootedUpTM, sub_80FDF90); // TM diff --git a/src/menu.c b/src/menu.c new file mode 100644 index 000000000..d06f950d3 --- /dev/null +++ b/src/menu.c @@ -0,0 +1,2414 @@ +#include "global.h" +#include "bg.h" +#include "window.h" +#include "palette.h" +#include "menu.h" +#include "constants/songs.h" +#include "main.h" +#include "sound.h" +#include "menu_helpers.h" +#include "malloc.h" +#include "task.h" +#include "dma3.h" +#include "string_util.h" +#include "pokemon_icon.h" +#include "constants/flags.h" +#include "event_data.h" +#include "pokedex.h" +#include "region_map.h" +#include "text_window.h" +#include "strings.h" +#include "graphics.h" + +#define DLG_WINDOW_PALETTE_NUM 15 +#define DLG_WINDOW_BASE_TILE_NUM 0x200 +#define STD_WINDOW_PALETTE_NUM 14 +#define STD_WINDOW_BASE_TILE_NUM 0x214 + +struct SomeUnkStruct_60F0D4 +{ + u8 unk1; + u8 unk2; + u16 unk3; +}; + +struct Menu +{ + u8 left; + u8 top; + s8 cursorPos; + s8 minCursorPos; + s8 maxCursorPos; + u8 windowId; + u8 fontId; + u8 optionWidth; + u8 optionHeight; + u8 horizontalCount; + u8 verticalCount; + bool8 APressMuted; +}; + +static EWRAM_DATA u8 gUnknown_0203CD8C = 0; +static EWRAM_DATA u8 gUnknown_0203CD8D = 0; +static EWRAM_DATA struct Menu gUnknown_0203CD90 = {0}; +static EWRAM_DATA u16 gUnknown_0203CD9C = 0; +static EWRAM_DATA u8 gUnknown_0203CD9E = 0; +static EWRAM_DATA u8 gUnknown_0203CD9F = 0; +static EWRAM_DATA u8 gUnknown_0203CDA0 = 0; +static EWRAM_DATA u16 sFiller = 0; // needed to align +static EWRAM_DATA bool8 gUnknown_0203CDA4[4] = {FALSE}; +static EWRAM_DATA u16 gUnknown_0203CDA8 = 0; +static EWRAM_DATA void *gUnknown_0203CDAC[0x20] = {NULL}; + +const u16 gUnknown_0860F074[] = INCBIN_U16("graphics/interface/860F074.gbapal"); +static const u8 gUnknown_0860F094[] = { 8, 4, 1 }; + +static const struct WindowTemplate gUnknown_0860F098[] = +{ + { 0x00, 0x02, 0x0F, 0x1B, 0x04, 0x0F, 0x194 }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate gUnknown_0860F0A8 = +{ + 0x00, 0x15, 0x09, 0x05, 0x04, 0x0F, 0x125 +}; + +const u16 gUnknown_0860F0B0[] = INCBIN_U16("graphics/interface/860F0B0.gbapal"); +const u8 gUnknown_0860F0D0[] = { 15, 1, 2 }; +const struct SomeUnkStruct_60F0D4 gUnknown_0860F0D4[] = +{ + { 12, 12, 0x00 }, + { 32, 12, 0x20 }, + { 32, 12, 0x64 }, + { 32, 12, 0x60 }, + { 32, 12, 0x80 }, + { 32, 12, 0x48 }, + { 32, 12, 0x44 }, + { 32, 12, 0x6C }, + { 32, 12, 0x68 }, + { 32, 12, 0x88 }, + { 32, 12, 0xA4 }, + { 32, 12, 0x24 }, + { 32, 12, 0x28 }, + { 32, 12, 0x2C }, + { 32, 12, 0x40 }, + { 32, 12, 0x84 }, + { 32, 12, 0x4C }, + { 32, 12, 0xA0 }, + { 32, 12, 0x8C }, + { 42, 12, 0xA8 }, + { 42, 12, 0xC0 }, + { 42, 12, 0xC8 }, + { 42, 12, 0xE0 }, + { 42, 12, 0xE8 }, + { 8, 8, 0xAE }, + { 8, 8, 0xAF }, +}; + +// Forward declarations +extern void sub_81973A4(void); +extern void DrawStandardFrame(u8, u8, u8, u8, u8, u8); +extern void DrawDialogueFrame(u8, u8, u8, u8, u8, u8); +extern void sub_81977BC(u8, u8, u8, u8, u8, u8); +extern void sub_8197804(u8, u8, u8, u8, u8, u8); +extern void sub_8197BB4(u8, u8, u8, u8, u8, u8); +extern void sub_8197E30(u8, u8, u8, u8, u8, u8); +extern void DrawWindowBorder(u8, u8, u8, u8, u8, u8); +extern void sub_81980A8(u8, u8, u8, u8, u8, u8); +extern u8 MoveMenuCursor(s8); +extern u8 sub_8199134(s8, s8); +extern void sub_8199F74(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 letterSpacing, u8 lineSpacing); +extern void sub_8198C78(void); +extern void task_free_buf_after_copying_tile_data_to_vram(u8 taskId); + +void sub_81971D0(void) +{ + InitWindows(gUnknown_0860F098); + gUnknown_0203CD8C = 0xFF; + gUnknown_0203CD8D = 0xFF; +} + +void sub_81971F4(void) +{ + FreeAllWindowBuffers(); +} + +void sub_8197200(void) +{ + ChangeBgX(0, 0, 0); + ChangeBgY(0, 0, 0); + DeactivateAllTextPrinters(); + sub_81973A4(); +} + +u16 sub_8197224(void) +{ + RunTextPrinters(); + return IsTextPrinterActive(0); +} + +u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor) +{ + struct TextSubPrinter printer; + + printer.current_text_offset = str; + printer.windowId = windowId; + printer.fontId = fontId; + printer.x = 0; + printer.y = 1; + printer.currentX = 0; + printer.currentY = 1; + printer.letterSpacing = 0; + printer.lineSpacing = 0; + printer.fontColor_l = 0; + printer.fgColor = fgColor; + printer.bgColor = bgColor; + printer.shadowColor = shadowColor; + + gTextFlags.flag_1 = 0; + return AddTextPrinter(&printer, speed, callback); +} + +void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress) +{ + void (*callback)(struct TextSubPrinter *, u16) = NULL; + gTextFlags.flag_0 = allowSkippingDelayWithButtonPress; + AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), callback, 2, 1, 3); +} + +void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress) +{ + gTextFlags.flag_0 = allowSkippingDelayWithButtonPress; + AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), NULL, 2, 1, 3); +} + +void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed) +{ + gTextFlags.flag_0 = allowSkippingDelayWithButtonPress; + AddTextPrinterParameterized(0, 1, gStringVar4, speed, NULL, 2, 1, 3); +} + +void sub_81973A4(void) +{ + copy_textbox_border_tile_patterns_to_vram(0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10); + sub_809882C(0, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM * 0x10); +} + +void NewMenuHelpers_DrawDialogueFrame(u8 windowId, bool8 copyToVram) +{ + CallWindowFunction(windowId, DrawDialogueFrame); + FillWindowPixelBuffer(windowId, 0x11); + PutWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 copyToVram) +{ + CallWindowFunction(windowId, DrawStandardFrame); + FillWindowPixelBuffer(windowId, 0x11); + PutWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void sub_8197434(u8 windowId, bool8 copyToVram) +{ + CallWindowFunction(windowId, sub_8197804); + FillWindowPixelBuffer(windowId, 0x11); + ClearWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void sub_819746C(u8 windowId, bool8 copyToVram) +{ + CallWindowFunction(windowId, sub_81977BC); + FillWindowPixelBuffer(windowId, 0x11); + ClearWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +{ + int i; + + FillBgTilemapBufferRect(bg, + STD_WINDOW_BASE_TILE_NUM + 0, + tilemapLeft - 1, + tilemapTop - 1, + 1, + 1, + STD_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + STD_WINDOW_BASE_TILE_NUM + 1, + tilemapLeft, + tilemapTop - 1, + width, + 1, + STD_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + STD_WINDOW_BASE_TILE_NUM + 2, + tilemapLeft + width, + tilemapTop - 1, + 1, + 1, + STD_WINDOW_PALETTE_NUM); + + for (i = tilemapTop; i < tilemapTop + height; i++) + { + FillBgTilemapBufferRect(bg, + STD_WINDOW_BASE_TILE_NUM + 3, + tilemapLeft - 1, + i, + 1, + 1, + STD_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + STD_WINDOW_BASE_TILE_NUM + 5, + tilemapLeft + width, + i, + 1, + 1, + STD_WINDOW_PALETTE_NUM); + } + + FillBgTilemapBufferRect(bg, + STD_WINDOW_BASE_TILE_NUM + 6, + tilemapLeft - 1, + tilemapTop + height, + 1, + 1, + STD_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + STD_WINDOW_BASE_TILE_NUM + 7, + tilemapLeft, + tilemapTop + height, + width, + 1, + STD_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + STD_WINDOW_BASE_TILE_NUM + 8, + tilemapLeft + width, + tilemapTop + height, + 1, + 1, + STD_WINDOW_PALETTE_NUM); +} + +void DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +{ + FillBgTilemapBufferRect(bg, + DLG_WINDOW_BASE_TILE_NUM + 1, + tilemapLeft - 2, + tilemapTop - 1, + 1, + 1, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + DLG_WINDOW_BASE_TILE_NUM + 3, + tilemapLeft - 1, + tilemapTop - 1, + 1, + 1, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + DLG_WINDOW_BASE_TILE_NUM + 4, + tilemapLeft, + tilemapTop - 1, + width - 1, + 1, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + DLG_WINDOW_BASE_TILE_NUM + 5, + tilemapLeft + width - 1, + tilemapTop - 1, + 1, + 1, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + DLG_WINDOW_BASE_TILE_NUM + 6, + tilemapLeft + width, + tilemapTop - 1, + 1, + 1, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + DLG_WINDOW_BASE_TILE_NUM + 7, + tilemapLeft - 2, + tilemapTop, + 1, + 5, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + DLG_WINDOW_BASE_TILE_NUM + 9, + tilemapLeft - 1, + tilemapTop, + width + 1, + 5, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + DLG_WINDOW_BASE_TILE_NUM + 10, + tilemapLeft + width, + tilemapTop, + 1, + 5, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(DLG_WINDOW_BASE_TILE_NUM + 1), + tilemapLeft - 2, + tilemapTop + height, + 1, + 1, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(DLG_WINDOW_BASE_TILE_NUM + 3), + tilemapLeft - 1, + tilemapTop + height, + 1, + 1, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(DLG_WINDOW_BASE_TILE_NUM + 4), + tilemapLeft, + tilemapTop + height, + width - 1, + 1, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(DLG_WINDOW_BASE_TILE_NUM + 5), + tilemapLeft + width - 1, + tilemapTop + height, + 1, + 1, + DLG_WINDOW_PALETTE_NUM); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(DLG_WINDOW_BASE_TILE_NUM + 6), + tilemapLeft + width, + tilemapTop + height, + 1, + 1, + DLG_WINDOW_PALETTE_NUM); +} + +void sub_81977BC(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +{ + FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, STD_WINDOW_PALETTE_NUM); +} + +void sub_8197804(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +{ + FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, STD_WINDOW_PALETTE_NUM); +} + +void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram) +{ + SetWindowBorderStyle(windowId, copyToVram, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM); +} + +void sub_819786C(u8 windowId, bool8 copyToVram) +{ + copy_textbox_border_tile_patterns_to_vram(windowId, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10); + sub_8197B1C(windowId, copyToVram, DLG_WINDOW_BASE_TILE_NUM, 0xF); +} + +void sub_819789C(void) +{ + LoadPalette(gUnknown_0860F074, STD_WINDOW_PALETTE_NUM * 0x10, 0x14); +} + +void sub_81978B0(u16 offset) +{ + LoadPalette(gUnknown_0860F074, offset, 0x14); +} + +const u16 *sub_81978C8(void) +{ + return gUnknown_0860F074; +} + +u16 sub_81978D0(u8 colorNum) +{ + if (colorNum > 15) + colorNum = 0; + return gUnknown_0860F074[colorNum]; +} + +void DisplayItemMessageOnField(u8 taskId, const u8 *string, TaskFunc callback) +{ + sub_81973A4(); + DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, 1, GetPlayerTextSpeed(), string, callback); + CopyWindowToVram(0, 3); +} + +void sub_8197930(void) +{ + CreateYesNoMenu(&gUnknown_0860F0A8, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 0); +} + +void sub_8197948(u8 initialCursorPos) +{ + CreateYesNoMenu(&gUnknown_0860F0A8, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, initialCursorPos); +} + +u32 sub_8197964(void) +{ + if (gTextFlags.flag_3) + return 1; + return gSaveBlock2Ptr->optionsTextSpeed; +} + +u8 GetPlayerTextSpeed(void) +{ + u32 speed; + if (gSaveBlock2Ptr->optionsTextSpeed > 2) + gSaveBlock2Ptr->optionsTextSpeed = 1; + speed = sub_8197964(); + return gUnknown_0860F094[speed]; +} + +u8 sub_81979C4(u8 a1) +{ + if (gUnknown_0203CD8C == 0xFF) + gUnknown_0203CD8C = sub_8198AA4(0, 0x16, 1, 7, (a1 * 2) + 2, 0xF, 0x139); + return gUnknown_0203CD8C; +} + +u8 GetStartMenuWindowId(void) +{ + return gUnknown_0203CD8C; +} + +void remove_start_menu_window_maybe(void) +{ + if (gUnknown_0203CD8C != 0xFF) + { + RemoveWindow(gUnknown_0203CD8C); + gUnknown_0203CD8C = 0xFF; + } +} + +u16 sub_8197A30(void) +{ + return DLG_WINDOW_BASE_TILE_NUM; +} + +u16 sub_8197A38(void) +{ + return STD_WINDOW_BASE_TILE_NUM; +} + +u8 AddMapNamePopUpWindow(void) +{ + if (gUnknown_0203CD8D == 0xFF) + gUnknown_0203CD8D = sub_8198AA4(0, 1, 1, 10, 3, 14, 0x107); + return gUnknown_0203CD8D; +} + +u8 GetMapNamePopUpWindowId(void) +{ + return gUnknown_0203CD8D; +} + +void RemoveMapNamePopUpWindow(void) +{ + if (gUnknown_0203CD8D != 0xFF) + { + RemoveWindow(gUnknown_0203CD8D); + gUnknown_0203CD8D = 0xFF; + } +} + +void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextSubPrinter *, u16)) +{ + gTextFlags.flag_0 = a1; + AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), callback, 2, 1, 3); +} + +void sub_8197AE8(bool8 copyToVram) +{ + FillBgTilemapBufferRect(0, 0, 0, 0, 32, 32, 0x11); + if (copyToVram == TRUE) + CopyBgTilemapBufferToVram(0); +} + +void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a3, u8 a4) +{ + gUnknown_0203CD9C = a3; + gUnknown_0203CD9E = a4; + CallWindowFunction(windowId, sub_8197BB4); + FillWindowPixelBuffer(windowId, 0x11); + PutWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void sub_8197B64(u8 windowId, bool8 copyToVram, u16 a3) +{ + gUnknown_0203CD9C = a3; + gUnknown_0203CD9E = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM); + CallWindowFunction(windowId, sub_8197BB4); + FillWindowPixelBuffer(windowId, 0x11); + PutWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void sub_8197BB4(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +{ + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 1, + tilemapLeft - 2, + tilemapTop - 1, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 3, + tilemapLeft - 1, + tilemapTop - 1, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 4, + tilemapLeft, + tilemapTop - 1, + width - 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 5, + tilemapLeft + width - 1, + tilemapTop - 1, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 6, + tilemapLeft + width, + tilemapTop - 1, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 7, + tilemapLeft - 2, + tilemapTop, + 1, + 5, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 9, + tilemapLeft - 1, + tilemapTop, + width + 1, + 5, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 10, + tilemapLeft + width, + tilemapTop, + 1, + 5, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(gUnknown_0203CD9C + 1), + tilemapLeft - 2, + tilemapTop + height, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(gUnknown_0203CD9C + 3), + tilemapLeft - 1, + tilemapTop + height, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(gUnknown_0203CD9C + 4), + tilemapLeft, + tilemapTop + height, + width - 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(gUnknown_0203CD9C + 5), + tilemapLeft + width - 1, + tilemapTop + height, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + BG_TILE_V_FLIP(gUnknown_0203CD9C + 6), + tilemapLeft + width, + tilemapTop + height, + 1, + 1, + gUnknown_0203CD9E); +} + +void sub_8197DF8(u8 windowId, bool8 copyToVram) +{ + CallWindowFunction(windowId, sub_8197E30); + FillWindowPixelBuffer(windowId, 0); + ClearWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void sub_8197E30(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +{ + FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, 0); +} + +void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 baseTileNum, u8 paletteNum) +{ + gUnknown_0203CD9C = baseTileNum; + gUnknown_0203CD9E = paletteNum; + CallWindowFunction(windowId, DrawWindowBorder); + FillWindowPixelBuffer(windowId, 0x11); + PutWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void sub_8197EC8(u8 windowId, bool8 copyToVram, u16 baseTileNum) +{ + gUnknown_0203CD9C = baseTileNum; + gUnknown_0203CD9E = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM); + CallWindowFunction(windowId, DrawWindowBorder); + FillWindowPixelBuffer(windowId, 0x11); + PutWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void DrawWindowBorder(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +{ + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 0, + tilemapLeft - 1, + tilemapTop - 1, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 1, + tilemapLeft, + tilemapTop - 1, + width, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 2, + tilemapLeft + width, + tilemapTop - 1, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 3, + tilemapLeft - 1, + tilemapTop, + 1, + height, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 5, + tilemapLeft + width, + tilemapTop, + 1, + height, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 6, + tilemapLeft - 1, + tilemapTop + height, + 1, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 7, + tilemapLeft, + tilemapTop + height, + width, + 1, + gUnknown_0203CD9E); + FillBgTilemapBufferRect(bg, + gUnknown_0203CD9C + 8, + tilemapLeft + width, + tilemapTop + height, + 1, + 1, + gUnknown_0203CD9E); +} + +void sub_8198070(u8 windowId, bool8 copyToVram) +{ + CallWindowFunction(windowId, sub_81980A8); + FillWindowPixelBuffer(windowId, 0); + ClearWindowTilemap(windowId); + if (copyToVram == TRUE) + CopyWindowToVram(windowId, 3); +} + +void sub_81980A8(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +{ + FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, 0); +} + +u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile) +{ + struct WindowTemplate window; + memset(&window, 0, sizeof(window)); + + if (bg > 3) + window.priority = 0; + else + window.priority = bg; + + window.tilemapTop = yPos; + window.height = 2; + window.tilemapLeft = 0x1E - xPos; + window.width = xPos; + window.paletteNum = palette; + window.baseBlock = baseTile; + + gUnknown_0203CDA0 = AddWindow(&window); + + if (palette > 15) + palette = 15 * 16; + else + palette *= 16; + + LoadPalette(gUnknown_0860F0B0, palette, sizeof(gUnknown_0860F0B0)); + return gUnknown_0203CDA0; +} + +void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram) +{ + u16 width = 0; + + if (gUnknown_0203CDA0 != 0xFF) + { + PutWindowTilemap(gUnknown_0203CDA0); + FillWindowPixelBuffer(gUnknown_0203CDA0, 0xFF); + width = GetStringWidth(0, string, 0); + box_print(gUnknown_0203CDA0, + 0, + 0xEC - (GetWindowAttribute(gUnknown_0203CDA0, WINDOW_TILEMAP_LEFT) * 8) - a2 - width, + 1, + gUnknown_0860F0D0, + 0, + string); + if (copyToVram) + CopyWindowToVram(gUnknown_0203CDA0, 3); + } +} + +void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram) +{ + u8 color[3]; + u16 width = 0; + + if (gUnknown_0203CDA0 != 0xFF) + { + if (a3 != 0) + { + color[0] = 0; + color[1] = 1; + color[2] = 2; + } + else + { + color[0] = 15; + color[1] = 1; + color[2] = 2; + } + PutWindowTilemap(gUnknown_0203CDA0); + FillWindowPixelBuffer(gUnknown_0203CDA0, 0xFF); + if (string2 != NULL) + { + width = GetStringWidth(0, string2, 0); + box_print(gUnknown_0203CDA0, + 0, + 0xEC - (GetWindowAttribute(gUnknown_0203CDA0, WINDOW_TILEMAP_LEFT) * 8) - a4 - width, + 1, + color, + 0, + string2); + } + AddTextPrinterParameterized2(gUnknown_0203CDA0, 1, 4, 1, 0, 0, color, 0, string); + if (copyToVram) + CopyWindowToVram(gUnknown_0203CDA0, 3); + } +} + +void sub_81982D8(void) +{ + if (gUnknown_0203CDA0 != 0xFF) + CopyWindowToVram(gUnknown_0203CDA0, 3); +} + +void sub_81982F0(void) +{ + if (gUnknown_0203CDA0 != 0xFF) + { + FillWindowPixelBuffer(gUnknown_0203CDA0, 0xFF); + CopyWindowToVram(gUnknown_0203CDA0, 3); + } +} + +void sub_8198314(void) +{ + if (gUnknown_0203CDA0 != 0xFF) + { + FillWindowPixelBuffer(gUnknown_0203CDA0, 0); + ClearWindowTilemap(gUnknown_0203CDA0); + CopyWindowToVram(gUnknown_0203CDA0, 3); + RemoveWindow(gUnknown_0203CDA0); + gUnknown_0203CDA0 = 0xFF; + } +} + +u8 sub_8198348(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos, u8 a7) +{ + s32 pos; + + gUnknown_0203CD90.left = left; + gUnknown_0203CD90.top = top; + gUnknown_0203CD90.minCursorPos = 0; + gUnknown_0203CD90.maxCursorPos = numChoices - 1; + gUnknown_0203CD90.windowId = windowId; + gUnknown_0203CD90.fontId = fontId; + gUnknown_0203CD90.optionHeight = cursorHeight; + gUnknown_0203CD90.APressMuted = a7; + + pos = initialCursorPos; + + if (pos < 0 || pos > gUnknown_0203CD90.maxCursorPos) + gUnknown_0203CD90.cursorPos = 0; + else + gUnknown_0203CD90.cursorPos = pos; + + MoveMenuCursor(0); + return gUnknown_0203CD90.cursorPos; +} + +u8 sub_81983AC(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos) +{ + return sub_8198348(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos, 0); +} + +u8 sub_81983EC(u8 windowId, u8 fontId, u8 left, u8 top, u8 numChoices, u8 initialCursorPos) +{ + u8 cursorHeight = GetMenuCursorDimensionByFont(fontId, 1); + return sub_81983AC(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos); +} + +void RedrawMenuCursor(u8 oldPos, u8 newPos) +{ + u8 width, height; + + width = GetMenuCursorDimensionByFont(gUnknown_0203CD90.fontId, 0); + height = GetMenuCursorDimensionByFont(gUnknown_0203CD90.fontId, 1); + FillWindowPixelRect(gUnknown_0203CD90.windowId, 0x11, gUnknown_0203CD90.left, gUnknown_0203CD90.optionHeight * oldPos + gUnknown_0203CD90.top, width, height); + PrintTextOnWindow(gUnknown_0203CD90.windowId, gUnknown_0203CD90.fontId, gText_SelectorArrow3, gUnknown_0203CD90.left, gUnknown_0203CD90.optionHeight * newPos + gUnknown_0203CD90.top, 0, 0); +} + +u8 MoveMenuCursor(s8 cursorDelta) +{ + u8 oldPos = gUnknown_0203CD90.cursorPos; + int newPos = gUnknown_0203CD90.cursorPos + cursorDelta; + + if (newPos < gUnknown_0203CD90.minCursorPos) + gUnknown_0203CD90.cursorPos = gUnknown_0203CD90.maxCursorPos; + else if (newPos > gUnknown_0203CD90.maxCursorPos) + gUnknown_0203CD90.cursorPos = gUnknown_0203CD90.minCursorPos; + else + gUnknown_0203CD90.cursorPos += cursorDelta; + + RedrawMenuCursor(oldPos, gUnknown_0203CD90.cursorPos); + return gUnknown_0203CD90.cursorPos; +} + +u8 MoveMenuCursorNoWrapAround(s8 cursorDelta) +{ + u8 oldPos = gUnknown_0203CD90.cursorPos; + int newPos = gUnknown_0203CD90.cursorPos + cursorDelta; + + if (newPos < gUnknown_0203CD90.minCursorPos) + gUnknown_0203CD90.cursorPos = gUnknown_0203CD90.minCursorPos; + else if (newPos > gUnknown_0203CD90.maxCursorPos) + gUnknown_0203CD90.cursorPos = gUnknown_0203CD90.maxCursorPos; + else + gUnknown_0203CD90.cursorPos += cursorDelta; + + RedrawMenuCursor(oldPos, gUnknown_0203CD90.cursorPos); + return gUnknown_0203CD90.cursorPos; +} + +u8 GetMenuCursorPos(void) +{ + return gUnknown_0203CD90.cursorPos; +} + +s8 ProcessMenuInput(void) +{ + if (gMain.newKeys & A_BUTTON) + { + if (!gUnknown_0203CD90.APressMuted) + PlaySE(SE_SELECT); + return gUnknown_0203CD90.cursorPos; + } + else if (gMain.newKeys & B_BUTTON) + { + return MENU_B_PRESSED; + } + else if (gMain.newKeys & DPAD_UP) + { + PlaySE(SE_SELECT); + MoveMenuCursor(-1); + return MENU_NOTHING_CHOSEN; + } + else if (gMain.newKeys & DPAD_DOWN) + { + PlaySE(SE_SELECT); + MoveMenuCursor(1); + return MENU_NOTHING_CHOSEN; + } + + return MENU_NOTHING_CHOSEN; +} + +s8 ProcessMenuInputNoWrapAround(void) +{ + u8 oldPos = gUnknown_0203CD90.cursorPos; + + if (gMain.newKeys & A_BUTTON) + { + if (!gUnknown_0203CD90.APressMuted) + PlaySE(SE_SELECT); + return gUnknown_0203CD90.cursorPos; + } + else if (gMain.newKeys & B_BUTTON) + { + return MENU_B_PRESSED; + } + else if (gMain.newKeys & DPAD_UP) + { + if (oldPos != MoveMenuCursorNoWrapAround(-1)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + else if (gMain.newKeys & DPAD_DOWN) + { + if (oldPos != MoveMenuCursorNoWrapAround(1)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + + return MENU_NOTHING_CHOSEN; +} + +s8 ProcessMenuInput_other(void) +{ + if (gMain.newKeys & A_BUTTON) + { + if (!gUnknown_0203CD90.APressMuted) + PlaySE(SE_SELECT); + return gUnknown_0203CD90.cursorPos; + } + else if (gMain.newKeys & B_BUTTON) + { + return MENU_B_PRESSED; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP) + { + PlaySE(SE_SELECT); + MoveMenuCursor(-1); + return MENU_NOTHING_CHOSEN; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN) + { + PlaySE(SE_SELECT); + MoveMenuCursor(1); + return MENU_NOTHING_CHOSEN; + } + + return MENU_NOTHING_CHOSEN; +} + +s8 ProcessMenuInputNoWrapAround_other(void) +{ + u8 oldPos = gUnknown_0203CD90.cursorPos; + + if (gMain.newKeys & A_BUTTON) + { + if (!gUnknown_0203CD90.APressMuted) + PlaySE(SE_SELECT); + return gUnknown_0203CD90.cursorPos; + } + else if (gMain.newKeys & B_BUTTON) + { + return MENU_B_PRESSED; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP) + { + if (oldPos != MoveMenuCursorNoWrapAround(-1)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN) + { + if (oldPos != MoveMenuCursorNoWrapAround(1)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + + return MENU_NOTHING_CHOSEN; +} + +void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs) +{ + u8 i; + for (i = 0; i < itemCount; i++) + { + PrintTextOnWindow(windowId, fontId, strs[i].text, left, (lineHeight * i) + top, 0xFF, NULL); + } + CopyWindowToVram(windowId, 2); +} + +void sub_81987BC(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, u8 a6, u8 a7) +{ + u8 i; + for (i = 0; i < itemCount; i++) + { + sub_8199F74(windowId, fontId, strs[i].text, left, (lineHeight * i) + top, 0xFF, NULL, a6, a7); + } + CopyWindowToVram(windowId, 2); +} + +void sub_8198854(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *strs) +{ + PrintTextArray(windowId, fontId, GetFontAttribute(fontId, 0), 1, lineHeight, itemCount, strs); +} + +void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a8) +{ + u8 i; + struct TextSubPrinter printer; + + printer.windowId = windowId; + printer.fontId = fontId; + printer.fgColor = GetFontAttribute(fontId, 5); + printer.bgColor = GetFontAttribute(fontId, 6); + printer.shadowColor = GetFontAttribute(fontId, 7); + printer.fontColor_l = GetFontAttribute(fontId, 4); + printer.letterSpacing = letterSpacing; + printer.lineSpacing = GetFontAttribute(fontId, 3); + printer.x = left; + printer.currentX = left; + + for (i = 0; i < itemCount; i++) + { + printer.current_text_offset = strs[a8[i]].text; + printer.y = (lineHeight * i) + top; + printer.currentY = printer.y; + AddTextPrinter(&printer, 0xFF, NULL); + } + + CopyWindowToVram(windowId, 2); +} + +void sub_81989B8(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a5) +{ + AddItemMenuActionTextPrinters(windowId, fontId, GetFontAttribute(fontId, 0), 1, GetFontAttribute(fontId, 2), lineHeight, itemCount, strs, a5); +} + +void SetWindowTemplateFields(struct WindowTemplate *template, u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock) +{ + template->priority = bg; + template->tilemapLeft = left; + template->tilemapTop = top; + template->width = width; + template->height = height; + template->paletteNum = paletteNum; + template->baseBlock = baseBlock; +} + +struct WindowTemplate sub_8198A50(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock) +{ + struct WindowTemplate template; + SetWindowTemplateFields(&template, bg, left, top, width, height, paletteNum, baseBlock); + return template; +} + +u16 sub_8198AA4(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock) +{ + struct WindowTemplate template; + SetWindowTemplateFields(&template, bg, left, top, width, height, paletteNum, baseBlock); + return AddWindow(&template); +} + +void sub_8198AF8(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top, u16 baseTileNum, u8 paletteNum, u8 initialCursorPos) +{ + struct TextSubPrinter printer; + + gUnknown_0203CD9F = AddWindow(window); + SetWindowBorderStyle(gUnknown_0203CD9F, TRUE, baseTileNum, paletteNum); + + printer.current_text_offset = gText_YesNo; + printer.windowId = gUnknown_0203CD9F; + printer.fontId = fontId; + printer.x = GetFontAttribute(fontId, 0) + left; + printer.y = top; + printer.currentX = printer.x; + printer.currentY = printer.y; + printer.fgColor = GetFontAttribute(fontId, 5); + printer.bgColor = GetFontAttribute(fontId, 6); + printer.shadowColor = GetFontAttribute(fontId, 7); + printer.fontColor_l = GetFontAttribute(fontId, 4); + printer.letterSpacing = GetFontAttribute(fontId, 2); + printer.lineSpacing = GetFontAttribute(fontId, 3); + + AddTextPrinter(&printer, 0xFF, NULL); + + sub_81983AC(gUnknown_0203CD9F, fontId, left, top, GetFontAttribute(fontId, 1), 2, initialCursorPos); +} + +void sub_8198C34(const struct WindowTemplate *window, u8 fontId, u16 baseTileNum, u8 paletteNum) +{ + sub_8198AF8(window, fontId, 0, 1, baseTileNum, paletteNum, 0); +} + +s8 ProcessMenuInputNoWrap_(void) +{ + s8 result = ProcessMenuInputNoWrapAround(); + if (result != MENU_NOTHING_CHOSEN) + sub_8198C78(); + return result; +} + +void sub_8198C78(void) +{ + sub_8198070(gUnknown_0203CD9F, TRUE); + RemoveWindow(gUnknown_0203CD9F); +} + +void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u8 a7, const struct MenuAction *strs) +{ + u8 i; + u8 j; + for (i = 0; i < a7; i++) + { + for (j = 0; j < a6; j++) + { + PrintTextOnWindow(windowId, fontId, strs[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, 0xFF, NULL); + } + } + CopyWindowToVram(windowId, 2); +} + +void sub_8198D54(u8 windowId, u8 fontId, u8 a2, u8 a3, u8 a4, u8 a5, const struct MenuAction *strs) +{ + sub_8198C94(windowId, fontId, GetFontAttribute(fontId, 0), 0, a2, a3, a4, a5, strs); +} + +void sub_8198DBC(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *strs, const u8 *a8) +{ + u8 i; + u8 j; + struct TextSubPrinter printer; + + printer.windowId = windowId; + printer.fontId = fontId; + printer.fgColor = GetFontAttribute(fontId, 5); + printer.bgColor = GetFontAttribute(fontId, 6); + printer.shadowColor = GetFontAttribute(fontId, 7); + printer.fontColor_l = GetFontAttribute(fontId, 4); + printer.letterSpacing = GetFontAttribute(fontId, 2); + printer.lineSpacing = GetFontAttribute(fontId, 3); + + for (i = 0; i < itemCount2; i++) + { + for (j = 0; j < itemCount; j++) + { + printer.current_text_offset = strs[a8[(itemCount * i) + j]].text; + printer.x = (a4 * j) + left; + printer.y = (GetFontAttribute(fontId, 1) * i) + top; + printer.currentX = printer.x; + printer.currentY = printer.y; + AddTextPrinter(&printer, 0xFF, NULL); + } + } + + CopyWindowToVram(windowId, 2); +} + +void sub_8198EF8(u8 windowId, u8 fontId, u8 a2, u8 a3, u8 a4, u8 a5, const struct MenuAction *strs, const u8 *a8) +{ + sub_8198DBC(windowId, fontId, GetFontAttribute(fontId, 0), 0, a2, a4, a5, strs, a8); +} + +u8 sub_8198F58(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 cursorHeight, u8 a6, u8 a7, u8 numChoices, u8 a9) +{ + s32 pos; + + gUnknown_0203CD90.left = left; + gUnknown_0203CD90.top = top; + gUnknown_0203CD90.minCursorPos = 0; + gUnknown_0203CD90.maxCursorPos = numChoices - 1; + gUnknown_0203CD90.windowId = windowId; + gUnknown_0203CD90.fontId = fontId; + gUnknown_0203CD90.optionWidth = a4; + gUnknown_0203CD90.optionHeight = cursorHeight; + gUnknown_0203CD90.horizontalCount = a6; + gUnknown_0203CD90.verticalCount = a7; + + pos = a9; + + if (pos < 0 || pos > gUnknown_0203CD90.maxCursorPos) + gUnknown_0203CD90.cursorPos = 0; + else + gUnknown_0203CD90.cursorPos = pos; + + sub_8199134(0, 0); + return gUnknown_0203CD90.cursorPos; +} + +u8 sub_8198FD4(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u8 a7) +{ + u8 cursorHeight = GetMenuCursorDimensionByFont(fontId, 1); + u8 numChoices = a5 * a6; + return sub_8198F58(windowId, fontId, left, top, a4, cursorHeight, a5, a6, numChoices, a7); +} + +void sub_8199060(u8 oldCursorPos, u8 newCursorPos) +{ + u8 cursorWidth = GetMenuCursorDimensionByFont(gUnknown_0203CD90.fontId, 0); + u8 cursorHeight = GetMenuCursorDimensionByFont(gUnknown_0203CD90.fontId, 1); + u8 xPos = (oldCursorPos % gUnknown_0203CD90.horizontalCount) * gUnknown_0203CD90.optionWidth + gUnknown_0203CD90.left; + u8 yPos = (oldCursorPos / gUnknown_0203CD90.horizontalCount) * gUnknown_0203CD90.optionHeight + gUnknown_0203CD90.top; + FillWindowPixelRect(gUnknown_0203CD90.windowId, + 0x11, + xPos, + yPos, + cursorWidth, + cursorHeight); + xPos = (newCursorPos % gUnknown_0203CD90.horizontalCount) * gUnknown_0203CD90.optionWidth + gUnknown_0203CD90.left; + yPos = (newCursorPos / gUnknown_0203CD90.horizontalCount) * gUnknown_0203CD90.optionHeight + gUnknown_0203CD90.top; + PrintTextOnWindow(gUnknown_0203CD90.windowId, + gUnknown_0203CD90.fontId, + gText_SelectorArrow3, + xPos, + yPos, + 0, + 0); +} + +u8 sub_8199134(s8 deltaX, s8 deltaY) +{ + u8 oldPos = gUnknown_0203CD90.cursorPos; + + if (deltaX != 0) + { + if ((gUnknown_0203CD90.cursorPos % gUnknown_0203CD90.horizontalCount) + deltaX < 0) + { + gUnknown_0203CD90.cursorPos += gUnknown_0203CD90.horizontalCount - 1; + } + else if ((gUnknown_0203CD90.cursorPos % gUnknown_0203CD90.horizontalCount) + deltaX >= gUnknown_0203CD90.horizontalCount) + { + gUnknown_0203CD90.cursorPos = (gUnknown_0203CD90.cursorPos / gUnknown_0203CD90.horizontalCount) * gUnknown_0203CD90.horizontalCount; + } + else + { + gUnknown_0203CD90.cursorPos += deltaX; + } + } + + if (deltaY != 0) + { + if ((gUnknown_0203CD90.cursorPos / gUnknown_0203CD90.horizontalCount) + deltaY < 0) + { + gUnknown_0203CD90.cursorPos += gUnknown_0203CD90.horizontalCount * (gUnknown_0203CD90.verticalCount - 1); + } + else if ((gUnknown_0203CD90.cursorPos / gUnknown_0203CD90.horizontalCount) + deltaY >= gUnknown_0203CD90.verticalCount) + { + gUnknown_0203CD90.cursorPos -= gUnknown_0203CD90.horizontalCount * (gUnknown_0203CD90.verticalCount - 1); + } + else + { + gUnknown_0203CD90.cursorPos += (gUnknown_0203CD90.horizontalCount * deltaY); + } + } + + if (gUnknown_0203CD90.cursorPos > gUnknown_0203CD90.maxCursorPos) + { + gUnknown_0203CD90.cursorPos = oldPos; + return gUnknown_0203CD90.cursorPos; + } + else + { + sub_8199060(oldPos, gUnknown_0203CD90.cursorPos); + return gUnknown_0203CD90.cursorPos; + } +} + +u8 sub_81991F8(s8 deltaX, s8 deltaY) +{ + u8 oldPos = gUnknown_0203CD90.cursorPos; + + if (deltaX != 0) + { + if (((gUnknown_0203CD90.cursorPos % gUnknown_0203CD90.horizontalCount) + deltaX >= 0) && + ((gUnknown_0203CD90.cursorPos % gUnknown_0203CD90.horizontalCount) + deltaX < gUnknown_0203CD90.horizontalCount)) + { + gUnknown_0203CD90.cursorPos += deltaX; + } + } + + if (deltaY != 0) + { + if (((gUnknown_0203CD90.cursorPos / gUnknown_0203CD90.horizontalCount) + deltaY >= 0) && + ((gUnknown_0203CD90.cursorPos / gUnknown_0203CD90.horizontalCount) + deltaY < gUnknown_0203CD90.verticalCount)) + { + gUnknown_0203CD90.cursorPos += (gUnknown_0203CD90.horizontalCount * deltaY); + } + } + + if (gUnknown_0203CD90.cursorPos > gUnknown_0203CD90.maxCursorPos) + { + gUnknown_0203CD90.cursorPos = oldPos; + return gUnknown_0203CD90.cursorPos; + } + else + { + sub_8199060(oldPos, gUnknown_0203CD90.cursorPos); + return gUnknown_0203CD90.cursorPos; + } +} + +s8 sub_8199284(void) +{ + if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + return gUnknown_0203CD90.cursorPos; + } + else if (gMain.newKeys & B_BUTTON) + { + return MENU_B_PRESSED; + } + else if (gMain.newKeys & DPAD_UP) + { + PlaySE(SE_SELECT); + sub_8199134(0, -1); + return MENU_NOTHING_CHOSEN; + } + else if (gMain.newKeys & DPAD_DOWN) + { + PlaySE(SE_SELECT); + sub_8199134(0, 1); + return MENU_NOTHING_CHOSEN; + } + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysState() == 1) + { + PlaySE(SE_SELECT); + sub_8199134(-1, 0); + return MENU_NOTHING_CHOSEN; + } + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysState() == 2) + { + PlaySE(SE_SELECT); + sub_8199134(1, 0); + return MENU_NOTHING_CHOSEN; + } + + return MENU_NOTHING_CHOSEN; +} + +s8 sub_8199334(void) +{ + u8 oldPos = gUnknown_0203CD90.cursorPos; + + if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + return gUnknown_0203CD90.cursorPos; + } + else if (gMain.newKeys & B_BUTTON) + { + return MENU_B_PRESSED; + } + else if (gMain.newKeys & DPAD_UP) + { + if (oldPos != sub_81991F8(0, -1)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + else if (gMain.newKeys & DPAD_DOWN) + { + if (oldPos != sub_81991F8(0, 1)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysState() == 1) + { + if (oldPos != sub_81991F8(-1, 0)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysState() == 2) + { + if (oldPos != sub_81991F8(1, 0)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + + return MENU_NOTHING_CHOSEN; +} + +s8 sub_81993D8(void) +{ + if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + return gUnknown_0203CD90.cursorPos; + } + else if (gMain.newKeys & B_BUTTON) + { + return MENU_B_PRESSED; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP) + { + PlaySE(SE_SELECT); + sub_8199134(0, -1); + return MENU_NOTHING_CHOSEN; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN) + { + PlaySE(SE_SELECT); + sub_8199134(0, 1); + return MENU_NOTHING_CHOSEN; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || sub_812210C() == 1) + { + PlaySE(SE_SELECT); + sub_8199134(-1, 0); + return MENU_NOTHING_CHOSEN; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || sub_812210C() == 2) + { + PlaySE(SE_SELECT); + sub_8199134(1, 0); + return MENU_NOTHING_CHOSEN; + } + + return MENU_NOTHING_CHOSEN; +} + +s8 sub_8199484(void) +{ + u8 oldPos = gUnknown_0203CD90.cursorPos; + + if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + return gUnknown_0203CD90.cursorPos; + } + else if (gMain.newKeys & B_BUTTON) + { + return MENU_B_PRESSED; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP) + { + if (oldPos != sub_81991F8(0, -1)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN) + { + if (oldPos != sub_81991F8(0, 1)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || sub_812210C() == 1) + { + if (oldPos != sub_81991F8(-1, 0)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || sub_812210C() == 2) + { + if (oldPos != sub_81991F8(1, 0)) + PlaySE(SE_SELECT); + return MENU_NOTHING_CHOSEN; + } + + return MENU_NOTHING_CHOSEN; +} + +u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, bool8 APressMuted) +{ + s32 pos; + + gUnknown_0203CD90.left = 0; + gUnknown_0203CD90.top = 1; + gUnknown_0203CD90.minCursorPos = 0; + gUnknown_0203CD90.maxCursorPos = itemCount - 1; + gUnknown_0203CD90.windowId = windowId; + gUnknown_0203CD90.fontId = 1; + gUnknown_0203CD90.optionHeight = 16; + gUnknown_0203CD90.APressMuted = APressMuted; + + pos = initialCursorPos; + + if (pos < 0 || pos > gUnknown_0203CD90.maxCursorPos) + gUnknown_0203CD90.cursorPos = 0; + else + gUnknown_0203CD90.cursorPos = pos; + + return MoveMenuCursor(0); +} + +u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 itemCount, u8 initialCursorPos) +{ + return InitMenuInUpperLeftCorner(windowId, itemCount, initialCursorPos, FALSE); +} + +void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs) +{ + u32 i; + + for (i = 0; i < itemCount; i++) + { + PrintTextOnWindow(windowId, 1, strs[i].text, 8, (i * 16) + 1, 0xFF, NULL); + } + + CopyWindowToVram(windowId, 2); +} + +void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *strs, const u8 *a8) +{ + u8 i; + struct TextSubPrinter printer; + + printer.windowId = windowId; + printer.fontId = 1; + printer.fgColor = GetFontAttribute(1, 5); + printer.bgColor = GetFontAttribute(1, 6); + printer.shadowColor = GetFontAttribute(1, 7); + printer.fontColor_l = GetFontAttribute(1, 4); + printer.letterSpacing = 0; + printer.lineSpacing = 0; + printer.x = 8; + printer.currentX = 8; + + for (i = 0; i < itemCount; i++) + { + printer.current_text_offset = strs[a8[i]].text; + printer.y = (i * 16) + 1; + printer.currentY = (i * 16) + 1; + AddTextPrinter(&printer, 0xFF, NULL); + } + + CopyWindowToVram(windowId, 2); +} + +void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 paletteNum, u8 initialCursorPos) +{ + struct TextSubPrinter printer; + + gUnknown_0203CD9F = AddWindow(window); + SetWindowBorderStyle(gUnknown_0203CD9F, TRUE, baseTileNum, paletteNum); + + printer.current_text_offset = gText_YesNo; + printer.windowId = gUnknown_0203CD9F; + printer.fontId = 1; + printer.x = 8; + printer.y = 1; + printer.currentX = printer.x; + printer.currentY = printer.y; + printer.fgColor = GetFontAttribute(1, 5); + printer.bgColor = GetFontAttribute(1, 6); + printer.shadowColor = GetFontAttribute(1, 7); + printer.fontColor_l = GetFontAttribute(1, 4); + printer.letterSpacing = 0; + printer.lineSpacing = 0; + + AddTextPrinter(&printer, 0xFF, NULL); + InitMenuInUpperLeftCornerPlaySoundWhenAPressed(gUnknown_0203CD9F, 2, initialCursorPos); +} + +void sub_81997AC(u8 windowId, u8 a4, u8 a6, u8 a7, const struct MenuAction *strs) +{ + u32 i; + u32 j; + for (i = 0; i < a7; i++) + { + for (j = 0; j < a6; j++) + { + PrintTextOnWindow(windowId, 1, strs[(i * a6) + j].text, (a4 * j) + 8, (i * 16) + 1, 0xFF, NULL); + } + } + CopyWindowToVram(windowId, 2); +} + +void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *strs, const u8 *a8) +{ + u8 i; + u8 j; + struct TextSubPrinter printer; + + printer.windowId = windowId; + printer.fontId = 1; + printer.fgColor = GetFontAttribute(1, 5); + printer.bgColor = GetFontAttribute(1, 6); + printer.shadowColor = GetFontAttribute(1, 7); + printer.fontColor_l = GetFontAttribute(1, 4); + printer.letterSpacing = 0; + printer.lineSpacing = 0; + + for (i = 0; i < itemCount2; i++) + { + for (j = 0; j < itemCount; j++) + { + printer.current_text_offset = strs[a8[(itemCount * i) + j]].text; + printer.x = (a4 * j) + 8; + printer.y = (16 * i) + 1; + printer.currentX = printer.x; + printer.currentY = printer.y; + AddTextPrinter(&printer, 0xFF, NULL); + } + } + + CopyWindowToVram(windowId, 2); +} + +u8 sub_8199944(u8 windowId, u8 optionWidth, u8 horizontalCount, u8 verticalCount, u8 initialCursorPos) +{ + s32 pos; + + gUnknown_0203CD90.left = 0; + gUnknown_0203CD90.top = 1; + gUnknown_0203CD90.minCursorPos = 0; + gUnknown_0203CD90.maxCursorPos = (horizontalCount * verticalCount) - 1; + gUnknown_0203CD90.windowId = windowId; + gUnknown_0203CD90.fontId = 1; + gUnknown_0203CD90.optionWidth = optionWidth; + gUnknown_0203CD90.optionHeight = 16; + gUnknown_0203CD90.horizontalCount = horizontalCount; + gUnknown_0203CD90.verticalCount = verticalCount; + + pos = initialCursorPos; + + if (pos < 0 || pos > gUnknown_0203CD90.maxCursorPos) + gUnknown_0203CD90.cursorPos = 0; + else + gUnknown_0203CD90.cursorPos = pos; + + sub_8199134(0, 0); + return gUnknown_0203CD90.cursorPos; +} + +void clear_scheduled_bg_copies_to_vram(void) +{ + memset(gUnknown_0203CDA4, 0, sizeof(gUnknown_0203CDA4)); +} + +void schedule_bg_copy_tilemap_to_vram(u8 bgId) +{ + gUnknown_0203CDA4[bgId] = TRUE; +} + +void do_scheduled_bg_tilemap_copies_to_vram(void) +{ + if (gUnknown_0203CDA4[0] == TRUE) + { + CopyBgTilemapBufferToVram(0); + gUnknown_0203CDA4[0] = FALSE; + } + if (gUnknown_0203CDA4[1] == TRUE) + { + CopyBgTilemapBufferToVram(1); + gUnknown_0203CDA4[1] = FALSE; + } + if (gUnknown_0203CDA4[2] == TRUE) + { + CopyBgTilemapBufferToVram(2); + gUnknown_0203CDA4[2] = FALSE; + } + if (gUnknown_0203CDA4[3] == TRUE) + { + CopyBgTilemapBufferToVram(3); + gUnknown_0203CDA4[3] = FALSE; + } +} + +void reset_temp_tile_data_buffers(void) +{ + int i; + for (i = 0; i < (s32)ARRAY_COUNT(gUnknown_0203CDAC); i++) + { + gUnknown_0203CDAC[i] = NULL; + } + gUnknown_0203CDA8 = 0; +} + +bool8 free_temp_tile_data_buffers_if_possible(void) +{ + int i; + + if (!IsDma3ManagerBusyWithBgCopy()) + { + if (gUnknown_0203CDA8) + { + for (i = 0; i < gUnknown_0203CDA8; i++) + { + FREE_AND_SET_NULL(gUnknown_0203CDAC[i]); + } + gUnknown_0203CDA8 = 0; + } + return FALSE; + } + else + { + return TRUE; + } +} + +void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, int size, u16 offset, u8 mode) +{ + int sizeOut; + if (gUnknown_0203CDA8 < ARRAY_COUNT(gUnknown_0203CDAC)) + { + void *ptr = malloc_and_decompress(src, &sizeOut); + if (!size) + size = sizeOut; + if (ptr) + { + copy_decompressed_tile_data_to_vram(bgId, ptr, size, offset, mode); + gUnknown_0203CDAC[gUnknown_0203CDA8++] = ptr; + } + return ptr; + } + return NULL; +} + +void copy_decompressed_tile_data_to_vram_autofree(u8 bgId, const void *src, int size, u16 offset, u8 mode) +{ + int sizeOut; + void *ptr = malloc_and_decompress(src, &sizeOut); + if (!size) + size = sizeOut; + if (ptr) + { + u8 taskId = CreateTask(task_free_buf_after_copying_tile_data_to_vram, 0); + gTasks[taskId].data[0] = copy_decompressed_tile_data_to_vram(bgId, ptr, size, offset, mode); + SetWordTaskArg(taskId, 1, (u32)ptr); + } +} + +void task_free_buf_after_copying_tile_data_to_vram(u8 taskId) +{ + if (!CheckForSpaceForDma3Request(gTasks[taskId].data[0])) + { + Free((void *)GetWordTaskArg(taskId, 1)); + DestroyTask(taskId); + } +} + +void *malloc_and_decompress(const void *src, int *size) +{ + void *ptr; + u8 *sizeAsBytes = (u8 *)size; + u8 *srcAsBytes = (u8 *)src; + + sizeAsBytes[0] = srcAsBytes[1]; + sizeAsBytes[1] = srcAsBytes[2]; + sizeAsBytes[2] = srcAsBytes[3]; + sizeAsBytes[3] = 0; + + ptr = Alloc(*size); + if (ptr) + LZ77UnCompWram(src, ptr); + return ptr; +} + +u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode) +{ + switch (mode) + { + case 0: + return LoadBgTiles(bgId, src, size, offset); + case 1: + return LoadBgTilemap(bgId, src, size, offset); + default: + return -1; + } +} + +void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette) +{ + u8 i; + u8 j; + u16 *ptr = GetBgTilemapBuffer(bgId); + + for (i = top; i < top + height; i++) + { + for (j = left; j < left + width; j++) + { + ptr[(i * 32) + j] = (ptr[(i * 32) + j] & 0xFFF) | (palette << 12); + } + } +} + +void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height) +{ + u8 i; + u8 j; + const u16 *src = GetBgTilemapBuffer(bgId); + + for (i = 0; i < height; i++) + { + for (j = 0; j < width; j++) + { + dest[(i * width) + j] = src[(i + top) * 32 + j + left]; + } + } +} + +void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP) +{ + int i; + int area = width * height; + if (is8BPP == TRUE) + { + u8 *as8BPP = ptr; + for (i = 0; i < area; i++) + { + as8BPP[i] += delta; + } + } + else + { + u16 *as4BPP = ptr; + for (i = 0; i < area; i++) + { + as4BPP[i] = (as4BPP[i] & 0xFC00) | ((as4BPP[i] + delta) & 0x3FF); + } + } +} + +void sub_8199D98(void) +{ + ChangeBgX(0, 0, 0); + ChangeBgX(1, 0, 0); + ChangeBgX(2, 0, 0); + ChangeBgX(3, 0, 0); + ChangeBgY(0, 0, 0); + ChangeBgY(1, 0, 0); + ChangeBgY(2, 0, 0); + ChangeBgY(3, 0, 0); +} + +void sub_8199DF0(u32 bg, u8 a1, int a2, int a3) +{ + int temp = (!GetBgAttribute(bg, 4)) ? 0x20 : 0x40; + void *addr = (void *)((GetBgAttribute(bg, 1) * 0x4000) + (GetBgAttribute(bg, 10) + a2) * temp); + RequestDma3Fill(a1 << 24 | a1 << 16 | a1 << 8 | a1, addr + VRAM, a3 * temp, 1); +} + +void box_print(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str) +{ + struct TextSubPrinter printer; + + printer.current_text_offset = str; + printer.windowId = windowId; + printer.fontId = fontId; + printer.x = left; + printer.y = top; + printer.currentX = printer.x; + printer.currentY = printer.y; + printer.letterSpacing = GetFontAttribute(fontId, 2); + printer.lineSpacing = GetFontAttribute(fontId, 3); + printer.fontColor_l = 0; + printer.fgColor = color[1]; + printer.bgColor = color[0]; + printer.shadowColor = color[2]; + + AddTextPrinter(&printer, speed, NULL); +} + +void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str) +{ + struct TextSubPrinter printer; + + printer.current_text_offset = str; + printer.windowId = windowId; + printer.fontId = fontId; + printer.x = left; + printer.y = top; + printer.currentX = printer.x; + printer.currentY = printer.y; + printer.letterSpacing = letterSpacing; + printer.lineSpacing = lineSpacing; + printer.fontColor_l = 0; + printer.fgColor = color[1]; + printer.bgColor = color[0]; + printer.shadowColor = color[2]; + + AddTextPrinter(&printer, speed, NULL); +} + +void sub_8199F74(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 letterSpacing, u8 lineSpacing) +{ + struct TextSubPrinter printer; + + printer.current_text_offset = str; + printer.windowId = windowId; + printer.fontId = fontId; + printer.x = left; + printer.y = top; + printer.currentX = left; + printer.currentY = top; + printer.letterSpacing = letterSpacing; + printer.lineSpacing = lineSpacing; + printer.fontColor_l = 0; + + printer.fgColor = GetFontAttribute(fontId, 5); + printer.bgColor = GetFontAttribute(fontId, 6); + printer.shadowColor = GetFontAttribute(fontId, 7); + + AddTextPrinter(&printer, speed, callback); +} + +void sub_819A024(u8 windowId, const u8 *src, u16 a2, u16 a3) +{ + int count = 0; + while (gSaveBlock2Ptr->playerName[count] != EOS) + count++; + + StringExpandPlaceholders(gStringVar4, src); + + PrintTextOnWindow(windowId, 1, gStringVar4, a2, a3, 0xFF, 0); +} + +//Screw this function, it's long and unreferenced and ugh + +struct UnkStruct_819A080 { + u8 *unk00; + u16 unk04; + u16 unk06; +}; + +#ifdef NONMATCHING +void sub_819A080(struct UnkStruct_819A080 *a0, struct UnkStruct_819A080 *a1, u16 a2, u16 a3, u16 a4, u16 a5, u16 a6, u16 a7) +{ + // r3 = a3 + // r4 = a5 + // r1 = a6 + // r5 = a7 + // sp+00 = a0 + // sp+04 = a1 + // sp+08 = a2 + // sp+0c = a4 + int sp10 = a1->unk04 - a4 < a6 ? a1->unk04 - a4 + a2 : a6 + a2; + int sp14 = a0->unk06 - a5 < a7 ? a3 + a0->unk06 - a5 : a3 + a7; + int sp18 = (a0->unk04 + (a0->unk04 & 0x7)) / 8; + int sp1c = (a1->unk04 + (a1->unk04 & 0x7)) / 8; + int r12; // sp+20 + int r8; // sp+24 + int r5; + int r6; + u16 r2; + + for (r12 = a3, r8 = a5; r12 < sp14; r12++, r8++) + { + for (r5 = a2, r6 = a4; a5 < sp10; a5++, a6++) + { + u8 *r3 = a0->unk00 + ((r5 >> 1) & 0x3) + ((r5 >> 3) << 5) + (((r12 >> 3) * sp18) << 5) + ((r12 & 0x7) << 2); + u8 *r4 = a1->unk00 + ((r6 >> 1) & 0x3) + ((r6 >> 3) << 5) + (((r8 >> 3) * sp1c) << 5) + ((r8 & 0x7) << 2); + if (((uintptr_t)r4) & 0x1) + { + u16 *r4_2 = (u16 *)(r4 - 1); + if (r6 & 0x1) + { + r2 = *r4_2 & 0x0fff; + if (r5 & 0x1) + *r4_2 = r2 | ((*r3 & 0xf0) << 8); + else + *r4_2 = r2 | ((*r3 & 0x0f) << 12); + } + else + { + r2 = *r4_2 * 0xf0ff; + if (r5 & 0x1) + *r4_2 = r2 | ((*r3 & 0xf0) << 4); + else + *r4_2 = r2 | ((*r3 & 0x0f) << 8); + } + } + else + { + u16 *r4_2 = (u16 *)r4; + if (r6 & 1) + { + r2 = *r4_2 & 0xff0f; + if (r5 & 1) + *r4_2 = r2 | ((*r3 & 0xf0) << 0); + else + *r4_2 = r2 | ((*r3 & 0x0f) << 4); + } + else + { + r2 = *r4_2 & 0xfff0; + if (r5 & 1) + *r4_2 = r2 | ((*r3 & 0xf0) >> 4); + else + *r4_2 = r2 | ((*r3 & 0x0f) >> 0); + } + } + } + } +} +#else +__attribute__((naked)) +void sub_819A080(struct UnkStruct_819A080 *a0, struct UnkStruct_819A080 *a1, u16 a2, u16 a3, u16 a4, u16 a5, u16 a6, u16 a7) +{ + asm("push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + sub sp, #0x28\n\ + str r0, [sp]\n\ + str r1, [sp, #0x4]\n\ + ldr r0, [sp, #0x48]\n\ + ldr r4, [sp, #0x4C]\n\ + ldr r1, [sp, #0x50]\n\ + ldr r5, [sp, #0x54]\n\ + lsl r2, #16\n\ + lsr r2, #16\n\ + str r2, [sp, #0x8]\n\ + lsl r3, #16\n\ + lsr r3, #16\n\ + lsl r0, #16\n\ + lsr r0, #16\n\ + str r0, [sp, #0xC]\n\ + lsl r4, #16\n\ + lsr r4, #16\n\ + lsl r1, #16\n\ + lsr r1, #16\n\ + lsl r5, #16\n\ + lsr r5, #16\n\ + ldr r2, [sp, #0x4]\n\ + ldrh r0, [r2, #0x4]\n\ + ldr r2, [sp, #0xC]\n\ + sub r0, r2\n\ + ldr r2, [sp, #0x8]\n\ + add r2, r1, r2\n\ + str r2, [sp, #0x10]\n\ + cmp r0, r1\n\ + bge _0819A0CC\n\ + ldr r1, [sp, #0x8]\n\ + add r0, r1\n\ + str r0, [sp, #0x10]\n\ +_0819A0CC:\n\ + ldr r2, [sp, #0x4]\n\ + ldrh r1, [r2, #0x6]\n\ + sub r0, r1, r4\n\ + cmp r0, r5\n\ + bge _0819A0DE\n\ + add r0, r3, r1\n\ + sub r0, r4\n\ + str r0, [sp, #0x14]\n\ + b _0819A0E2\n\ +_0819A0DE:\n\ + add r5, r3, r5\n\ + str r5, [sp, #0x14]\n\ +_0819A0E2:\n\ + ldr r0, [sp]\n\ + ldrh r1, [r0, #0x4]\n\ + mov r2, #0x7\n\ + add r0, r1, #0\n\ + and r0, r2\n\ + add r1, r0\n\ + asr r1, #3\n\ + str r1, [sp, #0x18]\n\ + ldr r0, [sp, #0x4]\n\ + ldrh r1, [r0, #0x4]\n\ + add r0, r1, #0\n\ + and r0, r2\n\ + add r1, r0\n\ + asr r1, #3\n\ + str r1, [sp, #0x1C]\n\ + mov r12, r3\n\ + mov r8, r4\n\ + ldr r1, [sp, #0x14]\n\ + cmp r12, r1\n\ + blt _0819A10C\n\ + b _0819A24A\n\ +_0819A10C:\n\ + ldr r5, [sp, #0x8]\n\ + ldr r6, [sp, #0xC]\n\ + mov r2, r12\n\ + add r2, #0x1\n\ + str r2, [sp, #0x20]\n\ + mov r0, r8\n\ + add r0, #0x1\n\ + str r0, [sp, #0x24]\n\ + ldr r1, [sp, #0x10]\n\ + cmp r5, r1\n\ + blt _0819A124\n\ + b _0819A23A\n\ +_0819A124:\n\ + mov r7, #0x1\n\ + mov r2, #0xF0\n\ + mov r10, r2\n\ + mov r0, #0xF\n\ + mov r9, r0\n\ +_0819A12E:\n\ + asr r0, r5, #1\n\ + mov r1, #0x3\n\ + and r0, r1\n\ + ldr r2, [sp]\n\ + ldr r1, [r2]\n\ + add r1, r0\n\ + asr r0, r5, #3\n\ + lsl r0, #5\n\ + add r1, r0\n\ + mov r2, r12\n\ + asr r0, r2, #3\n\ + ldr r2, [sp, #0x18]\n\ + mul r0, r2\n\ + lsl r0, #5\n\ + add r1, r0\n\ + mov r2, r12\n\ + lsl r0, r2, #29\n\ + lsr r0, #27\n\ + add r3, r1, r0\n\ + asr r0, r6, #1\n\ + mov r1, #0x3\n\ + and r0, r1\n\ + ldr r2, [sp, #0x4]\n\ + ldr r1, [r2]\n\ + add r1, r0\n\ + asr r0, r6, #3\n\ + lsl r0, #5\n\ + add r1, r0\n\ + mov r2, r8\n\ + asr r0, r2, #3\n\ + ldr r2, [sp, #0x1C]\n\ + mul r0, r2\n\ + lsl r0, #5\n\ + add r1, r0\n\ + mov r2, r8\n\ + lsl r0, r2, #29\n\ + lsr r0, #27\n\ + add r4, r1, r0\n\ + add r0, r4, #0\n\ + and r0, r7\n\ + cmp r0, #0\n\ + beq _0819A1DA\n\ + sub r4, #0x1\n\ + add r0, r6, #0\n\ + and r0, r7\n\ + cmp r0, #0\n\ + beq _0819A1B2\n\ + ldrh r0, [r4]\n\ + ldr r2, =0x00000fff\n\ + and r2, r0\n\ + add r0, r5, #0\n\ + and r0, r7\n\ + cmp r0, #0\n\ + beq _0819A1A8\n\ + ldrb r1, [r3]\n\ + mov r0, r10\n\ + and r0, r1\n\ + lsl r0, #8\n\ + b _0819A22A\n\ + .pool\n\ +_0819A1A8:\n\ + ldrb r1, [r3]\n\ + mov r0, r9\n\ + and r0, r1\n\ + lsl r0, #12\n\ + b _0819A22A\n\ +_0819A1B2:\n\ + ldrh r0, [r4]\n\ + ldr r2, =0x0000f0ff\n\ + and r2, r0\n\ + add r0, r5, #0\n\ + and r0, r7\n\ + cmp r0, #0\n\ + beq _0819A1D0\n\ + ldrb r1, [r3]\n\ + mov r0, r10\n\ + and r0, r1\n\ + lsl r0, #4\n\ + b _0819A22A\n\ + .pool\n\ +_0819A1D0:\n\ + ldrb r1, [r3]\n\ + mov r0, r9\n\ + and r0, r1\n\ + lsl r0, #8\n\ + b _0819A22A\n\ +_0819A1DA:\n\ + add r0, r6, #0\n\ + and r0, r7\n\ + cmp r0, #0\n\ + beq _0819A206\n\ + ldrh r0, [r4]\n\ + ldr r2, =0x0000ff0f\n\ + and r2, r0\n\ + add r0, r5, #0\n\ + and r0, r7\n\ + cmp r0, #0\n\ + beq _0819A1FC\n\ + ldrb r1, [r3]\n\ + mov r0, r10\n\ + b _0819A228\n\ + .pool\n\ +_0819A1FC:\n\ + ldrb r1, [r3]\n\ + mov r0, r9\n\ + and r0, r1\n\ + lsl r0, #4\n\ + b _0819A22A\n\ +_0819A206:\n\ + ldrh r0, [r4]\n\ + ldr r2, =0x0000fff0\n\ + and r2, r0\n\ + add r0, r5, #0\n\ + and r0, r7\n\ + cmp r0, #0\n\ + beq _0819A224\n\ + ldrb r1, [r3]\n\ + mov r0, r10\n\ + and r0, r1\n\ + lsr r0, #4\n\ + b _0819A22A\n\ + .pool\n\ +_0819A224:\n\ + ldrb r1, [r3]\n\ + mov r0, r9\n\ +_0819A228:\n\ + and r0, r1\n\ +_0819A22A:\n\ + orr r2, r0\n\ + strh r2, [r4]\n\ + add r5, #0x1\n\ + add r6, #0x1\n\ + ldr r0, [sp, #0x10]\n\ + cmp r5, r0\n\ + bge _0819A23A\n\ + b _0819A12E\n\ +_0819A23A:\n\ + ldr r1, [sp, #0x20]\n\ + mov r12, r1\n\ + ldr r2, [sp, #0x24]\n\ + mov r8, r2\n\ + ldr r0, [sp, #0x14]\n\ + cmp r12, r0\n\ + bge _0819A24A\n\ + b _0819A10C\n\ +_0819A24A:\n\ + add sp, #0x28\n\ + pop {r3-r5}\n\ + mov r8, r3\n\ + mov r9, r4\n\ + mov r10, r5\n\ + pop {r4-r7}\n\ + pop {r0}\n\ + bx r0\n"); +} +#endif + +void sub_819A25C(u8 palOffset, u16 speciesId) +{ + LoadPalette(GetValidMonIconPalettePtr(speciesId), palOffset, 0x20); +} + +void sub_819A27C(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y) +{ + BlitBitmapToWindow(windowId, GetMonIconPtr(speciesId, personality, 1), x, y, 32, 32); +} + +void sub_819A2BC(u8 palOffset, u8 palId) +{ + const u16 *palette; + + switch (palId) + { + case 0: + default: + palette = gFireRedMenuElements1_Pal; + break; + case 1: + palette = gFireRedMenuElements2_Pal; + break; + case 2: + palette = gFireRedMenuElements3_Pal; + break; + } + + LoadPalette(palette, palOffset, 0x20); +} + +void blit_move_info_icon(u8 windowId, u8 iconId, u16 x, u16 y) +{ + BlitBitmapRectToWindow(windowId, gFireRedMenuElements_Gfx + gUnknown_0860F0D4[iconId].unk3 * 32, 0, 0, 128, 128, x, y, gUnknown_0860F0D4[iconId].unk1, gUnknown_0860F0D4[iconId].unk2); +} + +void sub_819A344(u8 a0, u8 *a1, u8 a2) +{ + s32 curFlag; + s32 flagCount; + u8 *endOfString; + u8 *string = a1; + + *(string++) = EXT_CTRL_CODE_BEGIN; + *(string++) = EXT_CTRL_CODE_COLOR; + *(string++) = a2; + *(string++) = EXT_CTRL_CODE_BEGIN; + *(string++) = EXT_CTRL_CODE_SHADOW; + *(string++) = a2 + 1; + + switch (a0) + { + case 0: + StringCopy(string, gSaveBlock2Ptr->playerName); + break; + case 1: + if (IsNationalPokedexEnabled()) + string = ConvertIntToDecimalStringN(string, pokedex_count(1), 0, 3); + else + string = ConvertIntToDecimalStringN(string, sub_80C0844(1), 0, 3); + *string = EOS; + break; + case 2: + string = ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeHours, 0, 3); + *(string++) = CHAR_COLON; + ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeMinutes, 2, 2); + break; + case 3: + sub_81245DC(string, gMapHeader.regionMapSectionId); + break; + case 4: + for (curFlag = FLAG_BADGE01_GET, flagCount = 0, endOfString = string + 1; curFlag <= FLAG_BADGE08_GET; curFlag++) + { + if (FlagGet(curFlag)) + flagCount++; + } + *string = flagCount + CHAR_0; + *endOfString = EOS; + break; + } +} diff --git a/src/mystery_event_menu.c b/src/mystery_event_menu.c index 0478f50cd..31b366ae9 100644 --- a/src/mystery_event_menu.c +++ b/src/mystery_event_menu.c @@ -17,7 +17,6 @@ #include "window.h" #include "gpu_regs.h" #include "text_window.h" -#include "new_menu_helpers.h" #include "decompress.h" // this file's functions @@ -291,13 +290,13 @@ static void CB2_MysteryEventMenu(void) static void PrintMysteryMenuText(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed) { - struct TextColor textColor; + u8 textColor[3]; u8 letterSpacing = 0; u8 lineSpacing = 1; - textColor.fgColor = 1; - textColor.bgColor = 2; - textColor.shadowColor = 3; + textColor[0] = 1; + textColor[1] = 2; + textColor[2] = 3; - FillWindowPixelBuffer(windowId, (textColor.fgColor) | (textColor.fgColor << 4)); - AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, lineSpacing, &textColor, speed, text); + FillWindowPixelBuffer(windowId, (textColor[0]) | (textColor[0] << 4)); + AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, lineSpacing, textColor, speed, text); } diff --git a/src/naming_screen.c b/src/naming_screen.c index 7139b5c90..47d8b8ad1 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -5,7 +5,6 @@ #include "task.h" #include "sprite.h" #include "string_util.h" -#include "new_menu_helpers.h" #include "window.h" #include "bg.h" #include "gpu_regs.h" @@ -530,7 +529,7 @@ static void DisplaySentToPCMessage(void) stringToDisplay++; StringExpandPlaceholders(gStringVar4, gUnknown_0858BDB8[stringToDisplay]); - sub_81973C4(0, 0); + NewMenuHelpers_DrawDialogueFrame(0, 0); gTextFlags.flag_0 = TRUE; AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), 0, 2, 1, 3); CopyWindowToVram(0, 3); @@ -1496,7 +1495,7 @@ static void TaskDummy3(void) } -static const struct TextColor sGenderColors[2] = +static const u8 sGenderColors[2][3] = { {0, 9, 8}, {0, 5, 4} @@ -1516,7 +1515,7 @@ static void sub_80E49BC(void) StringCopy(genderSymbol, gText_FemaleSymbol); isFemale = TRUE; } - box_print(gNamingScreenData->windows[2], 1, 0x68, 1, &sGenderColors[isFemale], -1, genderSymbol); + box_print(gNamingScreenData->windows[2], 1, 0x68, 1, sGenderColors[isFemale], -1, genderSymbol); } } @@ -1661,19 +1660,18 @@ static void sub_80E4D10(void) PutWindowTilemap(gNamingScreenData->windows[2]); } -static const struct AlignedTextColor sUnkColor1 = +struct TextColorThing // needed because of alignment... it's so stupid { - 13, 1, 2 + u8 colors[3][4]; }; -static const struct AlignedTextColor sUnkColor2 = +static const struct TextColorThing sUnkColorStruct = { - 14, 1, 2 -}; - -static const struct AlignedTextColor sUnkColor3 = -{ - 15, 1, 2 + { + {13, 1, 2}, + {14, 1, 2}, + {15, 1, 2} + } }; static const u8 sFillValues[3] = @@ -1681,11 +1679,11 @@ static const u8 sFillValues[3] = 0xEE, 0xDD, 0xFF }; -static const struct AlignedTextColor *const sUnkColors[3] = +static const u8 *const sUnkColors[3] = { - &sUnkColor2, - &sUnkColor1, - &sUnkColor3 + sUnkColorStruct.colors[1], + sUnkColorStruct.colors[0], + sUnkColorStruct.colors[2] }; static void sub_80E4DE4(u8 window, u8 a1) @@ -1738,7 +1736,7 @@ static void sub_80E4E5C(void) static void sub_80E4EF0(void) { - const struct TextColor color[] = { 15, 1, 2 }; + const u8 color[3] = { 15, 1, 2 }; FillWindowPixelBuffer(gNamingScreenData->windows[4], 0xFF); box_print(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack); diff --git a/src/pokeblock.c b/src/pokeblock.c index 472b030e0..b9d1d94c6 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -6,7 +6,6 @@ #include "menu.h" #include "task.h" #include "menu_helpers.h" -#include "new_menu_helpers.h" #include "pokemon.h" #include "graphics.h" #include "malloc.h" @@ -284,7 +283,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokeblockCase = SpriteCallbackDummy }; -static const struct TextColor sTextColorInPokeblockMenu = {0, 2, 3}; +static const u8 sTextColorInPokeblockMenu[3] = {0, 2, 3}; static const struct Pokeblock sFavoritePokeblocksTable[] = { @@ -583,7 +582,7 @@ static void HandleInitWindows(void) static void PrintOnPokeblockWindow(u8 windowId, const u8 *string, s32 x) { - AddTextPrinterParameterized2(windowId, 1, x, 1, 0, 0, &sTextColorInPokeblockMenu, 0, string); + AddTextPrinterParameterized2(windowId, 1, x, 1, 0, 0, sTextColorInPokeblockMenu, 0, string); } static void PutPokeblockInfoText(void) diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index d899e54f1..2039808cb 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -16,7 +16,6 @@ #include "event_data.h" #include "strings.h" #include "string_util.h" -#include "new_menu_helpers.h" #include "party_menu.h" #include "m4a.h" #include "sound.h" diff --git a/src/pokemon_1.c b/src/pokemon_1.c index 98a35454f..cafd86c07 100644 --- a/src/pokemon_1.c +++ b/src/pokemon_1.c @@ -2,7 +2,11 @@ #include "pokemon.h" #include "random.h" #include "main.h" +#include "constants/species.h" +#include "constants/abilities.h" #include "constants/items.h" +#include "constants/trainers.h" +#include "constants/moves.h" #include "string_util.h" #include "text.h" @@ -14,6 +18,68 @@ extern u8 sav1_map_get_name(void); +// EWRAM vars +EWRAM_DATA u8 sLearningMoveTableID = 0; +EWRAM_DATA u8 gPlayerPartyCount = 0; +EWRAM_DATA u8 gEnemyPartyCount = 0; +EWRAM_DATA struct Pokemon gPlayerParty[PARTY_SIZE] = {0}; +EWRAM_DATA struct Pokemon gEnemyParty[PARTY_SIZE] = {0}; + +// const rom data +const u16 gSpeciesToHoennPokedexNum[] = {203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 156, 157, 112, 113, 227, 228, 229, 230, 231, 232, 233, 234, 153, 154, 138, 139, 63, 64, 88, 89, 90, 235, 236, 237, 238, 239, 240, 241, 242, 158, 159, 243, 244, 245, 246, 247, 248, 249, 39, 40, 41, 73, 74, 75, 250, 251, 252, 66, 67, 57, 58, 59, 253, 254, 255, 256, 82, 83, 257, 92, 93, 258, 259, 106, 107, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 84, 85, 270, 271, 272, 273, 274, 275, 276, 108, 109, 169, 170, 277, 278, 279, 184, 185, 50, 51, 143, 144, 280, 281, 282, 283, 284, 167, 285, 52, 53, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 65, 181, 182, 155, 324, 137, 325, 326, 162, 163, 327, 328, 329, 91, 55, 56, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 161, 164, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 168, 357, 358, 359, 103, 104, 360, 361, 180, 362, 363, 364, 365, 115, 366, 367, 186, 165, 166, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 42, 43, 44, 25, 26, 34, 35, 114, 27, 28, 32, 33, 99, 100, 61, 62, 145, 131, 132, 60, 105, 68, 127, 128, 183, 129, 130, 140, 141, 97, 98, 116, 117, 118, 48, 49, 78, 79, 101, 102, 173, 174, 175, 119, 120, 171, 172, 125, 126, 54, 110, 111, 80, 81, 69, 76, 77, 121, 122, 160, 148, 149, 94, 36, 37, 38, 95, 96, 150, 45, 46, 47, 176, 177, 178, 152, 146, 147, 124, 123, 179, 70, 71, 72, 142, 86, 87, 133, 134, 135, 136, 29, 30, 31, 187, 188, 189, 190, 191, 192, 193, 194, 195, 198, 199, 200, 196, 197, 201, 202, 151}; +const u16 gSpeciesToNationalPokedexNum[] = {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, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 290, 291, 292, 276, 277, 285, 286, 327, 278, 279, 283, 284, 320, 321, 300, 301, 352, 343, 344, 299, 324, 302, 339, 340, 370, 341, 342, 349, 350, 318, 319, 328, 329, 330, 296, 297, 309, 310, 322, 323, 363, 364, 365, 331, 332, 361, 362, 337, 338, 298, 325, 326, 311, 312, 303, 307, 308, 333, 334, 360, 355, 356, 315, 287, 288, 289, 316, 317, 357, 293, 294, 295, 366, 367, 368, 359, 353, 354, 336, 335, 369, 304, 305, 306, 351, 313, 314, 345, 346, 347, 348, 280, 281, 282, 371, 372, 373, 374, 375, 376, 377, 378, 379, 382, 383, 384, 380, 381, 385, 386, 358}; +const u16 gHoennToNationalOrder[] = {252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 63, 64, 65, 290, 291, 292, 293, 294, 295, 296, 297, 118, 119, 129, 130, 298, 183, 184, 74, 75, 76, 299, 300, 301, 41, 42, 169, 72, 73, 302, 303, 304, 305, 306, 66, 67, 68, 307, 308, 309, 310, 311, 312, 81, 82, 100, 101, 313, 314, 43, 44, 45, 182, 84, 85, 315, 316, 317, 318, 319, 320, 321, 322, 323, 218, 219, 324, 88, 89, 109, 110, 325, 326, 27, 28, 327, 227, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 174, 39, 40, 349, 350, 351, 120, 121, 352, 353, 354, 355, 356, 357, 358, 359, 37, 38, 172, 25, 26, 54, 55, 360, 202, 177, 178, 203, 231, 232, 127, 214, 111, 112, 361, 362, 363, 364, 365, 366, 367, 368, 369, 222, 170, 171, 370, 116, 117, 230, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 29, 30, 31, 32, 33, 34, 35, 36, 46, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 59, 60, 61, 62, 69, 70, 71, 77, 78, 79, 80, 83, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 102, 103, 104, 105, 106, 107, 108, 113, 114, 115, 122, 123, 124, 125, 126, 128, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 173, 175, 176, 179, 180, 181, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 215, 216, 217, 220, 221, 223, 224, 225, 226, 228, 229, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411}; + +const struct SpindaSpot gSpindaSpotGraphics[] = +{ + {16, 7, INCBIN_U16("graphics/spinda_spots/spot_0.bin")}, + {40, 8, INCBIN_U16("graphics/spinda_spots/spot_1.bin")}, + {22, 25, INCBIN_U16("graphics/spinda_spots/spot_2.bin")}, + {34, 26, INCBIN_U16("graphics/spinda_spots/spot_3.bin")} +}; + +#include "data/pokemon/item_effects.h" + +const s8 gNatureStatTable[][5] = +{ + // Atk Def Spd Sp.Atk Sp.Def + { 0, 0, 0, 0, 0}, // Hardy + { +1, -1, 0, 0, 0}, // Lonely + { +1, 0, -1, 0, 0}, // Brave + { +1, 0, 0, -1, 0}, // Adamant + { +1, 0, 0, 0, -1}, // Naughty + { -1, +1, 0, 0, 0}, // Bold + { 0, 0, 0, 0, 0}, // Docile + { 0, +1, -1, 0, 0}, // Relaxed + { 0, +1, 0, -1, 0}, // Impish + { 0, +1, 0, 0, -1}, // Lax + { -1, 0, +1, 0, 0}, // Timid + { 0, -1, +1, 0, 0}, // Hasty + { 0, 0, 0, 0, 0}, // Serious + { 0, 0, +1, -1, 0}, // Jolly + { 0, 0, +1, 0, -1}, // Naive + { -1, 0, 0, +1, 0}, // Modest + { 0, -1, 0, +1, 0}, // Mild + { 0, 0, -1, +1, 0}, // Quiet + { 0, 0, 0, 0, 0}, // Bashful + { 0, 0, 0, +1, -1}, // Rash + { -1, 0, 0, 0, +1}, // Calm + { 0, -1, 0, 0, +1}, // Gentle + { 0, 0, -1, 0, +1}, // Sassy + { 0, 0, 0, -1, +1}, // Careful + { 0, 0, 0, 0, 0}, // Quirky +}; + +#include "data/pokemon/tmhm_learnsets.h" +#include "data/pokemon/trainer_class_lookups.h" +#include "data/pokemon/cry_ids.h" +#include "data/pokemon/experience_tables.h" +#include "data/pokemon/base_stats.h" +#include "data/pokemon/level_up_learnsets.h" +#include "data/pokemon/evolution.h" +#include "data/pokemon/level_up_learnset_pointers.h" + +// code void ZeroBoxMonData(struct BoxPokemon *boxMon) { u8 *raw = (u8 *)boxMon; @@ -43,14 +109,14 @@ void ZeroMonData(struct Pokemon *mon) void ZeroPlayerPartyMons(void) { s32 i; - for (i = 0; i < 6; i++) + for (i = 0; i < PARTY_SIZE; i++) ZeroMonData(&gPlayerParty[i]); } void ZeroEnemyPartyMons(void) { s32 i; - for (i = 0; i < 6; i++) + for (i = 0; i < PARTY_SIZE; i++) ZeroMonData(&gEnemyParty[i]); } diff --git a/src/pokemon_2.c b/src/pokemon_2.c index 730f245d7..3f37381c3 100644 --- a/src/pokemon_2.c +++ b/src/pokemon_2.c @@ -332,7 +332,7 @@ u32 GetMonData(struct Pokemon *mon, s32 field, u8* data) ret = mon->defense; break; case MON_DATA_SPEED: - ret = GetDeoxysStat(mon, STAT_SPD); + ret = GetDeoxysStat(mon, STAT_SPEED); if (!ret) ret = mon->speed; break; @@ -1222,20 +1222,20 @@ void CreateSecretBaseEnemyParty(struct SecretBaseRecord *secretBaseRecord) } } -extern const u8 gUnknown_0831F578[]; -extern const u8 gTrainerClassToNameIndex[]; +extern const u8 gFacilityClassToPicIndex[]; +extern const u8 gFacilityClassToTrainerClass[]; extern const u8 gSecretBaseTrainerClasses[][5]; u8 GetSecretBaseTrainerPicIndex(void) { u8 trainerClass = gSecretBaseTrainerClasses[gBattleResources->secretBase->gender][gBattleResources->secretBase->trainerId[0] % 5]; - return gUnknown_0831F578[trainerClass]; + return gFacilityClassToPicIndex[trainerClass]; } u8 GetSecretBaseTrainerNameIndex(void) { u8 trainerClass = gSecretBaseTrainerClasses[gBattleResources->secretBase->gender][gBattleResources->secretBase->trainerId[0] % 5]; - return gTrainerClassToNameIndex[trainerClass]; + return gFacilityClassToTrainerClass[trainerClass]; } bool8 IsPlayerPartyAndPokemonStorageFull(void) diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 7ce58a80b..0dd1131de 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -301,56 +301,56 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) for (i = 0; i < 5; i++) { - switch (gEvolutionTable[species].evolutions[i].method) + switch (gEvolutionTable[species][i].method) { case EVO_FRIENDSHIP: if (friendship >= 220) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_FRIENDSHIP_DAY: RtcCalcLocalTime(); if (gLocalTime.hours >= 12 && gLocalTime.hours < 24 && friendship >= 220) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_FRIENDSHIP_NIGHT: RtcCalcLocalTime(); if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && friendship >= 220) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL: - if (gEvolutionTable[species].evolutions[i].param <= level) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + if (gEvolutionTable[species][i].param <= level) + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL_ATK_GT_DEF: - if (gEvolutionTable[species].evolutions[i].param <= level) + if (gEvolutionTable[species][i].param <= level) if (GetMonData(mon, MON_DATA_ATK, 0) > GetMonData(mon, MON_DATA_DEF, 0)) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL_ATK_EQ_DEF: - if (gEvolutionTable[species].evolutions[i].param <= level) + if (gEvolutionTable[species][i].param <= level) if (GetMonData(mon, MON_DATA_ATK, 0) == GetMonData(mon, MON_DATA_DEF, 0)) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL_ATK_LT_DEF: - if (gEvolutionTable[species].evolutions[i].param <= level) + if (gEvolutionTable[species][i].param <= level) if (GetMonData(mon, MON_DATA_ATK, 0) < GetMonData(mon, MON_DATA_DEF, 0)) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL_SILCOON: - if (gEvolutionTable[species].evolutions[i].param <= level && (upperPersonality % 10) <= 4) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + if (gEvolutionTable[species][i].param <= level && (upperPersonality % 10) <= 4) + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL_CASCOON: - if (gEvolutionTable[species].evolutions[i].param <= level && (upperPersonality % 10) > 4) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + if (gEvolutionTable[species][i].param <= level && (upperPersonality % 10) > 4) + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_LEVEL_NINJASK: - if (gEvolutionTable[species].evolutions[i].param <= level) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + if (gEvolutionTable[species][i].param <= level) + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_BEAUTY: - if (gEvolutionTable[species].evolutions[i].param <= beauty) - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + if (gEvolutionTable[species][i].param <= beauty) + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; } } @@ -358,17 +358,17 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) case 1: for (i = 0; i < 5; i++) { - switch (gEvolutionTable[species].evolutions[i].method) + switch (gEvolutionTable[species][i].method) { case EVO_TRADE: - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_TRADE_ITEM: - if (gEvolutionTable[species].evolutions[i].param == heldItem) + if (gEvolutionTable[species][i].param == heldItem) { heldItem = 0; SetMonData(mon, MON_DATA_HELD_ITEM, (u8 *)&heldItem); - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + targetSpecies = gEvolutionTable[species][i].targetSpecies; } break; } @@ -378,10 +378,10 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) case 3: for (i = 0; i < 5; i++) { - if (gEvolutionTable[species].evolutions[i].method == EVO_ITEM - && gEvolutionTable[species].evolutions[i].param == evolutionItem) + if (gEvolutionTable[species][i].method == EVO_ITEM + && gEvolutionTable[species][i].param == evolutionItem) { - targetSpecies = gEvolutionTable[species].evolutions[i].targetSpecies; + targetSpecies = gEvolutionTable[species][i].targetSpecies; break; } } @@ -1652,11 +1652,11 @@ u8 sub_806EF84(u8 arg0, u8 arg1) return i; } -extern const u8 gUnknown_0831F578[]; +extern const u8 gFacilityClassToPicIndex[]; u16 sub_806EFF0(u16 arg0) { - return gUnknown_0831F578[arg0]; + return gFacilityClassToPicIndex[arg0]; } u16 PlayerGenderToFrontTrainerPicId(u8 playerGender) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index bb196dd27..7f8c24ab7 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -71,7 +71,7 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_8571730[] = sSpriteAffineAnim_8571720 }; -const struct TextColor gUnknown_08571734[] = {4, 0xF, 0xE}; +const u8 gUnknown_08571734[] = {4, 0xF, 0xE}; const u8 gUnknown_08571737[] = _("/30"); // code diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index a1f422180..8c9e7a8a0 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -52,7 +52,7 @@ extern u16 gSummaryScreenWindow_Tilemap[]; extern struct ContestMove gContestMoves[]; extern struct ContestEffect gContestEffects[]; extern struct WindowTemplate gUnknown_0861CC24; -extern struct TextColor gUnknown_0861CD2C[]; +extern u8 gUnknown_0861CD2C[][3]; extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1]; extern u8 gText_MaleSymbol[]; extern u8 gText_FemaleSymbol[]; @@ -160,7 +160,7 @@ extern struct BattleMove gBattleMoves[]; extern u32 ChangeBgX(u8 bg, u32 value, u8 op); extern void sub_8199C30(u8 a, u8 b, u8 c, u8 d, u8 e, u8 f); -extern void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor* colors, s8 speed, u8 *str); +extern void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8* colors, s8 speed, u8 *str); extern s32 GetStringCenterAlignXOffset(u8 fontId, u8 *str, s32 totalWidth); extern s32 GetStringRightAlignXOffset(u8 fontId, u8 *str, s32 totalWidth); extern bool8 sub_81A6BF4(); @@ -2555,7 +2555,7 @@ void sub_81C2554() void sub_81C25A4(u8 a, u8 *b, u8 c, u8 d, u8 e, u8 f) { - AddTextPrinterParameterized2(a, 1, c, d, 0, e, &gUnknown_0861CD2C[f], 0, b); + AddTextPrinterParameterized2(a, 1, c, d, 0, e, gUnknown_0861CD2C[f], 0, b); } void sub_81C25E8() diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index 75d994162..9bd462b60 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -17,7 +17,6 @@ #include "bg.h" #include "window.h" #include "gpu_regs.h" -#include "new_menu_helpers.h" struct ResetRtcStruct { diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 95897e721..b207d7e74 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -168,12 +168,12 @@ static bool8 WipeSectors(u32); // although this is a general text printer, it's only used in this file. static void SaveFailedScreenTextPrint(u8 *text, u8 var1, u8 var2) { - struct TextColor color; + u8 color[3]; - color.fgColor = 0; - color.bgColor = 15; - color.shadowColor = 3; - AddTextPrinterParameterized2(gSaveFailedWindowIds[TEXT_WIN_ID], 1, var1 * 8, var2 * 8 + 1, 0, 0, &color, 0, text); + color[0] = 0; + color[1] = 15; + color[2] = 3; + AddTextPrinterParameterized2(gSaveFailedWindowIds[TEXT_WIN_ID], 1, var1 * 8, var2 * 8 + 1, 0, 0, color, 0, text); } void DoSaveFailedScreen(u8 saveType) diff --git a/src/scrcmd.c b/src/scrcmd.c index b73ea2125..d2e9c13c9 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -29,7 +29,6 @@ #include "menu.h" #include "money.h" #include "mystery_event_script.h" -#include "new_menu_helpers.h" #include "palette.h" #include "party_menu.h" #include "pokemon_3.h" @@ -1306,7 +1305,7 @@ bool8 ScrCmd_cmdDB(struct ScriptContext *ctx) if (msg == NULL) msg = (const u8 *)ctx->data[0]; sub_81973A4(); - sub_81973C4(0, 1); + NewMenuHelpers_DrawDialogueFrame(0, 1); PrintTextOnWindow(0, 1, msg, 0, 1, 0, 0); return FALSE; } @@ -1523,7 +1522,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) template2 = template1; gUnknown_03000F30 = AddWindow(&template2); sub_809882C(gUnknown_03000F30, 0x214, 0xE0); - sub_81973FC(gUnknown_03000F30, 0); + NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0); PutWindowTilemap(gUnknown_03000F30); FillWindowPixelBuffer(gUnknown_03000F30, 0x11); PrintTextOnWindow(gUnknown_03000F30, 6, gStringVar4, temp1, temp2, 0xFF, 0x0); @@ -1644,7 +1643,7 @@ _0809AEC6:\n\ bl sub_809882C\n\ ldrb r0, [r5]\n\ mov r1, #0\n\ - bl sub_81973FC\n\ + bl NewMenuHelpers_DrawStdWindowFrame\n\ ldrb r0, [r5]\n\ bl PutWindowTilemap\n\ ldrb r0, [r5]\n\ diff --git a/src/secret_base.c b/src/secret_base.c index bb92bc5a9..e3c06a75d 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -9,7 +9,6 @@ #include "window.h" #include "menu.h" #include "menu_helpers.h" -#include "new_menu_helpers.h" #include "menu_indicators.h" #include "constants/maps.h" #include "constants/songs.h" @@ -33,6 +32,7 @@ #include "international_string_util.h" #include "event_data.h" #include "battle.h" +#include "battle_setup.h" #include "rom6.h" #include "decoration.h" #include "link.h" diff --git a/src/start_menu.c b/src/start_menu.c index 53c5106d9..d076d307d 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -32,7 +32,7 @@ extern bool32 InUnionRoom(void); extern bool8 InBattlePike(void); extern bool8 InBattlePyramid(void); extern bool8 InMultiBattleRoom(void); -extern void sub_81973FC(u8 windowId, u8 a1); +extern void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, u8 a1); extern void sub_8198070(u8 windowId, u8 a1); // this file's functions @@ -236,7 +236,7 @@ void DisplaySafariBallsWindow(void) { sSafariBallsWindowId = AddWindow(&gSafariBallsWindowTemplate); PutWindowTilemap(sSafariBallsWindowId); - sub_81973FC(sSafariBallsWindowId, 0); + NewMenuHelpers_DrawStdWindowFrame(sSafariBallsWindowId, 0); ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_SafariBallStock); PrintTextOnWindow(sSafariBallsWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL); @@ -251,7 +251,7 @@ void DisplayPyramidFloorWindow(void) else sBattlePyramidFloorWindowId = AddWindow(&gPyramidFloorWindowTemplate_2); PutWindowTilemap(sBattlePyramidFloorWindowId); - sub_81973FC(sBattlePyramidFloorWindowId, 0); + NewMenuHelpers_DrawStdWindowFrame(sBattlePyramidFloorWindowId, 0); StringCopy(gStringVar1, sPyramindFloorNames[gSaveBlock2Ptr->field_CAA[4]]); StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor); PrintTextOnWindow(sBattlePyramidFloorWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL); diff --git a/src/text.c b/src/text.c index 936f96798..6a83d5d15 100644 --- a/src/text.c +++ b/src/text.c @@ -164,7 +164,7 @@ u16 PrintTextOnWindow(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 spee subPrinter.letterSpacing = gFonts[fontId].letterSpacing; subPrinter.lineSpacing = gFonts[fontId].lineSpacing; subPrinter.fontColor_l = gFonts[fontId].fontColor_l; - subPrinter.fontColor_h = gFonts[fontId].fontColor_h; + subPrinter.fgColor = gFonts[fontId].fgColor; subPrinter.bgColor = gFonts[fontId].bgColor; subPrinter.shadowColor = gFonts[fontId].shadowColor; return AddTextPrinter(&subPrinter, speed, callback); @@ -194,7 +194,7 @@ bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*ca gTempTextPrinter.minLetterSpacing = 0; gTempTextPrinter.japanese = 0; - GenerateFontHalfRowLookupTable(textSubPrinter->fontColor_h, textSubPrinter->bgColor, textSubPrinter->shadowColor); + GenerateFontHalfRowLookupTable(textSubPrinter->fgColor, textSubPrinter->bgColor, textSubPrinter->shadowColor); if (speed != TEXT_SPEED_FF && speed != 0x0) { --gTempTextPrinter.text_speed; @@ -3518,7 +3518,7 @@ u8 GetFontAttribute(u8 fontId, u8 attributeId) result = gFontInfos[fontId].fontColor_l; break; case 5: - result = gFontInfos[fontId].fontColor_h; + result = gFontInfos[fontId].fgColor; break; case 6: result = gFontInfos[fontId].bgColor; diff --git a/src/title_screen.c b/src/title_screen.c new file mode 100644 index 000000000..4e25c8152 --- /dev/null +++ b/src/title_screen.c @@ -0,0 +1,783 @@ +#include "global.h" +#include "title_screen.h" +#include "sprite.h" +#include "gba/m4a_internal.h" +#include "clear_save_data_menu.h" +#include "decompress.h" +#include "event_data.h" +#include "intro.h" +#include "m4a.h" +#include "main.h" +#include "main_menu.h" +#include "palette.h" +#include "reset_rtc_screen.h" +#include "berry_fix_program.h" +#include "sound.h" +#include "sprite.h" +#include "task.h" +#include "scanline_effect.h" +#include "gpu_regs.h" +#include "trig.h" +#include "constants/rgb.h" + +#define VERSION_BANNER_SHAPE 1 +#define VERSION_BANNER_RIGHT_TILEOFFSET 64 +#define VERSION_BANNER_BYTES 0x1000 +#define VERSION_BANNER_LEFT_X 98 +#define VERSION_BANNER_RIGHT_X 162 +#define VERSION_BANNER_Y 2 +#define VERSION_BANNER_Y_GOAL 66 +#define START_BANNER_X 128 + +#define CLEAR_SAVE_BUTTON_COMBO (B_BUTTON | SELECT_BUTTON | DPAD_UP) +#define RESET_RTC_BUTTON_COMBO (B_BUTTON | SELECT_BUTTON | DPAD_LEFT) +#define BERRY_UPDATE_BUTTON_COMBO (B_BUTTON | SELECT_BUTTON) +#define A_B_START_SELECT (A_BUTTON | B_BUTTON | START_BUTTON | SELECT_BUTTON) + +extern struct MusicPlayerInfo gMPlayInfo_BGM; +extern u16 gBattle_BG1_X; +extern u16 gBattle_BG1_Y; + +extern const u8 gTitleScreenEmeraldVersionGfx[]; +extern const u8 gTitleScreenPressStartGfx[]; +extern const u8 gTitleScreenPokemonLogoGfx[]; +extern const u8 gUnknown_08DE0644[]; +extern const u8 gUnknown_08DDE458[]; +extern const u16 gTitleScreenBgPalettes[]; +extern const u16 gTitleScreenPressStartPal[]; +extern const u16 gTitleScreenEmeraldVersionPal[]; + +// this file's functions +static void MainCB2(void); +static void Task_TitleScreenPhase1(u8); +static void Task_TitleScreenPhase2(u8); +static void Task_TitleScreenPhase3(u8); +static void CB2_GoToMainMenu(void); +static void CB2_GoToClearSaveDataScreen(void); +static void CB2_GoToResetRtcScreen(void); +static void CB2_GoToBerryFixScreen(void); +static void CB2_GoToCopyrightScreen(void); +static void UpdateLegendaryMarkingColor(u8); + +static void SpriteCB_VersionBannerLeft(struct Sprite *sprite); +static void SpriteCB_VersionBannerRight(struct Sprite *sprite); +static void SpriteCB_PressStartCopyrightBanner(struct Sprite *sprite); +static void SpriteCB_PokemonLogoShine(struct Sprite *sprite); + +// const rom data +static const u16 sUnusedUnknownPal[] = INCBIN_U16("graphics/title_screen/unk_853EF78.gbapal"); + +static const u8 sTitleScreenRayquazaGfx[] = INCBIN_U8("graphics/title_screen/rayquaza.4bpp.lz"); +static const u8 sTitleScreenRayquazaTilemap[] = INCBIN_U8("graphics/title_screen/rayquaza.bin.lz"); +static const u8 sTitleScreenLogoShineGfx[] = INCBIN_U8("graphics/title_screen/logo_shine.4bpp.lz"); +static const u8 sTitleScreenCloudsGfx[] = INCBIN_U8("graphics/title_screen/clouds.4bpp.lz"); + +const u16 gUnknown_0853FF70[] = +{ + 0x0010, 0x0110, 0x0210, 0x0310, 0x0410, 0x0510, 0x0610, 0x0710, + 0x0810, 0x0910, 0x0a10, 0x0b10, 0x0c10, 0x0d10, 0x0e10, 0x0f10, + 0x100f, 0x100e, 0x100d, 0x100c, 0x100b, 0x100a, 0x1009, 0x1008, + 0x1007, 0x1006, 0x1005, 0x1004, 0x1003, 0x1002, 0x1001, 0x1000, + 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, + 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, + 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, + 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, +}; + +static const struct OamData sVersionBannerLeftOamData = +{ + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 1, + .shape = VERSION_BANNER_SHAPE, + .x = 0, + .matrixNum = 0, + .size = 3, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +static const struct OamData sVersionBannerRightOamData = +{ + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 1, + .shape = VERSION_BANNER_SHAPE, + .x = 0, + .matrixNum = 0, + .size = 3, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sVersionBannerLeftAnimSequence[] = +{ + ANIMCMD_FRAME(0, 30), + ANIMCMD_END, +}; + +static const union AnimCmd sVersionBannerRightAnimSequence[] = +{ + ANIMCMD_FRAME(VERSION_BANNER_RIGHT_TILEOFFSET, 30), + ANIMCMD_END, +}; + +static const union AnimCmd *const sVersionBannerLeftAnimTable[] = +{ + sVersionBannerLeftAnimSequence, +}; + +static const union AnimCmd *const sVersionBannerRightAnimTable[] = +{ + sVersionBannerRightAnimSequence, +}; + +static const struct SpriteTemplate sVersionBannerLeftSpriteTemplate = +{ + .tileTag = 1000, + .paletteTag = 1000, + .oam = &sVersionBannerLeftOamData, + .anims = sVersionBannerLeftAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_VersionBannerLeft, +}; + +static const struct SpriteTemplate sVersionBannerRightSpriteTemplate = +{ + .tileTag = 1000, + .paletteTag = 1000, + .oam = &sVersionBannerRightOamData, + .anims = sVersionBannerRightAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_VersionBannerRight, +}; + +static const struct CompressedSpriteSheet sSpriteSheet_EmeraldVersion[] = +{ + {gTitleScreenEmeraldVersionGfx, VERSION_BANNER_BYTES, 1000}, + {NULL}, +}; + +static const struct OamData sOamData_CopyrightBanner = +{ + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 1, + .x = 0, + .matrixNum = 0, + .size = 1, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sCopyrightBannerAnim0[] = +{ + ANIMCMD_FRAME(1, 4), + ANIMCMD_END, +}; +static const union AnimCmd sCopyrightBannerAnim1[] = +{ + ANIMCMD_FRAME(5, 4), + ANIMCMD_END, +}; +static const union AnimCmd sCopyrightBannerAnim2[] = +{ + ANIMCMD_FRAME(9, 4), + ANIMCMD_END, +}; +static const union AnimCmd sCopyrightBannerAnim3[] = +{ + ANIMCMD_FRAME(13, 4), + ANIMCMD_END, +}; +static const union AnimCmd sCopyrightBannerAnim4[] = +{ + ANIMCMD_FRAME(17, 4), + ANIMCMD_END, +}; +static const union AnimCmd sCopyrightBannerAnim5[] = +{ + ANIMCMD_FRAME(21, 4), + ANIMCMD_END, +}; +static const union AnimCmd sCopyrightBannerAnim6[] = +{ + ANIMCMD_FRAME(25, 4), + ANIMCMD_END, +}; +static const union AnimCmd sCopyrightBannerAnim7[] = +{ + ANIMCMD_FRAME(29, 4), + ANIMCMD_END, +}; +static const union AnimCmd sCopyrightBannerAnim8[] = +{ + ANIMCMD_FRAME(33, 4), + ANIMCMD_END, +}; +static const union AnimCmd sCopyrightBannerAnim9[] = +{ + ANIMCMD_FRAME(37, 4), + ANIMCMD_END, +}; + +static const union AnimCmd *const sStartCopyrightBannerAnimTable[] = +{ + sCopyrightBannerAnim0, + sCopyrightBannerAnim1, + sCopyrightBannerAnim2, + sCopyrightBannerAnim3, + sCopyrightBannerAnim4, + sCopyrightBannerAnim5, + sCopyrightBannerAnim6, + sCopyrightBannerAnim7, + sCopyrightBannerAnim8, + sCopyrightBannerAnim9, +}; + +static const struct SpriteTemplate sStartCopyrightBannerSpriteTemplate = +{ + .tileTag = 1001, + .paletteTag = 1001, + .oam = &sOamData_CopyrightBanner, + .anims = sStartCopyrightBannerAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_PressStartCopyrightBanner, +}; + +static const struct CompressedSpriteSheet sSpriteSheet_PressStart[] = +{ + {gTitleScreenPressStartGfx, 0x520, 1001}, + {NULL}, +}; + +static const struct SpritePalette sSpritePalette_PressStart[] = +{ + {gTitleScreenPressStartPal, 1001}, + {NULL}, +}; + +static const struct OamData sPokemonLogoShineOamData = +{ + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 3, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sPokemonLogoShineAnimSequence[] = +{ + ANIMCMD_FRAME(0, 4), + ANIMCMD_END, +}; + +static const union AnimCmd *const sPokemonLogoShineAnimTable[] = +{ + sPokemonLogoShineAnimSequence, +}; + +static const struct SpriteTemplate sPokemonLogoShineSpriteTemplate = +{ + .tileTag = 1002, + .paletteTag = 1001, + .oam = &sPokemonLogoShineOamData, + .anims = sPokemonLogoShineAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_PokemonLogoShine, +}; + +static const struct CompressedSpriteSheet sPokemonLogoShineSpriteSheet[] = +{ + {sTitleScreenLogoShineGfx, 0x800, 1002}, + {NULL}, +}; + +// code +static void SpriteCB_VersionBannerLeft(struct Sprite *sprite) +{ + if (gTasks[sprite->data[1]].data[1] != 0) + { + sprite->oam.objMode = 0; + sprite->pos1.y = VERSION_BANNER_Y_GOAL; + } + else + { + if (sprite->pos1.y != VERSION_BANNER_Y_GOAL) + sprite->pos1.y++; + if (sprite->data[0] != 0) + sprite->data[0]--; + SetGpuReg(REG_OFFSET_BLDALPHA, gUnknown_0853FF70[sprite->data[0]]); + } +} + +static void SpriteCB_VersionBannerRight(struct Sprite *sprite) +{ + if (gTasks[sprite->data[1]].data[1] != 0) + { + sprite->oam.objMode = 0; + sprite->pos1.y = VERSION_BANNER_Y_GOAL; + } + else + { + if (sprite->pos1.y != VERSION_BANNER_Y_GOAL) + sprite->pos1.y++; + } +} + +static void SpriteCB_PressStartCopyrightBanner(struct Sprite *sprite) +{ + if (sprite->data[0] == 1) + { + sprite->data[1]++; + // Alternate between hidden and shown every 16th frame + if (sprite->data[1] & 0x10) + sprite->invisible = FALSE; + else + sprite->invisible = TRUE; + } + else + { + sprite->invisible = FALSE; + } +} + +static void CreatePressStartBanner(s16 x, s16 y) +{ + u8 i; + u8 spriteId; + + x -= 64; + for (i = 0; i < 5; i++, x += 32) + { + spriteId = CreateSprite(&sStartCopyrightBannerSpriteTemplate, x, y, 0); + StartSpriteAnim(&gSprites[spriteId], i); + gSprites[spriteId].data[0] = 1; + } +} + +static void CreateCopyrightBanner(s16 x, s16 y) +{ + u8 i; + u8 spriteId; + + x -= 64; + for (i = 0; i < 5; i++, x += 32) + { + spriteId = CreateSprite(&sStartCopyrightBannerSpriteTemplate, x, y, 0); + StartSpriteAnim(&gSprites[spriteId], i + 5); + } +} + +static void SpriteCB_PokemonLogoShine(struct Sprite *sprite) +{ + if (sprite->pos1.x < 272) + { + if (sprite->data[0]) // Flash background + { + u16 backgroundColor; + + if (sprite->pos1.x < DISPLAY_WIDTH / 2) + { + // Brighten background color + if (sprite->data[1] < 31) + sprite->data[1]++; + if (sprite->data[1] < 31) + sprite->data[1]++; + } + else + { + // Darken background color + if (sprite->data[1] != 0) + sprite->data[1]--; + if (sprite->data[1] != 0) + sprite->data[1]--; + } + + backgroundColor = _RGB(sprite->data[1], sprite->data[1], sprite->data[1]); + if (sprite->pos1.x == DISPLAY_WIDTH / 2 + 12 + || sprite->pos1.x == DISPLAY_WIDTH / 2 + 16 + || sprite->pos1.x == DISPLAY_WIDTH / 2 + 20 + || sprite->pos1.x == DISPLAY_WIDTH / 2 + 24) + gPlttBufferFaded[0] = RGB(24, 31, 12); + else + gPlttBufferFaded[0] = backgroundColor; + } + sprite->pos1.x += 4; + } + else + { + gPlttBufferFaded[0] = RGB_BLACK; + DestroySprite(sprite); + } +} + +static void SpriteCB_PokemonLogoShine2(struct Sprite *sprite) +{ + if (sprite->pos1.x < 272) + sprite->pos1.x += 8; + else + DestroySprite(sprite); +} + +static void StartPokemonLogoShine(u8 flashBg) +{ + u8 spriteId; + + switch (flashBg) + { + case 0: + case 2: + spriteId = CreateSprite(&sPokemonLogoShineSpriteTemplate, 0, 68, 0); + gSprites[spriteId].oam.objMode = 2; + gSprites[spriteId].data[0] = flashBg; + break; + case 1: + spriteId = CreateSprite(&sPokemonLogoShineSpriteTemplate, 0, 68, 0); + gSprites[spriteId].oam.objMode = 2; + gSprites[spriteId].data[0] = flashBg; + gSprites[spriteId].invisible = TRUE; + + spriteId = CreateSprite(&sPokemonLogoShineSpriteTemplate, 0, 68, 0); + gSprites[spriteId].callback = SpriteCB_PokemonLogoShine2; + gSprites[spriteId].oam.objMode = 2; + + spriteId = CreateSprite(&sPokemonLogoShineSpriteTemplate, -80, 68, 0); + gSprites[spriteId].callback = SpriteCB_PokemonLogoShine2; + gSprites[spriteId].oam.objMode = 2; + break; + } +} + +static void VBlankCB(void) +{ + ScanlineEffect_InitHBlankDmaTransfer(); + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); + SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); +} + +#define tCounter data[0] +#define tSkipToNext data[1] + +void CB2_InitTitleScreen(void) +{ + switch (gMain.state) + { + default: + case 0: + SetVBlankCallback(NULL); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); + *((u16 *)PLTT) = RGB_WHITE; + SetGpuReg(REG_OFFSET_DISPCNT, 0); + SetGpuReg(REG_OFFSET_BG2CNT, 0); + SetGpuReg(REG_OFFSET_BG1CNT, 0); + SetGpuReg(REG_OFFSET_BG0CNT, 0); + SetGpuReg(REG_OFFSET_BG2HOFS, 0); + SetGpuReg(REG_OFFSET_BG2VOFS, 0); + SetGpuReg(REG_OFFSET_BG1HOFS, 0); + SetGpuReg(REG_OFFSET_BG1VOFS, 0); + SetGpuReg(REG_OFFSET_BG0HOFS, 0); + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + DmaFill16(3, 0, (void *)VRAM, VRAM_SIZE); + DmaFill32(3, 0, (void *)OAM, OAM_SIZE); + DmaFill16(3, 0, (void *)(PLTT + 2), PLTT_SIZE - 2); + ResetPaletteFade(); + gMain.state = 1; + break; + case 1: + LZ77UnCompVram(gTitleScreenPokemonLogoGfx, (void *)VRAM); + LZ77UnCompVram(gUnknown_08DE0644, (void *)(VRAM + 0x4800)); + LoadPalette(gTitleScreenBgPalettes, 0, 0x1E0); + LZ77UnCompVram(sTitleScreenRayquazaGfx, (void *)(VRAM + 0x8000)); + LZ77UnCompVram(sTitleScreenRayquazaTilemap, (void *)(VRAM + 0xD000)); + LZ77UnCompVram(sTitleScreenCloudsGfx, (void *)(VRAM + 0xC000)); + LZ77UnCompVram(gUnknown_08DDE458, (void *)(VRAM + 0xD800)); + ScanlineEffect_Stop(); + ResetTasks(); + ResetSpriteData(); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 9; + LoadCompressedObjectPic(&sSpriteSheet_EmeraldVersion[0]); + LoadCompressedObjectPic(&sSpriteSheet_PressStart[0]); + LoadCompressedObjectPic(&sPokemonLogoShineSpriteSheet[0]); + LoadPalette(gTitleScreenEmeraldVersionPal, 0x100, 0x20); + LoadSpritePalette(&sSpritePalette_PressStart[0]); + gMain.state = 2; + break; + case 2: + { + u8 taskId = CreateTask(Task_TitleScreenPhase1, 0); + + gTasks[taskId].tCounter = 256; + gTasks[taskId].tSkipToNext = FALSE; + gTasks[taskId].data[2] = -16; + gTasks[taskId].data[3] = -32; + gMain.state = 3; + break; + } + case 3: + BeginNormalPaletteFade(-1, 1, 0x10, 0, 0xFFFF); + SetVBlankCallback(VBlankCB); + gMain.state = 4; + break; + case 4: + sub_816F2A8(0x78, 0x50, 0x100, 0); + SetGpuReg(REG_OFFSET_BG2X_L, -29 * 256); + SetGpuReg(REG_OFFSET_BG2X_H, -1); + SetGpuReg(REG_OFFSET_BG2Y_L, -32 * 256); + SetGpuReg(REG_OFFSET_BG2Y_H, -1); + SetGpuReg(REG_OFFSET_WIN0H, 0); + SetGpuReg(REG_OFFSET_WIN0V, 0); + SetGpuReg(REG_OFFSET_WIN1H, 0); + SetGpuReg(REG_OFFSET_WIN1V, 0); + SetGpuReg(REG_OFFSET_WININ, 0x1F1F); + SetGpuReg(REG_OFFSET_WINOUT, 0x3F1F); + SetGpuReg(REG_OFFSET_BLDCNT, 0x84); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0xC); + SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_PRIORITY(3) | BGCNT_CHARBASE(2) | BGCNT_SCREENBASE(26) | BGCNT_16COLOR | BGCNT_TXT256x256); + SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(2) | BGCNT_CHARBASE(3) | BGCNT_SCREENBASE(27) | BGCNT_16COLOR | BGCNT_TXT256x256); + SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(1) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(9) | BGCNT_256COLOR | BGCNT_AFF256x256); + EnableInterrupts(INTR_FLAG_VBLANK); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 + | DISPCNT_OBJ_1D_MAP + | DISPCNT_BG2_ON + | DISPCNT_OBJ_ON + | DISPCNT_WIN0_ON + | DISPCNT_OBJWIN_ON); + m4aSongNumStart(0x19D); + gMain.state = 5; + break; + case 5: + if (!UpdatePaletteFade()) + { + StartPokemonLogoShine(0); + ScanlineEffect_InitWave(0, DISPLAY_HEIGHT, 4, 4, 0, SCANLINE_EFFECT_REG_BG1HOFS, TRUE); + SetMainCallback2(MainCB2); + } + break; + } +} + +static void MainCB2(void) +{ + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); +} + +// Shine the Pokemon logo two more times, and fade in the version banner +static void Task_TitleScreenPhase1(u8 taskId) +{ + // Skip to next phase when A, B, Start, or Select is pressed + if ((gMain.newKeys & A_B_START_SELECT) || gTasks[taskId].data[1] != 0) + { + gTasks[taskId].tSkipToNext = TRUE; + gTasks[taskId].tCounter = 0; + } + + if (gTasks[taskId].tCounter != 0) + { + u16 frameNum = gTasks[taskId].tCounter; + if (frameNum == 176) + StartPokemonLogoShine(1); + else if (frameNum == 64) + StartPokemonLogoShine(2); + + gTasks[taskId].tCounter--; + } + else + { + u8 spriteId; + + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG2_ON | DISPCNT_OBJ_ON); + SetGpuReg(REG_OFFSET_WININ, 0); + SetGpuReg(REG_OFFSET_WINOUT, 0); + SetGpuReg(REG_OFFSET_BLDCNT, 0x3F50); + SetGpuReg(REG_OFFSET_BLDALPHA, 0x10); + SetGpuReg(REG_OFFSET_BLDY, 0); + + // Create left side of version banner + spriteId = CreateSprite(&sVersionBannerLeftSpriteTemplate, VERSION_BANNER_LEFT_X, VERSION_BANNER_Y, 0); + gSprites[spriteId].data[0] = 64; + gSprites[spriteId].data[1] = taskId; + + // Create right side of version banner + spriteId = CreateSprite(&sVersionBannerRightSpriteTemplate, VERSION_BANNER_RIGHT_X, VERSION_BANNER_Y, 0); + gSprites[spriteId].data[1] = taskId; + + gTasks[taskId].tCounter = 144; + gTasks[taskId].func = Task_TitleScreenPhase2; + } +} + +// Create "Press Start" and copyright banners, and slide Pokemon logo up +static void Task_TitleScreenPhase2(u8 taskId) +{ + u32 yPos; + + // Skip to next phase when A, B, Start, or Select is pressed + if ((gMain.newKeys & A_B_START_SELECT) || gTasks[taskId].tSkipToNext) + { + gTasks[taskId].tSkipToNext = TRUE; + gTasks[taskId].tCounter = 0; + } + + if (gTasks[taskId].tCounter != 0) + { + gTasks[taskId].tCounter--; + } + else + { + gTasks[taskId].tSkipToNext = TRUE; + SetGpuReg(REG_OFFSET_BLDCNT, 0x2142); + SetGpuReg(REG_OFFSET_BLDALPHA, 0xF06); + SetGpuReg(REG_OFFSET_BLDY, 0); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 + | DISPCNT_OBJ_1D_MAP + | DISPCNT_BG0_ON + | DISPCNT_BG1_ON + | DISPCNT_BG2_ON + | DISPCNT_OBJ_ON); + CreatePressStartBanner(START_BANNER_X, 108); + CreateCopyrightBanner(START_BANNER_X, 148); + gTasks[taskId].data[4] = 0; + gTasks[taskId].func = Task_TitleScreenPhase3; + } + + if (!(gTasks[taskId].tCounter & 3) && gTasks[taskId].data[2] != 0) + gTasks[taskId].data[2]++; + if (!(gTasks[taskId].tCounter & 1) && gTasks[taskId].data[3] != 0) + gTasks[taskId].data[3]++; + + // Slide Pokemon logo up + yPos = gTasks[taskId].data[3] * 256; + SetGpuReg(REG_OFFSET_BG2Y_L, yPos); + SetGpuReg(REG_OFFSET_BG2Y_H, yPos / 0x10000); + + gTasks[taskId].data[5] = 15; + gTasks[taskId].data[6] = 6; +} + +// Show Rayquaza silhouette and process main title screen input +static void Task_TitleScreenPhase3(u8 taskId) +{ + if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & START_BUTTON)) + { + FadeOutBGM(4); + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0xFFFF); + SetMainCallback2(CB2_GoToMainMenu); + } + else if ((gMain.heldKeys & CLEAR_SAVE_BUTTON_COMBO) == CLEAR_SAVE_BUTTON_COMBO) + { + SetMainCallback2(CB2_GoToClearSaveDataScreen); + } + else if ((gMain.heldKeys & RESET_RTC_BUTTON_COMBO) == RESET_RTC_BUTTON_COMBO + && CanResetRTC() == TRUE) + { + FadeOutBGM(4); + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + SetMainCallback2(CB2_GoToResetRtcScreen); + } + else if ((gMain.heldKeys & BERRY_UPDATE_BUTTON_COMBO) == BERRY_UPDATE_BUTTON_COMBO) + { + FadeOutBGM(4); + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + SetMainCallback2(CB2_GoToBerryFixScreen); + } + else + { + SetGpuReg(REG_OFFSET_BG2Y_L, 0); + SetGpuReg(REG_OFFSET_BG2Y_H, 0); + gTasks[taskId].tCounter++; + if (gTasks[taskId].tCounter & 1) + { + gTasks[taskId].data[4]++; + gBattle_BG1_Y = gTasks[taskId].data[4] / 2; + gBattle_BG1_X = 0; + } + UpdateLegendaryMarkingColor(gTasks[taskId].tCounter); + if ((gMPlayInfo_BGM.status & 0xFFFF) == 0) + { + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0xFFFF); + SetMainCallback2(CB2_GoToCopyrightScreen); + } + } +} + +static void CB2_GoToMainMenu(void) +{ + if (!UpdatePaletteFade()) + SetMainCallback2(CB2_InitMainMenu); +} + +static void CB2_GoToCopyrightScreen(void) +{ + if (!UpdatePaletteFade()) + SetMainCallback2(CB2_InitCopyrightScreenAfterTitleScreen); +} + +static void CB2_GoToClearSaveDataScreen(void) +{ + if (!UpdatePaletteFade()) + SetMainCallback2(CB2_InitClearSaveDataScreen); +} + +static void CB2_GoToResetRtcScreen(void) +{ + if (!UpdatePaletteFade()) + SetMainCallback2(CB2_InitResetRtcScreen); +} + +static void CB2_GoToBerryFixScreen(void) +{ + if (!UpdatePaletteFade()) + { + m4aMPlayAllStop(); + SetMainCallback2(CB2_InitBerryFixProgram); + } +} + +static void UpdateLegendaryMarkingColor(u8 frameNum) +{ + if ((frameNum % 4) == 0) // Change color every 4th frame + { + s32 intensity = Cos(frameNum, 128) + 128; + s32 r = 31 - ((intensity * 32 - intensity) / 256); + s32 g = 31 - (intensity * 22 / 256); + s32 b = 12; + + u16 color = RGB(r, g, b); + LoadPalette(&color, 0xEF, sizeof(color)); + } +} diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index 8eaab32b6..ca8246128 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -57,24 +57,24 @@ u16 Font6Func(struct TextPrinter *textPrinter) switch (char_) { case 1: - textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset ++; - GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + textPrinter->subPrinter.fgColor = *textPrinter->subPrinter.current_text_offset ++; + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fgColor, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); return 2; case 2: textPrinter->subPrinter.bgColor = *textPrinter->subPrinter.current_text_offset ++; - GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fgColor, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); return 2; case 3: textPrinter->subPrinter.shadowColor = *textPrinter->subPrinter.current_text_offset ++; - GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fgColor, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); return 2; case 4: - textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset; + textPrinter->subPrinter.fgColor = *textPrinter->subPrinter.current_text_offset; textPrinter->subPrinter.bgColor = *++ textPrinter->subPrinter.current_text_offset; textPrinter->subPrinter.shadowColor = *++ textPrinter->subPrinter.current_text_offset; textPrinter->subPrinter.current_text_offset ++; - GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fgColor, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); return 2; case 5: textPrinter->subPrinter.current_text_offset ++; diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 705c4416c..279b6e672 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -19,16 +19,12 @@ #include "link.h" #include "script.h" #include "constants/items.h" +#include "constants/maps.h" extern const u8 EventScript_RepelWoreOff[]; #define NUM_FEEBAS_SPOTS 6 -extern const u16 gRoute119WaterTileData[]; -extern const struct WildPokemonHeader gBattlePikeWildMonHeaders[]; -extern const struct WildPokemonHeader gBattlePyramidWildMonHeaders[]; -extern const struct WildPokemon gWildFeebasRoute119Data; - extern u8 GetBattlePikeWildMonHeaderId(void); extern bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate); extern void GenerateBattlePyramidWildMon(void); @@ -44,9 +40,4564 @@ static void ApplyCleanseTagEncounterRateMod(u32 *encRate); static bool8 TryGetAbilityInfluencedWildMonIndex(const struct WildPokemon *wildMon, u8 type, u8 ability, u8 *monIndex); static bool8 IsAbilityAllowingEncounter(u8 level); -EWRAM_DATA u8 sWildEncountersDisabled = 0; -EWRAM_DATA u32 sFeebasRngValue = 0; +// EWRAM vars +EWRAM_DATA static u8 sWildEncountersDisabled = 0; +EWRAM_DATA static u32 sFeebasRngValue = 0; + +// const rom data +const struct WildPokemon gRoute101_LandMons[] = +{ + {2, 2, SPECIES_WURMPLE}, + {2, 2, SPECIES_POOCHYENA}, + {2, 2, SPECIES_WURMPLE}, + {3, 3, SPECIES_WURMPLE}, + {3, 3, SPECIES_POOCHYENA}, + {3, 3, SPECIES_POOCHYENA}, + {3, 3, SPECIES_WURMPLE}, + {3, 3, SPECIES_POOCHYENA}, + {2, 2, SPECIES_ZIGZAGOON}, + {2, 2, SPECIES_ZIGZAGOON}, + {3, 3, SPECIES_ZIGZAGOON}, + {3, 3, SPECIES_ZIGZAGOON}, +}; + +const struct WildPokemonInfo gRoute101_LandMonsInfo = {20, gRoute101_LandMons}; + +const struct WildPokemon gRoute102_LandMons[] = +{ + {3, 3, SPECIES_POOCHYENA}, + {3, 3, SPECIES_WURMPLE}, + {4, 4, SPECIES_POOCHYENA}, + {4, 4, SPECIES_WURMPLE}, + {3, 3, SPECIES_LOTAD}, + {4, 4, SPECIES_LOTAD}, + {3, 3, SPECIES_ZIGZAGOON}, + {3, 3, SPECIES_ZIGZAGOON}, + {4, 4, SPECIES_ZIGZAGOON}, + {4, 4, SPECIES_RALTS}, + {4, 4, SPECIES_ZIGZAGOON}, + {3, 3, SPECIES_SEEDOT}, +}; + +const struct WildPokemonInfo gRoute102_LandMonsInfo = {20, gRoute102_LandMons}; + +const struct WildPokemon gRoute102_WaterMons[] = +{ + {20, 30, SPECIES_MARILL}, + {10, 20, SPECIES_MARILL}, + {30, 35, SPECIES_MARILL}, + {5, 10, SPECIES_MARILL}, + {20, 30, SPECIES_GOLDEEN}, +}; + +const struct WildPokemonInfo gRoute102_WaterMonsInfo = {4, gRoute102_WaterMons}; + +const struct WildPokemon gRoute102_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_CORPHISH}, + {25, 30, SPECIES_CORPHISH}, + {30, 35, SPECIES_CORPHISH}, + {20, 25, SPECIES_CORPHISH}, + {35, 40, SPECIES_CORPHISH}, + {40, 45, SPECIES_CORPHISH}, +}; + +const struct WildPokemonInfo gRoute102_FishingMonsInfo = {30, gRoute102_FishingMons}; + +const struct WildPokemon gRoute103_LandMons[] = +{ + {2, 2, SPECIES_POOCHYENA}, + {3, 3, SPECIES_POOCHYENA}, + {3, 3, SPECIES_POOCHYENA}, + {4, 4, SPECIES_POOCHYENA}, + {2, 2, SPECIES_WINGULL}, + {3, 3, SPECIES_ZIGZAGOON}, + {3, 3, SPECIES_ZIGZAGOON}, + {4, 4, SPECIES_ZIGZAGOON}, + {3, 3, SPECIES_WINGULL}, + {3, 3, SPECIES_WINGULL}, + {2, 2, SPECIES_WINGULL}, + {4, 4, SPECIES_WINGULL}, +}; + +const struct WildPokemonInfo gRoute103_LandMonsInfo = {20, gRoute103_LandMons}; + +const struct WildPokemon gRoute103_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute103_WaterMonsInfo = {4, gRoute103_WaterMons}; + +const struct WildPokemon gRoute103_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute103_FishingMonsInfo = {30, gRoute103_FishingMons}; + +const struct WildPokemon gRoute104_LandMons[] = +{ + {4, 4, SPECIES_POOCHYENA}, + {4, 4, SPECIES_WURMPLE}, + {5, 5, SPECIES_POOCHYENA}, + {5, 5, SPECIES_MARILL}, + {4, 4, SPECIES_MARILL}, + {5, 5, SPECIES_POOCHYENA}, + {4, 4, SPECIES_TAILLOW}, + {5, 5, SPECIES_TAILLOW}, + {4, 4, SPECIES_WINGULL}, + {4, 4, SPECIES_WINGULL}, + {3, 3, SPECIES_WINGULL}, + {5, 5, SPECIES_WINGULL}, +}; + +const struct WildPokemonInfo gRoute104_LandMonsInfo = {20, gRoute104_LandMons}; + +const struct WildPokemon gRoute104_WaterMons[] = +{ + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute104_WaterMonsInfo = {4, gRoute104_WaterMons}; + +const struct WildPokemon gRoute104_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_MAGIKARP}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_MAGIKARP}, + {25, 30, SPECIES_MAGIKARP}, + {30, 35, SPECIES_MAGIKARP}, + {20, 25, SPECIES_MAGIKARP}, + {35, 40, SPECIES_MAGIKARP}, + {40, 45, SPECIES_MAGIKARP}, +}; + +const struct WildPokemonInfo gRoute104_FishingMonsInfo = {30, gRoute104_FishingMons}; + +const struct WildPokemon gRoute105_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute105_WaterMonsInfo = {4, gRoute105_WaterMons}; + +const struct WildPokemon gRoute105_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute105_FishingMonsInfo = {30, gRoute105_FishingMons}; + +const struct WildPokemon gRoute110_LandMons[] = +{ + {12, 12, SPECIES_POOCHYENA}, + {12, 12, SPECIES_ELECTRIKE}, + {12, 12, SPECIES_GULPIN}, + {13, 13, SPECIES_ELECTRIKE}, + {13, 13, SPECIES_MINUN}, + {13, 13, SPECIES_ODDISH}, + {13, 13, SPECIES_MINUN}, + {13, 13, SPECIES_GULPIN}, + {12, 12, SPECIES_WINGULL}, + {12, 12, SPECIES_WINGULL}, + {12, 12, SPECIES_PLUSLE}, + {13, 13, SPECIES_PLUSLE}, +}; + +const struct WildPokemonInfo gRoute110_LandMonsInfo = {20, gRoute110_LandMons}; + +const struct WildPokemon gRoute110_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute110_WaterMonsInfo = {4, gRoute110_WaterMons}; + +const struct WildPokemon gRoute110_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute110_FishingMonsInfo = {30, gRoute110_FishingMons}; + +const struct WildPokemon gRoute111_LandMons[] = +{ + {20, 20, SPECIES_SANDSHREW}, + {20, 20, SPECIES_TRAPINCH}, + {21, 21, SPECIES_SANDSHREW}, + {21, 21, SPECIES_TRAPINCH}, + {19, 19, SPECIES_BALTOY}, + {21, 21, SPECIES_BALTOY}, + {19, 19, SPECIES_SANDSHREW}, + {19, 19, SPECIES_TRAPINCH}, + {20, 20, SPECIES_BALTOY}, + {20, 20, SPECIES_CACNEA}, + {22, 22, SPECIES_CACNEA}, + {22, 22, SPECIES_CACNEA}, +}; + +const struct WildPokemonInfo gRoute111_LandMonsInfo = {10, gRoute111_LandMons}; + +const struct WildPokemon gRoute111_WaterMons[] = +{ + {20, 30, SPECIES_MARILL}, + {10, 20, SPECIES_MARILL}, + {30, 35, SPECIES_MARILL}, + {5, 10, SPECIES_MARILL}, + {20, 30, SPECIES_GOLDEEN}, +}; + +const struct WildPokemonInfo gRoute111_WaterMonsInfo = {4, gRoute111_WaterMons}; + +const struct WildPokemon gRoute111_RockSmashMons[] = +{ + {10, 15, SPECIES_GEODUDE}, + {5, 10, SPECIES_GEODUDE}, + {15, 20, SPECIES_GEODUDE}, + {15, 20, SPECIES_GEODUDE}, + {15, 20, SPECIES_GEODUDE}, +}; + +const struct WildPokemonInfo gRoute111_RockSmashMonsInfo = {20, gRoute111_RockSmashMons}; + +const struct WildPokemon gRoute111_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_BARBOACH}, + {25, 30, SPECIES_BARBOACH}, + {30, 35, SPECIES_BARBOACH}, + {20, 25, SPECIES_BARBOACH}, + {35, 40, SPECIES_BARBOACH}, + {40, 45, SPECIES_BARBOACH}, +}; + +const struct WildPokemonInfo gRoute111_FishingMonsInfo = {30, gRoute111_FishingMons}; + +const struct WildPokemon gRoute112_LandMons[] = +{ + {15, 15, SPECIES_NUMEL}, + {15, 15, SPECIES_NUMEL}, + {15, 15, SPECIES_MARILL}, + {14, 14, SPECIES_NUMEL}, + {14, 14, SPECIES_NUMEL}, + {14, 14, SPECIES_MARILL}, + {16, 16, SPECIES_NUMEL}, + {16, 16, SPECIES_MARILL}, + {16, 16, SPECIES_NUMEL}, + {16, 16, SPECIES_NUMEL}, + {16, 16, SPECIES_NUMEL}, + {16, 16, SPECIES_NUMEL}, +}; + +const struct WildPokemonInfo gRoute112_LandMonsInfo = {20, gRoute112_LandMons}; + +const struct WildPokemon gRoute113_LandMons[] = +{ + {15, 15, SPECIES_SPINDA}, + {15, 15, SPECIES_SPINDA}, + {15, 15, SPECIES_SLUGMA}, + {14, 14, SPECIES_SPINDA}, + {14, 14, SPECIES_SPINDA}, + {14, 14, SPECIES_SLUGMA}, + {16, 16, SPECIES_SPINDA}, + {16, 16, SPECIES_SLUGMA}, + {16, 16, SPECIES_SPINDA}, + {16, 16, SPECIES_SKARMORY}, + {16, 16, SPECIES_SPINDA}, + {16, 16, SPECIES_SKARMORY}, +}; + +const struct WildPokemonInfo gRoute113_LandMonsInfo = {20, gRoute113_LandMons}; + +const struct WildPokemon gRoute114_LandMons[] = +{ + {16, 16, SPECIES_SWABLU}, + {16, 16, SPECIES_LOTAD}, + {17, 17, SPECIES_SWABLU}, + {15, 15, SPECIES_SWABLU}, + {15, 15, SPECIES_LOTAD}, + {16, 16, SPECIES_LOMBRE}, + {16, 16, SPECIES_LOMBRE}, + {18, 18, SPECIES_LOMBRE}, + {17, 17, SPECIES_SEVIPER}, + {15, 15, SPECIES_SEVIPER}, + {17, 17, SPECIES_SEVIPER}, + {15, 15, SPECIES_NUZLEAF}, +}; + +const struct WildPokemonInfo gRoute114_LandMonsInfo = {20, gRoute114_LandMons}; + +const struct WildPokemon gRoute114_WaterMons[] = +{ + {20, 30, SPECIES_MARILL}, + {10, 20, SPECIES_MARILL}, + {30, 35, SPECIES_MARILL}, + {5, 10, SPECIES_MARILL}, + {20, 30, SPECIES_GOLDEEN}, +}; + +const struct WildPokemonInfo gRoute114_WaterMonsInfo = {4, gRoute114_WaterMons}; + +const struct WildPokemon gRoute114_RockSmashMons[] = +{ + {10, 15, SPECIES_GEODUDE}, + {5, 10, SPECIES_GEODUDE}, + {15, 20, SPECIES_GEODUDE}, + {15, 20, SPECIES_GEODUDE}, + {15, 20, SPECIES_GEODUDE}, +}; + +const struct WildPokemonInfo gRoute114_RockSmashMonsInfo = {20, gRoute114_RockSmashMons}; + +const struct WildPokemon gRoute114_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_BARBOACH}, + {25, 30, SPECIES_BARBOACH}, + {30, 35, SPECIES_BARBOACH}, + {20, 25, SPECIES_BARBOACH}, + {35, 40, SPECIES_BARBOACH}, + {40, 45, SPECIES_BARBOACH}, +}; + +const struct WildPokemonInfo gRoute114_FishingMonsInfo = {30, gRoute114_FishingMons}; + +const struct WildPokemon gRoute116_LandMons[] = +{ + {6, 6, SPECIES_POOCHYENA}, + {6, 6, SPECIES_WHISMUR}, + {6, 6, SPECIES_NINCADA}, + {7, 7, SPECIES_ABRA}, + {7, 7, SPECIES_NINCADA}, + {6, 6, SPECIES_TAILLOW}, + {7, 7, SPECIES_TAILLOW}, + {8, 8, SPECIES_TAILLOW}, + {7, 7, SPECIES_POOCHYENA}, + {8, 8, SPECIES_POOCHYENA}, + {7, 7, SPECIES_SKITTY}, + {8, 8, SPECIES_SKITTY}, +}; + +const struct WildPokemonInfo gRoute116_LandMonsInfo = {20, gRoute116_LandMons}; + +const struct WildPokemon gRoute117_LandMons[] = +{ + {13, 13, SPECIES_POOCHYENA}, + {13, 13, SPECIES_ODDISH}, + {14, 14, SPECIES_POOCHYENA}, + {14, 14, SPECIES_ODDISH}, + {13, 13, SPECIES_MARILL}, + {13, 13, SPECIES_ODDISH}, + {13, 13, SPECIES_ILLUMISE}, + {13, 13, SPECIES_ILLUMISE}, + {14, 14, SPECIES_ILLUMISE}, + {14, 14, SPECIES_ILLUMISE}, + {13, 13, SPECIES_VOLBEAT}, + {13, 13, SPECIES_SEEDOT}, +}; + +const struct WildPokemonInfo gRoute117_LandMonsInfo = {20, gRoute117_LandMons}; + +const struct WildPokemon gRoute117_WaterMons[] = +{ + {20, 30, SPECIES_MARILL}, + {10, 20, SPECIES_MARILL}, + {30, 35, SPECIES_MARILL}, + {5, 10, SPECIES_MARILL}, + {20, 30, SPECIES_GOLDEEN}, +}; + +const struct WildPokemonInfo gRoute117_WaterMonsInfo = {4, gRoute117_WaterMons}; + +const struct WildPokemon gRoute117_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_CORPHISH}, + {25, 30, SPECIES_CORPHISH}, + {30, 35, SPECIES_CORPHISH}, + {20, 25, SPECIES_CORPHISH}, + {35, 40, SPECIES_CORPHISH}, + {40, 45, SPECIES_CORPHISH}, +}; + +const struct WildPokemonInfo gRoute117_FishingMonsInfo = {30, gRoute117_FishingMons}; + +const struct WildPokemon gRoute118_LandMons[] = +{ + {24, 24, SPECIES_ZIGZAGOON}, + {24, 24, SPECIES_ELECTRIKE}, + {26, 26, SPECIES_ZIGZAGOON}, + {26, 26, SPECIES_ELECTRIKE}, + {26, 26, SPECIES_LINOONE}, + {26, 26, SPECIES_MANECTRIC}, + {25, 25, SPECIES_WINGULL}, + {25, 25, SPECIES_WINGULL}, + {26, 26, SPECIES_WINGULL}, + {26, 26, SPECIES_WINGULL}, + {27, 27, SPECIES_WINGULL}, + {25, 25, SPECIES_KECLEON}, +}; + +const struct WildPokemonInfo gRoute118_LandMonsInfo = {20, gRoute118_LandMons}; + +const struct WildPokemon gRoute118_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute118_WaterMonsInfo = {4, gRoute118_WaterMons}; + +const struct WildPokemon gRoute118_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_CARVANHA}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_CARVANHA}, + {20, 25, SPECIES_CARVANHA}, + {35, 40, SPECIES_CARVANHA}, + {40, 45, SPECIES_CARVANHA}, +}; + +const struct WildPokemonInfo gRoute118_FishingMonsInfo = {30, gRoute118_FishingMons}; + +const struct WildPokemon gRoute124_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute124_WaterMonsInfo = {4, gRoute124_WaterMons}; + +const struct WildPokemon gRoute124_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute124_FishingMonsInfo = {30, gRoute124_FishingMons}; + +const struct WildPokemon gPetalburgWoods_LandMons[] = +{ + {5, 5, SPECIES_POOCHYENA}, + {5, 5, SPECIES_WURMPLE}, + {5, 5, SPECIES_SHROOMISH}, + {6, 6, SPECIES_POOCHYENA}, + {5, 5, SPECIES_SILCOON}, + {5, 5, SPECIES_CASCOON}, + {6, 6, SPECIES_WURMPLE}, + {6, 6, SPECIES_SHROOMISH}, + {5, 5, SPECIES_TAILLOW}, + {5, 5, SPECIES_SLAKOTH}, + {6, 6, SPECIES_TAILLOW}, + {6, 6, SPECIES_SLAKOTH}, +}; + +const struct WildPokemonInfo gPetalburgWoods_LandMonsInfo = {20, gPetalburgWoods_LandMons}; + +const struct WildPokemon gRusturfTunnel_LandMons[] = +{ + {6, 6, SPECIES_WHISMUR}, + {7, 7, SPECIES_WHISMUR}, + {6, 6, SPECIES_WHISMUR}, + {6, 6, SPECIES_WHISMUR}, + {7, 7, SPECIES_WHISMUR}, + {7, 7, SPECIES_WHISMUR}, + {5, 5, SPECIES_WHISMUR}, + {8, 8, SPECIES_WHISMUR}, + {5, 5, SPECIES_WHISMUR}, + {8, 8, SPECIES_WHISMUR}, + {5, 5, SPECIES_WHISMUR}, + {8, 8, SPECIES_WHISMUR}, +}; + +const struct WildPokemonInfo gRusturfTunnel_LandMonsInfo = {10, gRusturfTunnel_LandMons}; + +const struct WildPokemon gGraniteCave_1F_LandMons[] = +{ + {7, 7, SPECIES_ZUBAT}, + {8, 8, SPECIES_MAKUHITA}, + {7, 7, SPECIES_MAKUHITA}, + {8, 8, SPECIES_ZUBAT}, + {9, 9, SPECIES_MAKUHITA}, + {8, 8, SPECIES_ABRA}, + {10, 10, SPECIES_MAKUHITA}, + {6, 6, SPECIES_MAKUHITA}, + {7, 7, SPECIES_GEODUDE}, + {8, 8, SPECIES_GEODUDE}, + {6, 6, SPECIES_GEODUDE}, + {9, 9, SPECIES_GEODUDE}, +}; + +const struct WildPokemonInfo gGraniteCave_1F_LandMonsInfo = {10, gGraniteCave_1F_LandMons}; + +const struct WildPokemon gGraniteCave_B1F_LandMons[] = +{ + {9, 9, SPECIES_ZUBAT}, + {10, 10, SPECIES_ARON}, + {9, 9, SPECIES_ARON}, + {11, 11, SPECIES_ARON}, + {10, 10, SPECIES_ZUBAT}, + {9, 9, SPECIES_ABRA}, + {10, 10, SPECIES_MAKUHITA}, + {11, 11, SPECIES_MAKUHITA}, + {10, 10, SPECIES_SABLEYE}, + {10, 10, SPECIES_SABLEYE}, + {9, 9, SPECIES_SABLEYE}, + {11, 11, SPECIES_SABLEYE}, +}; + +const struct WildPokemonInfo gGraniteCave_B1F_LandMonsInfo = {10, gGraniteCave_B1F_LandMons}; + +const struct WildPokemon gMtPyre_1F_LandMons[] = +{ + {27, 27, SPECIES_SHUPPET}, + {28, 28, SPECIES_SHUPPET}, + {26, 26, SPECIES_SHUPPET}, + {25, 25, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {23, 23, SPECIES_SHUPPET}, + {22, 22, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, +}; + +const struct WildPokemonInfo gMtPyre_1F_LandMonsInfo = {10, gMtPyre_1F_LandMons}; + +const struct WildPokemon gVictoryRoad_1F_LandMons[] = +{ + {40, 40, SPECIES_GOLBAT}, + {40, 40, SPECIES_HARIYAMA}, + {40, 40, SPECIES_LAIRON}, + {40, 40, SPECIES_LOUDRED}, + {36, 36, SPECIES_ZUBAT}, + {36, 36, SPECIES_MAKUHITA}, + {38, 38, SPECIES_GOLBAT}, + {38, 38, SPECIES_HARIYAMA}, + {36, 36, SPECIES_ARON}, + {36, 36, SPECIES_WHISMUR}, + {36, 36, SPECIES_ARON}, + {36, 36, SPECIES_WHISMUR}, +}; + +const struct WildPokemonInfo gVictoryRoad_1F_LandMonsInfo = {10, gVictoryRoad_1F_LandMons}; + +const struct WildPokemon gSafariZone_South_LandMons[] = +{ + {25, 25, SPECIES_ODDISH}, + {27, 27, SPECIES_ODDISH}, + {25, 25, SPECIES_GIRAFARIG}, + {27, 27, SPECIES_GIRAFARIG}, + {25, 25, SPECIES_NATU}, + {25, 25, SPECIES_DODUO}, + {25, 25, SPECIES_GLOOM}, + {27, 27, SPECIES_WOBBUFFET}, + {25, 25, SPECIES_PIKACHU}, + {27, 27, SPECIES_WOBBUFFET}, + {27, 27, SPECIES_PIKACHU}, + {29, 29, SPECIES_WOBBUFFET}, +}; + +const struct WildPokemonInfo gSafariZone_South_LandMonsInfo = {25, gSafariZone_South_LandMons}; + +const struct WildPokemon gUnderwater2_WaterMons[] = +{ + {20, 30, SPECIES_CLAMPERL}, + {20, 30, SPECIES_CHINCHOU}, + {30, 35, SPECIES_CLAMPERL}, + {30, 35, SPECIES_RELICANTH}, + {30, 35, SPECIES_RELICANTH}, +}; + +const struct WildPokemonInfo gUnderwater2_WaterMonsInfo = {4, gUnderwater2_WaterMons}; + +const struct WildPokemon gAbandonedShip_Rooms_B1F_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_TENTACOOL}, + {30, 35, SPECIES_TENTACRUEL}, +}; + +const struct WildPokemonInfo gAbandonedShip_Rooms_B1F_WaterMonsInfo = {4, gAbandonedShip_Rooms_B1F_WaterMons}; + +const struct WildPokemon gAbandonedShip_Rooms_B1F_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_TENTACOOL}, + {25, 30, SPECIES_TENTACOOL}, + {30, 35, SPECIES_TENTACOOL}, + {30, 35, SPECIES_TENTACRUEL}, + {25, 30, SPECIES_TENTACRUEL}, + {20, 25, SPECIES_TENTACRUEL}, +}; + +const struct WildPokemonInfo gAbandonedShip_Rooms_B1F_FishingMonsInfo = {20, gAbandonedShip_Rooms_B1F_FishingMons}; + +const struct WildPokemon gGraniteCave_B2F_LandMons[] = +{ + {10, 10, SPECIES_ZUBAT}, + {11, 11, SPECIES_ARON}, + {10, 10, SPECIES_ARON}, + {11, 11, SPECIES_ZUBAT}, + {12, 12, SPECIES_ARON}, + {10, 10, SPECIES_ABRA}, + {10, 10, SPECIES_SABLEYE}, + {11, 11, SPECIES_SABLEYE}, + {12, 12, SPECIES_SABLEYE}, + {10, 10, SPECIES_SABLEYE}, + {12, 12, SPECIES_SABLEYE}, + {10, 10, SPECIES_SABLEYE}, +}; + +const struct WildPokemonInfo gGraniteCave_B2F_LandMonsInfo = {10, gGraniteCave_B2F_LandMons}; + +const struct WildPokemon gGraniteCave_B2F_RockSmashMons[] = +{ + {10, 15, SPECIES_GEODUDE}, + {10, 20, SPECIES_NOSEPASS}, + {5, 10, SPECIES_GEODUDE}, + {15, 20, SPECIES_GEODUDE}, + {15, 20, SPECIES_GEODUDE}, +}; + +const struct WildPokemonInfo gGraniteCave_B2F_RockSmashMonsInfo = {20, gGraniteCave_B2F_RockSmashMons}; + +const struct WildPokemon gFieryPath_LandMons[] = +{ + {15, 15, SPECIES_NUMEL}, + {15, 15, SPECIES_KOFFING}, + {16, 16, SPECIES_NUMEL}, + {15, 15, SPECIES_MACHOP}, + {15, 15, SPECIES_TORKOAL}, + {15, 15, SPECIES_SLUGMA}, + {16, 16, SPECIES_KOFFING}, + {16, 16, SPECIES_MACHOP}, + {14, 14, SPECIES_TORKOAL}, + {16, 16, SPECIES_TORKOAL}, + {14, 14, SPECIES_GRIMER}, + {14, 14, SPECIES_GRIMER}, +}; + +const struct WildPokemonInfo gFieryPath_LandMonsInfo = {10, gFieryPath_LandMons}; + +const struct WildPokemon gMeteorFalls_B1F_2R_LandMons[] = +{ + {33, 33, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {30, 30, SPECIES_BAGON}, + {35, 35, SPECIES_SOLROCK}, + {35, 35, SPECIES_BAGON}, + {37, 37, SPECIES_SOLROCK}, + {25, 25, SPECIES_BAGON}, + {39, 39, SPECIES_SOLROCK}, + {38, 38, SPECIES_GOLBAT}, + {40, 40, SPECIES_GOLBAT}, + {38, 38, SPECIES_GOLBAT}, + {40, 40, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gMeteorFalls_B1F_2R_LandMonsInfo = {10, gMeteorFalls_B1F_2R_LandMons}; + +const struct WildPokemon gMeteorFalls_B1F_2R_WaterMons[] = +{ + {30, 35, SPECIES_GOLBAT}, + {30, 35, SPECIES_GOLBAT}, + {25, 35, SPECIES_SOLROCK}, + {15, 25, SPECIES_SOLROCK}, + {5, 15, SPECIES_SOLROCK}, +}; + +const struct WildPokemonInfo gMeteorFalls_B1F_2R_WaterMonsInfo = {4, gMeteorFalls_B1F_2R_WaterMons}; + +const struct WildPokemon gMeteorFalls_B1F_2R_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_BARBOACH}, + {25, 30, SPECIES_BARBOACH}, + {30, 35, SPECIES_BARBOACH}, + {30, 35, SPECIES_WHISCASH}, + {35, 40, SPECIES_WHISCASH}, + {40, 45, SPECIES_WHISCASH}, +}; + +const struct WildPokemonInfo gMeteorFalls_B1F_2R_FishingMonsInfo = {30, gMeteorFalls_B1F_2R_FishingMons}; + +const struct WildPokemon gJaggedPass_LandMons[] = +{ + {21, 21, SPECIES_NUMEL}, + {21, 21, SPECIES_NUMEL}, + {21, 21, SPECIES_MACHOP}, + {20, 20, SPECIES_NUMEL}, + {20, 20, SPECIES_SPOINK}, + {20, 20, SPECIES_MACHOP}, + {21, 21, SPECIES_SPOINK}, + {22, 22, SPECIES_MACHOP}, + {22, 22, SPECIES_NUMEL}, + {22, 22, SPECIES_SPOINK}, + {22, 22, SPECIES_NUMEL}, + {22, 22, SPECIES_SPOINK}, +}; + +const struct WildPokemonInfo gJaggedPass_LandMonsInfo = {20, gJaggedPass_LandMons}; + +const struct WildPokemon gRoute106_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute106_WaterMonsInfo = {4, gRoute106_WaterMons}; + +const struct WildPokemon gRoute106_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute106_FishingMonsInfo = {30, gRoute106_FishingMons}; + +const struct WildPokemon gRoute107_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute107_WaterMonsInfo = {4, gRoute107_WaterMons}; + +const struct WildPokemon gRoute107_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute107_FishingMonsInfo = {30, gRoute107_FishingMons}; + +const struct WildPokemon gRoute108_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute108_WaterMonsInfo = {4, gRoute108_WaterMons}; + +const struct WildPokemon gRoute108_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute108_FishingMonsInfo = {30, gRoute108_FishingMons}; + +const struct WildPokemon gRoute109_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute109_WaterMonsInfo = {4, gRoute109_WaterMons}; + +const struct WildPokemon gRoute109_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute109_FishingMonsInfo = {30, gRoute109_FishingMons}; + +const struct WildPokemon gRoute115_LandMons[] = +{ + {23, 23, SPECIES_SWABLU}, + {23, 23, SPECIES_TAILLOW}, + {25, 25, SPECIES_SWABLU}, + {24, 24, SPECIES_TAILLOW}, + {25, 25, SPECIES_TAILLOW}, + {25, 25, SPECIES_SWELLOW}, + {24, 24, SPECIES_JIGGLYPUFF}, + {25, 25, SPECIES_JIGGLYPUFF}, + {24, 24, SPECIES_WINGULL}, + {24, 24, SPECIES_WINGULL}, + {26, 26, SPECIES_WINGULL}, + {25, 25, SPECIES_WINGULL}, +}; + +const struct WildPokemonInfo gRoute115_LandMonsInfo = {20, gRoute115_LandMons}; + +const struct WildPokemon gRoute115_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute115_WaterMonsInfo = {4, gRoute115_WaterMons}; + +const struct WildPokemon gRoute115_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute115_FishingMonsInfo = {30, gRoute115_FishingMons}; + +const struct WildPokemon gNewMauville_Inside_LandMons[] = +{ + {24, 24, SPECIES_VOLTORB}, + {24, 24, SPECIES_MAGNEMITE}, + {25, 25, SPECIES_VOLTORB}, + {25, 25, SPECIES_MAGNEMITE}, + {23, 23, SPECIES_VOLTORB}, + {23, 23, SPECIES_MAGNEMITE}, + {26, 26, SPECIES_VOLTORB}, + {26, 26, SPECIES_MAGNEMITE}, + {22, 22, SPECIES_VOLTORB}, + {22, 22, SPECIES_MAGNEMITE}, + {26, 26, SPECIES_ELECTRODE}, + {26, 26, SPECIES_MAGNETON}, +}; + +const struct WildPokemonInfo gNewMauville_Inside_LandMonsInfo = {10, gNewMauville_Inside_LandMons}; + +const struct WildPokemon gRoute119_LandMons[] = +{ + {25, 25, SPECIES_ZIGZAGOON}, + {25, 25, SPECIES_LINOONE}, + {27, 27, SPECIES_ZIGZAGOON}, + {25, 25, SPECIES_ODDISH}, + {27, 27, SPECIES_LINOONE}, + {26, 26, SPECIES_ODDISH}, + {27, 27, SPECIES_ODDISH}, + {24, 24, SPECIES_ODDISH}, + {25, 25, SPECIES_TROPIUS}, + {26, 26, SPECIES_TROPIUS}, + {27, 27, SPECIES_TROPIUS}, + {25, 25, SPECIES_KECLEON}, +}; + +const struct WildPokemonInfo gRoute119_LandMonsInfo = {15, gRoute119_LandMons}; + +const struct WildPokemon gRoute119_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute119_WaterMonsInfo = {4, gRoute119_WaterMons}; + +const struct WildPokemon gRoute119_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_CARVANHA}, + {25, 30, SPECIES_CARVANHA}, + {30, 35, SPECIES_CARVANHA}, + {20, 25, SPECIES_CARVANHA}, + {35, 40, SPECIES_CARVANHA}, + {40, 45, SPECIES_CARVANHA}, +}; + +const struct WildPokemonInfo gRoute119_FishingMonsInfo = {30, gRoute119_FishingMons}; + +const struct WildPokemon gRoute120_LandMons[] = +{ + {25, 25, SPECIES_POOCHYENA}, + {25, 25, SPECIES_MIGHTYENA}, + {27, 27, SPECIES_MIGHTYENA}, + {25, 25, SPECIES_ODDISH}, + {25, 25, SPECIES_MARILL}, + {26, 26, SPECIES_ODDISH}, + {27, 27, SPECIES_ODDISH}, + {27, 27, SPECIES_MARILL}, + {25, 25, SPECIES_ABSOL}, + {27, 27, SPECIES_ABSOL}, + {25, 25, SPECIES_KECLEON}, + {25, 25, SPECIES_SEEDOT}, +}; + +const struct WildPokemonInfo gRoute120_LandMonsInfo = {20, gRoute120_LandMons}; + +const struct WildPokemon gRoute120_WaterMons[] = +{ + {20, 30, SPECIES_MARILL}, + {10, 20, SPECIES_MARILL}, + {30, 35, SPECIES_MARILL}, + {5, 10, SPECIES_MARILL}, + {20, 30, SPECIES_GOLDEEN}, +}; + +const struct WildPokemonInfo gRoute120_WaterMonsInfo = {4, gRoute120_WaterMons}; + +const struct WildPokemon gRoute120_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_BARBOACH}, + {25, 30, SPECIES_BARBOACH}, + {30, 35, SPECIES_BARBOACH}, + {20, 25, SPECIES_BARBOACH}, + {35, 40, SPECIES_BARBOACH}, + {40, 45, SPECIES_BARBOACH}, +}; + +const struct WildPokemonInfo gRoute120_FishingMonsInfo = {30, gRoute120_FishingMons}; + +const struct WildPokemon gRoute121_LandMons[] = +{ + {26, 26, SPECIES_POOCHYENA}, + {26, 26, SPECIES_SHUPPET}, + {26, 26, SPECIES_MIGHTYENA}, + {28, 28, SPECIES_SHUPPET}, + {28, 28, SPECIES_MIGHTYENA}, + {26, 26, SPECIES_ODDISH}, + {28, 28, SPECIES_ODDISH}, + {28, 28, SPECIES_GLOOM}, + {26, 26, SPECIES_WINGULL}, + {27, 27, SPECIES_WINGULL}, + {28, 28, SPECIES_WINGULL}, + {25, 25, SPECIES_KECLEON}, +}; + +const struct WildPokemonInfo gRoute121_LandMonsInfo = {20, gRoute121_LandMons}; + +const struct WildPokemon gRoute121_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute121_WaterMonsInfo = {4, gRoute121_WaterMons}; + +const struct WildPokemon gRoute121_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute121_FishingMonsInfo = {30, gRoute121_FishingMons}; + +const struct WildPokemon gRoute122_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute122_WaterMonsInfo = {4, gRoute122_WaterMons}; + +const struct WildPokemon gRoute122_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute122_FishingMonsInfo = {30, gRoute122_FishingMons}; + +const struct WildPokemon gRoute123_LandMons[] = +{ + {26, 26, SPECIES_POOCHYENA}, + {26, 26, SPECIES_SHUPPET}, + {26, 26, SPECIES_MIGHTYENA}, + {28, 28, SPECIES_SHUPPET}, + {28, 28, SPECIES_MIGHTYENA}, + {26, 26, SPECIES_ODDISH}, + {28, 28, SPECIES_ODDISH}, + {28, 28, SPECIES_GLOOM}, + {26, 26, SPECIES_WINGULL}, + {27, 27, SPECIES_WINGULL}, + {28, 28, SPECIES_WINGULL}, + {25, 25, SPECIES_KECLEON}, +}; + +const struct WildPokemonInfo gRoute123_LandMonsInfo = {20, gRoute123_LandMons}; + +const struct WildPokemon gRoute123_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute123_WaterMonsInfo = {4, gRoute123_WaterMons}; + +const struct WildPokemon gRoute123_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute123_FishingMonsInfo = {30, gRoute123_FishingMons}; + +const struct WildPokemon gMtPyre_2F_LandMons[] = +{ + {27, 27, SPECIES_SHUPPET}, + {28, 28, SPECIES_SHUPPET}, + {26, 26, SPECIES_SHUPPET}, + {25, 25, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {23, 23, SPECIES_SHUPPET}, + {22, 22, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, +}; + +const struct WildPokemonInfo gMtPyre_2F_LandMonsInfo = {10, gMtPyre_2F_LandMons}; + +const struct WildPokemon gMtPyre_3F_LandMons[] = +{ + {27, 27, SPECIES_SHUPPET}, + {28, 28, SPECIES_SHUPPET}, + {26, 26, SPECIES_SHUPPET}, + {25, 25, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {23, 23, SPECIES_SHUPPET}, + {22, 22, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, +}; + +const struct WildPokemonInfo gMtPyre_3F_LandMonsInfo = {10, gMtPyre_3F_LandMons}; + +const struct WildPokemon gMtPyre_4F_LandMons[] = +{ + {27, 27, SPECIES_SHUPPET}, + {28, 28, SPECIES_SHUPPET}, + {26, 26, SPECIES_SHUPPET}, + {25, 25, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {23, 23, SPECIES_SHUPPET}, + {22, 22, SPECIES_SHUPPET}, + {27, 27, SPECIES_DUSKULL}, + {27, 27, SPECIES_DUSKULL}, + {25, 25, SPECIES_DUSKULL}, + {29, 29, SPECIES_DUSKULL}, +}; + +const struct WildPokemonInfo gMtPyre_4F_LandMonsInfo = {10, gMtPyre_4F_LandMons}; + +const struct WildPokemon gMtPyre_5F_LandMons[] = +{ + {27, 27, SPECIES_SHUPPET}, + {28, 28, SPECIES_SHUPPET}, + {26, 26, SPECIES_SHUPPET}, + {25, 25, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {23, 23, SPECIES_SHUPPET}, + {22, 22, SPECIES_SHUPPET}, + {27, 27, SPECIES_DUSKULL}, + {27, 27, SPECIES_DUSKULL}, + {25, 25, SPECIES_DUSKULL}, + {29, 29, SPECIES_DUSKULL}, +}; + +const struct WildPokemonInfo gMtPyre_5F_LandMonsInfo = {10, gMtPyre_5F_LandMons}; + +const struct WildPokemon gMtPyre_6F_LandMons[] = +{ + {27, 27, SPECIES_SHUPPET}, + {28, 28, SPECIES_SHUPPET}, + {26, 26, SPECIES_SHUPPET}, + {25, 25, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {23, 23, SPECIES_SHUPPET}, + {22, 22, SPECIES_SHUPPET}, + {27, 27, SPECIES_DUSKULL}, + {27, 27, SPECIES_DUSKULL}, + {25, 25, SPECIES_DUSKULL}, + {29, 29, SPECIES_DUSKULL}, +}; + +const struct WildPokemonInfo gMtPyre_6F_LandMonsInfo = {10, gMtPyre_6F_LandMons}; + +const struct WildPokemon gMtPyre_Exterior_LandMons[] = +{ + {27, 27, SPECIES_SHUPPET}, + {27, 27, SPECIES_SHUPPET}, + {28, 28, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {29, 29, SPECIES_VULPIX}, + {27, 27, SPECIES_VULPIX}, + {29, 29, SPECIES_VULPIX}, + {25, 25, SPECIES_VULPIX}, + {27, 27, SPECIES_WINGULL}, + {27, 27, SPECIES_WINGULL}, + {26, 26, SPECIES_WINGULL}, + {28, 28, SPECIES_WINGULL}, +}; + +const struct WildPokemonInfo gMtPyre_Exterior_LandMonsInfo = {10, gMtPyre_Exterior_LandMons}; + +const struct WildPokemon gMtPyre_Summit_LandMons[] = +{ + {28, 28, SPECIES_SHUPPET}, + {29, 29, SPECIES_SHUPPET}, + {27, 27, SPECIES_SHUPPET}, + {26, 26, SPECIES_SHUPPET}, + {30, 30, SPECIES_SHUPPET}, + {25, 25, SPECIES_SHUPPET}, + {24, 24, SPECIES_SHUPPET}, + {28, 28, SPECIES_DUSKULL}, + {26, 26, SPECIES_DUSKULL}, + {30, 30, SPECIES_DUSKULL}, + {28, 28, SPECIES_CHIMECHO}, + {28, 28, SPECIES_CHIMECHO}, +}; + +const struct WildPokemonInfo gMtPyre_Summit_LandMonsInfo = {10, gMtPyre_Summit_LandMons}; + +const struct WildPokemon gGraniteCave_StevensRoom_LandMons[] = +{ + {7, 7, SPECIES_ZUBAT}, + {8, 8, SPECIES_MAKUHITA}, + {7, 7, SPECIES_MAKUHITA}, + {8, 8, SPECIES_ZUBAT}, + {9, 9, SPECIES_MAKUHITA}, + {8, 8, SPECIES_ABRA}, + {10, 10, SPECIES_MAKUHITA}, + {6, 6, SPECIES_MAKUHITA}, + {7, 7, SPECIES_ARON}, + {8, 8, SPECIES_ARON}, + {7, 7, SPECIES_ARON}, + {8, 8, SPECIES_ARON}, +}; + +const struct WildPokemonInfo gGraniteCave_StevensRoom_LandMonsInfo = {10, gGraniteCave_StevensRoom_LandMons}; + +const struct WildPokemon gRoute125_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute125_WaterMonsInfo = {4, gRoute125_WaterMons}; + +const struct WildPokemon gRoute125_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute125_FishingMonsInfo = {30, gRoute125_FishingMons}; + +const struct WildPokemon gRoute126_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute126_WaterMonsInfo = {4, gRoute126_WaterMons}; + +const struct WildPokemon gRoute126_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute126_FishingMonsInfo = {30, gRoute126_FishingMons}; + +const struct WildPokemon gRoute127_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute127_WaterMonsInfo = {4, gRoute127_WaterMons}; + +const struct WildPokemon gRoute127_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute127_FishingMonsInfo = {30, gRoute127_FishingMons}; + +const struct WildPokemon gRoute128_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute128_WaterMonsInfo = {4, gRoute128_WaterMons}; + +const struct WildPokemon gRoute128_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_LUVDISC}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_LUVDISC}, + {30, 35, SPECIES_WAILMER}, + {30, 35, SPECIES_CORSOLA}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute128_FishingMonsInfo = {30, gRoute128_FishingMons}; + +const struct WildPokemon gRoute129_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_WAILORD}, +}; + +const struct WildPokemonInfo gRoute129_WaterMonsInfo = {4, gRoute129_WaterMons}; + +const struct WildPokemon gRoute129_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute129_FishingMonsInfo = {30, gRoute129_FishingMons}; + +const struct WildPokemon gRoute130_LandMons[] = +{ + {30, 30, SPECIES_WYNAUT}, + {35, 35, SPECIES_WYNAUT}, + {25, 25, SPECIES_WYNAUT}, + {40, 40, SPECIES_WYNAUT}, + {20, 20, SPECIES_WYNAUT}, + {45, 45, SPECIES_WYNAUT}, + {15, 15, SPECIES_WYNAUT}, + {50, 50, SPECIES_WYNAUT}, + {10, 10, SPECIES_WYNAUT}, + {5, 5, SPECIES_WYNAUT}, + {10, 10, SPECIES_WYNAUT}, + {5, 5, SPECIES_WYNAUT}, +}; + +const struct WildPokemonInfo gRoute130_LandMonsInfo = {20, gRoute130_LandMons}; + +const struct WildPokemon gRoute130_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute130_WaterMonsInfo = {4, gRoute130_WaterMons}; + +const struct WildPokemon gRoute130_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute130_FishingMonsInfo = {30, gRoute130_FishingMons}; + +const struct WildPokemon gRoute131_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute131_WaterMonsInfo = {4, gRoute131_WaterMons}; + +const struct WildPokemon gRoute131_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute131_FishingMonsInfo = {30, gRoute131_FishingMons}; + +const struct WildPokemon gRoute132_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute132_WaterMonsInfo = {4, gRoute132_WaterMons}; + +const struct WildPokemon gRoute132_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_HORSEA}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute132_FishingMonsInfo = {30, gRoute132_FishingMons}; + +const struct WildPokemon gRoute133_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute133_WaterMonsInfo = {4, gRoute133_WaterMons}; + +const struct WildPokemon gRoute133_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_HORSEA}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute133_FishingMonsInfo = {30, gRoute133_FishingMons}; + +const struct WildPokemon gRoute134_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gRoute134_WaterMonsInfo = {4, gRoute134_WaterMons}; + +const struct WildPokemon gRoute134_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_HORSEA}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gRoute134_FishingMonsInfo = {30, gRoute134_FishingMons}; + +const struct WildPokemon gAbandonedShip_HiddenFloorCorridors_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_TENTACOOL}, + {30, 35, SPECIES_TENTACRUEL}, +}; + +const struct WildPokemonInfo gAbandonedShip_HiddenFloorCorridors_WaterMonsInfo = {4, gAbandonedShip_HiddenFloorCorridors_WaterMons}; + +const struct WildPokemon gAbandonedShip_HiddenFloorCorridors_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_TENTACOOL}, + {25, 30, SPECIES_TENTACOOL}, + {30, 35, SPECIES_TENTACOOL}, + {30, 35, SPECIES_TENTACRUEL}, + {25, 30, SPECIES_TENTACRUEL}, + {20, 25, SPECIES_TENTACRUEL}, +}; + +const struct WildPokemonInfo gAbandonedShip_HiddenFloorCorridors_FishingMonsInfo = {20, gAbandonedShip_HiddenFloorCorridors_FishingMons}; + +const struct WildPokemon gSeafloorCavern_Room1_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {33, 33, SPECIES_ZUBAT}, + {28, 28, SPECIES_ZUBAT}, + {29, 29, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {35, 35, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room1_LandMonsInfo = {4, gSeafloorCavern_Room1_LandMons}; + +const struct WildPokemon gSeafloorCavern_Room2_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {33, 33, SPECIES_ZUBAT}, + {28, 28, SPECIES_ZUBAT}, + {29, 29, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {35, 35, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room2_LandMonsInfo = {4, gSeafloorCavern_Room2_LandMons}; + +const struct WildPokemon gSeafloorCavern_Room3_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {33, 33, SPECIES_ZUBAT}, + {28, 28, SPECIES_ZUBAT}, + {29, 29, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {35, 35, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room3_LandMonsInfo = {4, gSeafloorCavern_Room3_LandMons}; + +const struct WildPokemon gSeafloorCavern_Room4_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {33, 33, SPECIES_ZUBAT}, + {28, 28, SPECIES_ZUBAT}, + {29, 29, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {35, 35, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room4_LandMonsInfo = {4, gSeafloorCavern_Room4_LandMons}; + +const struct WildPokemon gSeafloorCavern_Room5_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {33, 33, SPECIES_ZUBAT}, + {28, 28, SPECIES_ZUBAT}, + {29, 29, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {35, 35, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room5_LandMonsInfo = {4, gSeafloorCavern_Room5_LandMons}; + +const struct WildPokemon gSeafloorCavern_Room6_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {33, 33, SPECIES_ZUBAT}, + {28, 28, SPECIES_ZUBAT}, + {29, 29, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {35, 35, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room6_LandMonsInfo = {4, gSeafloorCavern_Room6_LandMons}; + +const struct WildPokemon gSeafloorCavern_Room6_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_ZUBAT}, + {30, 35, SPECIES_ZUBAT}, + {30, 35, SPECIES_GOLBAT}, + {30, 35, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room6_WaterMonsInfo = {4, gSeafloorCavern_Room6_WaterMons}; + +const struct WildPokemon gSeafloorCavern_Room6_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room6_FishingMonsInfo = {10, gSeafloorCavern_Room6_FishingMons}; + +const struct WildPokemon gSeafloorCavern_Room7_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {33, 33, SPECIES_ZUBAT}, + {28, 28, SPECIES_ZUBAT}, + {29, 29, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {35, 35, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room7_LandMonsInfo = {4, gSeafloorCavern_Room7_LandMons}; + +const struct WildPokemon gSeafloorCavern_Room7_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_ZUBAT}, + {30, 35, SPECIES_ZUBAT}, + {30, 35, SPECIES_GOLBAT}, + {30, 35, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room7_WaterMonsInfo = {4, gSeafloorCavern_Room7_WaterMons}; + +const struct WildPokemon gSeafloorCavern_Room7_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room7_FishingMonsInfo = {10, gSeafloorCavern_Room7_FishingMons}; + +const struct WildPokemon gSeafloorCavern_Room8_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {33, 33, SPECIES_ZUBAT}, + {28, 28, SPECIES_ZUBAT}, + {29, 29, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {35, 35, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Room8_LandMonsInfo = {4, gSeafloorCavern_Room8_LandMons}; + +const struct WildPokemon gSeafloorCavern_Entrance_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_ZUBAT}, + {30, 35, SPECIES_ZUBAT}, + {30, 35, SPECIES_GOLBAT}, + {30, 35, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Entrance_WaterMonsInfo = {4, gSeafloorCavern_Entrance_WaterMons}; + +const struct WildPokemon gSeafloorCavern_Entrance_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gSeafloorCavern_Entrance_FishingMonsInfo = {10, gSeafloorCavern_Entrance_FishingMons}; + +const struct WildPokemon gCaveOfOrigin_Entrance_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {33, 33, SPECIES_ZUBAT}, + {28, 28, SPECIES_ZUBAT}, + {29, 29, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {35, 35, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gCaveOfOrigin_Entrance_LandMonsInfo = {4, gCaveOfOrigin_Entrance_LandMons}; + +const struct WildPokemon gCaveOfOrigin_1F_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {30, 30, SPECIES_SABLEYE}, + {32, 32, SPECIES_SABLEYE}, + {34, 34, SPECIES_SABLEYE}, + {33, 33, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gCaveOfOrigin_1F_LandMonsInfo = {4, gCaveOfOrigin_1F_LandMons}; + +const struct WildPokemon gCaveOfOrigin_UnusedRubySapphireMap1_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {30, 30, SPECIES_SABLEYE}, + {32, 32, SPECIES_SABLEYE}, + {34, 34, SPECIES_SABLEYE}, + {33, 33, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gCaveOfOrigin_UnusedRubySapphireMap1_LandMonsInfo = {4, gCaveOfOrigin_UnusedRubySapphireMap1_LandMons}; + +const struct WildPokemon gCaveOfOrigin_UnusedRubySapphireMap2_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {30, 30, SPECIES_SABLEYE}, + {32, 32, SPECIES_SABLEYE}, + {34, 34, SPECIES_SABLEYE}, + {33, 33, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gCaveOfOrigin_UnusedRubySapphireMap2_LandMonsInfo = {4, gCaveOfOrigin_UnusedRubySapphireMap2_LandMons}; + +const struct WildPokemon gCaveOfOrigin_UnusedRubySapphireMap3_LandMons[] = +{ + {30, 30, SPECIES_ZUBAT}, + {31, 31, SPECIES_ZUBAT}, + {32, 32, SPECIES_ZUBAT}, + {30, 30, SPECIES_SABLEYE}, + {32, 32, SPECIES_SABLEYE}, + {34, 34, SPECIES_SABLEYE}, + {33, 33, SPECIES_ZUBAT}, + {34, 34, SPECIES_ZUBAT}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {36, 36, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gCaveOfOrigin_UnusedRubySapphireMap3_LandMonsInfo = {4, gCaveOfOrigin_UnusedRubySapphireMap3_LandMons}; + +const struct WildPokemon gNewMauville_Entrance_LandMons[] = +{ + {24, 24, SPECIES_VOLTORB}, + {24, 24, SPECIES_MAGNEMITE}, + {25, 25, SPECIES_VOLTORB}, + {25, 25, SPECIES_MAGNEMITE}, + {23, 23, SPECIES_VOLTORB}, + {23, 23, SPECIES_MAGNEMITE}, + {26, 26, SPECIES_VOLTORB}, + {26, 26, SPECIES_MAGNEMITE}, + {22, 22, SPECIES_VOLTORB}, + {22, 22, SPECIES_MAGNEMITE}, + {22, 22, SPECIES_VOLTORB}, + {22, 22, SPECIES_MAGNEMITE}, +}; + +const struct WildPokemonInfo gNewMauville_Entrance_LandMonsInfo = {10, gNewMauville_Entrance_LandMons}; + +const struct WildPokemon gSafariZone_Southwest_LandMons[] = +{ + {25, 25, SPECIES_ODDISH}, + {27, 27, SPECIES_ODDISH}, + {25, 25, SPECIES_GIRAFARIG}, + {27, 27, SPECIES_GIRAFARIG}, + {25, 25, SPECIES_NATU}, + {27, 27, SPECIES_DODUO}, + {25, 25, SPECIES_GLOOM}, + {27, 27, SPECIES_WOBBUFFET}, + {25, 25, SPECIES_PIKACHU}, + {27, 27, SPECIES_WOBBUFFET}, + {27, 27, SPECIES_PIKACHU}, + {29, 29, SPECIES_WOBBUFFET}, +}; + +const struct WildPokemonInfo gSafariZone_Southwest_LandMonsInfo = {25, gSafariZone_Southwest_LandMons}; + +const struct WildPokemon gSafariZone_Southwest_WaterMons[] = +{ + {20, 30, SPECIES_PSYDUCK}, + {20, 30, SPECIES_PSYDUCK}, + {30, 35, SPECIES_PSYDUCK}, + {30, 35, SPECIES_PSYDUCK}, + {30, 35, SPECIES_PSYDUCK}, +}; + +const struct WildPokemonInfo gSafariZone_Southwest_WaterMonsInfo = {9, gSafariZone_Southwest_WaterMons}; + +const struct WildPokemon gSafariZone_Southwest_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 25, SPECIES_GOLDEEN}, + {10, 30, SPECIES_GOLDEEN}, + {25, 30, SPECIES_GOLDEEN}, + {30, 35, SPECIES_GOLDEEN}, + {30, 35, SPECIES_SEAKING}, + {35, 40, SPECIES_SEAKING}, + {25, 30, SPECIES_SEAKING}, +}; + +const struct WildPokemonInfo gSafariZone_Southwest_FishingMonsInfo = {35, gSafariZone_Southwest_FishingMons}; + +const struct WildPokemon gSafariZone_North_LandMons[] = +{ + {27, 27, SPECIES_PHANPY}, + {27, 27, SPECIES_ODDISH}, + {29, 29, SPECIES_PHANPY}, + {29, 29, SPECIES_ODDISH}, + {27, 27, SPECIES_NATU}, + {29, 29, SPECIES_GLOOM}, + {31, 31, SPECIES_GLOOM}, + {29, 29, SPECIES_NATU}, + {29, 29, SPECIES_XATU}, + {27, 27, SPECIES_HERACROSS}, + {31, 31, SPECIES_XATU}, + {29, 29, SPECIES_HERACROSS}, +}; + +const struct WildPokemonInfo gSafariZone_North_LandMonsInfo = {25, gSafariZone_North_LandMons}; + +const struct WildPokemon gSafariZone_North_RockSmashMons[] = +{ + {10, 15, SPECIES_GEODUDE}, + {5, 10, SPECIES_GEODUDE}, + {15, 20, SPECIES_GEODUDE}, + {20, 25, SPECIES_GEODUDE}, + {25, 30, SPECIES_GEODUDE}, +}; + +const struct WildPokemonInfo gSafariZone_North_RockSmashMonsInfo = {25, gSafariZone_North_RockSmashMons}; + +const struct WildPokemon gSafariZone_Northwest_LandMons[] = +{ + {27, 27, SPECIES_RHYHORN}, + {27, 27, SPECIES_ODDISH}, + {29, 29, SPECIES_RHYHORN}, + {29, 29, SPECIES_ODDISH}, + {27, 27, SPECIES_DODUO}, + {29, 29, SPECIES_GLOOM}, + {31, 31, SPECIES_GLOOM}, + {29, 29, SPECIES_DODUO}, + {29, 29, SPECIES_DODRIO}, + {27, 27, SPECIES_PINSIR}, + {31, 31, SPECIES_DODRIO}, + {29, 29, SPECIES_PINSIR}, +}; + +const struct WildPokemonInfo gSafariZone_Northwest_LandMonsInfo = {25, gSafariZone_Northwest_LandMons}; + +const struct WildPokemon gSafariZone_Northwest_WaterMons[] = +{ + {20, 30, SPECIES_PSYDUCK}, + {20, 30, SPECIES_PSYDUCK}, + {30, 35, SPECIES_PSYDUCK}, + {30, 35, SPECIES_GOLDUCK}, + {25, 40, SPECIES_GOLDUCK}, +}; + +const struct WildPokemonInfo gSafariZone_Northwest_WaterMonsInfo = {9, gSafariZone_Northwest_WaterMons}; + +const struct WildPokemon gSafariZone_Northwest_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 25, SPECIES_GOLDEEN}, + {10, 30, SPECIES_GOLDEEN}, + {25, 30, SPECIES_GOLDEEN}, + {30, 35, SPECIES_GOLDEEN}, + {30, 35, SPECIES_SEAKING}, + {35, 40, SPECIES_SEAKING}, + {25, 30, SPECIES_SEAKING}, +}; + +const struct WildPokemonInfo gSafariZone_Northwest_FishingMonsInfo = {35, gSafariZone_Northwest_FishingMons}; + +const struct WildPokemon gVictoryRoad_B1F_LandMons[] = +{ + {40, 40, SPECIES_GOLBAT}, + {40, 40, SPECIES_HARIYAMA}, + {40, 40, SPECIES_LAIRON}, + {40, 40, SPECIES_LAIRON}, + {38, 38, SPECIES_GOLBAT}, + {38, 38, SPECIES_HARIYAMA}, + {42, 42, SPECIES_GOLBAT}, + {42, 42, SPECIES_HARIYAMA}, + {42, 42, SPECIES_LAIRON}, + {38, 38, SPECIES_MAWILE}, + {42, 42, SPECIES_LAIRON}, + {38, 38, SPECIES_MAWILE}, +}; + +const struct WildPokemonInfo gVictoryRoad_B1F_LandMonsInfo = {10, gVictoryRoad_B1F_LandMons}; + +const struct WildPokemon gVictoryRoad_B1F_RockSmashMons[] = +{ + {30, 40, SPECIES_GRAVELER}, + {30, 40, SPECIES_GEODUDE}, + {35, 40, SPECIES_GRAVELER}, + {35, 40, SPECIES_GRAVELER}, + {35, 40, SPECIES_GRAVELER}, +}; + +const struct WildPokemonInfo gVictoryRoad_B1F_RockSmashMonsInfo = {20, gVictoryRoad_B1F_RockSmashMons}; + +const struct WildPokemon gVictoryRoad_B2F_LandMons[] = +{ + {40, 40, SPECIES_GOLBAT}, + {40, 40, SPECIES_SABLEYE}, + {40, 40, SPECIES_LAIRON}, + {40, 40, SPECIES_LAIRON}, + {42, 42, SPECIES_GOLBAT}, + {42, 42, SPECIES_SABLEYE}, + {44, 44, SPECIES_GOLBAT}, + {44, 44, SPECIES_SABLEYE}, + {42, 42, SPECIES_LAIRON}, + {42, 42, SPECIES_MAWILE}, + {44, 44, SPECIES_LAIRON}, + {44, 44, SPECIES_MAWILE}, +}; + +const struct WildPokemonInfo gVictoryRoad_B2F_LandMonsInfo = {10, gVictoryRoad_B2F_LandMons}; + +const struct WildPokemon gVictoryRoad_B2F_WaterMons[] = +{ + {30, 35, SPECIES_GOLBAT}, + {25, 30, SPECIES_GOLBAT}, + {35, 40, SPECIES_GOLBAT}, + {35, 40, SPECIES_GOLBAT}, + {35, 40, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gVictoryRoad_B2F_WaterMonsInfo = {4, gVictoryRoad_B2F_WaterMons}; + +const struct WildPokemon gVictoryRoad_B2F_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_BARBOACH}, + {25, 30, SPECIES_BARBOACH}, + {30, 35, SPECIES_BARBOACH}, + {30, 35, SPECIES_WHISCASH}, + {35, 40, SPECIES_WHISCASH}, + {40, 45, SPECIES_WHISCASH}, +}; + +const struct WildPokemonInfo gVictoryRoad_B2F_FishingMonsInfo = {30, gVictoryRoad_B2F_FishingMons}; + +const struct WildPokemon gMeteorFalls_1F_1R_LandMons[] = +{ + {16, 16, SPECIES_ZUBAT}, + {17, 17, SPECIES_ZUBAT}, + {18, 18, SPECIES_ZUBAT}, + {15, 15, SPECIES_ZUBAT}, + {14, 14, SPECIES_ZUBAT}, + {16, 16, SPECIES_SOLROCK}, + {18, 18, SPECIES_SOLROCK}, + {14, 14, SPECIES_SOLROCK}, + {19, 19, SPECIES_ZUBAT}, + {20, 20, SPECIES_ZUBAT}, + {19, 19, SPECIES_ZUBAT}, + {20, 20, SPECIES_ZUBAT}, +}; + +const struct WildPokemonInfo gMeteorFalls_1F_1R_LandMonsInfo = {10, gMeteorFalls_1F_1R_LandMons}; + +const struct WildPokemon gMeteorFalls_1F_1R_WaterMons[] = +{ + {5, 35, SPECIES_ZUBAT}, + {30, 35, SPECIES_ZUBAT}, + {25, 35, SPECIES_SOLROCK}, + {15, 25, SPECIES_SOLROCK}, + {5, 15, SPECIES_SOLROCK}, +}; + +const struct WildPokemonInfo gMeteorFalls_1F_1R_WaterMonsInfo = {4, gMeteorFalls_1F_1R_WaterMons}; + +const struct WildPokemon gMeteorFalls_1F_1R_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_BARBOACH}, + {25, 30, SPECIES_BARBOACH}, + {30, 35, SPECIES_BARBOACH}, + {20, 25, SPECIES_BARBOACH}, + {35, 40, SPECIES_BARBOACH}, + {40, 45, SPECIES_BARBOACH}, +}; + +const struct WildPokemonInfo gMeteorFalls_1F_1R_FishingMonsInfo = {30, gMeteorFalls_1F_1R_FishingMons}; + +const struct WildPokemon gMeteorFalls_1F_2R_LandMons[] = +{ + {33, 33, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {35, 35, SPECIES_SOLROCK}, + {33, 33, SPECIES_SOLROCK}, + {37, 37, SPECIES_SOLROCK}, + {35, 35, SPECIES_GOLBAT}, + {39, 39, SPECIES_SOLROCK}, + {38, 38, SPECIES_GOLBAT}, + {40, 40, SPECIES_GOLBAT}, + {38, 38, SPECIES_GOLBAT}, + {40, 40, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gMeteorFalls_1F_2R_LandMonsInfo = {10, gMeteorFalls_1F_2R_LandMons}; + +const struct WildPokemon gMeteorFalls_1F_2R_WaterMons[] = +{ + {30, 35, SPECIES_GOLBAT}, + {30, 35, SPECIES_GOLBAT}, + {25, 35, SPECIES_SOLROCK}, + {15, 25, SPECIES_SOLROCK}, + {5, 15, SPECIES_SOLROCK}, +}; + +const struct WildPokemonInfo gMeteorFalls_1F_2R_WaterMonsInfo = {4, gMeteorFalls_1F_2R_WaterMons}; + +const struct WildPokemon gMeteorFalls_1F_2R_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_BARBOACH}, + {25, 30, SPECIES_BARBOACH}, + {30, 35, SPECIES_BARBOACH}, + {30, 35, SPECIES_WHISCASH}, + {35, 40, SPECIES_WHISCASH}, + {40, 45, SPECIES_WHISCASH}, +}; + +const struct WildPokemonInfo gMeteorFalls_1F_2R_FishingMonsInfo = {30, gMeteorFalls_1F_2R_FishingMons}; + +const struct WildPokemon gMeteorFalls_B1F_1R_LandMons[] = +{ + {33, 33, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {35, 35, SPECIES_SOLROCK}, + {33, 33, SPECIES_SOLROCK}, + {37, 37, SPECIES_SOLROCK}, + {35, 35, SPECIES_GOLBAT}, + {39, 39, SPECIES_SOLROCK}, + {38, 38, SPECIES_GOLBAT}, + {40, 40, SPECIES_GOLBAT}, + {38, 38, SPECIES_GOLBAT}, + {40, 40, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gMeteorFalls_B1F_1R_LandMonsInfo = {10, gMeteorFalls_B1F_1R_LandMons}; + +const struct WildPokemon gMeteorFalls_B1F_1R_WaterMons[] = +{ + {30, 35, SPECIES_GOLBAT}, + {30, 35, SPECIES_GOLBAT}, + {25, 35, SPECIES_SOLROCK}, + {15, 25, SPECIES_SOLROCK}, + {5, 15, SPECIES_SOLROCK}, +}; + +const struct WildPokemonInfo gMeteorFalls_B1F_1R_WaterMonsInfo = {4, gMeteorFalls_B1F_1R_WaterMons}; + +const struct WildPokemon gMeteorFalls_B1F_1R_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_BARBOACH}, + {25, 30, SPECIES_BARBOACH}, + {30, 35, SPECIES_BARBOACH}, + {30, 35, SPECIES_WHISCASH}, + {35, 40, SPECIES_WHISCASH}, + {40, 45, SPECIES_WHISCASH}, +}; + +const struct WildPokemonInfo gMeteorFalls_B1F_1R_FishingMonsInfo = {30, gMeteorFalls_B1F_1R_FishingMons}; + +const struct WildPokemon gShoalCave_LowTideStairsRoom_LandMons[] = +{ + {26, 26, SPECIES_ZUBAT}, + {26, 26, SPECIES_SPHEAL}, + {28, 28, SPECIES_ZUBAT}, + {28, 28, SPECIES_SPHEAL}, + {30, 30, SPECIES_ZUBAT}, + {30, 30, SPECIES_SPHEAL}, + {32, 32, SPECIES_ZUBAT}, + {32, 32, SPECIES_SPHEAL}, + {32, 32, SPECIES_GOLBAT}, + {32, 32, SPECIES_SPHEAL}, + {32, 32, SPECIES_GOLBAT}, + {32, 32, SPECIES_SPHEAL}, +}; + +const struct WildPokemonInfo gShoalCave_LowTideStairsRoom_LandMonsInfo = {10, gShoalCave_LowTideStairsRoom_LandMons}; + +const struct WildPokemon gShoalCave_LowTideLowerRoom_LandMons[] = +{ + {26, 26, SPECIES_ZUBAT}, + {26, 26, SPECIES_SPHEAL}, + {28, 28, SPECIES_ZUBAT}, + {28, 28, SPECIES_SPHEAL}, + {30, 30, SPECIES_ZUBAT}, + {30, 30, SPECIES_SPHEAL}, + {32, 32, SPECIES_ZUBAT}, + {32, 32, SPECIES_SPHEAL}, + {32, 32, SPECIES_GOLBAT}, + {32, 32, SPECIES_SPHEAL}, + {32, 32, SPECIES_GOLBAT}, + {32, 32, SPECIES_SPHEAL}, +}; + +const struct WildPokemonInfo gShoalCave_LowTideLowerRoom_LandMonsInfo = {10, gShoalCave_LowTideLowerRoom_LandMons}; + +const struct WildPokemon gShoalCave_LowTideInnerRoom_LandMons[] = +{ + {26, 26, SPECIES_ZUBAT}, + {26, 26, SPECIES_SPHEAL}, + {28, 28, SPECIES_ZUBAT}, + {28, 28, SPECIES_SPHEAL}, + {30, 30, SPECIES_ZUBAT}, + {30, 30, SPECIES_SPHEAL}, + {32, 32, SPECIES_ZUBAT}, + {32, 32, SPECIES_SPHEAL}, + {32, 32, SPECIES_GOLBAT}, + {32, 32, SPECIES_SPHEAL}, + {32, 32, SPECIES_GOLBAT}, + {32, 32, SPECIES_SPHEAL}, +}; + +const struct WildPokemonInfo gShoalCave_LowTideInnerRoom_LandMonsInfo = {10, gShoalCave_LowTideInnerRoom_LandMons}; + +const struct WildPokemon gShoalCave_LowTideInnerRoom_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_ZUBAT}, + {25, 30, SPECIES_SPHEAL}, + {25, 30, SPECIES_SPHEAL}, + {25, 35, SPECIES_SPHEAL}, +}; + +const struct WildPokemonInfo gShoalCave_LowTideInnerRoom_WaterMonsInfo = {4, gShoalCave_LowTideInnerRoom_WaterMons}; + +const struct WildPokemon gShoalCave_LowTideInnerRoom_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gShoalCave_LowTideInnerRoom_FishingMonsInfo = {10, gShoalCave_LowTideInnerRoom_FishingMons}; + +const struct WildPokemon gShoalCave_LowTideEntranceRoom_LandMons[] = +{ + {26, 26, SPECIES_ZUBAT}, + {26, 26, SPECIES_SPHEAL}, + {28, 28, SPECIES_ZUBAT}, + {28, 28, SPECIES_SPHEAL}, + {30, 30, SPECIES_ZUBAT}, + {30, 30, SPECIES_SPHEAL}, + {32, 32, SPECIES_ZUBAT}, + {32, 32, SPECIES_SPHEAL}, + {32, 32, SPECIES_GOLBAT}, + {32, 32, SPECIES_SPHEAL}, + {32, 32, SPECIES_GOLBAT}, + {32, 32, SPECIES_SPHEAL}, +}; + +const struct WildPokemonInfo gShoalCave_LowTideEntranceRoom_LandMonsInfo = {10, gShoalCave_LowTideEntranceRoom_LandMons}; + +const struct WildPokemon gShoalCave_LowTideEntranceRoom_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {5, 35, SPECIES_ZUBAT}, + {25, 30, SPECIES_SPHEAL}, + {25, 30, SPECIES_SPHEAL}, + {25, 35, SPECIES_SPHEAL}, +}; + +const struct WildPokemonInfo gShoalCave_LowTideEntranceRoom_WaterMonsInfo = {4, gShoalCave_LowTideEntranceRoom_WaterMons}; + +const struct WildPokemon gShoalCave_LowTideEntranceRoom_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gShoalCave_LowTideEntranceRoom_FishingMonsInfo = {10, gShoalCave_LowTideEntranceRoom_FishingMons}; + +const struct WildPokemon gLilycoveCity_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gLilycoveCity_WaterMonsInfo = {4, gLilycoveCity_WaterMons}; + +const struct WildPokemon gLilycoveCity_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_STARYU}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gLilycoveCity_FishingMonsInfo = {10, gLilycoveCity_FishingMons}; + +const struct WildPokemon gDewfordTown_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gDewfordTown_WaterMonsInfo = {4, gDewfordTown_WaterMons}; + +const struct WildPokemon gDewfordTown_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gDewfordTown_FishingMonsInfo = {10, gDewfordTown_FishingMons}; + +const struct WildPokemon gSlateportCity_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gSlateportCity_WaterMonsInfo = {4, gSlateportCity_WaterMons}; + +const struct WildPokemon gSlateportCity_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_WAILMER}, + {20, 25, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gSlateportCity_FishingMonsInfo = {10, gSlateportCity_FishingMons}; + +const struct WildPokemon gMossdeepCity_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gMossdeepCity_WaterMonsInfo = {4, gMossdeepCity_WaterMons}; + +const struct WildPokemon gMossdeepCity_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gMossdeepCity_FishingMonsInfo = {10, gMossdeepCity_FishingMons}; + +const struct WildPokemon gPacifidlogTown_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gPacifidlogTown_WaterMonsInfo = {4, gPacifidlogTown_WaterMons}; + +const struct WildPokemon gPacifidlogTown_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_SHARPEDO}, + {30, 35, SPECIES_WAILMER}, + {25, 30, SPECIES_WAILMER}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gPacifidlogTown_FishingMonsInfo = {10, gPacifidlogTown_FishingMons}; + +const struct WildPokemon gEverGrandeCity_WaterMons[] = +{ + {5, 35, SPECIES_TENTACOOL}, + {10, 30, SPECIES_WINGULL}, + {15, 25, SPECIES_WINGULL}, + {25, 30, SPECIES_PELIPPER}, + {25, 30, SPECIES_PELIPPER}, +}; + +const struct WildPokemonInfo gEverGrandeCity_WaterMonsInfo = {4, gEverGrandeCity_WaterMons}; + +const struct WildPokemon gEverGrandeCity_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_LUVDISC}, + {10, 30, SPECIES_WAILMER}, + {30, 35, SPECIES_LUVDISC}, + {30, 35, SPECIES_WAILMER}, + {30, 35, SPECIES_CORSOLA}, + {35, 40, SPECIES_WAILMER}, + {40, 45, SPECIES_WAILMER}, +}; + +const struct WildPokemonInfo gEverGrandeCity_FishingMonsInfo = {10, gEverGrandeCity_FishingMons}; + +const struct WildPokemon gPetalburgCity_WaterMons[] = +{ + {20, 30, SPECIES_MARILL}, + {10, 20, SPECIES_MARILL}, + {30, 35, SPECIES_MARILL}, + {5, 10, SPECIES_MARILL}, + {5, 10, SPECIES_MARILL}, +}; + +const struct WildPokemonInfo gPetalburgCity_WaterMonsInfo = {1, gPetalburgCity_WaterMons}; + +const struct WildPokemon gPetalburgCity_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_GOLDEEN}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_GOLDEEN}, + {10, 30, SPECIES_CORPHISH}, + {25, 30, SPECIES_CORPHISH}, + {30, 35, SPECIES_CORPHISH}, + {20, 25, SPECIES_CORPHISH}, + {35, 40, SPECIES_CORPHISH}, + {40, 45, SPECIES_CORPHISH}, +}; + +const struct WildPokemonInfo gPetalburgCity_FishingMonsInfo = {10, gPetalburgCity_FishingMons}; + +const struct WildPokemon gUnderwater1_WaterMons[] = +{ + {20, 30, SPECIES_CLAMPERL}, + {20, 30, SPECIES_CHINCHOU}, + {30, 35, SPECIES_CLAMPERL}, + {30, 35, SPECIES_RELICANTH}, + {30, 35, SPECIES_RELICANTH}, +}; + +const struct WildPokemonInfo gUnderwater1_WaterMonsInfo = {4, gUnderwater1_WaterMons}; + +const struct WildPokemon gShoalCave_LowTideIceRoom_LandMons[] = +{ + {26, 26, SPECIES_ZUBAT}, + {26, 26, SPECIES_SPHEAL}, + {28, 28, SPECIES_ZUBAT}, + {28, 28, SPECIES_SPHEAL}, + {30, 30, SPECIES_ZUBAT}, + {30, 30, SPECIES_SPHEAL}, + {26, 26, SPECIES_SNORUNT}, + {32, 32, SPECIES_SPHEAL}, + {30, 30, SPECIES_GOLBAT}, + {28, 28, SPECIES_SNORUNT}, + {32, 32, SPECIES_GOLBAT}, + {30, 30, SPECIES_SNORUNT}, +}; + +const struct WildPokemonInfo gShoalCave_LowTideIceRoom_LandMonsInfo = {10, gShoalCave_LowTideIceRoom_LandMons}; + +const struct WildPokemon gSkyPillar_1F_LandMons[] = +{ + {33, 33, SPECIES_SABLEYE}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {34, 34, SPECIES_SABLEYE}, + {36, 36, SPECIES_CLAYDOL}, + {37, 37, SPECIES_BANETTE}, + {38, 38, SPECIES_BANETTE}, + {36, 36, SPECIES_CLAYDOL}, + {37, 37, SPECIES_CLAYDOL}, + {38, 38, SPECIES_CLAYDOL}, + {37, 37, SPECIES_CLAYDOL}, + {38, 38, SPECIES_CLAYDOL}, +}; + +const struct WildPokemonInfo gSkyPillar_1F_LandMonsInfo = {10, gSkyPillar_1F_LandMons}; + +const struct WildPokemon gSootopolisCity_WaterMons[] = +{ + {5, 35, SPECIES_MAGIKARP}, + {10, 30, SPECIES_MAGIKARP}, + {15, 25, SPECIES_MAGIKARP}, + {25, 30, SPECIES_MAGIKARP}, + {25, 30, SPECIES_MAGIKARP}, +}; + +const struct WildPokemonInfo gSootopolisCity_WaterMonsInfo = {1, gSootopolisCity_WaterMons}; + +const struct WildPokemon gSootopolisCity_FishingMons[] = +{ + {5, 10, SPECIES_MAGIKARP}, + {5, 10, SPECIES_TENTACOOL}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_MAGIKARP}, + {10, 30, SPECIES_MAGIKARP}, + {30, 35, SPECIES_MAGIKARP}, + {30, 35, SPECIES_MAGIKARP}, + {35, 40, SPECIES_GYARADOS}, + {35, 45, SPECIES_GYARADOS}, + {5, 45, SPECIES_GYARADOS}, +}; + +const struct WildPokemonInfo gSootopolisCity_FishingMonsInfo = {10, gSootopolisCity_FishingMons}; + +const struct WildPokemon gSkyPillar_3F_LandMons[] = +{ + {33, 33, SPECIES_SABLEYE}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {34, 34, SPECIES_SABLEYE}, + {36, 36, SPECIES_CLAYDOL}, + {37, 37, SPECIES_BANETTE}, + {38, 38, SPECIES_BANETTE}, + {36, 36, SPECIES_CLAYDOL}, + {37, 37, SPECIES_CLAYDOL}, + {38, 38, SPECIES_CLAYDOL}, + {37, 37, SPECIES_CLAYDOL}, + {38, 38, SPECIES_CLAYDOL}, +}; + +const struct WildPokemonInfo gSkyPillar_3F_LandMonsInfo = {10, gSkyPillar_3F_LandMons}; + +const struct WildPokemon gSkyPillar_5F_LandMons[] = +{ + {33, 33, SPECIES_SABLEYE}, + {34, 34, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {34, 34, SPECIES_SABLEYE}, + {36, 36, SPECIES_CLAYDOL}, + {37, 37, SPECIES_BANETTE}, + {38, 38, SPECIES_BANETTE}, + {36, 36, SPECIES_CLAYDOL}, + {37, 37, SPECIES_CLAYDOL}, + {38, 38, SPECIES_ALTARIA}, + {39, 39, SPECIES_ALTARIA}, + {39, 39, SPECIES_ALTARIA}, +}; + +const struct WildPokemonInfo gSkyPillar_5F_LandMonsInfo = {10, gSkyPillar_5F_LandMons}; + +const struct WildPokemon gSafariZone_Southeast_LandMons[] = +{ + {33, 33, SPECIES_SUNKERN}, + {34, 34, SPECIES_MAREEP}, + {35, 35, SPECIES_SUNKERN}, + {36, 36, SPECIES_MAREEP}, + {34, 34, SPECIES_AIPOM}, + {33, 33, SPECIES_SPINARAK}, + {35, 35, SPECIES_HOOTHOOT}, + {34, 34, SPECIES_SNUBBULL}, + {36, 36, SPECIES_STANTLER}, + {37, 37, SPECIES_GLIGAR}, + {39, 39, SPECIES_STANTLER}, + {40, 40, SPECIES_GLIGAR}, +}; + +const struct WildPokemonInfo gSafariZone_Southeast_LandMonsInfo = {25, gSafariZone_Southeast_LandMons}; + +const struct WildPokemon gSafariZone_Southeast_WaterMons[] = +{ + {25, 30, SPECIES_WOOPER}, + {25, 30, SPECIES_MARILL}, + {25, 30, SPECIES_MARILL}, + {30, 35, SPECIES_MARILL}, + {35, 40, SPECIES_QUAGSIRE}, +}; + +const struct WildPokemonInfo gSafariZone_Southeast_WaterMonsInfo = {9, gSafariZone_Southeast_WaterMons}; + +const struct WildPokemon gSafariZone_Southeast_FishingMons[] = +{ + {25, 30, SPECIES_MAGIKARP}, + {25, 30, SPECIES_GOLDEEN}, + {25, 30, SPECIES_MAGIKARP}, + {25, 30, SPECIES_GOLDEEN}, + {30, 35, SPECIES_REMORAID}, + {25, 30, SPECIES_GOLDEEN}, + {25, 30, SPECIES_REMORAID}, + {30, 35, SPECIES_REMORAID}, + {30, 35, SPECIES_REMORAID}, + {35, 40, SPECIES_OCTILLERY}, +}; + +const struct WildPokemonInfo gSafariZone_Southeast_FishingMonsInfo = {35, gSafariZone_Southeast_FishingMons}; + +const struct WildPokemon gSafariZone_Northeast_LandMons[] = +{ + {33, 33, SPECIES_AIPOM}, + {34, 34, SPECIES_TEDDIURSA}, + {35, 35, SPECIES_AIPOM}, + {36, 36, SPECIES_TEDDIURSA}, + {34, 34, SPECIES_SUNKERN}, + {33, 33, SPECIES_LEDYBA}, + {35, 35, SPECIES_HOOTHOOT}, + {34, 34, SPECIES_PINECO}, + {36, 36, SPECIES_HOUNDOUR}, + {37, 37, SPECIES_MILTANK}, + {39, 39, SPECIES_HOUNDOUR}, + {40, 40, SPECIES_MILTANK}, +}; + +const struct WildPokemonInfo gSafariZone_Northeast_LandMonsInfo = {25, gSafariZone_Northeast_LandMons}; + +const struct WildPokemon gSafariZone_Northeast_RockSmashMons[] = +{ + {25, 30, SPECIES_SHUCKLE}, + {20, 25, SPECIES_SHUCKLE}, + {30, 35, SPECIES_SHUCKLE}, + {30, 35, SPECIES_SHUCKLE}, + {35, 40, SPECIES_SHUCKLE}, +}; + +const struct WildPokemonInfo gSafariZone_Northeast_RockSmashMonsInfo = {25, gSafariZone_Northeast_RockSmashMons}; + +const struct WildPokemon gMagmaHideout_1F_LandMons[] = +{ + {27, 27, SPECIES_GEODUDE}, + {28, 28, SPECIES_TORKOAL}, + {28, 28, SPECIES_GEODUDE}, + {30, 30, SPECIES_TORKOAL}, + {29, 29, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GRAVELER}, + {30, 30, SPECIES_GRAVELER}, + {31, 31, SPECIES_GRAVELER}, + {32, 32, SPECIES_GRAVELER}, + {33, 33, SPECIES_GRAVELER}, +}; + +const struct WildPokemonInfo gMagmaHideout_1F_LandMonsInfo = {10, gMagmaHideout_1F_LandMons}; + +const struct WildPokemon gMagmaHideout_2F_1R_LandMons[] = +{ + {27, 27, SPECIES_GEODUDE}, + {28, 28, SPECIES_TORKOAL}, + {28, 28, SPECIES_GEODUDE}, + {30, 30, SPECIES_TORKOAL}, + {29, 29, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GRAVELER}, + {30, 30, SPECIES_GRAVELER}, + {31, 31, SPECIES_GRAVELER}, + {32, 32, SPECIES_GRAVELER}, + {33, 33, SPECIES_GRAVELER}, +}; + +const struct WildPokemonInfo gMagmaHideout_2F_1R_LandMonsInfo = {10, gMagmaHideout_2F_1R_LandMons}; + +const struct WildPokemon gMagmaHideout_2F_2R_LandMons[] = +{ + {27, 27, SPECIES_GEODUDE}, + {28, 28, SPECIES_TORKOAL}, + {28, 28, SPECIES_GEODUDE}, + {30, 30, SPECIES_TORKOAL}, + {29, 29, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GRAVELER}, + {30, 30, SPECIES_GRAVELER}, + {31, 31, SPECIES_GRAVELER}, + {32, 32, SPECIES_GRAVELER}, + {33, 33, SPECIES_GRAVELER}, +}; + +const struct WildPokemonInfo gMagmaHideout_2F_2R_LandMonsInfo = {10, gMagmaHideout_2F_2R_LandMons}; + +const struct WildPokemon gMagmaHideout_3F_1R_LandMons[] = +{ + {27, 27, SPECIES_GEODUDE}, + {28, 28, SPECIES_TORKOAL}, + {28, 28, SPECIES_GEODUDE}, + {30, 30, SPECIES_TORKOAL}, + {29, 29, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GRAVELER}, + {30, 30, SPECIES_GRAVELER}, + {31, 31, SPECIES_GRAVELER}, + {32, 32, SPECIES_GRAVELER}, + {33, 33, SPECIES_GRAVELER}, +}; + +const struct WildPokemonInfo gMagmaHideout_3F_1R_LandMonsInfo = {10, gMagmaHideout_3F_1R_LandMons}; + +const struct WildPokemon gMagmaHideout_3F_2R_LandMons[] = +{ + {27, 27, SPECIES_GEODUDE}, + {28, 28, SPECIES_TORKOAL}, + {28, 28, SPECIES_GEODUDE}, + {30, 30, SPECIES_TORKOAL}, + {29, 29, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GRAVELER}, + {30, 30, SPECIES_GRAVELER}, + {31, 31, SPECIES_GRAVELER}, + {32, 32, SPECIES_GRAVELER}, + {33, 33, SPECIES_GRAVELER}, +}; + +const struct WildPokemonInfo gMagmaHideout_3F_2R_LandMonsInfo = {10, gMagmaHideout_3F_2R_LandMons}; + +const struct WildPokemon gMagmaHideout_4F_LandMons[] = +{ + {27, 27, SPECIES_GEODUDE}, + {28, 28, SPECIES_TORKOAL}, + {28, 28, SPECIES_GEODUDE}, + {30, 30, SPECIES_TORKOAL}, + {29, 29, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GRAVELER}, + {30, 30, SPECIES_GRAVELER}, + {31, 31, SPECIES_GRAVELER}, + {32, 32, SPECIES_GRAVELER}, + {33, 33, SPECIES_GRAVELER}, +}; + +const struct WildPokemonInfo gMagmaHideout_4F_LandMonsInfo = {10, gMagmaHideout_4F_LandMons}; + +const struct WildPokemon gMagmaHideout_3F_3R_LandMons[] = +{ + {27, 27, SPECIES_GEODUDE}, + {28, 28, SPECIES_TORKOAL}, + {28, 28, SPECIES_GEODUDE}, + {30, 30, SPECIES_TORKOAL}, + {29, 29, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GRAVELER}, + {30, 30, SPECIES_GRAVELER}, + {31, 31, SPECIES_GRAVELER}, + {32, 32, SPECIES_GRAVELER}, + {33, 33, SPECIES_GRAVELER}, +}; + +const struct WildPokemonInfo gMagmaHideout_3F_3R_LandMonsInfo = {10, gMagmaHideout_3F_3R_LandMons}; + +const struct WildPokemon gMagmaHideout_2F_3R_LandMons[] = +{ + {27, 27, SPECIES_GEODUDE}, + {28, 28, SPECIES_TORKOAL}, + {28, 28, SPECIES_GEODUDE}, + {30, 30, SPECIES_TORKOAL}, + {29, 29, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GEODUDE}, + {30, 30, SPECIES_GRAVELER}, + {30, 30, SPECIES_GRAVELER}, + {31, 31, SPECIES_GRAVELER}, + {32, 32, SPECIES_GRAVELER}, + {33, 33, SPECIES_GRAVELER}, +}; + +const struct WildPokemonInfo gMagmaHideout_2F_3R_LandMonsInfo = {10, gMagmaHideout_2F_3R_LandMons}; + +const struct WildPokemon gMirageTower_1F_LandMons[] = +{ + {21, 21, SPECIES_SANDSHREW}, + {21, 21, SPECIES_TRAPINCH}, + {20, 20, SPECIES_SANDSHREW}, + {20, 20, SPECIES_TRAPINCH}, + {20, 20, SPECIES_SANDSHREW}, + {20, 20, SPECIES_TRAPINCH}, + {22, 22, SPECIES_SANDSHREW}, + {22, 22, SPECIES_TRAPINCH}, + {23, 23, SPECIES_SANDSHREW}, + {23, 23, SPECIES_TRAPINCH}, + {24, 24, SPECIES_SANDSHREW}, + {24, 24, SPECIES_TRAPINCH}, +}; + +const struct WildPokemonInfo gMirageTower_1F_LandMonsInfo = {10, gMirageTower_1F_LandMons}; + +const struct WildPokemon gMirageTower_2F_LandMons[] = +{ + {21, 21, SPECIES_SANDSHREW}, + {21, 21, SPECIES_TRAPINCH}, + {20, 20, SPECIES_SANDSHREW}, + {20, 20, SPECIES_TRAPINCH}, + {20, 20, SPECIES_SANDSHREW}, + {20, 20, SPECIES_TRAPINCH}, + {22, 22, SPECIES_SANDSHREW}, + {22, 22, SPECIES_TRAPINCH}, + {23, 23, SPECIES_SANDSHREW}, + {23, 23, SPECIES_TRAPINCH}, + {24, 24, SPECIES_SANDSHREW}, + {24, 24, SPECIES_TRAPINCH}, +}; + +const struct WildPokemonInfo gMirageTower_2F_LandMonsInfo = {10, gMirageTower_2F_LandMons}; + +const struct WildPokemon gMirageTower_3F_LandMons[] = +{ + {21, 21, SPECIES_SANDSHREW}, + {21, 21, SPECIES_TRAPINCH}, + {20, 20, SPECIES_SANDSHREW}, + {20, 20, SPECIES_TRAPINCH}, + {20, 20, SPECIES_SANDSHREW}, + {20, 20, SPECIES_TRAPINCH}, + {22, 22, SPECIES_SANDSHREW}, + {22, 22, SPECIES_TRAPINCH}, + {23, 23, SPECIES_SANDSHREW}, + {23, 23, SPECIES_TRAPINCH}, + {24, 24, SPECIES_SANDSHREW}, + {24, 24, SPECIES_TRAPINCH}, +}; + +const struct WildPokemonInfo gMirageTower_3F_LandMonsInfo = {10, gMirageTower_3F_LandMons}; + +const struct WildPokemon gMirageTower_4F_LandMons[] = +{ + {21, 21, SPECIES_SANDSHREW}, + {21, 21, SPECIES_TRAPINCH}, + {20, 20, SPECIES_SANDSHREW}, + {20, 20, SPECIES_TRAPINCH}, + {20, 20, SPECIES_SANDSHREW}, + {20, 20, SPECIES_TRAPINCH}, + {22, 22, SPECIES_SANDSHREW}, + {22, 22, SPECIES_TRAPINCH}, + {23, 23, SPECIES_SANDSHREW}, + {23, 23, SPECIES_TRAPINCH}, + {24, 24, SPECIES_SANDSHREW}, + {24, 24, SPECIES_TRAPINCH}, +}; + +const struct WildPokemonInfo gMirageTower_4F_LandMonsInfo = {10, gMirageTower_4F_LandMons}; + +const struct WildPokemon gDesertUnderpass_LandMons[] = +{ + {38, 38, SPECIES_DITTO}, + {35, 35, SPECIES_WHISMUR}, + {40, 40, SPECIES_DITTO}, + {40, 40, SPECIES_LOUDRED}, + {41, 41, SPECIES_DITTO}, + {36, 36, SPECIES_WHISMUR}, + {38, 38, SPECIES_LOUDRED}, + {42, 42, SPECIES_DITTO}, + {38, 38, SPECIES_WHISMUR}, + {43, 43, SPECIES_DITTO}, + {44, 44, SPECIES_LOUDRED}, + {45, 45, SPECIES_DITTO}, +}; + +const struct WildPokemonInfo gDesertUnderpass_LandMonsInfo = {10, gDesertUnderpass_LandMons}; + +const struct WildPokemon gArtisanCave_B1F_LandMons[] = +{ + {40, 40, SPECIES_SMEARGLE}, + {41, 41, SPECIES_SMEARGLE}, + {42, 42, SPECIES_SMEARGLE}, + {43, 43, SPECIES_SMEARGLE}, + {44, 44, SPECIES_SMEARGLE}, + {45, 45, SPECIES_SMEARGLE}, + {46, 46, SPECIES_SMEARGLE}, + {47, 47, SPECIES_SMEARGLE}, + {48, 48, SPECIES_SMEARGLE}, + {49, 49, SPECIES_SMEARGLE}, + {50, 50, SPECIES_SMEARGLE}, + {50, 50, SPECIES_SMEARGLE}, +}; + +const struct WildPokemonInfo gArtisanCave_B1F_LandMonsInfo = {10, gArtisanCave_B1F_LandMons}; + +const struct WildPokemon gArtisanCave_1F_LandMons[] = +{ + {40, 40, SPECIES_SMEARGLE}, + {41, 41, SPECIES_SMEARGLE}, + {42, 42, SPECIES_SMEARGLE}, + {43, 43, SPECIES_SMEARGLE}, + {44, 44, SPECIES_SMEARGLE}, + {45, 45, SPECIES_SMEARGLE}, + {46, 46, SPECIES_SMEARGLE}, + {47, 47, SPECIES_SMEARGLE}, + {48, 48, SPECIES_SMEARGLE}, + {49, 49, SPECIES_SMEARGLE}, + {50, 50, SPECIES_SMEARGLE}, + {50, 50, SPECIES_SMEARGLE}, +}; + +const struct WildPokemonInfo gArtisanCave_1F_LandMonsInfo = {10, gArtisanCave_1F_LandMons}; + +const struct WildPokemon gAlteringCave1_LandMons[] = +{ + {10, 10, SPECIES_ZUBAT}, + {12, 12, SPECIES_ZUBAT}, + {8, 8, SPECIES_ZUBAT}, + {14, 14, SPECIES_ZUBAT}, + {10, 10, SPECIES_ZUBAT}, + {12, 12, SPECIES_ZUBAT}, + {16, 16, SPECIES_ZUBAT}, + {6, 6, SPECIES_ZUBAT}, + {8, 8, SPECIES_ZUBAT}, + {14, 14, SPECIES_ZUBAT}, + {8, 8, SPECIES_ZUBAT}, + {14, 14, SPECIES_ZUBAT}, +}; + +const struct WildPokemonInfo gAlteringCave1_LandMonsInfo = {7, gAlteringCave1_LandMons}; + +const struct WildPokemon gAlteringCave2_LandMons[] = +{ + {7, 7, SPECIES_MAREEP}, + {9, 9, SPECIES_MAREEP}, + {5, 5, SPECIES_MAREEP}, + {11, 11, SPECIES_MAREEP}, + {7, 7, SPECIES_MAREEP}, + {9, 9, SPECIES_MAREEP}, + {13, 13, SPECIES_MAREEP}, + {3, 3, SPECIES_MAREEP}, + {5, 5, SPECIES_MAREEP}, + {11, 11, SPECIES_MAREEP}, + {5, 5, SPECIES_MAREEP}, + {11, 11, SPECIES_MAREEP}, +}; + +const struct WildPokemonInfo gAlteringCave2_LandMonsInfo = {7, gAlteringCave2_LandMons}; + +const struct WildPokemon gAlteringCave3_LandMons[] = +{ + {23, 23, SPECIES_PINECO}, + {25, 25, SPECIES_PINECO}, + {22, 22, SPECIES_PINECO}, + {27, 27, SPECIES_PINECO}, + {23, 23, SPECIES_PINECO}, + {25, 25, SPECIES_PINECO}, + {29, 29, SPECIES_PINECO}, + {19, 19, SPECIES_PINECO}, + {21, 21, SPECIES_PINECO}, + {27, 27, SPECIES_PINECO}, + {21, 21, SPECIES_PINECO}, + {27, 27, SPECIES_PINECO}, +}; + +const struct WildPokemonInfo gAlteringCave3_LandMonsInfo = {7, gAlteringCave3_LandMons}; + +const struct WildPokemon gAlteringCave4_LandMons[] = +{ + {16, 16, SPECIES_HOUNDOUR}, + {18, 18, SPECIES_HOUNDOUR}, + {14, 14, SPECIES_HOUNDOUR}, + {20, 20, SPECIES_HOUNDOUR}, + {16, 16, SPECIES_HOUNDOUR}, + {18, 18, SPECIES_HOUNDOUR}, + {22, 22, SPECIES_HOUNDOUR}, + {12, 12, SPECIES_HOUNDOUR}, + {14, 14, SPECIES_HOUNDOUR}, + {20, 20, SPECIES_HOUNDOUR}, + {14, 14, SPECIES_HOUNDOUR}, + {20, 20, SPECIES_HOUNDOUR}, +}; + +const struct WildPokemonInfo gAlteringCave4_LandMonsInfo = {7, gAlteringCave4_LandMons}; + +const struct WildPokemon gAlteringCave5_LandMons[] = +{ + {10, 10, SPECIES_TEDDIURSA}, + {12, 12, SPECIES_TEDDIURSA}, + {8, 8, SPECIES_TEDDIURSA}, + {14, 14, SPECIES_TEDDIURSA}, + {10, 10, SPECIES_TEDDIURSA}, + {12, 12, SPECIES_TEDDIURSA}, + {16, 16, SPECIES_TEDDIURSA}, + {6, 6, SPECIES_TEDDIURSA}, + {8, 8, SPECIES_TEDDIURSA}, + {14, 14, SPECIES_TEDDIURSA}, + {8, 8, SPECIES_TEDDIURSA}, + {14, 14, SPECIES_TEDDIURSA}, +}; + +const struct WildPokemonInfo gAlteringCave5_LandMonsInfo = {7, gAlteringCave5_LandMons}; + +const struct WildPokemon gAlteringCave6_LandMons[] = +{ + {22, 22, SPECIES_AIPOM}, + {24, 24, SPECIES_AIPOM}, + {20, 20, SPECIES_AIPOM}, + {26, 26, SPECIES_AIPOM}, + {22, 22, SPECIES_AIPOM}, + {24, 24, SPECIES_AIPOM}, + {28, 28, SPECIES_AIPOM}, + {18, 18, SPECIES_AIPOM}, + {20, 20, SPECIES_AIPOM}, + {26, 26, SPECIES_AIPOM}, + {20, 20, SPECIES_AIPOM}, + {26, 26, SPECIES_AIPOM}, +}; + +const struct WildPokemonInfo gAlteringCave6_LandMonsInfo = {7, gAlteringCave6_LandMons}; + +const struct WildPokemon gAlteringCave7_LandMons[] = +{ + {22, 22, SPECIES_SHUCKLE}, + {24, 24, SPECIES_SHUCKLE}, + {20, 20, SPECIES_SHUCKLE}, + {26, 26, SPECIES_SHUCKLE}, + {22, 22, SPECIES_SHUCKLE}, + {24, 24, SPECIES_SHUCKLE}, + {28, 28, SPECIES_SHUCKLE}, + {18, 18, SPECIES_SHUCKLE}, + {20, 20, SPECIES_SHUCKLE}, + {26, 26, SPECIES_SHUCKLE}, + {20, 20, SPECIES_SHUCKLE}, + {26, 26, SPECIES_SHUCKLE}, +}; + +const struct WildPokemonInfo gAlteringCave7_LandMonsInfo = {7, gAlteringCave7_LandMons}; + +const struct WildPokemon gAlteringCave8_LandMons[] = +{ + {22, 22, SPECIES_STANTLER}, + {24, 24, SPECIES_STANTLER}, + {20, 20, SPECIES_STANTLER}, + {26, 26, SPECIES_STANTLER}, + {22, 22, SPECIES_STANTLER}, + {24, 24, SPECIES_STANTLER}, + {28, 28, SPECIES_STANTLER}, + {18, 18, SPECIES_STANTLER}, + {20, 20, SPECIES_STANTLER}, + {26, 26, SPECIES_STANTLER}, + {20, 20, SPECIES_STANTLER}, + {26, 26, SPECIES_STANTLER}, +}; + +const struct WildPokemonInfo gAlteringCave8_LandMonsInfo = {7, gAlteringCave8_LandMons}; + +const struct WildPokemon gAlteringCave9_LandMons[] = +{ + {22, 22, SPECIES_SMEARGLE}, + {24, 24, SPECIES_SMEARGLE}, + {20, 20, SPECIES_SMEARGLE}, + {26, 26, SPECIES_SMEARGLE}, + {22, 22, SPECIES_SMEARGLE}, + {24, 24, SPECIES_SMEARGLE}, + {28, 28, SPECIES_SMEARGLE}, + {18, 18, SPECIES_SMEARGLE}, + {20, 20, SPECIES_SMEARGLE}, + {26, 26, SPECIES_SMEARGLE}, + {20, 20, SPECIES_SMEARGLE}, + {26, 26, SPECIES_SMEARGLE}, +}; + +const struct WildPokemonInfo gAlteringCave9_LandMonsInfo = {7, gAlteringCave9_LandMons}; + +const struct WildPokemon gMeteorFalls_StevensCave_LandMons[] = +{ + {33, 33, SPECIES_GOLBAT}, + {35, 35, SPECIES_GOLBAT}, + {33, 33, SPECIES_GOLBAT}, + {35, 35, SPECIES_SOLROCK}, + {33, 33, SPECIES_SOLROCK}, + {37, 37, SPECIES_SOLROCK}, + {35, 35, SPECIES_GOLBAT}, + {39, 39, SPECIES_SOLROCK}, + {38, 38, SPECIES_GOLBAT}, + {40, 40, SPECIES_GOLBAT}, + {38, 38, SPECIES_GOLBAT}, + {40, 40, SPECIES_GOLBAT}, +}; + +const struct WildPokemonInfo gMeteorFalls_StevensCave_LandMonsInfo = {10, gMeteorFalls_StevensCave_LandMons}; + +const struct WildPokemonHeader gWildMonHeaders[] = +{ + { + .mapGroup = MAP_GROUP(ROUTE101), + .mapNum = MAP_NUM(ROUTE101), + .landMonsInfo = &gRoute101_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ROUTE102), + .mapNum = MAP_NUM(ROUTE102), + .landMonsInfo = &gRoute102_LandMonsInfo, + .waterMonsInfo = &gRoute102_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute102_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE103), + .mapNum = MAP_NUM(ROUTE103), + .landMonsInfo = &gRoute103_LandMonsInfo, + .waterMonsInfo = &gRoute103_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute103_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE104), + .mapNum = MAP_NUM(ROUTE104), + .landMonsInfo = &gRoute104_LandMonsInfo, + .waterMonsInfo = &gRoute104_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute104_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE105), + .mapNum = MAP_NUM(ROUTE105), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute105_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute105_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE110), + .mapNum = MAP_NUM(ROUTE110), + .landMonsInfo = &gRoute110_LandMonsInfo, + .waterMonsInfo = &gRoute110_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute110_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE111), + .mapNum = MAP_NUM(ROUTE111), + .landMonsInfo = &gRoute111_LandMonsInfo, + .waterMonsInfo = &gRoute111_WaterMonsInfo, + .rockSmashMonsInfo = &gRoute111_RockSmashMonsInfo, + .fishingMonsInfo = &gRoute111_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE112), + .mapNum = MAP_NUM(ROUTE112), + .landMonsInfo = &gRoute112_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ROUTE113), + .mapNum = MAP_NUM(ROUTE113), + .landMonsInfo = &gRoute113_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ROUTE114), + .mapNum = MAP_NUM(ROUTE114), + .landMonsInfo = &gRoute114_LandMonsInfo, + .waterMonsInfo = &gRoute114_WaterMonsInfo, + .rockSmashMonsInfo = &gRoute114_RockSmashMonsInfo, + .fishingMonsInfo = &gRoute114_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE116), + .mapNum = MAP_NUM(ROUTE116), + .landMonsInfo = &gRoute116_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ROUTE117), + .mapNum = MAP_NUM(ROUTE117), + .landMonsInfo = &gRoute117_LandMonsInfo, + .waterMonsInfo = &gRoute117_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute117_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE118), + .mapNum = MAP_NUM(ROUTE118), + .landMonsInfo = &gRoute118_LandMonsInfo, + .waterMonsInfo = &gRoute118_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute118_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE124), + .mapNum = MAP_NUM(ROUTE124), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute124_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute124_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(PETALBURG_WOODS), + .mapNum = MAP_NUM(PETALBURG_WOODS), + .landMonsInfo = &gPetalburgWoods_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(RUSTURF_TUNNEL), + .mapNum = MAP_NUM(RUSTURF_TUNNEL), + .landMonsInfo = &gRusturfTunnel_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(GRANITE_CAVE_1F), + .mapNum = MAP_NUM(GRANITE_CAVE_1F), + .landMonsInfo = &gGraniteCave_1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(GRANITE_CAVE_B1F), + .mapNum = MAP_NUM(GRANITE_CAVE_B1F), + .landMonsInfo = &gGraniteCave_B1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MT_PYRE_1F), + .mapNum = MAP_NUM(MT_PYRE_1F), + .landMonsInfo = &gMtPyre_1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(VICTORY_ROAD_1F), + .mapNum = MAP_NUM(VICTORY_ROAD_1F), + .landMonsInfo = &gVictoryRoad_1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SAFARI_ZONE_SOUTHEAST), + .mapNum = MAP_NUM(SAFARI_ZONE_SOUTHEAST), + .landMonsInfo = &gSafariZone_South_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(UNDERWATER2), + .mapNum = MAP_NUM(UNDERWATER2), + .landMonsInfo = NULL, + .waterMonsInfo = &gUnderwater2_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ABANDONED_SHIP_ROOMS_B1F), + .mapNum = MAP_NUM(ABANDONED_SHIP_ROOMS_B1F), + .landMonsInfo = NULL, + .waterMonsInfo = &gAbandonedShip_Rooms_B1F_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gAbandonedShip_Rooms_B1F_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(GRANITE_CAVE_B2F), + .mapNum = MAP_NUM(GRANITE_CAVE_B2F), + .landMonsInfo = &gGraniteCave_B2F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = &gGraniteCave_B2F_RockSmashMonsInfo, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(FIERY_PATH), + .mapNum = MAP_NUM(FIERY_PATH), + .landMonsInfo = &gFieryPath_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(METEOR_FALLS_B1F_2R), + .mapNum = MAP_NUM(METEOR_FALLS_B1F_2R), + .landMonsInfo = &gMeteorFalls_B1F_2R_LandMonsInfo, + .waterMonsInfo = &gMeteorFalls_B1F_2R_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gMeteorFalls_B1F_2R_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(JAGGED_PASS), + .mapNum = MAP_NUM(JAGGED_PASS), + .landMonsInfo = &gJaggedPass_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ROUTE106), + .mapNum = MAP_NUM(ROUTE106), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute106_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute106_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE107), + .mapNum = MAP_NUM(ROUTE107), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute107_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute107_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE108), + .mapNum = MAP_NUM(ROUTE108), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute108_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute108_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE109), + .mapNum = MAP_NUM(ROUTE109), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute109_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute109_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE115), + .mapNum = MAP_NUM(ROUTE115), + .landMonsInfo = &gRoute115_LandMonsInfo, + .waterMonsInfo = &gRoute115_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute115_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(NEW_MAUVILLE_INSIDE), + .mapNum = MAP_NUM(NEW_MAUVILLE_INSIDE), + .landMonsInfo = &gNewMauville_Inside_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ROUTE119), + .mapNum = MAP_NUM(ROUTE119), + .landMonsInfo = &gRoute119_LandMonsInfo, + .waterMonsInfo = &gRoute119_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute119_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE120), + .mapNum = MAP_NUM(ROUTE120), + .landMonsInfo = &gRoute120_LandMonsInfo, + .waterMonsInfo = &gRoute120_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute120_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE121), + .mapNum = MAP_NUM(ROUTE121), + .landMonsInfo = &gRoute121_LandMonsInfo, + .waterMonsInfo = &gRoute121_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute121_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE122), + .mapNum = MAP_NUM(ROUTE122), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute122_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute122_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE123), + .mapNum = MAP_NUM(ROUTE123), + .landMonsInfo = &gRoute123_LandMonsInfo, + .waterMonsInfo = &gRoute123_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute123_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(MT_PYRE_2F), + .mapNum = MAP_NUM(MT_PYRE_2F), + .landMonsInfo = &gMtPyre_2F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MT_PYRE_3F), + .mapNum = MAP_NUM(MT_PYRE_3F), + .landMonsInfo = &gMtPyre_3F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MT_PYRE_4F), + .mapNum = MAP_NUM(MT_PYRE_4F), + .landMonsInfo = &gMtPyre_4F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MT_PYRE_5F), + .mapNum = MAP_NUM(MT_PYRE_5F), + .landMonsInfo = &gMtPyre_5F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MT_PYRE_6F), + .mapNum = MAP_NUM(MT_PYRE_6F), + .landMonsInfo = &gMtPyre_6F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MT_PYRE_EXTERIOR), + .mapNum = MAP_NUM(MT_PYRE_EXTERIOR), + .landMonsInfo = &gMtPyre_Exterior_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MT_PYRE_SUMMIT), + .mapNum = MAP_NUM(MT_PYRE_SUMMIT), + .landMonsInfo = &gMtPyre_Summit_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(GRANITE_CAVE_STEVENS_ROOM), + .mapNum = MAP_NUM(GRANITE_CAVE_STEVENS_ROOM), + .landMonsInfo = &gGraniteCave_StevensRoom_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ROUTE125), + .mapNum = MAP_NUM(ROUTE125), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute125_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute125_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE126), + .mapNum = MAP_NUM(ROUTE126), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute126_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute126_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE127), + .mapNum = MAP_NUM(ROUTE127), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute127_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute127_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE128), + .mapNum = MAP_NUM(ROUTE128), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute128_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute128_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE129), + .mapNum = MAP_NUM(ROUTE129), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute129_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute129_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE130), + .mapNum = MAP_NUM(ROUTE130), + .landMonsInfo = &gRoute130_LandMonsInfo, + .waterMonsInfo = &gRoute130_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute130_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE131), + .mapNum = MAP_NUM(ROUTE131), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute131_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute131_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE132), + .mapNum = MAP_NUM(ROUTE132), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute132_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute132_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE133), + .mapNum = MAP_NUM(ROUTE133), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute133_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute133_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ROUTE134), + .mapNum = MAP_NUM(ROUTE134), + .landMonsInfo = NULL, + .waterMonsInfo = &gRoute134_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gRoute134_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS), + .mapNum = MAP_NUM(ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS), + .landMonsInfo = NULL, + .waterMonsInfo = &gAbandonedShip_HiddenFloorCorridors_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gAbandonedShip_HiddenFloorCorridors_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM1), + .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM1), + .landMonsInfo = &gSeafloorCavern_Room1_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM2), + .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM2), + .landMonsInfo = &gSeafloorCavern_Room2_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM3), + .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM3), + .landMonsInfo = &gSeafloorCavern_Room3_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM4), + .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM4), + .landMonsInfo = &gSeafloorCavern_Room4_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM5), + .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM5), + .landMonsInfo = &gSeafloorCavern_Room5_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM6), + .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM6), + .landMonsInfo = &gSeafloorCavern_Room6_LandMonsInfo, + .waterMonsInfo = &gSeafloorCavern_Room6_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gSeafloorCavern_Room6_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM7), + .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM7), + .landMonsInfo = &gSeafloorCavern_Room7_LandMonsInfo, + .waterMonsInfo = &gSeafloorCavern_Room7_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gSeafloorCavern_Room7_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM8), + .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM8), + .landMonsInfo = &gSeafloorCavern_Room8_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ENTRANCE), + .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ENTRANCE), + .landMonsInfo = NULL, + .waterMonsInfo = &gSeafloorCavern_Entrance_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gSeafloorCavern_Entrance_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_ENTRANCE), + .mapNum = MAP_NUM(CAVE_OF_ORIGIN_ENTRANCE), + .landMonsInfo = &gCaveOfOrigin_Entrance_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_1F), + .mapNum = MAP_NUM(CAVE_OF_ORIGIN_1F), + .landMonsInfo = &gCaveOfOrigin_1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_UNUSED_RS_B1F), + .mapNum = MAP_NUM(CAVE_OF_ORIGIN_UNUSED_RS_B1F), + .landMonsInfo = &gCaveOfOrigin_UnusedRubySapphireMap1_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_UNUSED_RS_B2F), + .mapNum = MAP_NUM(CAVE_OF_ORIGIN_UNUSED_RS_B2F), + .landMonsInfo = &gCaveOfOrigin_UnusedRubySapphireMap2_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_UNUSED_RS_B3F), + .mapNum = MAP_NUM(CAVE_OF_ORIGIN_UNUSED_RS_B3F), + .landMonsInfo = &gCaveOfOrigin_UnusedRubySapphireMap3_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(NEW_MAUVILLE_ENTRANCE), + .mapNum = MAP_NUM(NEW_MAUVILLE_ENTRANCE), + .landMonsInfo = &gNewMauville_Entrance_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SAFARI_ZONE_SOUTHWEST), + .mapNum = MAP_NUM(SAFARI_ZONE_SOUTHWEST), + .landMonsInfo = &gSafariZone_Southwest_LandMonsInfo, + .waterMonsInfo = &gSafariZone_Southwest_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gSafariZone_Southwest_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(SAFARI_ZONE_NORTHEAST), + .mapNum = MAP_NUM(SAFARI_ZONE_NORTHEAST), + .landMonsInfo = &gSafariZone_North_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = &gSafariZone_North_RockSmashMonsInfo, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SAFARI_ZONE_NORTHWEST), + .mapNum = MAP_NUM(SAFARI_ZONE_NORTHWEST), + .landMonsInfo = &gSafariZone_Northwest_LandMonsInfo, + .waterMonsInfo = &gSafariZone_Northwest_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gSafariZone_Northwest_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(VICTORY_ROAD_B1F), + .mapNum = MAP_NUM(VICTORY_ROAD_B1F), + .landMonsInfo = &gVictoryRoad_B1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = &gVictoryRoad_B1F_RockSmashMonsInfo, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(VICTORY_ROAD_B2F), + .mapNum = MAP_NUM(VICTORY_ROAD_B2F), + .landMonsInfo = &gVictoryRoad_B2F_LandMonsInfo, + .waterMonsInfo = &gVictoryRoad_B2F_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gVictoryRoad_B2F_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(METEOR_FALLS_1F_1R), + .mapNum = MAP_NUM(METEOR_FALLS_1F_1R), + .landMonsInfo = &gMeteorFalls_1F_1R_LandMonsInfo, + .waterMonsInfo = &gMeteorFalls_1F_1R_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gMeteorFalls_1F_1R_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(METEOR_FALLS_1F_2R), + .mapNum = MAP_NUM(METEOR_FALLS_1F_2R), + .landMonsInfo = &gMeteorFalls_1F_2R_LandMonsInfo, + .waterMonsInfo = &gMeteorFalls_1F_2R_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gMeteorFalls_1F_2R_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(METEOR_FALLS_B1F_1R), + .mapNum = MAP_NUM(METEOR_FALLS_B1F_1R), + .landMonsInfo = &gMeteorFalls_B1F_1R_LandMonsInfo, + .waterMonsInfo = &gMeteorFalls_B1F_1R_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gMeteorFalls_B1F_1R_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM), + .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM), + .landMonsInfo = &gShoalCave_LowTideStairsRoom_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_LOWER_ROOM), + .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_LOWER_ROOM), + .landMonsInfo = &gShoalCave_LowTideLowerRoom_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_INNER_ROOM), + .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_INNER_ROOM), + .landMonsInfo = &gShoalCave_LowTideInnerRoom_LandMonsInfo, + .waterMonsInfo = &gShoalCave_LowTideInnerRoom_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gShoalCave_LowTideInnerRoom_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM), + .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM), + .landMonsInfo = &gShoalCave_LowTideEntranceRoom_LandMonsInfo, + .waterMonsInfo = &gShoalCave_LowTideEntranceRoom_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gShoalCave_LowTideEntranceRoom_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(LILYCOVE_CITY), + .mapNum = MAP_NUM(LILYCOVE_CITY), + .landMonsInfo = NULL, + .waterMonsInfo = &gLilycoveCity_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gLilycoveCity_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(DEWFORD_TOWN), + .mapNum = MAP_NUM(DEWFORD_TOWN), + .landMonsInfo = NULL, + .waterMonsInfo = &gDewfordTown_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gDewfordTown_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(SLATEPORT_CITY), + .mapNum = MAP_NUM(SLATEPORT_CITY), + .landMonsInfo = NULL, + .waterMonsInfo = &gSlateportCity_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gSlateportCity_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(MOSSDEEP_CITY), + .mapNum = MAP_NUM(MOSSDEEP_CITY), + .landMonsInfo = NULL, + .waterMonsInfo = &gMossdeepCity_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gMossdeepCity_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(PACIFIDLOG_TOWN), + .mapNum = MAP_NUM(PACIFIDLOG_TOWN), + .landMonsInfo = NULL, + .waterMonsInfo = &gPacifidlogTown_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gPacifidlogTown_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(EVER_GRANDE_CITY), + .mapNum = MAP_NUM(EVER_GRANDE_CITY), + .landMonsInfo = NULL, + .waterMonsInfo = &gEverGrandeCity_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gEverGrandeCity_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(PETALBURG_CITY), + .mapNum = MAP_NUM(PETALBURG_CITY), + .landMonsInfo = NULL, + .waterMonsInfo = &gPetalburgCity_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gPetalburgCity_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(UNDERWATER1), + .mapNum = MAP_NUM(UNDERWATER1), + .landMonsInfo = NULL, + .waterMonsInfo = &gUnderwater1_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_ICE_ROOM), + .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_ICE_ROOM), + .landMonsInfo = &gShoalCave_LowTideIceRoom_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SKY_PILLAR_1F), + .mapNum = MAP_NUM(SKY_PILLAR_1F), + .landMonsInfo = &gSkyPillar_1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SOOTOPOLIS_CITY), + .mapNum = MAP_NUM(SOOTOPOLIS_CITY), + .landMonsInfo = NULL, + .waterMonsInfo = &gSootopolisCity_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gSootopolisCity_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(SKY_PILLAR_3F), + .mapNum = MAP_NUM(SKY_PILLAR_3F), + .landMonsInfo = &gSkyPillar_3F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SKY_PILLAR_5F), + .mapNum = MAP_NUM(SKY_PILLAR_5F), + .landMonsInfo = &gSkyPillar_5F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(SAFARI_ZONE_EM_2), + .mapNum = MAP_NUM(SAFARI_ZONE_EM_2), + .landMonsInfo = &gSafariZone_Southeast_LandMonsInfo, + .waterMonsInfo = &gSafariZone_Southeast_WaterMonsInfo, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = &gSafariZone_Southeast_FishingMonsInfo, + }, + { + .mapGroup = MAP_GROUP(SAFARI_ZONE_EM_1), + .mapNum = MAP_NUM(SAFARI_ZONE_EM_1), + .landMonsInfo = &gSafariZone_Northeast_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = &gSafariZone_Northeast_RockSmashMonsInfo, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_1F), + .mapNum = MAP_NUM(MAGMA_HIDEOUT_1F), + .landMonsInfo = &gMagmaHideout_1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_2F_1R), + .mapNum = MAP_NUM(MAGMA_HIDEOUT_2F_1R), + .landMonsInfo = &gMagmaHideout_2F_1R_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_2F_2R), + .mapNum = MAP_NUM(MAGMA_HIDEOUT_2F_2R), + .landMonsInfo = &gMagmaHideout_2F_2R_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_3F_1R), + .mapNum = MAP_NUM(MAGMA_HIDEOUT_3F_1R), + .landMonsInfo = &gMagmaHideout_3F_1R_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_3F_2R), + .mapNum = MAP_NUM(MAGMA_HIDEOUT_3F_2R), + .landMonsInfo = &gMagmaHideout_3F_2R_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_4F), + .mapNum = MAP_NUM(MAGMA_HIDEOUT_4F), + .landMonsInfo = &gMagmaHideout_4F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_3F_3R), + .mapNum = MAP_NUM(MAGMA_HIDEOUT_3F_3R), + .landMonsInfo = &gMagmaHideout_3F_3R_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_2F_3R), + .mapNum = MAP_NUM(MAGMA_HIDEOUT_2F_3R), + .landMonsInfo = &gMagmaHideout_2F_3R_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MIRAGE_TOWER_1F), + .mapNum = MAP_NUM(MIRAGE_TOWER_1F), + .landMonsInfo = &gMirageTower_1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MIRAGE_TOWER_2F), + .mapNum = MAP_NUM(MIRAGE_TOWER_2F), + .landMonsInfo = &gMirageTower_2F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MIRAGE_TOWER_3F), + .mapNum = MAP_NUM(MIRAGE_TOWER_3F), + .landMonsInfo = &gMirageTower_3F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(MIRAGE_TOWER_4F), + .mapNum = MAP_NUM(MIRAGE_TOWER_4F), + .landMonsInfo = &gMirageTower_4F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(DESERT_UNDERPASS), + .mapNum = MAP_NUM(DESERT_UNDERPASS), + .landMonsInfo = &gDesertUnderpass_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ARTISAN_CAVE_B1F), + .mapNum = MAP_NUM(ARTISAN_CAVE_B1F), + .landMonsInfo = &gArtisanCave_B1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ARTISAN_CAVE_1F), + .mapNum = MAP_NUM(ARTISAN_CAVE_1F), + .landMonsInfo = &gArtisanCave_1F_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ALTERING_CAVE), + .mapNum = MAP_NUM(ALTERING_CAVE), + .landMonsInfo = &gAlteringCave1_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ALTERING_CAVE), + .mapNum = MAP_NUM(ALTERING_CAVE), + .landMonsInfo = &gAlteringCave2_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ALTERING_CAVE), + .mapNum = MAP_NUM(ALTERING_CAVE), + .landMonsInfo = &gAlteringCave3_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ALTERING_CAVE), + .mapNum = MAP_NUM(ALTERING_CAVE), + .landMonsInfo = &gAlteringCave4_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ALTERING_CAVE), + .mapNum = MAP_NUM(ALTERING_CAVE), + .landMonsInfo = &gAlteringCave5_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ALTERING_CAVE), + .mapNum = MAP_NUM(ALTERING_CAVE), + .landMonsInfo = &gAlteringCave6_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ALTERING_CAVE), + .mapNum = MAP_NUM(ALTERING_CAVE), + .landMonsInfo = &gAlteringCave7_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ALTERING_CAVE), + .mapNum = MAP_NUM(ALTERING_CAVE), + .landMonsInfo = &gAlteringCave8_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(ALTERING_CAVE), + .mapNum = MAP_NUM(ALTERING_CAVE), + .landMonsInfo = &gAlteringCave9_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(METEOR_FALLS_STEVENS_CAVE), + .mapNum = MAP_NUM(METEOR_FALLS_STEVENS_CAVE), + .landMonsInfo = &gMeteorFalls_StevensCave_LandMonsInfo, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = MAP_GROUP(UNDEFINED), + .mapNum = MAP_NUM(UNDEFINED), + .landMonsInfo = NULL, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, +}; + +const struct WildPokemon gBattlePyramidPlaceholders_1[] = +{ + {5, 5, SPECIES_BULBASAUR}, + {5, 5, SPECIES_BULBASAUR}, + {5, 5, SPECIES_BULBASAUR}, + {5, 5, SPECIES_BULBASAUR}, + {5, 5, SPECIES_IVYSAUR}, + {5, 5, SPECIES_IVYSAUR}, + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_CHARMANDER}, +}; + +const struct WildPokemonInfo gBattlePyramidPlaceholders_1Info = {4, gBattlePyramidPlaceholders_1}; + +const struct WildPokemon gBattlePyramidPlaceholders_2[] = +{ + {5, 5, SPECIES_IVYSAUR}, + {5, 5, SPECIES_IVYSAUR}, + {5, 5, SPECIES_IVYSAUR}, + {5, 5, SPECIES_IVYSAUR}, + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMANDER}, +}; + +const struct WildPokemonInfo gBattlePyramidPlaceholders_2Info = {4, gBattlePyramidPlaceholders_2}; + +const struct WildPokemon gBattlePyramidPlaceholders_3[] = +{ + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_VENUSAUR}, + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARIZARD}, +}; + +const struct WildPokemonInfo gBattlePyramidPlaceholders_3Info = {4, gBattlePyramidPlaceholders_3}; + +const struct WildPokemon gBattlePyramidPlaceholders_4[] = +{ + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_CHARMANDER}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_SQUIRTLE}, +}; + +const struct WildPokemonInfo gBattlePyramidPlaceholders_4Info = {4, gBattlePyramidPlaceholders_4}; + +const struct WildPokemon gBattlePyramidPlaceholders_5[] = +{ + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_WARTORTLE}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_WARTORTLE}, +}; + +const struct WildPokemonInfo gBattlePyramidPlaceholders_5Info = {4, gBattlePyramidPlaceholders_5}; + +const struct WildPokemon gBattlePyramidPlaceholders_6[] = +{ + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_WARTORTLE}, + {5, 5, SPECIES_WARTORTLE}, + {5, 5, SPECIES_WARTORTLE}, + {5, 5, SPECIES_WARTORTLE}, + {5, 5, SPECIES_WARTORTLE}, + {5, 5, SPECIES_WARTORTLE}, +}; + +const struct WildPokemonInfo gBattlePyramidPlaceholders_6Info = {4, gBattlePyramidPlaceholders_6}; + +const struct WildPokemon gBattlePyramidPlaceholders_7[] = +{ + {5, 5, SPECIES_WARTORTLE}, + {5, 5, SPECIES_WARTORTLE}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_SQUIRTLE}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARIZARD}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, + {5, 5, SPECIES_CHARMELEON}, +}; + +const struct WildPokemonInfo gBattlePyramidPlaceholders_7Info = {8, gBattlePyramidPlaceholders_7}; + +const struct WildPokemonHeader gBattlePyramidWildMonHeaders[] = +{ + { + .mapGroup = 0, + .mapNum = 1, + .landMonsInfo = &gBattlePyramidPlaceholders_1Info, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 0, + .mapNum = 2, + .landMonsInfo = &gBattlePyramidPlaceholders_2Info, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 0, + .mapNum = 3, + .landMonsInfo = &gBattlePyramidPlaceholders_3Info, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 0, + .mapNum = 4, + .landMonsInfo = &gBattlePyramidPlaceholders_4Info, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 0, + .mapNum = 5, + .landMonsInfo = &gBattlePyramidPlaceholders_5Info, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 0, + .mapNum = 6, + .landMonsInfo = &gBattlePyramidPlaceholders_6Info, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 0, + .mapNum = 7, + .landMonsInfo = &gBattlePyramidPlaceholders_7Info, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 255, + .mapNum = 255, + .landMonsInfo = NULL, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, +}; + +const struct WildPokemon gBattlePikeMons_1[] = +{ + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, + {5, 5, SPECIES_DUSCLOPS}, + {5, 5, SPECIES_DUSCLOPS}, + {5, 5, SPECIES_DUSCLOPS}, + {5, 5, SPECIES_DUSCLOPS}, + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, + {5, 5, SPECIES_DUSCLOPS}, + {5, 5, SPECIES_DUSCLOPS}, + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, +}; + +const struct WildPokemonInfo gBattlePikeMonsInfo_1 = {10, gBattlePikeMons_1}; + +const struct WildPokemon gBattlePikeMons_2[] = +{ + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, + {5, 5, SPECIES_ELECTRODE}, + {5, 5, SPECIES_ELECTRODE}, + {5, 5, SPECIES_ELECTRODE}, + {5, 5, SPECIES_ELECTRODE}, + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, + {5, 5, SPECIES_ELECTRODE}, + {5, 5, SPECIES_ELECTRODE}, + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, +}; + +const struct WildPokemonInfo gBattlePikeMonsInfo_2 = {10, gBattlePikeMons_2}; + +const struct WildPokemon gBattlePikeMons_3[] = +{ + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, + {5, 5, SPECIES_BRELOOM}, + {5, 5, SPECIES_BRELOOM}, + {5, 5, SPECIES_BRELOOM}, + {5, 5, SPECIES_BRELOOM}, + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, + {5, 5, SPECIES_BRELOOM}, + {5, 5, SPECIES_BRELOOM}, + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, +}; + +const struct WildPokemonInfo gBattlePikeMonsInfo_3 = {10, gBattlePikeMons_3}; + +const struct WildPokemon gBattlePikeMons_4[] = +{ + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, + {5, 5, SPECIES_WOBBUFFET}, + {5, 5, SPECIES_WOBBUFFET}, + {5, 5, SPECIES_WOBBUFFET}, + {5, 5, SPECIES_WOBBUFFET}, + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, + {5, 5, SPECIES_WOBBUFFET}, + {5, 5, SPECIES_WOBBUFFET}, + {5, 5, SPECIES_SEVIPER}, + {5, 5, SPECIES_MILOTIC}, +}; + +const struct WildPokemonInfo gBattlePikeMonsInfo_4 = {10, gBattlePikeMons_4}; + +const struct WildPokemonHeader gBattlePikeWildMonHeaders[] = +{ + { + .mapGroup = 0, + .mapNum = 1, + .landMonsInfo = &gBattlePikeMonsInfo_1, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 0, + .mapNum = 2, + .landMonsInfo = &gBattlePikeMonsInfo_2, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 0, + .mapNum = 3, + .landMonsInfo = &gBattlePikeMonsInfo_3, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 0, + .mapNum = 4, + .landMonsInfo = &gBattlePikeMonsInfo_4, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, + { + .mapGroup = 255, + .mapNum = 255, + .landMonsInfo = NULL, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, +}; + +const struct WildPokemon gWildFeebasRoute119Data = {20, 25, SPECIES_FEEBAS}; + +const u16 gRoute119WaterTileData[] = +{ + 0, 0x2D, 0, + 0x2E, 0x5B, 0x83, + 0x5C, 0x8B, 0x12A, +}; +// code void DisableWildEncounters(bool8 disabled) { sWildEncountersDisabled = disabled; diff --git a/src/window.c b/src/window.c index 3913b5800..9a892d079 100644 --- a/src/window.c +++ b/src/window.c @@ -403,7 +403,7 @@ void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height) } } -void BlitBitmapToWindow(u8 windowId, u8 *pixels, u16 x, u16 y, u16 width, u16 height) +void BlitBitmapToWindow(u8 windowId, const u8 *pixels, u16 x, u16 y, u16 width, u16 height) { BlitBitmapRectToWindow(windowId, pixels, 0, 0, width, height, x, y, width, height); } |