From a4dd8216587f73841ba9016678c1af88cb78b62c Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 31 Aug 2024 00:32:43 -0400 Subject: [PATCH] Restore review changes from dependent PR --- map_data_rules.mk | 1 + tools/mapjson/mapjson.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/map_data_rules.mk b/map_data_rules.mk index 3ec86da7dd..ed7c08edea 100755 --- a/map_data_rules.mk +++ b/map_data_rules.mk @@ -22,6 +22,7 @@ $(DATA_ASM_BUILDDIR)/maps.o: $(DATA_ASM_SUBDIR)/maps.s $(LAYOUTS_DIR)/layouts.in $(DATA_ASM_BUILDDIR)/map_events.o: $(DATA_ASM_SUBDIR)/map_events.s $(MAPS_DIR)/events.inc $(MAP_EVENTS) $(PREPROC) $< charmap.txt | $(CPP) -I include - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@ + $(MAPS_OUTDIR)/%/header.inc $(MAPS_OUTDIR)/%/events.inc $(MAPS_OUTDIR)/%/connections.inc: $(MAPS_DIR)/%/map.json $(MAPJSON) map emerald $< $(LAYOUTS_DIR)/layouts.json $(@D) diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index 1632b56be6..1a10c9dab8 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -374,7 +374,7 @@ void process_map(string map_filepath, string layouts_filepath, string output_dir string generate_groups_text(Json groups_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from /map_groups.json\n@\n\n"; + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; for (auto &key : groups_data["group_order"].array_items()) { string group = json_to_string(key); @@ -415,7 +415,7 @@ string generate_connections_text(Json groups_data, string include_path) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from /map_groups.json\n@\n\n"; + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; for (Json map_name : map_names) text << "\t.include \"" << include_path << "/" << json_to_string(map_name) << "/connections.inc\"\n"; @@ -432,7 +432,7 @@ string generate_headers_text(Json groups_data, string include_path) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from /map_groups.json\n@\n\n"; + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; for (string map_name : map_names) text << "\t.include \"" << include_path << "/" << map_name << "/header.inc\"\n"; @@ -465,7 +465,7 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) { text << "#ifndef GUARD_CONSTANTS_MAP_GROUPS_H\n" << "#define GUARD_CONSTANTS_MAP_GROUPS_H\n\n"; - text << "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from /map_groups.json\n//\n\n"; + text << "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n//\n\n"; int group_num = 0; @@ -530,7 +530,7 @@ void process_groups(string groups_filepath, string output_asm, string output_c) string generate_layout_headers_text(Json layouts_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from layouts.json\n@\n\n"; + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/layouts/layouts.json\n@\n\n"; for (auto &layout : layouts_data["layouts"].array_items()) { if (layout == Json::object()) continue;