mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-13 17:07:44 +00:00
* git subrepo pull --force tools/ZAPD
subrepo:
subdir: "tools/ZAPD"
merged: "b3bfa14cf"
upstream:
origin: "https://github.com/zeldaret/ZAPD.git"
branch: "master"
commit: "b3bfa14cf"
git-subrepo:
version: "0.4.6"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "110b9eb"
* use CS_FLOAT
* update csdis
* update committed csdata
* finish updating csdis.py
* add script to reextract committed csdata
* dont use asm-processor, use iconv for reencoding utf8 to eucjp
* remove asm-processor csdata usage remnants
* --cs-float hex
* delete tempfile at end of reencode.sh (may want to rm even if compilation fails though?)
* comment reencode.sh
* comment CMD_F
* do not break permuter guessing compile command, by not reencode.sh-wrapping compilation under PERMUTER (thanks anghelo)
* fix the permuter fix
* pad -> sBssDummyNeg1
* reencode.sh: rm tempfile on script exit (including on error)
* renumber sBssDummy vars in zcolchk from 0
* Revert "--cs-float hex"
This reverts commit 85267dc348
.
* Revert BSS changes
* Add linemarker to reencoded files for better error message
* fix audio/general.c bss
* make reencode.sh work on macOS
* touch up csdis, csdis_re
---------
Co-authored-by: cadmic <cadmic24@gmail.com>
121 lines
2.4 KiB
C++
121 lines
2.4 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
#include "ZFile.h"
|
|
|
|
class ZKeyFrameLimb;
|
|
|
|
struct Vec3s
|
|
{
|
|
int16_t x;
|
|
int16_t y;
|
|
int16_t z;
|
|
};
|
|
|
|
enum class ZKeyframeSkelType
|
|
{
|
|
Normal,
|
|
Flex,
|
|
Error,
|
|
};
|
|
|
|
class ZKeyFrameLimbList : public ZResource
|
|
{
|
|
public:
|
|
ZKeyFrameLimbList();
|
|
ZKeyFrameLimbList(ZFile* nParent);
|
|
ZKeyFrameLimbList(ZFile* nParent, uint32_t limbCount, ZKeyframeSkelType type);
|
|
|
|
~ZKeyFrameLimbList();
|
|
|
|
void ParseRawData() override;
|
|
|
|
std::string GetBodySourceCode() const override;
|
|
void ParseXML(tinyxml2::XMLElement* reader) override;
|
|
|
|
std::string GetSourceTypeName() const override;
|
|
ZResourceType GetResourceType() const override;
|
|
|
|
size_t GetRawDataSize() const override;
|
|
|
|
static ZKeyframeSkelType ParseLimbTypeStr(const std::string& typeStr);
|
|
|
|
std::vector<ZKeyFrameLimb*> limbs;
|
|
ZKeyframeSkelType limbType;
|
|
uint8_t numLimbs;
|
|
};
|
|
|
|
class ZKeyFrameLimb : public ZResource
|
|
{
|
|
public:
|
|
segptr_t dlist;
|
|
uint8_t numChildren;
|
|
uint8_t flags;
|
|
|
|
ZKeyFrameLimb(ZFile* nParent);
|
|
void ParseRawData() override;
|
|
};
|
|
|
|
class ZKeyFrameStandardLimb : public ZKeyFrameLimb
|
|
{
|
|
public:
|
|
Vec3s translation;
|
|
|
|
ZKeyFrameStandardLimb(ZFile* nParent);
|
|
void ParseRawData() override;
|
|
|
|
std::string GetBodySourceCode() const override;
|
|
|
|
|
|
std::string GetSourceTypeName() const override;
|
|
ZResourceType GetResourceType() const override;
|
|
|
|
size_t GetRawDataSize() const override;
|
|
};
|
|
|
|
class ZKeyFrameFlexLimb : public ZKeyFrameLimb
|
|
{
|
|
public:
|
|
uint8_t callbackIndex;
|
|
|
|
ZKeyFrameFlexLimb(ZFile* nParent);
|
|
// void ParseXML(tinyxml2::XMLElement* reader) override;
|
|
void ParseRawData() override;
|
|
|
|
std::string GetBodySourceCode() const override;
|
|
|
|
// std::string GetSourceOutputHeader(const std::string& prefix) override;
|
|
|
|
std::string GetSourceTypeName() const override;
|
|
ZResourceType GetResourceType() const override;
|
|
|
|
size_t GetRawDataSize() const override;
|
|
};
|
|
|
|
class ZKeyFrameSkel : public ZResource
|
|
{
|
|
public:
|
|
std::unique_ptr<ZKeyFrameLimbList> limbList;
|
|
segptr_t limbsPtr;
|
|
ZKeyframeSkelType limbType;
|
|
uint8_t limbCount;
|
|
uint8_t dListCount;
|
|
|
|
ZKeyFrameSkel(ZFile* nParent);
|
|
~ZKeyFrameSkel();
|
|
|
|
void ParseXML(tinyxml2::XMLElement* reader) override;
|
|
void ParseRawData() override;
|
|
void DeclareReferences(const std::string& prefix) override;
|
|
|
|
std::string GetBodySourceCode() const override;
|
|
|
|
std::string GetSourceTypeName() const override;
|
|
ZResourceType GetResourceType() const override;
|
|
|
|
size_t GetRawDataSize() const override;
|
|
};
|