From 9b705cf2e5f571a6c1116a476a2d11ca21948bad Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Sun, 26 Sep 2021 00:58:12 -0300 Subject: Change VTXs `#include`s to be consistent (#185) * Change VTXs incloudes to be consistent * Remove redundant check * Run formatter * Emtpy commit to trigger Jenkins * update gitignore --- ZAPD/ZFile.cpp | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) (limited to 'ZAPD/ZFile.cpp') diff --git a/ZAPD/ZFile.cpp b/ZAPD/ZFile.cpp index 6186205..472d3a7 100644 --- a/ZAPD/ZFile.cpp +++ b/ZAPD/ZFile.cpp @@ -1068,29 +1068,15 @@ std::string ZFile::ProcessDeclarations() item.second->text); } - // Do not asm_process vertex arrays. They have no practical use being overridden. - // if (item.second->varType == "Vtx" || item.second->varType == "static Vtx") - if (item.second->varType != "u64" && item.second->varType != "static u64" && - item.second->varType != "u8" && item.second->varType != "static u8") - { + if (item.second->arrayItemCntStr != "") output += StringHelper::Sprintf( - "%s %s[] = {\n #include \"%s\"\n};\n\n", item.second->varType.c_str(), - item.second->varName.c_str(), - StringHelper::Replace(item.second->includePath, "assets/", "../assets/") - .c_str()); - } + "%s %s[%s] = {\n #include \"%s\"\n};\n\n", item.second->varType.c_str(), + item.second->varName.c_str(), item.second->arrayItemCntStr.c_str(), + item.second->includePath.c_str()); else - { - if (item.second->arrayItemCntStr != "") - output += StringHelper::Sprintf( - "%s %s[%s] = {\n #include \"%s\"\n};\n\n", item.second->varType.c_str(), - item.second->varName.c_str(), item.second->arrayItemCntStr.c_str(), - item.second->includePath.c_str()); - else - output += StringHelper::Sprintf( - "%s %s[] = {\n #include \"%s\"\n};\n\n", item.second->varType.c_str(), - item.second->varName.c_str(), item.second->includePath.c_str()); - } + output += StringHelper::Sprintf( + "%s %s[] = {\n #include \"%s\"\n};\n\n", item.second->varType.c_str(), + item.second->varName.c_str(), item.second->includePath.c_str()); } else if (item.second->varType != "") { -- cgit v1.2.3