Skip to content

Commit ecf27f4

Browse files
Move heal locations data to their associated map.json
1 parent d45b94e commit ecf27f4

File tree

25 files changed

+275
-77
lines changed

25 files changed

+275
-77
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ ld_script_ruby.txt
4444
ld_script_sapphire.txt
4545
sound/**/*.bin
4646
sound/songs/midi/*.s
47+
src/data/heal_locations.h
4748
src/data/items.h
4849
src/data/wild_encounters.h
4950
src/data/region_map/region_map_entries.h

data/maps/CeladonCity/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -400,5 +400,14 @@
400400
"quantity": 1,
401401
"underfoot": false
402402
}
403+
],
404+
"heal_locations": [
405+
{
406+
"id": "SPAWN_CELADON_CITY",
407+
"x": 48,
408+
"y": 12,
409+
"respawn_map": "MAP_CELADON_CITY_POKEMON_CENTER_1F",
410+
"respawn_npc": 1
411+
}
403412
]
404413
}

data/maps/CeruleanCity/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -413,5 +413,14 @@
413413
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
414414
"script": "CeruleanCity_BikeShop_EventScript_Bicycle"
415415
}
416+
],
417+
"heal_locations": [
418+
{
419+
"id": "SPAWN_CERULEAN_CITY",
420+
"x": 22,
421+
"y": 20,
422+
"respawn_map": "MAP_CERULEAN_CITY_POKEMON_CENTER_1F",
423+
"respawn_npc": 1
424+
}
416425
]
417426
}

data/maps/CinnabarIsland/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,14 @@
164164
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
165165
"script": "CinnabarIsland_EventScript_PokemonLabSign"
166166
}
167+
],
168+
"heal_locations": [
169+
{
170+
"id": "SPAWN_CINNABAR_ISLAND",
171+
"x": 14,
172+
"y": 12,
173+
"respawn_map": "MAP_CINNABAR_ISLAND_POKEMON_CENTER_1F",
174+
"respawn_npc": 1
175+
}
167176
]
168177
}

data/maps/FiveIsland/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,14 @@
103103
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
104104
"script": "FiveIsland_EventScript_IslandSign"
105105
}
106+
],
107+
"heal_locations": [
108+
{
109+
"id": "SPAWN_FIVE_ISLAND",
110+
"x": 18,
111+
"y": 7,
112+
"respawn_map": "MAP_FIVE_ISLAND_POKEMON_CENTER_1F",
113+
"respawn_npc": 1
114+
}
106115
]
107116
}

data/maps/FourIsland/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -280,5 +280,14 @@
280280
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
281281
"script": "FourIsland_EventScript_LoreleisHouseSign"
282282
}
283+
],
284+
"heal_locations": [
285+
{
286+
"id": "SPAWN_FOUR_ISLAND",
287+
"x": 18,
288+
"y": 21,
289+
"respawn_map": "MAP_FOUR_ISLAND_POKEMON_CENTER_1F",
290+
"respawn_npc": 1
291+
}
283292
]
284293
}

data/maps/FuchsiaCity/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -435,5 +435,14 @@
435435
"quantity": 1,
436436
"underfoot": false
437437
}
438+
],
439+
"heal_locations": [
440+
{
441+
"id": "SPAWN_FUCHSIA_CITY",
442+
"x": 25,
443+
"y": 32,
444+
"respawn_map": "MAP_FUCHSIA_CITY_POKEMON_CENTER_1F",
445+
"respawn_npc": 1
446+
}
438447
]
439448
}

data/maps/IndigoPlateau_Exterior/map.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,14 @@
6060
}
6161
],
6262
"coord_events": [],
63-
"bg_events": []
63+
"bg_events": [],
64+
"heal_locations": [
65+
{
66+
"id": "SPAWN_INDIGO_PLATEAU",
67+
"x": 11,
68+
"y": 7,
69+
"respawn_map": "MAP_INDIGO_PLATEAU_POKEMON_CENTER_1F",
70+
"respawn_npc": 2
71+
}
72+
]
6473
}

data/maps/LavenderTown/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,14 @@
152152
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
153153
"script": "LavenderTown_EventScript_VolunteerHouseSign"
154154
}
155+
],
156+
"heal_locations": [
157+
{
158+
"id": "SPAWN_LAVENDER_TOWN",
159+
"x": 6,
160+
"y": 6,
161+
"respawn_map": "MAP_LAVENDER_TOWN_POKEMON_CENTER_1F",
162+
"respawn_npc": 1
163+
}
155164
]
156165
}

data/maps/OneIsland/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,14 @@
117117
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
118118
"script": "OneIsland_EventScript_PokemonNetCenterSign"
119119
}
120+
],
121+
"heal_locations": [
122+
{
123+
"id": "SPAWN_ONE_ISLAND",
124+
"x": 14,
125+
"y": 6,
126+
"respawn_map": "MAP_ONE_ISLAND_POKEMON_CENTER_1F",
127+
"respawn_npc": 1
128+
}
120129
]
121130
}

data/maps/PalletTown/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,14 @@
162162
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
163163
"script": "PalletTown_EventScript_TrainerTips"
164164
}
165+
],
166+
"heal_locations": [
167+
{
168+
"id": "SPAWN_PALLET_TOWN",
169+
"x": 6,
170+
"y": 8,
171+
"respawn_map": "MAP_PALLET_TOWN_PLAYERS_HOUSE_1F",
172+
"respawn_npc": 1
173+
}
165174
]
166175
}

data/maps/PewterCity/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -292,5 +292,14 @@
292292
"quantity": 1,
293293
"underfoot": false
294294
}
295+
],
296+
"heal_locations": [
297+
{
298+
"id": "SPAWN_PEWTER_CITY",
299+
"x": 17,
300+
"y": 26,
301+
"respawn_map": "MAP_PEWTER_CITY_POKEMON_CENTER_1F",
302+
"respawn_npc": 3
303+
}
295304
]
296305
}

data/maps/Route10/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -280,5 +280,14 @@
280280
"quantity": 1,
281281
"underfoot": false
282282
}
283+
],
284+
"heal_locations": [
285+
{
286+
"id": "SPAWN_ROUTE10",
287+
"x": 13,
288+
"y": 21,
289+
"respawn_map": "MAP_ROUTE10_POKEMON_CENTER_1F",
290+
"respawn_npc": 1
291+
}
283292
]
284293
}

data/maps/Route4/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -190,5 +190,14 @@
190190
"quantity": 1,
191191
"underfoot": false
192192
}
193+
],
194+
"heal_locations": [
195+
{
196+
"id": "SPAWN_ROUTE4",
197+
"x": 12,
198+
"y": 6,
199+
"respawn_map": "MAP_ROUTE4_POKEMON_CENTER_1F",
200+
"respawn_npc": 1
201+
}
193202
]
194203
}

data/maps/SaffronCity/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,14 @@
429429
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
430430
"script": "SaffronCity_EventScript_TrainerFanClubSign"
431431
}
432+
],
433+
"heal_locations": [
434+
{
435+
"id": "SPAWN_SAFFRON_CITY",
436+
"x": 24,
437+
"y": 39,
438+
"respawn_map": "MAP_SAFFRON_CITY_POKEMON_CENTER_1F",
439+
"respawn_npc": 1
440+
}
432441
]
433442
}

data/maps/SevenIsland/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,14 @@
109109
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
110110
"script": "SevenIsland_EventScript_IslandSign"
111111
}
112+
],
113+
"heal_locations": [
114+
{
115+
"id": "SPAWN_SEVEN_ISLAND",
116+
"x": 12,
117+
"y": 4,
118+
"respawn_map": "MAP_SEVEN_ISLAND_POKEMON_CENTER_1F",
119+
"respawn_npc": 1
120+
}
112121
]
113122
}

data/maps/SixIsland/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,14 @@
100100
"quantity": 1,
101101
"underfoot": false
102102
}
103+
],
104+
"heal_locations": [
105+
{
106+
"id": "SPAWN_SIX_ISLAND",
107+
"x": 11,
108+
"y": 12,
109+
"respawn_map": "MAP_SIX_ISLAND_POKEMON_CENTER_1F",
110+
"respawn_npc": 1
111+
}
103112
]
104113
}

data/maps/ThreeIsland/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -385,5 +385,14 @@
385385
"quantity": 1,
386386
"underfoot": false
387387
}
388+
],
389+
"heal_locations": [
390+
{
391+
"id": "SPAWN_THREE_ISLAND",
392+
"x": 14,
393+
"y": 28,
394+
"respawn_map": "MAP_THREE_ISLAND_POKEMON_CENTER_1F",
395+
"respawn_npc": 1
396+
}
388397
]
389398
}

data/maps/TwoIsland/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,14 @@
204204
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
205205
"script": "TwoIsland_EventScript_FastCurrentSign"
206206
}
207+
],
208+
"heal_locations": [
209+
{
210+
"id": "SPAWN_TWO_ISLAND",
211+
"x": 21,
212+
"y": 8,
213+
"respawn_map": "MAP_TWO_ISLAND_POKEMON_CENTER_1F",
214+
"respawn_npc": 1
215+
}
207216
]
208217
}

data/maps/VermilionCity/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -300,5 +300,14 @@
300300
"quantity": 1,
301301
"underfoot": false
302302
}
303+
],
304+
"heal_locations": [
305+
{
306+
"id": "SPAWN_VERMILION_CITY",
307+
"x": 15,
308+
"y": 7,
309+
"respawn_map": "MAP_VERMILION_CITY_POKEMON_CENTER_1F",
310+
"respawn_npc": 1
311+
}
303312
]
304313
}

data/maps/ViridianCity/map.json

+9
Original file line numberDiff line numberDiff line change
@@ -274,5 +274,14 @@
274274
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
275275
"script": "ViridianCity_EventScript_GymDoor"
276276
}
277+
],
278+
"heal_locations": [
279+
{
280+
"id": "SPAWN_VIRIDIAN_CITY",
281+
"x": 26,
282+
"y": 27,
283+
"respawn_map": "MAP_VIRIDIAN_CITY_POKEMON_CENTER_1F",
284+
"respawn_npc": 1
285+
}
277286
]
278287
}

map_data_rules.mk

+5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ INCLUDECONSTS_OUTDIR := include/constants
1111

1212
AUTO_GEN_TARGETS += $(INCLUDECONSTS_OUTDIR)/map_groups.h
1313
AUTO_GEN_TARGETS += $(INCLUDECONSTS_OUTDIR)/layouts.h
14+
AUTO_GEN_TARGETS += $(DATA_SRC_SUBDIR)/heal_locations.h
1415

1516
MAP_DIRS := $(dir $(wildcard $(MAPS_DIR)/*/map.json))
1617
MAP_CONNECTIONS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/connections.inc,$(MAP_DIRS))
1718
MAP_EVENTS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/events.inc,$(MAP_DIRS))
1819
MAP_HEADERS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/header.inc,$(MAP_DIRS))
20+
MAP_JSONS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/map.json,$(MAP_DIRS))
1921

