mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-11 01:10:33 +00:00
Update ZAPD (#1001)
* remove fake match * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "3e9ed72e2" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "3e9ed72e2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * new extraction script and a hack to make clear tag work * fix clear tag again * remove static from clear tag DLists * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "e7a8a48cf" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "e7a8a48cf" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "e243634e5" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "e243634e5" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "d0cd6b397" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "d0cd6b397" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Update ovl_En_Clear_Tag.xml
This commit is contained in:
parent
ed487b4bb8
commit
750c0cab35
272 changed files with 7790 additions and 58414 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "ZMtx.h"
|
||||
#include "BitConverter.h"
|
||||
#include "StringHelper.h"
|
||||
|
||||
#include "Utils/BitConverter.h"
|
||||
#include "Utils/StringHelper.h"
|
||||
#include "ZFile.h"
|
||||
|
||||
REGISTER_ZFILENODE(Mtx, ZMtx);
|
||||
|
@ -9,13 +10,6 @@ ZMtx::ZMtx(ZFile* nParent) : ZResource(nParent)
|
|||
{
|
||||
}
|
||||
|
||||
ZMtx::ZMtx(const std::string& prefix, uint32_t nRawDataIndex, ZFile* nParent) : ZResource(nParent)
|
||||
{
|
||||
name = GetDefaultName(prefix.c_str(), rawDataIndex);
|
||||
ExtractFromFile(nRawDataIndex);
|
||||
DeclareVar("", "");
|
||||
}
|
||||
|
||||
void ZMtx::ParseRawData()
|
||||
{
|
||||
ZResource::ParseRawData();
|
||||
|
@ -26,29 +20,12 @@ void ZMtx::ParseRawData()
|
|||
mtx[i][j] = BitConverter::ToInt32BE(rawData, rawDataIndex + (i * 4 + j) * 4);
|
||||
}
|
||||
|
||||
void ZMtx::ExtractFromXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex)
|
||||
{
|
||||
ZResource::ExtractFromXML(reader, nRawDataIndex);
|
||||
DeclareVar("", "");
|
||||
}
|
||||
|
||||
size_t ZMtx::GetRawDataSize() const
|
||||
{
|
||||
return 64;
|
||||
}
|
||||
|
||||
void ZMtx::DeclareVar(const std::string& prefix, const std::string& bodyStr) const
|
||||
{
|
||||
std::string auxName = name;
|
||||
|
||||
if (name == "")
|
||||
auxName = GetDefaultName(prefix, rawDataIndex);
|
||||
|
||||
parent->AddDeclaration(rawDataIndex, DeclarationAlignment::Align8, GetRawDataSize(),
|
||||
GetSourceTypeName(), auxName, bodyStr);
|
||||
}
|
||||
|
||||
std::string ZMtx::GetBodySourceCode()
|
||||
std::string ZMtx::GetBodySourceCode() const
|
||||
{
|
||||
std::string bodyStr = "\n";
|
||||
|
||||
|
@ -65,25 +42,6 @@ std::string ZMtx::GetBodySourceCode()
|
|||
return bodyStr;
|
||||
}
|
||||
|
||||
std::string ZMtx::GetSourceOutputCode(const std::string& prefix)
|
||||
{
|
||||
std::string bodyStr = GetBodySourceCode();
|
||||
|
||||
Declaration* decl = parent->GetDeclaration(rawDataIndex);
|
||||
|
||||
if (decl == nullptr)
|
||||
DeclareVar(prefix, bodyStr);
|
||||
else
|
||||
decl->text = bodyStr;
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string ZMtx::GetDefaultName(const std::string& prefix, uint32_t address)
|
||||
{
|
||||
return StringHelper::Sprintf("%sMtx_%06X", prefix.c_str(), address);
|
||||
}
|
||||
|
||||
std::string ZMtx::GetSourceTypeName() const
|
||||
{
|
||||
return "Mtx";
|
||||
|
@ -93,3 +51,8 @@ ZResourceType ZMtx::GetResourceType() const
|
|||
{
|
||||
return ZResourceType::Mtx;
|
||||
}
|
||||
|
||||
DeclarationAlignment ZMtx::GetDeclarationAlignment() const
|
||||
{
|
||||
return DeclarationAlignment::Align8;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue