mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-13 12:59:59 +00:00
9b67778a00
* git subrepo pull (merge) tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "945e6ca1a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "50242eca9" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Fix extract_assets.py multithreading * Update binutils doc a bit * Remove * import, add multiprocessing option and way to pass arguments to ZAPD * Update format.sh to be more platform-independent * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "fd5a7f434" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "fd5a7f434" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Remove ; * Update formatting script to not just use 11 * Add Python requirements, move the Mac stuff in the README into its own doc * Fix readme link * Minor format thing * . * Move ZAPDArgs into its own function * Update readme and remove requirements.txt * Dragorn-inspired rewrite of processZAPDArgs * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "a0d3f7b68" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "a0d3f7b68" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Fix function definition * Building docs overhaul * Add Python packages to Mac and Cygwin * Heading number * format format.sh (!) * Replace "currently" * Remove Debian * git subrepo pull (merge) --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "0ba781304" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "0ba781304" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
57 lines
997 B
C++
57 lines
997 B
C++
#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;
|
|
}
|