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

git subrepo pull --force tools/ZAPD (#718)

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "4bf6600a3"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "4bf6600a3"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
This commit is contained in:
fig02 2021-03-14 11:40:25 -04:00 committed by GitHub
parent 8a730123b6
commit 42af56b231
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 1854 additions and 445 deletions

View file

@ -2,64 +2,40 @@
#include <vector>
#include <string>
#include <stdint.h>
#include <cstdint>
#include "ZFile.h"
enum class ZLimbType
{
Standard,
LOD
};
struct ZLimbStandard : public ZResource
{
uint32_t address;
std::string name;
int16_t transX, transY, transZ;
uint8_t childIndex, siblingIndex;
uint32_t dListPtr;
std::vector<ZLimbStandard*> children;
ZLimbStandard();
static ZLimbStandard* FromXML(tinyxml2::XMLElement* reader, std::vector<uint8_t> nRawData, int rawDataIndex, std::string nRelPath, ZFile* parent);
static ZLimbStandard* FromRawData(std::vector<uint8_t> nRawData, int rawDataIndex);
std::string GetSourceOutputCode(const std::string& prefix) override;
int GetRawDataSize() override;
};
struct ZLimbLOD : ZLimbStandard
{
uint32_t farDListPtr;
ZLimbLOD();
//static ZLimbLOD* FromXML(tinyxml2::XMLElement* reader, std::vector<uint8_t> nRawData, int rawDataIndex, std::string nRelPath, ZFile* parent);
static ZLimbLOD* FromRawData(std::vector<uint8_t> nRawData, int rawDataIndex);
std::string GetSourceOutputCode(const std::string& prefix) override;
int GetRawDataSize() override;
};
#include "ZDisplayList.h"
#include "ZLimb.h"
enum ZSkeletonType
{
Normal,
Flex,
Skin
Flex
};
class ZSkeleton : public ZResource
{
public:
ZSkeletonType type;
std::vector<ZLimbStandard*> limbs;
ZLimbStandard* rootLimb;
ZSkeletonType type = ZSkeletonType::Normal;
ZLimbType limbType = ZLimbType::Standard;
std::vector<ZLimb*> limbs;
segptr_t limbsArrayAddress;
uint8_t limbCount;
uint8_t dListCount; // FLEX SKELETON ONLY
ZSkeleton();
virtual void GenerateHLIntermediette(HLFileIntermediette& hlFile);
ZSkeleton(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, int nRawDataIndex, ZFile* nParent);
~ZSkeleton();
void ParseXML(tinyxml2::XMLElement* reader) override;
void ParseRawData() override;
static ZSkeleton* FromXML(tinyxml2::XMLElement* reader, std::vector<uint8_t> nRawData, int rawDataIndex, std::string nRelPath, ZFile* nParent);
void Save(const std::string& outFolder) override;
void GenerateHLIntermediette(HLFileIntermediette& hlFile) override;
int GetRawDataSize() override;
std::string GetSourceOutputCode(const std::string& prefix) override;
std::string GetSourceTypeName() override;
ZResourceType GetResourceType() override;
std::string GetSourceOutputCode(const std::string& prefix) override;
segptr_t GetAddress();
};