1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-24 18:04:20 +00:00
oot/tools/ZAPD/ZAPD/ZSkeleton.h
fig02 ba0c6965ca
Remove submodule and use subrepo for ZAPD (#591)
* remove zap

* git subrepo clone https://github.com/zeldaret/ZAPD.git tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "cd4a8760b"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "cd4a8760b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* remove thanks.md

* zap2 -> zapd and spec changes

* remove submodule init
2021-01-01 23:24:29 -05:00

64 lines
No EOL
1.6 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(std::string prefix);
virtual int GetRawDataSize();
};
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(std::string prefix);
virtual int GetRawDataSize();
};
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(std::string outFolder);
std::string GetSourceOutputCode(std::string prefix);
};