summaryrefslogtreecommitdiff
path: root/tools/mapjson/mapjson.cpp
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-02-18 16:42:47 -0500
committerGitHub <noreply@github.com>2020-02-18 16:42:47 -0500
commitf9c1b6101495f09cf797cf0cb466ec4cc5838e72 (patch)
treea9928af64ee6a0ee6c9409ca40d43ddefe14c27d /tools/mapjson/mapjson.cpp
parente4d15a2338500e91e1f2a9723c48ecf25ae8111e (diff)
parent753e894b6a9aa9f51789d4e1945d310749fd6c54 (diff)
Merge pull request #258 from GriffinRichards/doc-headers
Document some header properties
Diffstat (limited to 'tools/mapjson/mapjson.cpp')
-rw-r--r--tools/mapjson/mapjson.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp
index f4e7380b9..753fac11b 100644
--- a/tools/mapjson/mapjson.cpp
+++ b/tools/mapjson/mapjson.cpp
@@ -104,24 +104,22 @@ string generate_map_header_text(Json map_data, Json layouts_data) {
<< "\t.byte " << map_data["weather"].string_value() << "\n"
<< "\t.byte " << map_data["map_type"].string_value() << "\n";
- if (version == "firered")
- text << "\t.byte " << map_data["unknown_18"].int_value() << "\n"
- << "\t.byte " << map_data["unknown_19"].int_value() << "\n";
- else
+ if (version != "firered")
text << "\t.2byte 0\n";
if (version == "ruby") {
text << "\t.byte " << map_data["show_map_name"].bool_value() << "\n";
}
- else if (version == "emerald") {
+ else if (version == "emerald" || version == "firered") {
text << "\tmap_header_flags "
- << "allow_bike=" << map_data["allow_bike"].bool_value() << ", "
- << "allow_escape_rope=" << map_data["allow_escape_rope"].bool_value() << ", "
- << "allow_run=" << map_data["allow_running"].bool_value() << ", "
+ << "allow_cycling=" << map_data["allow_cycling"].bool_value() << ", "
+ << "allow_escaping=" << map_data["allow_escaping"].bool_value() << ", "
+ << "allow_running=" << map_data["allow_running"].bool_value() << ", "
<< "show_map_name=" << map_data["show_map_name"].bool_value() << "\n";
}
- else if (version == "firered") {
- text << "\t.byte " << map_data["elevator_flag"].int_value() << "\n";
+
+ if (version == "firered") {
+ text << "\t.byte " << map_data["floor_number"].int_value() << "\n";
}
text << "\t.byte " << map_data["battle_scene"].string_value() << "\n\n";