summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcamthesaxman <cameronghall@cox.net>2017-11-27 17:54:49 -0600
committercamthesaxman <cameronghall@cox.net>2017-11-27 17:54:49 -0600
commitbc8f4541f3fe290e7deee61954f38c23c011169f (patch)
treedfc9948e2728b46809a5abb4b9842329c6ca222f
parent5498eaf94849bbc7b56d8c280862b61ecefa0643 (diff)
convert wild_encounter data to C
-rw-r--r--asm/macros/map.inc6
-rw-r--r--data/wild_encounter.s20
-rw-r--r--data/wild_mons.inc688
-rw-r--r--include/constants/maps.h4
-rw-r--r--include/wild_encounter.h10
-rw-r--r--ld_script.txt1
-rw-r--r--src/field/wild_encounter.c814
7 files changed, 813 insertions, 730 deletions
diff --git a/asm/macros/map.inc b/asm/macros/map.inc
index 41844b5cd..fd417fe9d 100644
--- a/asm/macros/map.inc
+++ b/asm/macros/map.inc
@@ -27,12 +27,6 @@
.space 2
.endm
- .equiv GROUP_NONE, 0x7f
- .equiv MAP_NONE, 0x7f
-
- .equiv GROUP_UNDEFINED, 0xff
- .equiv MAP_UNDEFINED, 0xff
-
.macro map_script type, address
.byte \type
.4byte \address
diff --git a/data/wild_encounter.s b/data/wild_encounter.s
deleted file mode 100644
index b906a21f1..000000000
--- a/data/wild_encounter.s
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "constants/maps.h"
-#include "constants/species.h"
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
-@ 839B540
- .include "data/wild_mons.inc"
-
- .align 2
-gWildFeebasRoute119Data:: @ 839DBFC
- .byte 20, 25 @ Min/Max level
- .2byte SPECIES_FEEBAS
-
- .align 2
-gRoute119WaterTileData:: @ 839DC00
- .2byte 0x0, 0x2D, 0x0
- .2byte 0x2E, 0x5B, 0x83
- .2byte 0x5C, 0x8B, 0x12A
diff --git a/data/wild_mons.inc b/data/wild_mons.inc
deleted file mode 100644
index 01ebd8a16..000000000
--- a/data/wild_mons.inc
+++ /dev/null
@@ -1,688 +0,0 @@
-
- .align 2
-gWildMonHeaders::
- map PetalburgCity
- .2byte 0 @ padding
- .4byte NULL
- .4byte PetalburgCity_WaterMonsInfo
- .4byte NULL
- .4byte PetalburgCity_FishingMonsInfo
-
- map SlateportCity
- .2byte 0 @ padding
- .4byte NULL
- .4byte SlateportCity_WaterMonsInfo
- .4byte NULL
- .4byte SlateportCity_FishingMonsInfo
-
- map LilycoveCity
- .2byte 0 @ padding
- .4byte NULL
- .4byte LilycoveCity_WaterMonsInfo
- .4byte NULL
- .4byte LilycoveCity_FishingMonsInfo
-
- map MossdeepCity
- .2byte 0 @ padding
- .4byte NULL
- .4byte MossdeepCity_WaterMonsInfo
- .4byte NULL
- .4byte MossdeepCity_FishingMonsInfo
-
- map SootopolisCity
- .2byte 0 @ padding
- .4byte NULL
- .4byte SootopolisCity_WaterMonsInfo
- .4byte NULL
- .4byte SootopolisCity_FishingMonsInfo
-
- map EverGrandeCity
- .2byte 0 @ padding
- .4byte NULL
- .4byte EverGrandeCity_WaterMonsInfo
- .4byte NULL
- .4byte EverGrandeCity_FishingMonsInfo
-
- map MeteorFalls_1F_1R
- .2byte 0 @ padding
- .4byte MeteorFalls_1F_1R_LandMonsInfo
- .4byte MeteorFalls_1F_1R_WaterMonsInfo
- .4byte NULL
- .4byte MeteorFalls_1F_1R_FishingMonsInfo
-
- map MeteorFalls_1F_2R
- .2byte 0 @ padding
- .4byte MeteorFalls_1F_2R_LandMonsInfo
- .4byte MeteorFalls_1F_2R_WaterMonsInfo
- .4byte NULL
- .4byte MeteorFalls_1F_2R_FishingMonsInfo
-
- map MeteorFalls_B1F_1R
- .2byte 0 @ padding
- .4byte MeteorFalls_B1F_1R_LandMonsInfo
- .4byte MeteorFalls_B1F_1R_WaterMonsInfo
- .4byte NULL
- .4byte MeteorFalls_B1F_1R_FishingMonsInfo
-
- map MeteorFalls_B1F_2R
- .2byte 0 @ padding
- .4byte MeteorFalls_B1F_2R_LandMonsInfo
- .4byte MeteorFalls_B1F_2R_WaterMonsInfo
- .4byte NULL
- .4byte MeteorFalls_B1F_2R_FishingMonsInfo
-
- map RusturfTunnel
- .2byte 0 @ padding
- .4byte RusturfTunnel_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map GraniteCave_1F
- .2byte 0 @ padding
- .4byte GraniteCave_1F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map GraniteCave_B1F
- .2byte 0 @ padding
- .4byte GraniteCave_B1F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map GraniteCave_B2F
- .2byte 0 @ padding
- .4byte GraniteCave_B2F_LandMonsInfo
- .4byte NULL
- .4byte GraniteCave_B2F_RockSmashMonsInfo
- .4byte NULL
-
- map GraniteCave_StevensRoom
- .2byte 0 @ padding
- .4byte GraniteCave_StevensRoom_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map PetalburgWoods
- .2byte 0 @ padding
- .4byte PetalburgWoods_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map JaggedPass
- .2byte 0 @ padding
- .4byte JaggedPass_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map FieryPath
- .2byte 0 @ padding
- .4byte FieryPath_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map MtPyre_1F
- .2byte 0 @ padding
- .4byte MtPyre_1F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map MtPyre_2F
- .2byte 0 @ padding
- .4byte MtPyre_2F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map MtPyre_3F
- .2byte 0 @ padding
- .4byte MtPyre_3F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map MtPyre_4F
- .2byte 0 @ padding
- .4byte MtPyre_4F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map MtPyre_5F
- .2byte 0 @ padding
- .4byte MtPyre_5F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map MtPyre_6F
- .2byte 0 @ padding
- .4byte MtPyre_6F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map MtPyre_Exterior
- .2byte 0 @ padding
- .4byte MtPyre_Exterior_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map MtPyre_Summit
- .2byte 0 @ padding
- .4byte MtPyre_Summit_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map SeafloorCavern_Entrance
- .2byte 0 @ padding
- .4byte NULL
- .4byte SeafloorCavern_Entrance_WaterMonsInfo
- .4byte NULL
- .4byte SeafloorCavern_Entrance_FishingMonsInfo
-
- map SeafloorCavern_Room1
- .2byte 0 @ padding
- .4byte SeafloorCavern_Room1_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map SeafloorCavern_Room2
- .2byte 0 @ padding
- .4byte SeafloorCavern_Room2_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map SeafloorCavern_Room3
- .2byte 0 @ padding
- .4byte SeafloorCavern_Room3_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map SeafloorCavern_Room4
- .2byte 0 @ padding
- .4byte SeafloorCavern_Room4_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map SeafloorCavern_Room5
- .2byte 0 @ padding
- .4byte SeafloorCavern_Room5_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map SeafloorCavern_Room6
- .2byte 0 @ padding
- .4byte SeafloorCavern_Room6_LandMonsInfo
- .4byte SeafloorCavern_Room6_WaterMonsInfo
- .4byte NULL
- .4byte SeafloorCavern_Room6_FishingMonsInfo
-
- map SeafloorCavern_Room7
- .2byte 0 @ padding
- .4byte SeafloorCavern_Room7_LandMonsInfo
- .4byte SeafloorCavern_Room7_WaterMonsInfo
- .4byte NULL
- .4byte SeafloorCavern_Room7_FishingMonsInfo
-
- map SeafloorCavern_Room8
- .2byte 0 @ padding
- .4byte SeafloorCavern_Room8_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map CaveOfOrigin_Entrance
- .2byte 0 @ padding
- .4byte CaveOfOrigin_Entrance_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map CaveOfOrigin_1F
- .2byte 0 @ padding
- .4byte CaveOfOrigin_1F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map CaveOfOrigin_B1F
- .2byte 0 @ padding
- .4byte CaveOfOrigin_B1F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map CaveOfOrigin_B2F
- .2byte 0 @ padding
- .4byte CaveOfOrigin_B2F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map CaveOfOrigin_B3F
- .2byte 0 @ padding
- .4byte CaveOfOrigin_B3F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map VictoryRoad_1F
- .2byte 0 @ padding
- .4byte VictoryRoad_1F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map VictoryRoad_B1F
- .2byte 0 @ padding
- .4byte VictoryRoad_B1F_LandMonsInfo
- .4byte NULL
- .4byte VictoryRoad_B1F_RockSmashMonsInfo
- .4byte NULL
-
- map VictoryRoad_B2F
- .2byte 0 @ padding
- .4byte VictoryRoad_B2F_LandMonsInfo
- .4byte VictoryRoad_B2F_WaterMonsInfo
- .4byte NULL
- .4byte VictoryRoad_B2F_FishingMonsInfo
-
- map ShoalCave_LowTideEntranceRoom
- .2byte 0 @ padding
- .4byte ShoalCave_LowTideEntranceRoom_LandMonsInfo
- .4byte ShoalCave_LowTideEntranceRoom_WaterMonsInfo
- .4byte NULL
- .4byte ShoalCave_LowTideEntranceRoom_FishingMonsInfo
-
- map ShoalCave_LowTideInnerRoom
- .2byte 0 @ padding
- .4byte ShoalCave_LowTideInnerRoom_LandMonsInfo
- .4byte ShoalCave_LowTideInnerRoom_WaterMonsInfo
- .4byte NULL
- .4byte ShoalCave_LowTideInnerRoom_FishingMonsInfo
-
- map ShoalCave_LowTideStairsRoom
- .2byte 0 @ padding
- .4byte ShoalCave_LowTideStairsRoom_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map ShoalCave_LowTideLowerRoom
- .2byte 0 @ padding
- .4byte ShoalCave_LowTideLowerRoom_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map ShoalCave_LowTideIceRoom
- .2byte 0 @ padding
- .4byte ShoalCave_LowTideIceRoom_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map NewMauville_Entrance
- .2byte 0 @ padding
- .4byte NewMauville_Entrance_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map NewMauville_Inside
- .2byte 0 @ padding
- .4byte NewMauville_Inside_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map AbandonedShip_Rooms_B1F
- .2byte 0 @ padding
- .4byte NULL
- .4byte AbandonedShip_Rooms_B1F_WaterMonsInfo
- .4byte NULL
- .4byte AbandonedShip_Rooms_B1F_FishingMonsInfo
-
- map AbandonedShip_HiddenFloorCorridors
- .2byte 0 @ padding
- .4byte NULL
- .4byte AbandonedShip_HiddenFloorCorridors_WaterMonsInfo
- .4byte NULL
- .4byte AbandonedShip_HiddenFloorCorridors_FishingMonsInfo
-
- map SkyPillar_1F
- .2byte 0 @ padding
- .4byte SkyPillar_1F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map SkyPillar_3F
- .2byte 0 @ padding
- .4byte SkyPillar_3F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map SkyPillar_5F
- .2byte 0 @ padding
- .4byte SkyPillar_5F_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map Route101
- .2byte 0 @ padding
- .4byte Route101_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map Route102
- .2byte 0 @ padding
- .4byte Route102_LandMonsInfo
- .4byte Route102_WaterMonsInfo
- .4byte NULL
- .4byte Route102_FishingMonsInfo
-
- map Route103
- .2byte 0 @ padding
- .4byte Route103_LandMonsInfo
- .4byte Route103_WaterMonsInfo
- .4byte NULL
- .4byte Route103_FishingMonsInfo
-
- map Route104
- .2byte 0 @ padding
- .4byte Route104_LandMonsInfo
- .4byte Route104_WaterMonsInfo
- .4byte NULL
- .4byte Route104_FishingMonsInfo
-
- map Route105
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route105_WaterMonsInfo
- .4byte NULL
- .4byte Route105_FishingMonsInfo
-
- map Route106
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route106_WaterMonsInfo
- .4byte NULL
- .4byte Route106_FishingMonsInfo
-
- map Route107
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route107_WaterMonsInfo
- .4byte NULL
- .4byte Route107_FishingMonsInfo
-
- map Route108
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route108_WaterMonsInfo
- .4byte NULL
- .4byte Route108_FishingMonsInfo
-
- map Route109
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route109_WaterMonsInfo
- .4byte NULL
- .4byte Route109_FishingMonsInfo
-
- map Route110
- .2byte 0 @ padding
- .4byte Route110_LandMonsInfo
- .4byte Route110_WaterMonsInfo
- .4byte NULL
- .4byte Route110_FishingMonsInfo
-
- map Route111
- .2byte 0 @ padding
- .4byte Route111_LandMonsInfo
- .4byte Route111_WaterMonsInfo
- .4byte Route111_RockSmashMonsInfo
- .4byte Route111_FishingMonsInfo
-
- map Route112
- .2byte 0 @ padding
- .4byte Route112_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map Route113
- .2byte 0 @ padding
- .4byte Route113_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map Route114
- .2byte 0 @ padding
- .4byte Route114_LandMonsInfo
- .4byte Route114_WaterMonsInfo
- .4byte Route114_RockSmashMonsInfo
- .4byte Route114_FishingMonsInfo
-
- map Route115
- .2byte 0 @ padding
- .4byte Route115_LandMonsInfo
- .4byte Route115_WaterMonsInfo
- .4byte NULL
- .4byte Route115_FishingMonsInfo
-
- map Route116
- .2byte 0 @ padding
- .4byte Route116_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map Route117
- .2byte 0 @ padding
- .4byte Route117_LandMonsInfo
- .4byte Route117_WaterMonsInfo
- .4byte NULL
- .4byte Route117_FishingMonsInfo
-
- map Route118
- .2byte 0 @ padding
- .4byte Route118_LandMonsInfo
- .4byte Route118_WaterMonsInfo
- .4byte NULL
- .4byte Route118_FishingMonsInfo
-
- map Route119
- .2byte 0 @ padding
- .4byte Route119_LandMonsInfo
- .4byte Route119_WaterMonsInfo
- .4byte NULL
- .4byte Route119_FishingMonsInfo
-
- map Route120
- .2byte 0 @ padding
- .4byte Route120_LandMonsInfo
- .4byte Route120_WaterMonsInfo
- .4byte NULL
- .4byte Route120_FishingMonsInfo
-
- map Route121
- .2byte 0 @ padding
- .4byte Route121_LandMonsInfo
- .4byte Route121_WaterMonsInfo
- .4byte NULL
- .4byte Route121_FishingMonsInfo
-
- map Route122
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route122_WaterMonsInfo
- .4byte NULL
- .4byte Route122_FishingMonsInfo
-
- map Route123
- .2byte 0 @ padding
- .4byte Route123_LandMonsInfo
- .4byte Route123_WaterMonsInfo
- .4byte NULL
- .4byte Route123_FishingMonsInfo
-
- map Route124
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route124_WaterMonsInfo
- .4byte NULL
- .4byte Route124_FishingMonsInfo
-
- map Route125
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route125_WaterMonsInfo
- .4byte NULL
- .4byte Route125_FishingMonsInfo
-
- map Route126
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route126_WaterMonsInfo
- .4byte NULL
- .4byte Route126_FishingMonsInfo
-
- map Route127
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route127_WaterMonsInfo
- .4byte NULL
- .4byte Route127_FishingMonsInfo
-
- map Route128
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route128_WaterMonsInfo
- .4byte NULL
- .4byte Route128_FishingMonsInfo
-
- map Route129
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route129_WaterMonsInfo
- .4byte NULL
- .4byte Route129_FishingMonsInfo
-
- map Route130
- .2byte 0 @ padding
- .4byte Route130_LandMonsInfo
- .4byte Route130_WaterMonsInfo
- .4byte NULL
- .4byte Route130_FishingMonsInfo
-
- map Route131
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route131_WaterMonsInfo
- .4byte NULL
- .4byte Route131_FishingMonsInfo
-
- map Route132
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route132_WaterMonsInfo
- .4byte NULL
- .4byte Route132_FishingMonsInfo
-
- map Route133
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route133_WaterMonsInfo
- .4byte NULL
- .4byte Route133_FishingMonsInfo
-
- map Route134
- .2byte 0 @ padding
- .4byte NULL
- .4byte Route134_WaterMonsInfo
- .4byte NULL
- .4byte Route134_FishingMonsInfo
-
- map SafariZone_Northwest
- .2byte 0 @ padding
- .4byte SafariZone_Northwest_LandMonsInfo
- .4byte SafariZone_Northwest_WaterMonsInfo
- .4byte NULL
- .4byte SafariZone_Northwest_FishingMonsInfo
-
- map SafariZone_Northeast
- .2byte 0 @ padding
- .4byte SafariZone_Northeast_LandMonsInfo
- .4byte NULL
- .4byte SafariZone_Northeast_RockSmashMonsInfo
- .4byte NULL
-
- map SafariZone_Southwest
- .2byte 0 @ padding
- .4byte SafariZone_Southwest_LandMonsInfo
- .4byte SafariZone_Southwest_WaterMonsInfo
- .4byte NULL
- .4byte SafariZone_Southwest_FishingMonsInfo
-
- map SafariZone_Southeast
- .2byte 0 @ padding
- .4byte SafariZone_Southeast_LandMonsInfo
- .4byte NULL
- .4byte NULL
- .4byte NULL
-
- map DewfordTown
- .2byte 0 @ padding
- .4byte NULL
- .4byte DewfordTown_WaterMonsInfo
- .4byte NULL
- .4byte DewfordTown_FishingMonsInfo
-
- map PacifidlogTown
- .2byte 0 @ padding
- .4byte NULL
- .4byte PacifidlogTown_WaterMonsInfo
- .4byte NULL
- .4byte PacifidlogTown_FishingMonsInfo
-
- map Underwater1
- .2byte 0 @ padding
- .4byte NULL
- .4byte Underwater1_WaterMonsInfo
- .4byte NULL
- .4byte NULL
-
- map Underwater2
- .2byte 0 @ padding
- .4byte NULL
- .4byte Underwater2_WaterMonsInfo
- .4byte NULL
- .4byte NULL
-
- map UNDEFINED
- .2byte 0 @ padding
- .4byte NULL
- .4byte NULL
- .4byte NULL
- .4byte NULL
diff --git a/include/constants/maps.h b/include/constants/maps.h
index 2fe255707..f96591f60 100644
--- a/include/constants/maps.h
+++ b/include/constants/maps.h
@@ -464,6 +464,10 @@
#define MAP_ROUTE124_DIVING_TREASURE_HUNTERS_HOUSE (0 | (33 << 8))
+#define MAP_NONE (0x7F | (0x7F << 8))
+#define MAP_UNDEFINED (0xFF | (0xFF << 8))
+
+
#define MAP_GROUP(map) (MAP_##map >> 8)
#define MAP_NUM(map) (MAP_##map & 0xFF)
diff --git a/include/wild_encounter.h b/include/wild_encounter.h
index d4b343126..c9d7c3fa1 100644
--- a/include/wild_encounter.h
+++ b/include/wild_encounter.h
@@ -18,13 +18,13 @@ struct WildPokemonHeader
{
u8 mapGroup;
u8 mapNum;
- struct WildPokemonInfo *landMonsInfo;
- struct WildPokemonInfo *waterMonsInfo;
- struct WildPokemonInfo *rockSmashMonsInfo;
- struct WildPokemonInfo *fishingMonsInfo;
+ const struct WildPokemonInfo *landMonsInfo;
+ const struct WildPokemonInfo *waterMonsInfo;
+ const struct WildPokemonInfo *rockSmashMonsInfo;
+ const struct WildPokemonInfo *fishingMonsInfo;
};
-extern struct WildPokemonHeader gWildMonHeaders[];
+extern const struct WildPokemonHeader gWildMonHeaders[];
void DisableWildEncounters(bool8 disabled);
bool8 StandardWildEncounter(u16 a, u16 b);
diff --git a/ld_script.txt b/ld_script.txt
index 3a271cd83..e120027c6 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -504,7 +504,6 @@ SECTIONS {
src/field/trainer_see.o(.rodata);
data/trainer_see.o(.rodata);
src/field/wild_encounter.o(.rodata);
- data/wild_encounter.o(.rodata);
src/field/field_effect.o(.rodata);
src/pokemon/pokemon_menu.o(.rodata);
src/engine/option_menu.o(.rodata);
diff --git a/src/field/wild_encounter.c b/src/field/wild_encounter.c
index 9b3db1a52..64c88694c 100644
--- a/src/field/wild_encounter.c
+++ b/src/field/wild_encounter.c
@@ -2898,10 +2898,804 @@ const struct WildPokemon Underwater2_WaterMons [] =
};
const struct WildPokemonInfo Underwater2_WaterMonsInfo = {4, Underwater2_WaterMons};
+const struct WildPokemonHeader gWildMonHeaders[] =
+{
+ {
+ .mapGroup = MAP_GROUP(PETALBURG_CITY),
+ .mapNum = MAP_NUM(PETALBURG_CITY),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &PetalburgCity_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &PetalburgCity_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SLATEPORT_CITY),
+ .mapNum = MAP_NUM(SLATEPORT_CITY),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &SlateportCity_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &SlateportCity_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(LILYCOVE_CITY),
+ .mapNum = MAP_NUM(LILYCOVE_CITY),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &LilycoveCity_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &LilycoveCity_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(MOSSDEEP_CITY),
+ .mapNum = MAP_NUM(MOSSDEEP_CITY),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &MossdeepCity_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &MossdeepCity_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SOOTOPOLIS_CITY),
+ .mapNum = MAP_NUM(SOOTOPOLIS_CITY),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &SootopolisCity_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &SootopolisCity_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(EVER_GRANDE_CITY),
+ .mapNum = MAP_NUM(EVER_GRANDE_CITY),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &EverGrandeCity_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &EverGrandeCity_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(METEOR_FALLS_1F_1R),
+ .mapNum = MAP_NUM(METEOR_FALLS_1F_1R),
+ .landMonsInfo = &MeteorFalls_1F_1R_LandMonsInfo,
+ .waterMonsInfo = &MeteorFalls_1F_1R_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &MeteorFalls_1F_1R_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(METEOR_FALLS_1F_2R),
+ .mapNum = MAP_NUM(METEOR_FALLS_1F_2R),
+ .landMonsInfo = &MeteorFalls_1F_2R_LandMonsInfo,
+ .waterMonsInfo = &MeteorFalls_1F_2R_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &MeteorFalls_1F_2R_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(METEOR_FALLS_B1F_1R),
+ .mapNum = MAP_NUM(METEOR_FALLS_B1F_1R),
+ .landMonsInfo = &MeteorFalls_B1F_1R_LandMonsInfo,
+ .waterMonsInfo = &MeteorFalls_B1F_1R_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &MeteorFalls_B1F_1R_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(METEOR_FALLS_B1F_2R),
+ .mapNum = MAP_NUM(METEOR_FALLS_B1F_2R),
+ .landMonsInfo = &MeteorFalls_B1F_2R_LandMonsInfo,
+ .waterMonsInfo = &MeteorFalls_B1F_2R_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &MeteorFalls_B1F_2R_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(RUSTURF_TUNNEL),
+ .mapNum = MAP_NUM(RUSTURF_TUNNEL),
+ .landMonsInfo = &RusturfTunnel_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(GRANITE_CAVE_1F),
+ .mapNum = MAP_NUM(GRANITE_CAVE_1F),
+ .landMonsInfo = &GraniteCave_1F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(GRANITE_CAVE_B1F),
+ .mapNum = MAP_NUM(GRANITE_CAVE_B1F),
+ .landMonsInfo = &GraniteCave_B1F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(GRANITE_CAVE_B2F),
+ .mapNum = MAP_NUM(GRANITE_CAVE_B2F),
+ .landMonsInfo = &GraniteCave_B2F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = &GraniteCave_B2F_RockSmashMonsInfo,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(GRANITE_CAVE_STEVENS_ROOM),
+ .mapNum = MAP_NUM(GRANITE_CAVE_STEVENS_ROOM),
+ .landMonsInfo = &GraniteCave_StevensRoom_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(PETALBURG_WOODS),
+ .mapNum = MAP_NUM(PETALBURG_WOODS),
+ .landMonsInfo = &PetalburgWoods_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(JAGGED_PASS),
+ .mapNum = MAP_NUM(JAGGED_PASS),
+ .landMonsInfo = &JaggedPass_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(FIERY_PATH),
+ .mapNum = MAP_NUM(FIERY_PATH),
+ .landMonsInfo = &FieryPath_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(MT_PYRE_1F),
+ .mapNum = MAP_NUM(MT_PYRE_1F),
+ .landMonsInfo = &MtPyre_1F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(MT_PYRE_2F),
+ .mapNum = MAP_NUM(MT_PYRE_2F),
+ .landMonsInfo = &MtPyre_2F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(MT_PYRE_3F),
+ .mapNum = MAP_NUM(MT_PYRE_3F),
+ .landMonsInfo = &MtPyre_3F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(MT_PYRE_4F),
+ .mapNum = MAP_NUM(MT_PYRE_4F),
+ .landMonsInfo = &MtPyre_4F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(MT_PYRE_5F),
+ .mapNum = MAP_NUM(MT_PYRE_5F),
+ .landMonsInfo = &MtPyre_5F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(MT_PYRE_6F),
+ .mapNum = MAP_NUM(MT_PYRE_6F),
+ .landMonsInfo = &MtPyre_6F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(MT_PYRE_EXTERIOR),
+ .mapNum = MAP_NUM(MT_PYRE_EXTERIOR),
+ .landMonsInfo = &MtPyre_Exterior_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(MT_PYRE_SUMMIT),
+ .mapNum = MAP_NUM(MT_PYRE_SUMMIT),
+ .landMonsInfo = &MtPyre_Summit_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ENTRANCE),
+ .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ENTRANCE),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &SeafloorCavern_Entrance_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &SeafloorCavern_Entrance_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM1),
+ .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM1),
+ .landMonsInfo = &SeafloorCavern_Room1_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM2),
+ .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM2),
+ .landMonsInfo = &SeafloorCavern_Room2_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM3),
+ .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM3),
+ .landMonsInfo = &SeafloorCavern_Room3_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM4),
+ .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM4),
+ .landMonsInfo = &SeafloorCavern_Room4_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM5),
+ .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM5),
+ .landMonsInfo = &SeafloorCavern_Room5_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM6),
+ .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM6),
+ .landMonsInfo = &SeafloorCavern_Room6_LandMonsInfo,
+ .waterMonsInfo = &SeafloorCavern_Room6_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &SeafloorCavern_Room6_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM7),
+ .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM7),
+ .landMonsInfo = &SeafloorCavern_Room7_LandMonsInfo,
+ .waterMonsInfo = &SeafloorCavern_Room7_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &SeafloorCavern_Room7_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM8),
+ .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM8),
+ .landMonsInfo = &SeafloorCavern_Room8_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_ENTRANCE),
+ .mapNum = MAP_NUM(CAVE_OF_ORIGIN_ENTRANCE),
+ .landMonsInfo = &CaveOfOrigin_Entrance_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_1F),
+ .mapNum = MAP_NUM(CAVE_OF_ORIGIN_1F),
+ .landMonsInfo = &CaveOfOrigin_1F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_B1F),
+ .mapNum = MAP_NUM(CAVE_OF_ORIGIN_B1F),
+ .landMonsInfo = &CaveOfOrigin_B1F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_B2F),
+ .mapNum = MAP_NUM(CAVE_OF_ORIGIN_B2F),
+ .landMonsInfo = &CaveOfOrigin_B2F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_B3F),
+ .mapNum = MAP_NUM(CAVE_OF_ORIGIN_B3F),
+ .landMonsInfo = &CaveOfOrigin_B3F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(VICTORY_ROAD_1F),
+ .mapNum = MAP_NUM(VICTORY_ROAD_1F),
+ .landMonsInfo = &VictoryRoad_1F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(VICTORY_ROAD_B1F),
+ .mapNum = MAP_NUM(VICTORY_ROAD_B1F),
+ .landMonsInfo = &VictoryRoad_B1F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = &VictoryRoad_B1F_RockSmashMonsInfo,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(VICTORY_ROAD_B2F),
+ .mapNum = MAP_NUM(VICTORY_ROAD_B2F),
+ .landMonsInfo = &VictoryRoad_B2F_LandMonsInfo,
+ .waterMonsInfo = &VictoryRoad_B2F_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &VictoryRoad_B2F_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM),
+ .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM),
+ .landMonsInfo = &ShoalCave_LowTideEntranceRoom_LandMonsInfo,
+ .waterMonsInfo = &ShoalCave_LowTideEntranceRoom_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &ShoalCave_LowTideEntranceRoom_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_INNER_ROOM),
+ .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_INNER_ROOM),
+ .landMonsInfo = &ShoalCave_LowTideInnerRoom_LandMonsInfo,
+ .waterMonsInfo = &ShoalCave_LowTideInnerRoom_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &ShoalCave_LowTideInnerRoom_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM),
+ .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM),
+ .landMonsInfo = &ShoalCave_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 = &ShoalCave_LowTideLowerRoom_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_ICE_ROOM),
+ .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_ICE_ROOM),
+ .landMonsInfo = &ShoalCave_LowTideIceRoom_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(NEW_MAUVILLE_ENTRANCE),
+ .mapNum = MAP_NUM(NEW_MAUVILLE_ENTRANCE),
+ .landMonsInfo = &NewMauville_Entrance_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(NEW_MAUVILLE_INSIDE),
+ .mapNum = MAP_NUM(NEW_MAUVILLE_INSIDE),
+ .landMonsInfo = &NewMauville_Inside_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(ABANDONED_SHIP_ROOMS_B1F),
+ .mapNum = MAP_NUM(ABANDONED_SHIP_ROOMS_B1F),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &AbandonedShip_Rooms_B1F_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &AbandonedShip_Rooms_B1F_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS),
+ .mapNum = MAP_NUM(ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &AbandonedShip_HiddenFloorCorridors_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &AbandonedShip_HiddenFloorCorridors_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SKY_PILLAR_1F),
+ .mapNum = MAP_NUM(SKY_PILLAR_1F),
+ .landMonsInfo = &SkyPillar_1F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SKY_PILLAR_3F),
+ .mapNum = MAP_NUM(SKY_PILLAR_3F),
+ .landMonsInfo = &SkyPillar_3F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SKY_PILLAR_5F),
+ .mapNum = MAP_NUM(SKY_PILLAR_5F),
+ .landMonsInfo = &SkyPillar_5F_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE101),
+ .mapNum = MAP_NUM(ROUTE101),
+ .landMonsInfo = &Route101_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE102),
+ .mapNum = MAP_NUM(ROUTE102),
+ .landMonsInfo = &Route102_LandMonsInfo,
+ .waterMonsInfo = &Route102_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route102_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE103),
+ .mapNum = MAP_NUM(ROUTE103),
+ .landMonsInfo = &Route103_LandMonsInfo,
+ .waterMonsInfo = &Route103_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route103_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE104),
+ .mapNum = MAP_NUM(ROUTE104),
+ .landMonsInfo = &Route104_LandMonsInfo,
+ .waterMonsInfo = &Route104_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route104_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE105),
+ .mapNum = MAP_NUM(ROUTE105),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route105_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route105_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE106),
+ .mapNum = MAP_NUM(ROUTE106),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route106_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route106_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE107),
+ .mapNum = MAP_NUM(ROUTE107),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route107_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route107_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE108),
+ .mapNum = MAP_NUM(ROUTE108),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route108_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route108_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE109),
+ .mapNum = MAP_NUM(ROUTE109),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route109_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route109_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE110),
+ .mapNum = MAP_NUM(ROUTE110),
+ .landMonsInfo = &Route110_LandMonsInfo,
+ .waterMonsInfo = &Route110_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route110_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE111),
+ .mapNum = MAP_NUM(ROUTE111),
+ .landMonsInfo = &Route111_LandMonsInfo,
+ .waterMonsInfo = &Route111_WaterMonsInfo,
+ .rockSmashMonsInfo = &Route111_RockSmashMonsInfo,
+ .fishingMonsInfo = &Route111_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE112),
+ .mapNum = MAP_NUM(ROUTE112),
+ .landMonsInfo = &Route112_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE113),
+ .mapNum = MAP_NUM(ROUTE113),
+ .landMonsInfo = &Route113_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE114),
+ .mapNum = MAP_NUM(ROUTE114),
+ .landMonsInfo = &Route114_LandMonsInfo,
+ .waterMonsInfo = &Route114_WaterMonsInfo,
+ .rockSmashMonsInfo = &Route114_RockSmashMonsInfo,
+ .fishingMonsInfo = &Route114_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE115),
+ .mapNum = MAP_NUM(ROUTE115),
+ .landMonsInfo = &Route115_LandMonsInfo,
+ .waterMonsInfo = &Route115_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route115_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE116),
+ .mapNum = MAP_NUM(ROUTE116),
+ .landMonsInfo = &Route116_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE117),
+ .mapNum = MAP_NUM(ROUTE117),
+ .landMonsInfo = &Route117_LandMonsInfo,
+ .waterMonsInfo = &Route117_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route117_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE118),
+ .mapNum = MAP_NUM(ROUTE118),
+ .landMonsInfo = &Route118_LandMonsInfo,
+ .waterMonsInfo = &Route118_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route118_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE119),
+ .mapNum = MAP_NUM(ROUTE119),
+ .landMonsInfo = &Route119_LandMonsInfo,
+ .waterMonsInfo = &Route119_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route119_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE120),
+ .mapNum = MAP_NUM(ROUTE120),
+ .landMonsInfo = &Route120_LandMonsInfo,
+ .waterMonsInfo = &Route120_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route120_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE121),
+ .mapNum = MAP_NUM(ROUTE121),
+ .landMonsInfo = &Route121_LandMonsInfo,
+ .waterMonsInfo = &Route121_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route121_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE122),
+ .mapNum = MAP_NUM(ROUTE122),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route122_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route122_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE123),
+ .mapNum = MAP_NUM(ROUTE123),
+ .landMonsInfo = &Route123_LandMonsInfo,
+ .waterMonsInfo = &Route123_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route123_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE124),
+ .mapNum = MAP_NUM(ROUTE124),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route124_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route124_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE125),
+ .mapNum = MAP_NUM(ROUTE125),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route125_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route125_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE126),
+ .mapNum = MAP_NUM(ROUTE126),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route126_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route126_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE127),
+ .mapNum = MAP_NUM(ROUTE127),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route127_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route127_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE128),
+ .mapNum = MAP_NUM(ROUTE128),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route128_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route128_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE129),
+ .mapNum = MAP_NUM(ROUTE129),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route129_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route129_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE130),
+ .mapNum = MAP_NUM(ROUTE130),
+ .landMonsInfo = &Route130_LandMonsInfo,
+ .waterMonsInfo = &Route130_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route130_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE131),
+ .mapNum = MAP_NUM(ROUTE131),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route131_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route131_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE132),
+ .mapNum = MAP_NUM(ROUTE132),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route132_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route132_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE133),
+ .mapNum = MAP_NUM(ROUTE133),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route133_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route133_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(ROUTE134),
+ .mapNum = MAP_NUM(ROUTE134),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Route134_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &Route134_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SAFARI_ZONE_NORTHWEST),
+ .mapNum = MAP_NUM(SAFARI_ZONE_NORTHWEST),
+ .landMonsInfo = &SafariZone_Northwest_LandMonsInfo,
+ .waterMonsInfo = &SafariZone_Northwest_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &SafariZone_Northwest_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SAFARI_ZONE_NORTHEAST),
+ .mapNum = MAP_NUM(SAFARI_ZONE_NORTHEAST),
+ .landMonsInfo = &SafariZone_Northeast_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = &SafariZone_Northeast_RockSmashMonsInfo,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(SAFARI_ZONE_SOUTHWEST),
+ .mapNum = MAP_NUM(SAFARI_ZONE_SOUTHWEST),
+ .landMonsInfo = &SafariZone_Southwest_LandMonsInfo,
+ .waterMonsInfo = &SafariZone_Southwest_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &SafariZone_Southwest_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(SAFARI_ZONE_SOUTHEAST),
+ .mapNum = MAP_NUM(SAFARI_ZONE_SOUTHEAST),
+ .landMonsInfo = &SafariZone_Southeast_LandMonsInfo,
+ .waterMonsInfo = NULL,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(DEWFORD_TOWN),
+ .mapNum = MAP_NUM(DEWFORD_TOWN),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &DewfordTown_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &DewfordTown_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(PACIFIDLOG_TOWN),
+ .mapNum = MAP_NUM(PACIFIDLOG_TOWN),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &PacifidlogTown_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = &PacifidlogTown_FishingMonsInfo,
+ },
+ {
+ .mapGroup = MAP_GROUP(UNDERWATER1),
+ .mapNum = MAP_NUM(UNDERWATER1),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Underwater1_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(UNDERWATER2),
+ .mapNum = MAP_NUM(UNDERWATER2),
+ .landMonsInfo = NULL,
+ .waterMonsInfo = &Underwater2_WaterMonsInfo,
+ .rockSmashMonsInfo = NULL,
+ .fishingMonsInfo = NULL,
+ },
+ {
+ .mapGroup = MAP_GROUP(UNDEFINED),
+ .mapNum = MAP_NUM(UNDEFINED),
+ .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,
+};
-extern u16 gRoute119WaterTileData[];
extern u16 gScriptResult;
-extern struct WildPokemon gWildFeebasRoute119Data;
extern u8 S_RepelWoreOff[];
EWRAM_DATA static u8 sWildEncountersDisabled = 0;
@@ -2967,7 +3761,7 @@ static bool8 CheckFeebas(void)
route119section = 2;
#else
{
- register u16 *arr asm("r0");
+ register const u16 *arr asm("r0");
if (y >= (arr = gRoute119WaterTileData)[3 * 1 + 0] && y <= arr[3 * 1 + 1])
route119section = 1;
if (y >= arr[3 * 2 + 0] && y <= arr[3 * 2 + 1])
@@ -3177,7 +3971,7 @@ static void CreateWildMon(u16 species, u8 b)
CreateMonWithNature(&gEnemyParty[0], species, b, 0x20, PickWildMonNature());
}
-static bool8 GenerateWildMon(struct WildPokemonInfo *wildMonInfo, u8 area, bool8 checkRepel)
+static bool8 GenerateWildMon(const struct WildPokemonInfo *wildMonInfo, u8 area, bool8 checkRepel)
{
u8 wildMonIndex = 0;
u8 level;
@@ -3204,7 +3998,7 @@ static bool8 GenerateWildMon(struct WildPokemonInfo *wildMonInfo, u8 area, bool8
}
}
-static u16 GenerateFishingWildMon(struct WildPokemonInfo *wildMonInfo, u8 rod)
+static u16 GenerateFishingWildMon(const struct WildPokemonInfo *wildMonInfo, u8 rod)
{
u8 wildMonIndex = ChooseWildMonIndex_Fishing(rod);
u8 level = ChooseWildMonLevel(&wildMonInfo->wildPokemon[wildMonIndex]);
@@ -3369,7 +4163,7 @@ void ScrSpecial_RockSmashWildEncounter(void)
if (headerNum != 0xFFFF)
{
- struct WildPokemonInfo *wildPokemonInfo = gWildMonHeaders[headerNum].rockSmashMonsInfo;
+ const struct WildPokemonInfo *wildPokemonInfo = gWildMonHeaders[headerNum].rockSmashMonsInfo;
if (wildPokemonInfo == NULL)
{
@@ -3393,7 +4187,7 @@ bool8 SweetScentWildEncounter(void)
s16 x;
s16 y;
u16 headerNum;
- struct WildPokemonInfo *wildPokemonInfo;
+ const struct WildPokemonInfo *wildPokemonInfo;
PlayerGetDestCoords(&x, &y);
if ((headerNum = GetCurrentMapWildMonHeader()) != 0xFFFF)
@@ -3468,8 +4262,8 @@ void FishingWildEncounter(u8 rod)
u16 GetLocalWildMon(bool8 *isWaterMon)
{
u16 headerNum;
- struct WildPokemonInfo *landMonsInfo;
- struct WildPokemonInfo *waterMonsInfo;
+ const struct WildPokemonInfo *landMonsInfo;
+ const struct WildPokemonInfo *waterMonsInfo;
*isWaterMon = FALSE;
headerNum = GetCurrentMapWildMonHeader();
@@ -3505,7 +4299,7 @@ u16 GetLocalWaterMon(void)
if (headerNum != 0xFFFF)
{
- struct WildPokemonInfo *waterMonsInfo = gWildMonHeaders[headerNum].waterMonsInfo;
+ const struct WildPokemonInfo *waterMonsInfo = gWildMonHeaders[headerNum].waterMonsInfo;
if (waterMonsInfo)
return waterMonsInfo->wildPokemon[ChooseWildMonIndex_Water()].species;