Skip to content

Commit

Permalink
PR: Incorporated reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Icedude907 committed Nov 23, 2023
1 parent 7fa9819 commit 2b75819
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 1 addition & 5 deletions make_tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@ TOOL_NAMES := aif2pcm bin2c gbafix gbagfx jsonproc mapjson mid2agb preproc ramsc

TOOLDIRS := $(TOOL_NAMES:%=$(TOOLS_DIR)/%)

.PHONY: tools check-tools clean-tools $(TOOLDIRS) $(CHECKTOOLDIRS)
.PHONY: tools check-tools clean-tools $(TOOLDIRS)

tools: $(TOOLDIRS)
check-tools: $(CHECKTOOLDIRS)

$(TOOLDIRS):
@$(MAKE) -C $@

$(CHECKTOOLDIRS):
@$(MAKE) -C $@

clean-tools:
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
2 changes: 1 addition & 1 deletion map_data_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ $(MAPS_OUTDIR)/connections.inc $(MAPS_OUTDIR)/groups.inc $(MAPS_OUTDIR)/events.i
$(MAPJSON) groups emerald $< $(MAPS_OUTDIR) $(INCLUDECONSTS_OUTDIR)

$(LAYOUTS_OUTDIR)/layouts.inc $(LAYOUTS_OUTDIR)/layouts_table.inc $(INCLUDECONSTS_OUTDIR)/layouts.h: $(LAYOUTS_DIR)/layouts.json
$(MAPJSON) layouts emerald $< $(LAYOUTS_OUTDIR) $(INCLUDECONSTS_OUTDIR)
$(MAPJSON) layouts emerald $< $(LAYOUTS_OUTDIR) $(INCLUDECONSTS_OUTDIR)
10 changes: 5 additions & 5 deletions tools/mapjson/mapjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2b75819

Please sign in to comment.