summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Leggett <chris@leggett.dev>2022-10-23 04:04:20 -0400
committerGitHub <noreply@github.com>2022-10-23 04:04:20 -0400
commitfa5bfdf44a077374e83bf7ade42c4da264e9f658 (patch)
tree44ae6470f3b1768e31d8e874e6a91591c1017d68
parent08def1a820757570e62a56ab47455bd61bcb866f (diff)
Ensures MQ and Vanilla title Logos are saved with different names. (#1788)
This way either one can be loaded according to which OTR/whether or not MQ is enabled.
-rw-r--r--ZAPD/ZResource.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/ZAPD/ZResource.cpp b/ZAPD/ZResource.cpp
index d5c76ba..9afd704 100644
--- a/ZAPD/ZResource.cpp
+++ b/ZAPD/ZResource.cpp
@@ -362,6 +362,28 @@ static const char %s[] __attribute__((aligned (2))) = d%s;
}
}
+ if (name == "gTitleZeldaShieldLogoMQTex")
+ {
+ std::string addName = "gTitleZeldaShieldLogoTex";
+ nameStr = StringHelper::Strip(StringHelper::Strip(addName, "\n"), "\r");
+ str += StringHelper::Sprintf("\n#define d%s \"__OTR__%s/%s/%s\"", addName.c_str(), prefix.c_str(), outName.c_str(), nameStr.c_str());
+ if (nameSet && nameSet->find(addName) == nameSet->end())
+ {
+ str += StringHelper::Sprintf(R"(
+#ifdef _WIN32
+static const __declspec(align(2)) char %s[] = d%s;
+#else
+static const char %s[] __attribute__((aligned (2))) = d%s;
+#endif
+ )", addName.c_str(), addName.c_str(), addName.c_str(), addName.c_str());
+
+ if (nameSet)
+ {
+ nameSet->insert(addName);
+ }
+ }
+ }
+
return str;
}
else