1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-02 17:44:25 +00:00
oot/tools/ZAPD/ZAPD/ZSkeleton.h
fig02 588de66d06
git subrepo pull --force tools/ZAPD (#653)
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"
2021-01-22 16:25:08 -05:00

65 lines
1.7 KiB
C++

#pragma once
#include <vector>
#include <string>
#include <stdint.h>
#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;
};
enum ZSkeletonType
{
Normal,
Flex,
Skin
};
class ZSkeleton : public ZResource
{
public:
ZSkeletonType type;
std::vector<ZLimbStandard*> limbs;
ZLimbStandard* rootLimb;
uint8_t dListCount; // FLEX SKELETON ONLY
ZSkeleton();
virtual void GenerateHLIntermediette(HLFileIntermediette& hlFile);
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;
ZResourceType GetResourceType() override;
std::string GetSourceOutputCode(const std::string& prefix) override;
};