1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-14 19:10:25 +00:00

Updated to use latest version of ZAPD (#777)

* Updated config file

* Added missing files

* Temporarily removed asm_processor changes.

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "96ffc1e62"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "96ffc1e62"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "179af7d11"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "179af7d11"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* Cleanup and fixes.

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "50ad2fe78"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "50ad2fe78"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* Makefile fix

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "b9120803e"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "b9120803e"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
This commit is contained in:
Nicholas Estelami 2021-04-30 17:23:22 -04:00 committed by GitHub
parent 6e58354c71
commit 0432011bd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
141 changed files with 7843 additions and 4338 deletions

View file

@ -3,7 +3,9 @@
#include "StringHelper.h"
#include "ZFile.h"
ZVtx::ZVtx()
REGISTER_ZFILENODE(Vtx, ZVtx);
ZVtx::ZVtx(ZFile* nParent) : ZResource(nParent)
{
x = 0;
y = 0;
@ -32,8 +34,12 @@ std::string ZVtx::GetSourceOutputCode(const std::string& prefix)
StringHelper::Sprintf("VTX(%i, %i, %i, %i, %i, %i, %i, %i, %i)", x, y, z, s, t, r, g, b, a);
if (parent != nullptr)
parent->AddDeclaration(rawDataIndex, DeclarationAlignment::Align16, GetRawDataSize(),
GetSourceTypeName(), name, output);
{
Declaration* decl =
parent->AddDeclaration(rawDataIndex, DeclarationAlignment::Align16, GetRawDataSize(),
GetSourceTypeName(), name, output);
decl->isExternal = true;
}
return "";
}
@ -54,7 +60,7 @@ void ZVtx::ParseRawData()
a = data[rawDataIndex + 15];
}
int ZVtx::GetRawDataSize()
size_t ZVtx::GetRawDataSize()
{
return 16;
}
@ -69,13 +75,18 @@ ZResourceType ZVtx::GetResourceType()
return ZResourceType::Vertex;
}
ZVtx* ZVtx::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData,
const int rawDataIndex, const std::string& nRelPath)
bool ZVtx::IsExternalResource()
{
ZVtx* vtx = new ZVtx();
vtx->rawData = nRawData;
vtx->rawDataIndex = rawDataIndex;
vtx->ParseRawData();
return vtx;
return true;
}
std::string ZVtx::GetExternalExtension()
{
return "vtx";
}
void ZVtx::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData,
const uint32_t nRawDataIndex, const std::string& nRelPath)
{
ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath);
}