summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2022-01-02 19:19:51 -0300
committerGitHub <noreply@github.com>2022-01-02 17:19:51 -0500
commit0530b60691122ebbccffe4b8c813acd0438fcde6 (patch)
tree984d6707859a11221dd6e8d58085a032caebd99a
parenta0d3f7b68b754f0233ee0a8f014c4432e87dcc42 (diff)
Don't generate extern declarations for unaccounted variables (#229)
* Don't generate extern declarations for unaccounted variables * Update jenkinsfile for MM * format
-rw-r--r--Jenkinsfile2
-rw-r--r--ZAPD/Declaration.cpp2
-rw-r--r--ZAPD/ZTexture.cpp5
3 files changed, 4 insertions, 5 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index ec9b56a..9c4dde7 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -61,7 +61,7 @@ pipeline {
sh 'cp ../ZAPD.out tools/ZAPD/'
sh 'python3 tools/fixbaserom.py'
sh 'python3 tools/extract_baserom.py'
- sh 'python3 extract_assets.py -t$(nproc)'
+ sh 'python3 extract_assets.py -j $(nproc)'
}
}
}
diff --git a/ZAPD/Declaration.cpp b/ZAPD/Declaration.cpp
index be06b0b..34ab953 100644
--- a/ZAPD/Declaration.cpp
+++ b/ZAPD/Declaration.cpp
@@ -171,7 +171,7 @@ std::string Declaration::GetExternalDeclarationStr() const
std::string Declaration::GetExternStr() const
{
- if (IsStatic() || varType == "")
+ if (IsStatic() || varType == "" || isUnaccounted)
{
return "";
}
diff --git a/ZAPD/ZTexture.cpp b/ZAPD/ZTexture.cpp
index 60884ac..0d72d9c 100644
--- a/ZAPD/ZTexture.cpp
+++ b/ZAPD/ZTexture.cpp
@@ -776,9 +776,8 @@ Declaration* ZTexture::DeclareVar(const std::string& prefix,
incStr = StringHelper::Sprintf("%s.%s.inc.c", poolEntry->second.path.c_str(),
GetExternalExtension().c_str());
else
- incStr =
- StringHelper::Sprintf("%s.u32.%s.inc.c", poolEntry->second.path.c_str(),
- GetExternalExtension().c_str());
+ incStr = StringHelper::Sprintf("%s.u32.%s.inc.c", poolEntry->second.path.c_str(),
+ GetExternalExtension().c_str());
}
}
size_t texSizeDivisor = (dWordAligned) ? 8 : 4;