From 2e7cf50534bf695cb602bf8abde9da176743a2d0 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 14 Oct 2025 23:11:36 -0500 Subject: [PATCH] feat(component): show default geosets in CCharacterComponent::GeosRenderPrep --- src/component/CCharacterComponent.cpp | 7 +++++++ src/component/CCharacterComponent.hpp | 23 +++++++++++++++++++++++ src/component/Types.hpp | 27 +++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 src/component/Types.hpp diff --git a/src/component/CCharacterComponent.cpp b/src/component/CCharacterComponent.cpp index 37b4ced..cca2a81 100644 --- a/src/component/CCharacterComponent.cpp +++ b/src/component/CCharacterComponent.cpp @@ -16,6 +16,13 @@ void CCharacterComponent::GeosRenderPrep() { // Show base "skin" section (0) this->m_data.model->SetGeometryVisible(0, 0, 1); + // Show default geosets + for (int32_t i = 0; i < NUM_GEOSET; i++) { + // TODO handle 1703 + + this->m_data.model->SetGeometryVisible(this->m_data.defaultGeosets[i], this->m_data.defaultGeosets[i], 1); + } + // TODO this->m_flags &= ~0x4; diff --git a/src/component/CCharacterComponent.hpp b/src/component/CCharacterComponent.hpp index ba6b0f9..93fb357 100644 --- a/src/component/CCharacterComponent.hpp +++ b/src/component/CCharacterComponent.hpp @@ -1,6 +1,7 @@ #ifndef COMPONENT_C_CHARACTER_COMPONENT_HPP #define COMPONENT_C_CHARACTER_COMPONENT_HPP +#include "component/Types.hpp" #include class CM2Model; @@ -17,6 +18,28 @@ struct ComponentData { CM2Model* model = nullptr; uint32_t flags = 0x0; uint8_t byte28 = 0; + + uint32_t defaultGeosets[NUM_GEOSET] = { + 001, + 101, + 201, + 301, + 401, + 501, + 601, + 702, + 801, + 901, + 1001, + 1101, + 1201, + 1301, + 1401, + 1501, + 1601, + 1701, + 1801, + }; }; class CCharacterComponent { diff --git a/src/component/Types.hpp b/src/component/Types.hpp new file mode 100644 index 0000000..4b3b693 --- /dev/null +++ b/src/component/Types.hpp @@ -0,0 +1,27 @@ +#ifndef COMPONENT_TYPES_HPP +#define COMPONENT_TYPES_HPP + +enum COMPONENT_GEOSET { + GEOSET_HEAD = 0, + GEOSET_BEARD = 1, + GEOSET_SIDEBURNS = 2, + GEOSET_MOUSTACHE = 3, + GEOSET_GLOVES = 4, + GEOSET_BOOTS = 5, + GEOSET_SHIRT = 6, + GEOSET_EARS = 7, + GEOSET_SLEEVES = 8, + GEOSET_LEGS = 9, + GEOSET_SHIRT_DOUBLET = 10, + GEOSET_PANT_DOUBLET = 11, + GEOSET_TABARD = 12, + GEOSET_ROBE = 13, + GEOSET_LOINCLOTH = 14, + GEOSET_CAPE = 15, + GEOSET_FACIAL_JEWELRY = 16, + GEOSET_EYE_EFFECTS = 17, + GEOSET_BELT = 18, + NUM_GEOSET +}; + +#endif