summaryrefslogtreecommitdiff
path: root/ZAPD/ZLimb.h
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2022-01-20 23:47:57 -0300
committerGitHub <noreply@github.com>2022-01-20 21:47:57 -0500
commit119a6883e6f795815744b9afd6a79084c619ddb6 (patch)
treea8c34608bd215d56564ad46f03e235ddb9ed12e8 /ZAPD/ZLimb.h
parentbe71e26d9afc470a9293e74a6f56ca87f7412be0 (diff)
Automatic limbs enum generation (#221)
* proof of concept * SetLimbIndex * LIMB_DONE * use proper enum name in limbs * fix naming * add ifdefs * fix me being dumb * format * Add EnumPrefix * EnumName * Remove autogenerator stuff * Add warnings * format * Use HANDLE_WARNING_RESOURCE for warning * object_box special case * whoops * Remove overloaded bitconverter methods and use boundary-checker .at method when possible * Fix warning * Fix warning * format * Hopefully fix every warning now * docs * Review * typo * Update jenkinsfile for MM * format * Force functionpreamble printing in development mode * Use ARRAY_COUNT on SkeletonHeaders * Simplify endif in header guards * fix limbs using the wrong enum value * use hex in enum comments
Diffstat (limited to 'ZAPD/ZLimb.h')
-rw-r--r--ZAPD/ZLimb.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ZAPD/ZLimb.h b/ZAPD/ZLimb.h
index 53a4143..ce31e42 100644
--- a/ZAPD/ZLimb.h
+++ b/ZAPD/ZLimb.h
@@ -18,9 +18,14 @@ enum class ZLimbType
Legacy,
};
+class ZLimbTable;
+
class ZLimb : public ZResource
{
public:
+ std::string enumName;
+ ZLimbTable* limbsTable = nullptr; // borrowed pointer, do not delete!
+
ZLimbType type = ZLimbType::Standard;
ZLimbSkinType skinSegmentType = ZLimbSkinType::SkinType_0; // Skin only
@@ -39,6 +44,8 @@ public:
int16_t transX, transY, transZ;
uint8_t childIndex, siblingIndex;
+ uint8_t limbIndex = 0;
+
ZLimb(ZFile* nParent);
void ExtractFromBinary(uint32_t nRawDataIndex, ZLimbType nType);
@@ -59,6 +66,8 @@ public:
static const char* GetSourceTypeName(ZLimbType limbType);
static ZLimbType GetTypeByAttributeName(const std::string& attrName);
+ void SetLimbIndex(uint8_t nLimbIndex);
+
protected:
void DeclareDList(segptr_t dListSegmentedPtr, const std::string& prefix,
const std::string& limbSuffix);