Skip to content

Commit

Permalink
moved new data to separate file for porymap compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
cawtds committed Jul 21, 2024
1 parent f9476de commit 6dad6ed
Show file tree
Hide file tree
Showing 4 changed files with 173 additions and 174 deletions.
2 changes: 1 addition & 1 deletion include/constants/heal_locations.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
#define HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE 20
#define HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR 21
#define HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST 22
#define HEAL_LOCATION_COUNT (HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST + 1)
#define HEAL_LOCATION_COUNT 23

#endif // GUARD_CONSTANTS_HEAL_LOCATIONS_H
173 changes: 0 additions & 173 deletions src/data/heal_locations.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,176 +23,3 @@ static const struct HealLocation sHealLocations[] =
[HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR - 1] = {MAP_GROUP(SOUTHERN_ISLAND_EXTERIOR), MAP_NUM(SOUTHERN_ISLAND_EXTERIOR), 15, 20},
[HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST - 1] = {MAP_GROUP(BATTLE_FRONTIER_OUTSIDE_EAST), MAP_NUM(BATTLE_FRONTIER_OUTSIDE_EAST), 3, 52},
};

#define DEFAULT_POKEMON_CENTER_COORDS .x = 7, .y = 4

static const struct HealLocation sHealLocationsPokemonCenter[HEAL_LOCATION_COUNT - 1] =
{
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F - 1] =
{
.group = MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F),
.map = MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F),
.x = 2,
.y = 7,
},
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F - 1] =
{
.group = MAP_GROUP(LITTLEROOT_TOWN_MAYS_HOUSE_1F),
.map = MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_1F),
.x = 8,
.y = 7,
},
[HEAL_LOCATION_PETALBURG_CITY - 1] =
{
.group = MAP_GROUP(PETALBURG_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(PETALBURG_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_SLATEPORT_CITY - 1] =
{
.group = MAP_GROUP(SLATEPORT_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(SLATEPORT_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_MAUVILLE_CITY - 1] =
{
.group = MAP_GROUP(MAUVILLE_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(MAUVILLE_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_RUSTBORO_CITY - 1] =
{
.group = MAP_GROUP(RUSTBORO_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(RUSTBORO_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_FORTREE_CITY - 1] =
{
.group = MAP_GROUP(FORTREE_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(FORTREE_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_LILYCOVE_CITY - 1] =
{
.group = MAP_GROUP(LILYCOVE_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(LILYCOVE_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_MOSSDEEP_CITY - 1] =
{
.group = MAP_GROUP(MOSSDEEP_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(MOSSDEEP_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_SOOTOPOLIS_CITY - 1] =
{
.group = MAP_GROUP(SOOTOPOLIS_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(SOOTOPOLIS_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_EVER_GRANDE_CITY - 1] =
{
.group = MAP_GROUP(EVER_GRANDE_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(EVER_GRANDE_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE - 1] =
{
.group = MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F),
.map = MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F),
.x = 2,
.y = 7,
},
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE - 1] =
{
.group = MAP_GROUP(LITTLEROOT_TOWN_MAYS_HOUSE_1F),
.map = MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_1F),
.x = 8,
.y = 7,
},
[HEAL_LOCATION_OLDALE_TOWN - 1] =
{
.group = MAP_GROUP(OLDALE_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(OLDALE_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_DEWFORD_TOWN - 1] =
{
.group = MAP_GROUP(DEWFORD_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(DEWFORD_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_LAVARIDGE_TOWN - 1] =
{
.group = MAP_GROUP(LAVARIDGE_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(LAVARIDGE_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_FALLARBOR_TOWN - 1] =
{
.group = MAP_GROUP(FALLARBOR_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(FALLARBOR_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_VERDANTURF_TOWN - 1] =
{
.group = MAP_GROUP(VERDANTURF_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(VERDANTURF_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_PACIFIDLOG_TOWN - 1] =
{
.group = MAP_GROUP(PACIFIDLOG_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(PACIFIDLOG_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE - 1] =
{
.group = MAP_GROUP(EVER_GRANDE_CITY_POKEMON_LEAGUE_1F),
.map = MAP_NUM(EVER_GRANDE_CITY_POKEMON_LEAGUE_1F),
.x = 3,
.y = 4,
},
[HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR - 1] =
{
.group = MAP_GROUP(SOUTHERN_ISLAND_EXTERIOR),
.map = MAP_NUM(SOUTHERN_ISLAND_EXTERIOR),
.x = 15,
.y = 20,
},
[HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST - 1] =
{
.group = MAP_GROUP(BATTLE_FRONTIER_POKEMON_CENTER_1F),
.map = MAP_NUM(BATTLE_FRONTIER_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
};

#undef DEFAULT_POKEMON_CENTER_COORDS

static const u8 sWhiteoutRespawnHealerNpcLocalIds[HEAL_LOCATION_COUNT - 1] =
{
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F - 1] = 1,
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F - 1] = 1,
[HEAL_LOCATION_PETALBURG_CITY - 1] = 1,
[HEAL_LOCATION_SLATEPORT_CITY - 1] = 1,
[HEAL_LOCATION_MAUVILLE_CITY - 1] = 1,
[HEAL_LOCATION_RUSTBORO_CITY - 1] = 1,
[HEAL_LOCATION_FORTREE_CITY - 1] = 1,
[HEAL_LOCATION_LILYCOVE_CITY - 1] = 1,
[HEAL_LOCATION_MOSSDEEP_CITY - 1] = 1,
[HEAL_LOCATION_SOOTOPOLIS_CITY - 1] = 1,
[HEAL_LOCATION_EVER_GRANDE_CITY - 1] = 1,
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE - 1] = 1,
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE - 1] = 1,
[HEAL_LOCATION_OLDALE_TOWN - 1] = 1,
[HEAL_LOCATION_DEWFORD_TOWN - 1] = 1,
[HEAL_LOCATION_LAVARIDGE_TOWN - 1] = 1,
[HEAL_LOCATION_FALLARBOR_TOWN - 1] = 1,
[HEAL_LOCATION_VERDANTURF_TOWN - 1] = 1,
[HEAL_LOCATION_PACIFIDLOG_TOWN - 1] = 1,
[HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE - 1] = 1,
[HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR - 1] = 0, // no heal npc
[HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST - 1] = 1,
};

171 changes: 171 additions & 0 deletions src/data/heal_locations_pkm_center.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
#define DEFAULT_POKEMON_CENTER_COORDS .x = 7, .y = 4

static const struct HealLocation sHealLocationsPokemonCenter[HEAL_LOCATION_COUNT - 1] =
{
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F - 1] =
{
.group = MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F),
.map = MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F),
.x = 2,
.y = 7,
},
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F - 1] =
{
.group = MAP_GROUP(LITTLEROOT_TOWN_MAYS_HOUSE_1F),
.map = MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_1F),
.x = 8,
.y = 7,
},
[HEAL_LOCATION_PETALBURG_CITY - 1] =
{
.group = MAP_GROUP(PETALBURG_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(PETALBURG_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_SLATEPORT_CITY - 1] =
{
.group = MAP_GROUP(SLATEPORT_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(SLATEPORT_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_MAUVILLE_CITY - 1] =
{
.group = MAP_GROUP(MAUVILLE_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(MAUVILLE_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_RUSTBORO_CITY - 1] =
{
.group = MAP_GROUP(RUSTBORO_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(RUSTBORO_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_FORTREE_CITY - 1] =
{
.group = MAP_GROUP(FORTREE_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(FORTREE_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_LILYCOVE_CITY - 1] =
{
.group = MAP_GROUP(LILYCOVE_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(LILYCOVE_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_MOSSDEEP_CITY - 1] =
{
.group = MAP_GROUP(MOSSDEEP_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(MOSSDEEP_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_SOOTOPOLIS_CITY - 1] =
{
.group = MAP_GROUP(SOOTOPOLIS_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(SOOTOPOLIS_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_EVER_GRANDE_CITY - 1] =
{
.group = MAP_GROUP(EVER_GRANDE_CITY_POKEMON_CENTER_1F),
.map = MAP_NUM(EVER_GRANDE_CITY_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE - 1] =
{
.group = MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F),
.map = MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F),
.x = 2,
.y = 7,
},
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE - 1] =
{
.group = MAP_GROUP(LITTLEROOT_TOWN_MAYS_HOUSE_1F),
.map = MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_1F),
.x = 8,
.y = 7,
},
[HEAL_LOCATION_OLDALE_TOWN - 1] =
{
.group = MAP_GROUP(OLDALE_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(OLDALE_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_DEWFORD_TOWN - 1] =
{
.group = MAP_GROUP(DEWFORD_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(DEWFORD_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_LAVARIDGE_TOWN - 1] =
{
.group = MAP_GROUP(LAVARIDGE_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(LAVARIDGE_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_FALLARBOR_TOWN - 1] =
{
.group = MAP_GROUP(FALLARBOR_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(FALLARBOR_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_VERDANTURF_TOWN - 1] =
{
.group = MAP_GROUP(VERDANTURF_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(VERDANTURF_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_PACIFIDLOG_TOWN - 1] =
{
.group = MAP_GROUP(PACIFIDLOG_TOWN_POKEMON_CENTER_1F),
.map = MAP_NUM(PACIFIDLOG_TOWN_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
[HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE - 1] =
{
.group = MAP_GROUP(EVER_GRANDE_CITY_POKEMON_LEAGUE_1F),
.map = MAP_NUM(EVER_GRANDE_CITY_POKEMON_LEAGUE_1F),
.x = 3,
.y = 4,
},
[HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR - 1] =
{
.group = MAP_GROUP(SOUTHERN_ISLAND_EXTERIOR),
.map = MAP_NUM(SOUTHERN_ISLAND_EXTERIOR),
.x = 15,
.y = 20,
},
[HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST - 1] =
{
.group = MAP_GROUP(BATTLE_FRONTIER_POKEMON_CENTER_1F),
.map = MAP_NUM(BATTLE_FRONTIER_POKEMON_CENTER_1F),
DEFAULT_POKEMON_CENTER_COORDS,
},
};

#undef DEFAULT_POKEMON_CENTER_COORDS

static const u8 sWhiteoutRespawnHealerNpcLocalIds[HEAL_LOCATION_COUNT - 1] =
{
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F - 1] = 1,
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F - 1] = 1,
[HEAL_LOCATION_PETALBURG_CITY - 1] = 1,
[HEAL_LOCATION_SLATEPORT_CITY - 1] = 1,
[HEAL_LOCATION_MAUVILLE_CITY - 1] = 1,
[HEAL_LOCATION_RUSTBORO_CITY - 1] = 1,
[HEAL_LOCATION_FORTREE_CITY - 1] = 1,
[HEAL_LOCATION_LILYCOVE_CITY - 1] = 1,
[HEAL_LOCATION_MOSSDEEP_CITY - 1] = 1,
[HEAL_LOCATION_SOOTOPOLIS_CITY - 1] = 1,
[HEAL_LOCATION_EVER_GRANDE_CITY - 1] = 1,
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE - 1] = 1,
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE - 1] = 1,
[HEAL_LOCATION_OLDALE_TOWN - 1] = 1,
[HEAL_LOCATION_DEWFORD_TOWN - 1] = 1,
[HEAL_LOCATION_LAVARIDGE_TOWN - 1] = 1,
[HEAL_LOCATION_FALLARBOR_TOWN - 1] = 1,
[HEAL_LOCATION_VERDANTURF_TOWN - 1] = 1,
[HEAL_LOCATION_PACIFIDLOG_TOWN - 1] = 1,
[HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE - 1] = 1,
[HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR - 1] = 0, // no heal npc
[HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST - 1] = 1,
};
1 change: 1 addition & 0 deletions src/heal_location.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "constants/maps.h"

#include "data/heal_locations.h"
#include "data/heal_locations_pkm_center.h"

u32 GetHealLocationIndexByMap(u16 mapGroup, u16 mapNum)
{
Expand Down

0 comments on commit 6dad6ed

Please sign in to comment.