mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Changed level property from integer to id string
This commit is contained in:
@@ -8,7 +8,7 @@ BuildTTGhost::BuildTTGhost(std::string srcPath, std::string dstPath) {
|
||||
std::vector<uint8_t> 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"));
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user