feat(component): add CCharacterComponent::s_chrVarArray

This commit is contained in:
fallenoak committed 2025-10-16 08:57:30 -05:00
1 parent 342bb6345f
commit fdd2b02867
3 files changed
+36

No files matched your search

+2
View File
@@ -2,6 +2,8 @@
#include "model/CM2Model.hpp"
#include <storm/Memory.hpp>
st_race* CCharacterComponent::s_chrVarArray;
int32_t s_bInRenderPrep = 0;
CCharacterComponent* CCharacterComponent::AllocComponent() {
+5
View File
@@ -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();
+29
View File
@@ -0,0 +1,29 @@
#ifndef COMPONENT_UTIL_HPP
#define COMPONENT_UTIL_HPP
#include "component/Types.hpp"
#include <cstdint>
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