diff --git a/src/component/CCharacterComponent.cpp b/src/component/CCharacterComponent.cpp index f6b59c8..fc4f41e 100644 --- a/src/component/CCharacterComponent.cpp +++ b/src/component/CCharacterComponent.cpp @@ -2,6 +2,8 @@ #include "model/CM2Model.hpp" #include +st_race* CCharacterComponent::s_chrVarArray; + int32_t s_bInRenderPrep = 0; CCharacterComponent* CCharacterComponent::AllocComponent() { diff --git a/src/component/CCharacterComponent.hpp b/src/component/CCharacterComponent.hpp index a3a9f9e..b4c7617 100644 --- a/src/component/CCharacterComponent.hpp +++ b/src/component/CCharacterComponent.hpp @@ -7,6 +7,8 @@ class CM2Model; +struct st_race; + struct ComponentData { int32_t raceID = 0; int32_t sexID = 0; @@ -45,6 +47,9 @@ struct ComponentData { class CCharacterComponent { public: + // Static variables + static st_race* s_chrVarArray; + // Static functions static CCharacterComponent* AllocComponent(); static void Initialize(); diff --git a/src/component/Util.hpp b/src/component/Util.hpp new file mode 100644 index 0000000..c93f8fb --- /dev/null +++ b/src/component/Util.hpp @@ -0,0 +1,29 @@ +#ifndef COMPONENT_UTIL_HPP +#define COMPONENT_UTIL_HPP + +#include "component/Types.hpp" +#include + +class CharSectionsRec; + +struct st_variation; + +struct st_color { + CharSectionsRec* rec; +}; + +struct st_race { + // The use of "section" here refers to the groups of variations represented in + // COMPONENT_VARIATIONS. It does NOT refer to COMPONENT_SECTIONS. + struct { + uint32_t variationCount; + st_variation* variationArray; + } sections[NUM_COMPONENT_VARIATIONS]; +}; + +struct st_variation { + uint32_t colorCount; + st_color* colorArray; +}; + +#endif