From eb40e5ff01650a8595d9708ab2cbce05203b8f4c Mon Sep 17 00:00:00 2001 From: fallenoak Date: Thu, 16 Oct 2025 20:15:55 -0500 Subject: [PATCH] feat(component): add CCharacterComponent::GetSectionsRecord --- src/component/CCharacterComponent.cpp | 12 ++++++++++++ src/component/CCharacterComponent.hpp | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/component/CCharacterComponent.cpp b/src/component/CCharacterComponent.cpp index e422bec..a967636 100644 --- a/src/component/CCharacterComponent.cpp +++ b/src/component/CCharacterComponent.cpp @@ -63,6 +63,18 @@ void CCharacterComponent::GeosRenderPrep() { this->m_flags &= ~0x4; } +CharSectionsRec* CCharacterComponent::GetSectionsRecord(COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex, int32_t colorIndex, bool* found) { + return ComponentGetSectionsRecord( + CCharacterComponent::s_chrVarArray, + this->m_data.raceID, + this->m_data.sexID, + sectionIndex, + variationIndex, + colorIndex, + found + ); +} + void CCharacterComponent::Init(ComponentData* data, const char* a3) { if (data->model) { data->model->Release(); diff --git a/src/component/CCharacterComponent.hpp b/src/component/CCharacterComponent.hpp index e3e23f4..fab85d5 100644 --- a/src/component/CCharacterComponent.hpp +++ b/src/component/CCharacterComponent.hpp @@ -5,6 +5,7 @@ #include "gx/Texture.hpp" #include +class CharSectionsRec; class CM2Model; struct st_race; @@ -65,6 +66,7 @@ class CCharacterComponent { // Member functions void CreateBaseTexture(); void GeosRenderPrep(); + CharSectionsRec* GetSectionsRecord(COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex, int32_t colorIndex, bool* found); void Init(ComponentData* data, const char* a3); int32_t ItemsLoaded(int32_t a2); void PrepSections();