1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-14 02:49:16 +00:00
oot/tools/ZAPD/ZAPD/ZResource.cpp
fig02 1ff2f0f849
ZAPD update (#612)
* remove roompoly

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "fd4d53a26"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "fd4d53a26"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
2021-01-08 19:38:28 -05:00

110 lines
1.5 KiB
C++

#include "ZResource.h"
using namespace std;
ZResource::ZResource()
{
parent = nullptr;
name = "";
outName = "";
relativePath = "";
sourceOutput = "";
rawData = vector<uint8_t>();
rawDataIndex = 0;
outputDeclaration = true;
arrayCnt = -1;
}
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;
}
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::GenerateHLIntermediette(HLFileIntermediette& hlFile)
{
}
ZResourceType ZResource::GetResourceType()
{
return ZResourceType::Error;
}
void ZResource::CalcHash()
{
hash = 0;
}