mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-15 06:06:04 +00:00
750c0cab35
* 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
58 lines
987 B
C++
58 lines
987 B
C++
#include "ZMtx.h"
|
|
|
|
#include "Utils/BitConverter.h"
|
|
#include "Utils/StringHelper.h"
|
|
#include "ZFile.h"
|
|
|
|
REGISTER_ZFILENODE(Mtx, ZMtx);
|
|
|
|
ZMtx::ZMtx(ZFile* nParent) : ZResource(nParent)
|
|
{
|
|
}
|
|
|
|
void ZMtx::ParseRawData()
|
|
{
|
|
ZResource::ParseRawData();
|
|
|
|
const auto& rawData = parent->GetRawData();
|
|
for (size_t i = 0; i < 4; ++i)
|
|
for (size_t j = 0; j < 4; ++j)
|
|
mtx[i][j] = BitConverter::ToInt32BE(rawData, rawDataIndex + (i * 4 + j) * 4);
|
|
}
|
|
|
|
size_t ZMtx::GetRawDataSize() const
|
|
{
|
|
return 64;
|
|
}
|
|
|
|
std::string ZMtx::GetBodySourceCode() const
|
|
{
|
|
std::string bodyStr = "\n";
|
|
|
|
for (const auto& row : mtx)
|
|
{
|
|
bodyStr += " ";
|
|
|
|
for (int32_t val : row)
|
|
bodyStr += StringHelper::Sprintf("%-11i, ", val);
|
|
|
|
bodyStr += "\n";
|
|
}
|
|
|
|
return bodyStr;
|
|
}
|
|
|
|
std::string ZMtx::GetSourceTypeName() const
|
|
{
|
|
return "Mtx";
|
|
}
|
|
|
|
ZResourceType ZMtx::GetResourceType() const
|
|
{
|
|
return ZResourceType::Mtx;
|
|
}
|
|
|
|
DeclarationAlignment ZMtx::GetDeclarationAlignment() const
|
|
{
|
|
return DeclarationAlignment::Align8;
|
|
}
|