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.
This commit is contained in:
Christopher Leggett 2022-10-23 04:04:20 -04:00 committed by GitHub
commit 60c9e869e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 2 deletions

View file

@ -91,8 +91,17 @@ static void ExporterProgramEnd()
otrArchive = Ship::Archive::CreateArchive(otrFileName, 40000);
for (auto item : files) {
std::string fName = item.first;
if (fName.find("gTitleZeldaShieldLogoMQTex") != std::string::npos && !ZRom(romPath).IsMQ())
{
size_t pos = 0;
if ((pos = fName.find("gTitleZeldaShieldLogoMQTex", 0)) != std::string::npos)
{
fName.replace(pos, 27, "gTitleZeldaShieldLogoTex");
}
}
auto fileData = item.second;
otrArchive->AddFile(item.first, (uintptr_t)fileData.data(),
otrArchive->AddFile(fName, (uintptr_t)fileData.data(),
fileData.size());
}