mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-28 18:30:44 -04:00
Subrepos update (#613)
* a
* git subrepo pull tools/asm-differ --force
subrepo:
subdir: "tools/asm-differ"
merged: "6f8f80b71"
upstream:
origin: "https://github.com/simonlindholm/asm-differ"
branch: "main"
commit: "6f8f80b71"
git-subrepo:
version: "0.4.3"
origin: "https://github.com/ingydotnet/git-subrepo.git"
commit: "2f68596"
* git subrepo pull tools/z64compress --force
subrepo:
subdir: "tools/z64compress"
merged: "9e7a6dbfa"
upstream:
origin: "https://github.com/z64me/z64compress.git"
branch: "main"
commit: "9e7a6dbfa"
git-subrepo:
version: "0.4.3"
origin: "https://github.com/ingydotnet/git-subrepo.git"
commit: "2f68596"
* git subrepo pull tools/ZAPD --force
subrepo:
subdir: "tools/ZAPD"
merged: "bf16ff7c4"
upstream:
origin: "https://github.com/zeldaret/ZAPD.git"
branch: "master"
commit: "bf16ff7c4"
git-subrepo:
version: "0.4.3"
origin: "https://github.com/ingydotnet/git-subrepo.git"
commit: "2f68596"
* Revert "git subrepo pull tools/z64compress --force"
This reverts commit a7cc87394e.
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
#include "ZPointer.h"
|
||||
|
||||
#include "Globals.h"
|
||||
#include "Utils/BitConverter.h"
|
||||
#include "Utils/StringHelper.h"
|
||||
#include "WarningHandler.h"
|
||||
#include "ZFile.h"
|
||||
|
||||
REGISTER_ZFILENODE(Pointer, ZPointer);
|
||||
|
||||
ZPointer::ZPointer(ZFile* nParent) : ZResource(nParent)
|
||||
{
|
||||
RegisterRequiredAttribute("Type");
|
||||
}
|
||||
|
||||
void ZPointer::ParseXML(tinyxml2::XMLElement* reader)
|
||||
{
|
||||
ZResource::ParseXML(reader);
|
||||
|
||||
type = registeredAttributes.at("Type").value;
|
||||
}
|
||||
|
||||
void ZPointer::ParseRawData()
|
||||
{
|
||||
auto& rawData = parent->GetRawData();
|
||||
|
||||
ptr = BitConverter::ToUInt32BE(rawData, rawDataIndex);
|
||||
}
|
||||
|
||||
std::string ZPointer::GetBodySourceCode() const
|
||||
{
|
||||
std::string ptrName;
|
||||
|
||||
Globals::Instance->GetSegmentedPtrName(ptr, parent, "", ptrName);
|
||||
|
||||
return ptrName;
|
||||
}
|
||||
|
||||
bool ZPointer::DoesSupportArray() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string ZPointer::GetSourceTypeName() const
|
||||
{
|
||||
return type + "*";
|
||||
}
|
||||
|
||||
ZResourceType ZPointer::GetResourceType() const
|
||||
{
|
||||
return ZResourceType::Pointer;
|
||||
}
|
||||
|
||||
size_t ZPointer::GetRawDataSize() const
|
||||
{
|
||||
return 0x04;
|
||||
}
|
||||
Reference in New Issue
Block a user