summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/event_scripts.s1
-rw-r--r--data/maps/DewfordTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_HallOfFame/scripts.inc4
-rw-r--r--data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_PokemonLeague/scripts.inc2
-rw-r--r--data/maps/FallarborTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/FortreeCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/InsideOfTruck/scripts.inc4
-rw-r--r--data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/OldaleTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/RustboroCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/SSTidalCorridor/scripts.inc4
-rw-r--r--data/maps/SlateportCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--include/constants/heal_locations.h27
-rw-r--r--include/heal_location.h2
-rw-r--r--src/battle/post_battle_event_funcs.c5
-rw-r--r--src/data/heal_locations.h25
-rw-r--r--src/heal_location.c27
-rw-r--r--src/region_map.c116
26 files changed, 139 insertions, 108 deletions
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 3ce319397..eef08bb79 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -10,6 +10,7 @@
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/weather.h"
+#include "constants/heal_locations.h"
#include "constants/vars.h"
.include "include/macros.inc"
.include "include/macros/event.inc"
diff --git a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
index 33d14e770..38f242eab 100644
--- a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ DewfordTown_PokemonCenter_1F_MapScripts:: @ 8153014
.byte 0
DewfordTown_PokemonCenter_1F_MapScript1_15301A:: @ 815301A
- setrespawn 15
+ setrespawn HEAL_LOCATION_DEWFORD_TOWN
call DewfordTown_PokemonCenter_1F_EventScript_19FD1B
end
diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
index 6cfc5ae27..4b54204d3 100644
--- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc
+++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
@@ -51,7 +51,7 @@ EverGrandeCity_HallOfFame_EventScript_15BBA8:: @ 815BBA8
end
EverGrandeCity_HallOfFame_EventScript_15BC41:: @ 815BC41
- setrespawn 1
+ setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F
fadescreenspeed 1, 24
special GameClear
waitstate
@@ -59,7 +59,7 @@ EverGrandeCity_HallOfFame_EventScript_15BC41:: @ 815BC41
end
EverGrandeCity_HallOfFame_EventScript_15BC4D:: @ 815BC4D
- setrespawn 2
+ setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F
fadescreenspeed 1, 24
special GameClear
waitstate
diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
index 374ef9472..3c0ad3732 100644
--- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ EverGrandeCity_PokemonCenter_1F_MapScripts:: @ 815BC66
.byte 0
EverGrandeCity_PokemonCenter_1F_MapScript1_15BC6C:: @ 815BC6C
- setrespawn 11
+ setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_1
end
EverGrandeCity_PokemonCenter_1F_EventScript_15BC70:: @ 815BC70
diff --git a/data/maps/EverGrandeCity_PokemonLeague/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague/scripts.inc
index a48cf278e..6da717d06 100644
--- a/data/maps/EverGrandeCity_PokemonLeague/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonLeague/scripts.inc
@@ -3,7 +3,7 @@ EverGrandeCity_PokemonLeague_MapScripts:: @ 815BA75
.byte 0
EverGrandeCity_PokemonLeague_MapScript1_15BA7B:: @ 815BA7B
- setrespawn 20
+ setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_2
setflag FLAG_SYS_POKEMON_LEAGUE_FLY
call_if_unset FLAG_ENTERED_ELITE_FOUR, EverGrandeCity_PokemonLeague_EventScript_15BA8B
end
diff --git a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
index 6ae897ec8..801f704e3 100644
--- a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ FallarborTown_PokemonCenter_1F_MapScripts:: @ 8153AF3
.byte 0
FallarborTown_PokemonCenter_1F_MapScript1_153AF9:: @ 8153AF9
- setrespawn 17
+ setrespawn HEAL_LOCATION_FALLARBOR_TOWN
call FallarborTown_PokemonCenter_1F_EventScript_19FD1B
end
diff --git a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
index 6d847d7cc..999541b31 100644
--- a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ FortreeCity_PokemonCenter_1F_MapScripts:: @ 8158011
.byte 0
FortreeCity_PokemonCenter_1F_MapScript1_158017:: @ 8158017
- setrespawn 7
+ setrespawn HEAL_LOCATION_FORTREE_CITY
end
FortreeCity_PokemonCenter_1F_EventScript_15801B:: @ 815801B
diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc
index 37fa85041..b2617c8f7 100644
--- a/data/maps/InsideOfTruck/scripts.inc
+++ b/data/maps/InsideOfTruck/scripts.inc
@@ -24,7 +24,7 @@ InsideOfTruck_EventScript_15FC29:: @ 815FC29
end
InsideOfTruck_EventScript_15FC45:: @ 815FC45
- setrespawn 1
+ setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F
setvar VAR_LITTLEROOT_INTRO_STATE, 1
setflag FLAG_HIDE_MAY_MOM_DOWNSTAIRS
setflag FLAG_HIDE_MOVING_TRUCK_MAY
@@ -36,7 +36,7 @@ InsideOfTruck_EventScript_15FC45:: @ 815FC45
end
InsideOfTruck_EventScript_15FC68:: @ 815FC68
- setrespawn 2
+ setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F
setvar VAR_LITTLEROOT_INTRO_STATE, 2
setflag FLAG_HIDE_BRENDAN_MOM_DOWNSTAIRS
setflag FLAG_HIDE_MOVING_TRUCK_BRENDAN
diff --git a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
index 4e9c51380..611ced28f 100644
--- a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ LavaridgeTown_PokemonCenter_1F_MapScripts:: @ 815390C
.byte 0
LavaridgeTown_PokemonCenter_1F_MapScript1_153912:: @ 8153912
- setrespawn 16
+ setrespawn HEAL_LOCATION_LAVARIDGE_TOWN
call LavaridgeTown_PokemonCenter_1F_EventScript_19FD1B
end
diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
index cff88caf0..508f5fab8 100644
--- a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ LilycoveCity_PokemonCenter_1F_MapScripts:: @ 8159327
.byte 0
LilycoveCity_PokemonCenter_1F_MapScript1_15932D:: @ 815932D
- setrespawn 8
+ setrespawn HEAL_LOCATION_LILYCOVE_CITY
end
LilycoveCity_PokemonCenter_1F_EventScript_159331:: @ 8159331
diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
index 85590f9c2..817679cec 100644
--- a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ MauvilleCity_PokemonCenter_1F_MapScripts:: @ 8157351
.byte 0
MauvilleCity_PokemonCenter_1F_MapScript1_157357:: @ 8157357
- setrespawn 5
+ setrespawn HEAL_LOCATION_MAUVILLE_CITY
call MauvilleCity_PokemonCenter_1F_EventScript_19FD1B
goto MauvilleCity_PokemonCenter_1F_EventScript_157365
end
diff --git a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
index a722e666b..906cf8e83 100644
--- a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ MossdeepCity_PokemonCenter_1F_MapScripts:: @ 815A8D0
.byte 0
MossdeepCity_PokemonCenter_1F_MapScript1_15A8D6:: @ 815A8D6
- setrespawn 9
+ setrespawn HEAL_LOCATION_MOSSDEEP_CITY
end
MossdeepCity_PokemonCenter_1F_EventScript_15A8DA:: @ 815A8DA
diff --git a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
index c993807c6..16e11d6a2 100644
--- a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ OldaleTown_PokemonCenter_1F_MapScripts:: @ 8152F08
.byte 0
OldaleTown_PokemonCenter_1F_MapScript1_152F0E:: @ 8152F0E
- setrespawn 14
+ setrespawn HEAL_LOCATION_OLDALE_TOWN
call OldaleTown_PokemonCenter_1F_EventScript_19FD1B
end
diff --git a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
index 557b6497e..ea7a8e056 100644
--- a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ PacifidlogTown_PokemonCenter_1F_MapScripts:: @ 81540FF
.byte 0
PacifidlogTown_PokemonCenter_1F_MapScript1_154105:: @ 8154105
- setrespawn 19
+ setrespawn HEAL_LOCATION_PACIFIDLOG_TOWN
end
@ 8154109
diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
index 136cc11c5..6753865e0 100644
--- a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ PetalburgCity_PokemonCenter_1F_MapScripts:: @ 8155204
.byte 0
PetalburgCity_PokemonCenter_1F_MapScript1_15520A:: @ 815520A
- setrespawn 3
+ setrespawn HEAL_LOCATION_PETALBURG_CITY
call PetalburgCity_PokemonCenter_1F_EventScript_19FD1B
end
diff --git a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
index 653cceb25..c0bb5c2dd 100644
--- a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ RustboroCity_PokemonCenter_1F_MapScripts:: @ 8157B79
.byte 0
RustboroCity_PokemonCenter_1F_MapScript1_157B7F:: @ 8157B7F
- setrespawn 6
+ setrespawn HEAL_LOCATION_RUSTBORO_CITY
call RustboroCity_PokemonCenter_1F_EventScript_19FD1B
end
diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc
index 57872a66a..0f2028476 100644
--- a/data/maps/SSTidalCorridor/scripts.inc
+++ b/data/maps/SSTidalCorridor/scripts.inc
@@ -122,7 +122,7 @@ SSTidalCorridor_EventScript_15FDD6:: @ 815FDD6
end
SSTidalCorridor_EventScript_15FDF8:: @ 815FDF8
- setrespawn 8
+ setrespawn HEAL_LOCATION_LILYCOVE_CITY
msgbox SSTidalCorridor_Text_1991F4, 4
call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_15FE36
warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11
@@ -131,7 +131,7 @@ SSTidalCorridor_EventScript_15FDF8:: @ 815FDF8
end
SSTidalCorridor_EventScript_15FE17:: @ 815FE17
- setrespawn 4
+ setrespawn HEAL_LOCATION_SLATEPORT_CITY
msgbox SSTidalCorridor_Text_1991F4, 4
call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_15FE36
warp MAP_SLATEPORT_CITY_HARBOR, 255, 8, 11
diff --git a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
index 37b2b95ab..1164e96d6 100644
--- a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ SlateportCity_PokemonCenter_1F_MapScripts:: @ 81563BF
.byte 0
SlateportCity_PokemonCenter_1F_MapScript1_1563C5:: @ 81563C5
- setrespawn 4
+ setrespawn HEAL_LOCATION_SLATEPORT_CITY
call SlateportCity_PokemonCenter_1F_EventScript_19FD1B
end
diff --git a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
index 820dd4858..ebfaf4e23 100644
--- a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ SootopolisCity_PokemonCenter_1F_MapScripts:: @ 815B190
.byte 0
SootopolisCity_PokemonCenter_1F_MapScript1_15B196:: @ 815B196
- setrespawn 10
+ setrespawn HEAL_LOCATION_SOOTOPOLIS_CITY
end
@ 815B19A
diff --git a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
index 956a28ac5..de2f770d6 100644
--- a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
@@ -3,7 +3,7 @@ VerdanturfTown_PokemonCenter_1F_MapScripts:: @ 8153F09
.byte 0
VerdanturfTown_PokemonCenter_1F_MapScript1_153F0F:: @ 8153F0F
- setrespawn 18
+ setrespawn HEAL_LOCATION_VERDANTURF_TOWN
call VerdanturfTown_PokemonCenter_1F_EventScript_19FD1B
end
diff --git a/include/constants/heal_locations.h b/include/constants/heal_locations.h
new file mode 100644
index 000000000..721bc5a3c
--- /dev/null
+++ b/include/constants/heal_locations.h
@@ -0,0 +1,27 @@
+#ifndef GUARD_CONSTANTS_HEAL_LOCATIONS_H
+#define GUARD_CONSTANTS_HEAL_LOCATIONS_H
+
+#define HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F 1
+#define HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F 2
+#define HEAL_LOCATION_PETALBURG_CITY 3
+#define HEAL_LOCATION_SLATEPORT_CITY 4
+#define HEAL_LOCATION_MAUVILLE_CITY 5
+#define HEAL_LOCATION_RUSTBORO_CITY 6
+#define HEAL_LOCATION_FORTREE_CITY 7
+#define HEAL_LOCATION_LILYCOVE_CITY 8
+#define HEAL_LOCATION_MOSSDEEP_CITY 9
+#define HEAL_LOCATION_SOOTOPOLIS_CITY 10
+#define HEAL_LOCATION_EVER_GRANDE_CITY_1 11
+#define HEAL_LOCATION_LITTLEROOT_TOWN_1 12
+#define HEAL_LOCATION_LITTLEROOT_TOWN_2 13
+#define HEAL_LOCATION_OLDALE_TOWN 14
+#define HEAL_LOCATION_DEWFORD_TOWN 15
+#define HEAL_LOCATION_LAVARIDGE_TOWN 16
+#define HEAL_LOCATION_FALLARBOR_TOWN 17
+#define HEAL_LOCATION_VERDANTURF_TOWN 18
+#define HEAL_LOCATION_PACIFIDLOG_TOWN 19
+#define HEAL_LOCATION_EVER_GRANDE_CITY_2 20
+#define HEAL_LOCATION_BATTLE_TOWER_OUTSIDE 21
+#define HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR 22
+
+#endif // GUARD_CONSTANTS_HEAL_LOCATIONS_H
diff --git a/include/heal_location.h b/include/heal_location.h
index 94dac2417..46f0d785a 100644
--- a/include/heal_location.h
+++ b/include/heal_location.h
@@ -1,8 +1,6 @@
#ifndef GUARD_HEAL_LOCATION_H
#define GUARD_HEAL_LOCATION_H
-#include "sprite.h"
-
struct HealLocation
{
s8 group;
diff --git a/src/battle/post_battle_event_funcs.c b/src/battle/post_battle_event_funcs.c
index a44cf028b..d0fbbec85 100644
--- a/src/battle/post_battle_event_funcs.c
+++ b/src/battle/post_battle_event_funcs.c
@@ -6,6 +6,7 @@
#include "pokemon.h"
#include "overworld.h"
#include "script_pokemon_80C4.h"
+#include "constants/heal_locations.h"
extern u8 gUnknown_02039324;
@@ -32,9 +33,9 @@ int GameClear(void)
SetSecretBase2Field_9();
if (gSaveBlock2.playerGender == MALE)
- sub_80537CC(1);
+ sub_80537CC(HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F);
else
- sub_80537CC(2);
+ sub_80537CC(HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F);
ribbonGet = FALSE;
diff --git a/src/data/heal_locations.h b/src/data/heal_locations.h
new file mode 100644
index 000000000..f764981bf
--- /dev/null
+++ b/src/data/heal_locations.h
@@ -0,0 +1,25 @@
+static const struct HealLocation sHealLocations[] =
+{
+ {MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), 4, 2},
+ {MAP_GROUP(LITTLEROOT_TOWN_MAYS_HOUSE_2F), MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_2F), 4, 2},
+ {MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), 20, 17},
+ {MAP_GROUP(SLATEPORT_CITY), MAP_NUM(SLATEPORT_CITY), 19, 20},
+ {MAP_GROUP(MAUVILLE_CITY), MAP_NUM(MAUVILLE_CITY), 22, 6},
+ {MAP_GROUP(RUSTBORO_CITY), MAP_NUM(RUSTBORO_CITY), 16, 39},
+ {MAP_GROUP(FORTREE_CITY), MAP_NUM(FORTREE_CITY), 5, 7},
+ {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), 24, 15},
+ {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), 28, 17},
+ {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), 43, 32},
+ {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), 27, 49},
+ {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), 5, 9},
+ {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), 14, 9},
+ {MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), 6, 17},
+ {MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), 2, 11},
+ {MAP_GROUP(LAVARIDGE_TOWN), MAP_NUM(LAVARIDGE_TOWN), 9, 7},
+ {MAP_GROUP(FALLARBOR_TOWN), MAP_NUM(FALLARBOR_TOWN), 14, 8},
+ {MAP_GROUP(VERDANTURF_TOWN), MAP_NUM(VERDANTURF_TOWN), 16, 4},
+ {MAP_GROUP(PACIFIDLOG_TOWN), MAP_NUM(PACIFIDLOG_TOWN), 8, 16},
+ {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), 18, 6},
+ {MAP_GROUP(BATTLE_TOWER_OUTSIDE), MAP_NUM(BATTLE_TOWER_OUTSIDE), 14, 9},
+ {MAP_GROUP(SOUTHERN_ISLAND_EXTERIOR), MAP_NUM(SOUTHERN_ISLAND_EXTERIOR), 15, 20},
+};
diff --git a/src/heal_location.c b/src/heal_location.c
index 4c78f5921..3bb24e1a1 100644
--- a/src/heal_location.c
+++ b/src/heal_location.c
@@ -1,32 +1,7 @@
#include "global.h"
#include "heal_location.h"
#include "constants/maps.h"
-
-static const struct HealLocation sHealLocations[] =
-{
- {MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), 4, 2},
- {MAP_GROUP(LITTLEROOT_TOWN_MAYS_HOUSE_2F), MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_2F), 4, 2},
- {MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), 20, 17},
- {MAP_GROUP(SLATEPORT_CITY), MAP_NUM(SLATEPORT_CITY), 19, 20},
- {MAP_GROUP(MAUVILLE_CITY), MAP_NUM(MAUVILLE_CITY), 22, 6},
- {MAP_GROUP(RUSTBORO_CITY), MAP_NUM(RUSTBORO_CITY), 16, 39},
- {MAP_GROUP(FORTREE_CITY), MAP_NUM(FORTREE_CITY), 5, 7},
- {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), 24, 15},
- {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), 28, 17},
- {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), 43, 32},
- {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), 27, 49},
- {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), 5, 9},
- {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), 14, 9},
- {MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), 6, 17},
- {MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), 2, 11},
- {MAP_GROUP(LAVARIDGE_TOWN), MAP_NUM(LAVARIDGE_TOWN), 9, 7},
- {MAP_GROUP(FALLARBOR_TOWN), MAP_NUM(FALLARBOR_TOWN), 14, 8},
- {MAP_GROUP(VERDANTURF_TOWN), MAP_NUM(VERDANTURF_TOWN), 16, 4},
- {MAP_GROUP(PACIFIDLOG_TOWN), MAP_NUM(PACIFIDLOG_TOWN), 8, 16},
- {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), 18, 6},
- {MAP_GROUP(BATTLE_TOWER_OUTSIDE), MAP_NUM(BATTLE_TOWER_OUTSIDE), 14, 9},
- {MAP_GROUP(SOUTHERN_ISLAND_EXTERIOR), MAP_NUM(SOUTHERN_ISLAND_EXTERIOR), 15, 20},
-};
+#include "data/heal_locations.h"
u32 GetHealLocationIndexByMap(u16 mapGroup, u16 mapNum)
{
diff --git a/src/region_map.c b/src/region_map.c
index 74062f435..b5a16fa09 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -19,6 +19,8 @@
#include "text.h"
#include "trig.h"
#include "ewram.h"
+#include "heal_location.h"
+#include "constants/heal_locations.h"
#define MAP_WIDTH 28
#define MAP_HEIGHT 15
@@ -1260,58 +1262,59 @@ static const u8 sFlyRegionMapFrame_TilemapLZ[] = INCBIN_U8("graphics/pokenav/map
static const u16 sFlyTargetIcons_Pal[] = INCBIN_U16("graphics/pokenav/fly_target_icons.gbapal");
static const u8 sFlyTargetIcons_ImageLZ[] = INCBIN_U8("graphics/pokenav/fly_target_icons.4bpp.lz");
-static const u8 sUnknown_083E7920[][3] =
-{
- {0, 9, 1},
- {0, 10, 14},
- {0, 11, 15},
- {0, 12, 16},
- {0, 13, 17},
- {0, 14, 18},
- {0, 15, 19},
- {0, 0, 3},
- {0, 1, 4},
- {0, 2, 5},
- {0, 3, 6},
- {0, 4, 7},
- {0, 5, 8},
- {0, 6, 9},
- {0, 7, 10},
- {0, 8, 11},
- {0, 16, 0},
- {0, 17, 0},
- {0, 18, 0},
- {0, 19, 0},
- {0, 20, 0},
- {0, 21, 0},
- {0, 22, 0},
- {0, 23, 0},
- {0, 24, 0},
- {0, 25, 0},
- {0, 26, 0},
- {0, 27, 0},
- {0, 28, 0},
- {0, 29, 0},
- {0, 30, 0},
- {0, 31, 0},
- {0, 32, 0},
- {0, 33, 0},
- {0, 34, 0},
- {0, 35, 0},
- {0, 36, 0},
- {0, 37, 0},
- {0, 38, 0},
- {0, 39, 0},
- {0, 40, 0},
- {0, 41, 0},
- {0, 42, 0},
- {0, 43, 0},
- {0, 44, 0},
- {0, 45, 0},
- {0, 46, 0},
- {0, 47, 0},
- {0, 48, 0},
- {0, 49, 0},
+// MAP_GROUP, MAP_NUM, HEAL_LOCATION
+static const u8 sMapHealLocationIndexes[][3] =
+{
+/* MAPSEC_LITTLEROOT_TOWN */ {0, 9, HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F},
+/* MAPSEC_OLDALE_TOWN */ {0, 10, HEAL_LOCATION_OLDALE_TOWN},
+/* MAPSEC_DEWFORD_TOWN */ {0, 11, HEAL_LOCATION_DEWFORD_TOWN},
+/* MAPSEC_LAVARIDGE_TOWN */ {0, 12, HEAL_LOCATION_LAVARIDGE_TOWN},
+/* MAPSEC_FALLARBOR_TOWN */ {0, 13, HEAL_LOCATION_FALLARBOR_TOWN},
+/* MAPSEC_VERDANTURF_TOWN */ {0, 14, HEAL_LOCATION_VERDANTURF_TOWN},
+/* MAPSEC_PACIFIDLOG_TOWN */ {0, 15, HEAL_LOCATION_PACIFIDLOG_TOWN},
+/* MAPSEC_PETALBURG_CITY */ {0, 0, HEAL_LOCATION_PETALBURG_CITY},
+/* MAPSEC_SLATEPORT_CITY */ {0, 1, HEAL_LOCATION_SLATEPORT_CITY},
+/* MAPSEC_MAUVILLE_CITY */ {0, 2, HEAL_LOCATION_MAUVILLE_CITY},
+/* MAPSEC_RUSTBORO_CITY */ {0, 3, HEAL_LOCATION_RUSTBORO_CITY},
+/* MAPSEC_FORTREE_CITY */ {0, 4, HEAL_LOCATION_FORTREE_CITY},
+/* MAPSEC_LILYCOVE_CITY */ {0, 5, HEAL_LOCATION_LILYCOVE_CITY},
+/* MAPSEC_MOSSDEEP_CITY */ {0, 6, HEAL_LOCATION_MOSSDEEP_CITY},
+/* MAPSEC_SOOTOPOLIS_CITY */ {0, 7, HEAL_LOCATION_SOOTOPOLIS_CITY},
+/* MAPSEC_EVER_GRANDE_CITY */ {0, 8, HEAL_LOCATION_EVER_GRANDE_CITY_1},
+/* MAPSEC_ROUTE_101 */ {0, 16, 0},
+/* MAPSEC_ROUTE_102 */ {0, 17, 0},
+/* MAPSEC_ROUTE_103 */ {0, 18, 0},
+/* MAPSEC_ROUTE_104 */ {0, 19, 0},
+/* MAPSEC_ROUTE_105 */ {0, 20, 0},
+/* MAPSEC_ROUTE_106 */ {0, 21, 0},
+/* MAPSEC_ROUTE_107 */ {0, 22, 0},
+/* MAPSEC_ROUTE_108 */ {0, 23, 0},
+/* MAPSEC_ROUTE_109 */ {0, 24, 0},
+/* MAPSEC_ROUTE_110 */ {0, 25, 0},
+/* MAPSEC_ROUTE_111 */ {0, 26, 0},
+/* MAPSEC_ROUTE_112 */ {0, 27, 0},
+/* MAPSEC_ROUTE_113 */ {0, 28, 0},
+/* MAPSEC_ROUTE_114 */ {0, 29, 0},
+/* MAPSEC_ROUTE_115 */ {0, 30, 0},
+/* MAPSEC_ROUTE_116 */ {0, 31, 0},
+/* MAPSEC_ROUTE_117 */ {0, 32, 0},
+/* MAPSEC_ROUTE_118 */ {0, 33, 0},
+/* MAPSEC_ROUTE_119 */ {0, 34, 0},
+/* MAPSEC_ROUTE_120 */ {0, 35, 0},
+/* MAPSEC_ROUTE_121 */ {0, 36, 0},
+/* MAPSEC_ROUTE_122 */ {0, 37, 0},
+/* MAPSEC_ROUTE_123 */ {0, 38, 0},
+/* MAPSEC_ROUTE_124 */ {0, 39, 0},
+/* MAPSEC_ROUTE_125 */ {0, 40, 0},
+/* MAPSEC_ROUTE_126 */ {0, 41, 0},
+/* MAPSEC_ROUTE_127 */ {0, 42, 0},
+/* MAPSEC_ROUTE_128 */ {0, 43, 0},
+/* MAPSEC_ROUTE_129 */ {0, 44, 0},
+/* MAPSEC_ROUTE_130 */ {0, 45, 0},
+/* MAPSEC_ROUTE_131 */ {0, 46, 0},
+/* MAPSEC_ROUTE_132 */ {0, 47, 0},
+/* MAPSEC_ROUTE_133 */ {0, 48, 0},
+/* MAPSEC_ROUTE_134 */ {0, 49, 0},
};
static const u8 *const sEverGrandeCityAreaNames[] =
@@ -1333,6 +1336,7 @@ static const struct MultiPartMapSection sMultiPartMapSections[1] =
{sEverGrandeCityAreaNames, MAPSEC_EVER_GRANDE_CITY, FLAG_SYS_POKEMON_LEAGUE_FLY},
};
+// what in the hell is this?
static struct UnknownStruct3 *const sFlyDataPtr = (struct UnknownStruct3 *)gSharedMem;
static const struct SpritePalette sFlyTargetIconSpritePalette = {sFlyTargetIcons_Pal, 2};
@@ -1717,16 +1721,16 @@ void sub_80FC69C(void)
switch (sFlyDataPtr->regionMap.mapSectionId)
{
case MAPSEC_SOUTHERN_ISLAND:
- sub_8053538(22);
+ sub_8053538(HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR);
break;
case MAPSEC_BATTLE_TOWER:
- sub_8053538(21);
+ sub_8053538(HEAL_LOCATION_BATTLE_TOWER_OUTSIDE);
break;
case MAPSEC_LITTLEROOT_TOWN:
- sub_8053538((gSaveBlock2.playerGender == MALE) ? 12 : 13);
+ sub_8053538((gSaveBlock2.playerGender == MALE) ? HEAL_LOCATION_LITTLEROOT_TOWN_1 : HEAL_LOCATION_LITTLEROOT_TOWN_2);
break;
case MAPSEC_EVER_GRANDE_CITY:
- sub_8053538((FlagGet(FLAG_SYS_POKEMON_LEAGUE_FLY) && sFlyDataPtr->regionMap.everGrandeCityArea == 0) ? 20 : 11);
+ sub_8053538((FlagGet(FLAG_SYS_POKEMON_LEAGUE_FLY) && sFlyDataPtr->regionMap.everGrandeCityArea == 0) ? HEAL_LOCATION_EVER_GRANDE_CITY_2 : HEAL_LOCATION_EVER_GRANDE_CITY_1);
break;
default:
if (sUnknown_083E7920[sFlyDataPtr->regionMap.mapSectionId][2] != 0)