2022
$(DATA_ASM_BUILDDIR)/maps.o: $(DATA_ASM_SUBDIR)/maps.s $(LAYOUTS_DIR)/layouts.inc $(LAYOUTS_DIR)/layouts_table.inc $(MAPS_DIR)/headers.inc $(MAPS_DIR)/groups.inc $(MAPS_DIR)/connections.inc $(MAP_CONNECTIONS) $(MAP_HEADERS)
2123
$(PREPROC) $< charmap.txt | $(CPP) -I include -nostdinc -undef -Wno-unicode - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@
@@ -30,3 +32,6 @@ $(MAPS_OUTDIR)/connections.inc $(MAPS_OUTDIR)/groups.inc $(MAPS_OUTDIR)/events.i
3032

3133
$(LAYOUTS_OUTDIR)/layouts.inc $(LAYOUTS_OUTDIR)/layouts_table.inc $(INCLUDECONSTS_OUTDIR)/layouts.h: $(LAYOUTS_DIR)/layouts.json
3234
$(MAPJSON) layouts firered $< $(LAYOUTS_OUTDIR) $(INCLUDECONSTS_OUTDIR)
35+
36+
$(DATA_SRC_SUBDIR)/heal_locations.h: $(MAP_JSONS)
37+
@$(MAPJSON) heal_locations firered $^ $(DATA_SRC_SUBDIR)/heal_locations.h

0 commit comments

Comments
 (0)