mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-13 02:10:57 +00:00
git subrepo pull --force tools/ZAPD (#1049)
subrepo: subdir: "tools/ZAPD" merged: "a3363333d" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "a3363333d" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
This commit is contained in:
parent
5e9d24fca4
commit
68899c2e33
72 changed files with 1311 additions and 569 deletions
|
@ -92,20 +92,20 @@ std::string Declaration::GetNormalDeclarationStr() const
|
|||
|
||||
if (isArray)
|
||||
{
|
||||
if (arrayItemCntStr != "")
|
||||
if (arrayItemCntStr != "" && (IsStatic() || forceArrayCnt))
|
||||
{
|
||||
output += StringHelper::Sprintf("%s %s[%s];\n", varType.c_str(), varName.c_str(),
|
||||
arrayItemCntStr.c_str());
|
||||
}
|
||||
else if (arrayItemCnt == 0)
|
||||
{
|
||||
output += StringHelper::Sprintf("%s %s[] = {\n", varType.c_str(), varName.c_str());
|
||||
}
|
||||
else
|
||||
else if (arrayItemCnt != 0 && (IsStatic() || forceArrayCnt))
|
||||
{
|
||||
output += StringHelper::Sprintf("%s %s[%i] = {\n", varType.c_str(), varName.c_str(),
|
||||
arrayItemCnt);
|
||||
}
|
||||
else
|
||||
{
|
||||
output += StringHelper::Sprintf("%s %s[] = {\n", varType.c_str(), varName.c_str());
|
||||
}
|
||||
|
||||
output += text + "\n";
|
||||
}
|
||||
|
@ -145,16 +145,16 @@ std::string Declaration::GetExternalDeclarationStr() const
|
|||
output += "static ";
|
||||
}
|
||||
|
||||
if (arrayItemCntStr != "")
|
||||
if (arrayItemCntStr != "" && (IsStatic() || forceArrayCnt))
|
||||
output += StringHelper::Sprintf("%s %s[%s] = ", varType.c_str(), varName.c_str(),
|
||||
arrayItemCntStr.c_str());
|
||||
else if (arrayItemCnt != 0 && (IsStatic() || forceArrayCnt))
|
||||
output +=
|
||||
StringHelper::Sprintf("%s %s[%s] = {\n#include \"%s\"\n};", varType.c_str(),
|
||||
varName.c_str(), arrayItemCntStr.c_str(), includePath.c_str());
|
||||
else if (arrayItemCnt != 0)
|
||||
output += StringHelper::Sprintf("%s %s[%i] = {\n#include \"%s\"\n};", varType.c_str(),
|
||||
varName.c_str(), arrayItemCnt, includePath.c_str());
|
||||
StringHelper::Sprintf("%s %s[%i] = ", varType.c_str(), varName.c_str(), arrayItemCnt);
|
||||
else
|
||||
output += StringHelper::Sprintf("%s %s[] = {\n#include \"%s\"\n};", varType.c_str(),
|
||||
varName.c_str(), includePath.c_str());
|
||||
output += StringHelper::Sprintf("%s %s[] = ", varType.c_str(), varName.c_str());
|
||||
|
||||
output += StringHelper::Sprintf("{\n#include \"%s\"\n};", includePath.c_str());
|
||||
|
||||
if (rightText != "")
|
||||
output += " " + rightText + "";
|
||||
|
@ -178,14 +178,16 @@ std::string Declaration::GetExternStr() const
|
|||
|
||||
if (isArray)
|
||||
{
|
||||
if (arrayItemCntStr != "")
|
||||
if (arrayItemCntStr != "" && (IsStatic() || forceArrayCnt))
|
||||
{
|
||||
return StringHelper::Sprintf("extern %s %s[%s];\n", varType.c_str(), varName.c_str(),
|
||||
arrayItemCntStr.c_str());
|
||||
}
|
||||
else if (arrayItemCnt != 0)
|
||||
else if (arrayItemCnt != 0 && (IsStatic() || forceArrayCnt))
|
||||
{
|
||||
return StringHelper::Sprintf("extern %s %s[%i];\n", varType.c_str(), varName.c_str(),
|
||||
arrayItemCnt);
|
||||
}
|
||||
else
|
||||
return StringHelper::Sprintf("extern %s %s[];\n", varType.c_str(), varName.c_str());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue