diff --git a/tools/dkr_assets_tool_classes/builder/build_files/build_ttghost.cpp b/tools/dkr_assets_tool_classes/builder/build_files/build_ttghost.cpp index 3991880d..995bec87 100644 --- a/tools/dkr_assets_tool_classes/builder/build_files/build_ttghost.cpp +++ b/tools/dkr_assets_tool_classes/builder/build_files/build_ttghost.cpp @@ -8,7 +8,7 @@ BuildTTGhost::BuildTTGhost(std::string srcPath, std::string dstPath) { std::vector out(align16(SIZEOF_TTGHOST_HEADER + numberOfNodes * SIZEOF_TTGHOST_NODE)); // Write header - out[0] = get_int_from_json(srcPath, "header", "level"); + out[0] = get_index_from_build_id("ASSET_LEVEL_HEADERS", get_string_from_json(srcPath, "header", "level")); // get_int_from_json(srcPath, "header", "level"); out[1] = get_enum_value_from_string("Vehicle", get_string_from_json(srcPath, "header", "vehicle")); out[2] = 9; // Always 9? write_big_endian_halfword(out, 4, get_int_from_json(srcPath, "header", "time")); diff --git a/tools/dkr_assets_tool_classes/extractor/extract/extract_ttghost.cpp b/tools/dkr_assets_tool_classes/extractor/extract/extract_ttghost.cpp index 41b860db..597033e2 100644 --- a/tools/dkr_assets_tool_classes/extractor/extract/extract_ttghost.cpp +++ b/tools/dkr_assets_tool_classes/extractor/extract/extract_ttghost.cpp @@ -8,8 +8,8 @@ json::JSON &configJSON) out["type"] = "TTGhosts"; out["header"] = json::Object(); out["nodes"] = json::Array(); - - out["header"]["level"] = data[0]; + + out["header"]["level"] = get_build_id_from_section("ASSET_LEVEL_HEADERS", data[0]); // data[0]; out["header"]["vehicle"] = get_enum_string_from_value("Vehicle", data[1]); diff --git a/tools/dkr_assets_tool_classes/make_asset_files/asset_asm_data.cpp b/tools/dkr_assets_tool_classes/make_asset_files/asset_asm_data.cpp index a43d0184..14f62211 100644 --- a/tools/dkr_assets_tool_classes/make_asset_files/asset_asm_data.cpp +++ b/tools/dkr_assets_tool_classes/make_asset_files/asset_asm_data.cpp @@ -84,7 +84,7 @@ std::string formatGameTextWordEntry(std::string sourceSectionFirst, std::string } void AssetAsmIncludes::write_ttghost_table_entry(std::stringstream &out, std::string entryWord, std::string ttGhostJsonPath) { - int levelId = get_int_from_json(ttGhostJsonPath, "header", "level"); + int levelId = get_index_from_build_id("ASSET_LEVEL_HEADERS", get_string_from_json(ttGhostJsonPath, "header", "level")); std::string vehicle = get_string_from_json(ttGhostJsonPath, "header", "vehicle"); int vehicleId = get_enum_value_from_string("Vehicle", vehicle); write_two_words(out, to_hex((levelId << 24) | (vehicleId << 16)), entryWord);