mirror of
https://github.com/zeldaret/oot.git
synced 2025-01-16 13:36:57 +00:00
588de66d06
subrepo: subdir: "tools/ZAPD" merged: "2e1174063" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "2e1174063" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
123 lines
1.6 KiB
C++
123 lines
1.6 KiB
C++
#include "ZResource.h"
|
|
|
|
using namespace std;
|
|
|
|
ZResource::ZResource()
|
|
{
|
|
parent = nullptr;
|
|
name = "";
|
|
outName = "";
|
|
relativePath = "";
|
|
sourceOutput = "";
|
|
rawData = vector<uint8_t>();
|
|
rawDataIndex = 0;
|
|
outputDeclaration = true;
|
|
}
|
|
|
|
void ZResource::ParseXML(tinyxml2::XMLElement* reader)
|
|
{
|
|
name = reader->Attribute("Name");
|
|
|
|
if (reader->Attribute("OutName") != nullptr)
|
|
outName = reader->Attribute("OutName");
|
|
else
|
|
outName = name;
|
|
}
|
|
|
|
void ZResource::Save(const std::string& outFolder)
|
|
{
|
|
|
|
}
|
|
|
|
void ZResource::PreGenSourceFiles()
|
|
{
|
|
}
|
|
|
|
string ZResource::GetName()
|
|
{
|
|
return name;
|
|
}
|
|
|
|
std::string ZResource::GetOutName()
|
|
{
|
|
return outName;
|
|
}
|
|
|
|
void ZResource::SetName(string nName)
|
|
{
|
|
name = std::move(nName);
|
|
}
|
|
|
|
bool ZResource::IsExternalResource()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool ZResource::DoesSupportArray()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
std::string ZResource::GetExternalExtension()
|
|
{
|
|
return "";
|
|
}
|
|
|
|
string ZResource::GetRelativePath()
|
|
{
|
|
return relativePath;
|
|
}
|
|
|
|
vector<uint8_t> ZResource::GetRawData()
|
|
{
|
|
return rawData;
|
|
}
|
|
|
|
int ZResource::GetRawDataIndex()
|
|
{
|
|
return rawDataIndex;
|
|
}
|
|
|
|
int ZResource::GetRawDataSize()
|
|
{
|
|
return rawData.size();
|
|
}
|
|
|
|
void ZResource::SetRawDataIndex(int value)
|
|
{
|
|
rawDataIndex = value;
|
|
}
|
|
|
|
string ZResource::GetSourceOutputCode(const std::string& prefix)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
string ZResource::GetSourceOutputHeader(const std::string& prefix)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
void ZResource::ParseRawData()
|
|
{
|
|
}
|
|
|
|
void ZResource::GenerateHLIntermediette(HLFileIntermediette& hlFile)
|
|
{
|
|
|
|
}
|
|
|
|
std::string ZResource::GetSourceTypeName()
|
|
{
|
|
return "";
|
|
}
|
|
|
|
ZResourceType ZResource::GetResourceType()
|
|
{
|
|
return ZResourceType::Error;
|
|
}
|
|
|
|
void ZResource::CalcHash()
|
|
{
|
|
hash = 0;
|
|
}
|