Torch
Loading...
Searching...
No Matches
OoTSkeletonTypes.h
1#pragma once
2
3#include "factories/BaseFactory.h"
4#include <vector>
5#include <string>
6
7namespace OoT {
8
9// Must match SOH::SkeletonType enum values
10enum class OoTSkeletonType : uint8_t {
11 Normal = 0,
12 Flex = 1,
13 Curve = 2,
14};
15
16// Must match SOH::LimbType enum values
17enum class OoTLimbType : uint8_t {
18 Invalid = 0,
19 Standard = 1,
20 LOD = 2,
21 Skin = 3,
22 Curve = 4,
23 Legacy = 5,
24};
25
26// Must match ZLimbSkinType enum values
27enum class OoTLimbSkinType : int32_t {
28 SkinType_Null = 0,
29 SkinType_Animated = 4,
30 SkinType_Normal = 11,
31};
32
34 uint16_t index;
35 int16_t s, t;
36 int8_t normX, normY, normZ;
37 uint8_t alpha;
38};
39
41 uint8_t limbIndex;
42 int16_t x, y, z;
43 uint8_t scale;
44};
45
47 uint16_t unk_4;
48 std::vector<OoTSkinVertex> skinVertices;
49 std::vector<OoTSkinTransformation> limbTransformations;
50};
51
53 uint16_t totalVtxCount;
54 std::vector<OoTSkinLimbModif> limbModifications;
55 std::string dlist; // resolved path
56};
57
58// Parsed data for a single OoT limb
59class OoTLimbData : public IParsedData {
60public:
61 OoTLimbType limbType;
62
63 // Skin-specific fields
64 OoTLimbSkinType skinSegmentType = OoTLimbSkinType::SkinType_Null;
65 std::string skinDList; // resolved path (Skin + SkinType_Normal)
66 uint16_t skinVtxCnt = 0;
67 OoTSkinAnimatedLimbData skinAnimData;
68
69 // Legacy-specific fields
70 float legTransX = 0, legTransY = 0, legTransZ = 0;
71 uint16_t rotX = 0, rotY = 0, rotZ = 0;
72 std::string childPtr; // resolved path (Legacy only)
73 std::string siblingPtr; // resolved path (Legacy only)
74
75 // Common fields for Standard/LOD/Skin/Curve
76 std::string dListPtr; // resolved path
77 std::string dList2Ptr; // resolved path (LOD/Curve only)
78 int16_t transX = 0, transY = 0, transZ = 0;
79 uint8_t childIndex = 0, siblingIndex = 0;
80};
81
82// Parsed data for an OoT skeleton
84public:
85 OoTSkeletonType skelType;
86 OoTLimbType limbType;
87 uint8_t limbCount;
88 uint8_t dListCount; // Flex only
89 std::vector<std::string> limbPaths; // resolved paths to each limb
90};
91
92// Shared helpers
93OoTLimbType ParseLimbType(const std::string& str);
94OoTSkeletonType ParseSkeletonType(const std::string& str);
95std::string ResolveGfxPointer(uint32_t ptr, const std::string& limbSymbol,
96 const std::string& suffix);
97
98} // namespace OoT
Definition BaseFactory.h:88
Definition OoTSkeletonTypes.h:59
Definition OoTSkeletonTypes.h:83
Definition OoTSkeletonTypes.h:52
Definition OoTSkeletonTypes.h:46
Definition OoTSkeletonTypes.h:40
Definition OoTSkeletonTypes.h:33