ZAPD Update (#2851)
* git subrepo clone --force --branch=rebase2 C:/ZeldaStuff/ZAPDTR ZAPDTR/ subrepo: subdir: "ZAPDTR" merged: "6aa54a551" upstream: origin: "C:/ZeldaStuff/ZAPDTR" branch: "rebase2" commit: "6aa54a551" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * git subrepo clone --force --branch=rebase2 C:/ZeldaStuff/ZAPDTR ZAPDTR/ subrepo: subdir: "ZAPDTR" merged: "88b012240" upstream: origin: "C:/ZeldaStuff/ZAPDTR" branch: "rebase2" commit: "88b012240" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Update (its broken) * fix the enum * git subrepo push --remote=C:/ZeldaStuff/ZAPDTR/ ZAPDTR subrepo: subdir: "ZAPDTR" merged: "b7b6e1c82" upstream: origin: "C:/ZeldaStuff/ZAPDTR/" branch: "rebase2" commit: "b7b6e1c82" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * New names for LUS actions * git subrepo push --remote=C:/ZeldaStuff/ZAPDTR/ ZAPDTR subrepo: subdir: "ZAPDTR" merged: "c5cfebeee" upstream: origin: "C:/ZeldaStuff/ZAPDTR/" branch: "rebase2" commit: "c5cfebeee" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * git subrepo clone (merge) --force --branch=rebase2 C:/ZeldaStuff/ZAPDTR ZAPDTR/ subrepo: subdir: "ZAPDTR" merged: "d5f4769b8" upstream: origin: "C:/ZeldaStuff/ZAPDTR" branch: "rebase2" commit: "d5f4769b8" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Fix missing commands in the exporter. * Cleanups. * git subrepo pull --force --remote=https://github.com/harbourmasters/ZAPDTR --branch=master ZAPDTR subrepo: subdir: "ZAPDTR" merged: "d4c35b90a" upstream: origin: "https://github.com/harbourmasters/ZAPDTR" branch: "master" commit: "d4c35b90a" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Add unordered_map include to fix MacOS * fix string_view * Update Main.cpp * fix string view * So close I can almost taste it * So close * Fix missed git marker. * Fix surface types and * Update ZFile.cpp * Delete Jenkinsfile --------- Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
This commit is contained in:
@@ -224,7 +224,12 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename)
|
||||
// Check for repeated attributes.
|
||||
if (offsetXml != nullptr)
|
||||
{
|
||||
rawDataIndex = strtol(StringHelper::Split(std::string(offsetXml), "0x")[1].c_str(), NULL, 16);
|
||||
if (!StringHelper::IsValidOffset(std::string_view(offsetXml)))
|
||||
{
|
||||
HANDLE_ERROR(WarningType::InvalidXML,
|
||||
StringHelper::Sprintf("Invalid offset %s entered", offsetXml), "");
|
||||
}
|
||||
rawDataIndex = strtol(offsetXml, NULL, 16);
|
||||
|
||||
if (offsetSet.find(offsetXml) != offsetSet.end())
|
||||
{
|
||||
@@ -433,7 +438,7 @@ void ZFile::AddResource(ZResource* res)
|
||||
resources.push_back(res);
|
||||
}
|
||||
|
||||
ZResource* ZFile::FindResource(uint32_t rawDataIndex)
|
||||
ZResource* ZFile::FindResource(offset_t rawDataIndex)
|
||||
{
|
||||
for (ZResource* res : resources)
|
||||
{
|
||||
@@ -447,6 +452,7 @@ ZResource* ZFile::FindResource(uint32_t rawDataIndex)
|
||||
std::vector<ZResource*> ZFile::GetResourcesOfType(ZResourceType resType)
|
||||
{
|
||||
std::vector<ZResource*> resList;
|
||||
resList.reserve(resources.size());
|
||||
|
||||
for (ZResource* res : resources)
|
||||
{
|
||||
@@ -722,7 +728,7 @@ bool ZFile::GetDeclarationArrayIndexedName(segptr_t segAddress, size_t elementSi
|
||||
return true;
|
||||
}
|
||||
|
||||
Declaration* ZFile::GetDeclaration(uint32_t address) const
|
||||
Declaration* ZFile::GetDeclaration(offset_t address) const
|
||||
{
|
||||
if (declarations.find(address) != declarations.end())
|
||||
return declarations.at(address);
|
||||
@@ -730,7 +736,7 @@ Declaration* ZFile::GetDeclaration(uint32_t address) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Declaration* ZFile::GetDeclarationRanged(uint32_t address) const
|
||||
Declaration* ZFile::GetDeclarationRanged(offset_t address) const
|
||||
{
|
||||
for (const auto decl : declarations)
|
||||
{
|
||||
@@ -741,7 +747,7 @@ Declaration* ZFile::GetDeclarationRanged(uint32_t address) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool ZFile::HasDeclaration(uint32_t address)
|
||||
bool ZFile::HasDeclaration(offset_t address)
|
||||
{
|
||||
assert(GETSEGNUM(address) == 0);
|
||||
return declarations.find(address) != declarations.end();
|
||||
@@ -805,9 +811,14 @@ void ZFile::GenerateSourceFiles()
|
||||
void ZFile::GenerateSourceHeaderFiles()
|
||||
{
|
||||
OutputFormatter formatter;
|
||||
std::string guard = outName.stem().string();
|
||||
|
||||
std::transform(guard.begin(), guard.end(), guard.begin(), ::toupper);
|
||||
formatter.Write("#pragma once\n\n");
|
||||
formatter.Write(
|
||||
StringHelper::Sprintf("#ifndef %s_H\n#define %s_H 1\n\n", guard.c_str(), guard.c_str()));
|
||||
formatter.Write("#include \"align_asset_macro.h\"\n");
|
||||
|
||||
std::set<std::string> nameSet;
|
||||
for (ZResource* res : resources)
|
||||
{
|
||||
@@ -827,6 +838,8 @@ void ZFile::GenerateSourceHeaderFiles()
|
||||
|
||||
formatter.Write(ProcessExterns());
|
||||
|
||||
formatter.Write("#endif\n");
|
||||
|
||||
fs::path headerFilename = GetSourceOutputFolderPath() / outName.stem().concat(".h");
|
||||
|
||||
if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_INFO)
|
||||
@@ -1244,6 +1257,10 @@ void ZFile::HandleUnaccountedData()
|
||||
uint32_t lastSize = 0;
|
||||
std::vector<offset_t> declsAddresses;
|
||||
|
||||
if (Globals::Instance->otrMode)
|
||||
return;
|
||||
|
||||
declsAddresses.reserve(declarations.size());
|
||||
if (Globals::Instance->otrMode)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user