mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 17:00:19 +00:00
git subrepo pull --force tools/ZAPD (#1251)
subrepo: subdir: "tools/ZAPD" merged: "f54f2fa96" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "f54f2fa96" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
This commit is contained in:
parent
0a95d17aa8
commit
5015af4c57
39 changed files with 3382 additions and 3094 deletions
|
@ -406,7 +406,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)
|
||||
{
|
||||
|
@ -695,7 +695,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);
|
||||
|
@ -703,7 +703,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)
|
||||
{
|
||||
|
@ -714,7 +714,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();
|
||||
|
@ -776,6 +776,11 @@ void ZFile::GenerateSourceHeaderFiles()
|
|||
{
|
||||
OutputFormatter formatter;
|
||||
|
||||
std::string objectNameUpper = StringHelper::ToUpper(GetName());
|
||||
|
||||
formatter.Write(StringHelper::Sprintf("#ifndef %s_H\n#define %s_H 1\n\n",
|
||||
objectNameUpper.c_str(), objectNameUpper.c_str()));
|
||||
|
||||
for (ZResource* res : resources)
|
||||
{
|
||||
std::string resSrc = res->GetSourceOutputHeader("");
|
||||
|
@ -792,6 +797,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue