From 4dd9dfbd781737eaf084b38a47020fb5f9b7e475 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 14 Oct 2025 08:36:07 -0500 Subject: [PATCH] feat(glue): partially implement CCharacterComponent::RenderPrep --- src/glue/CCharacterComponent.cpp | 22 ++++++++++++++++++++++ src/glue/CCharacterComponent.hpp | 2 ++ 2 files changed, 24 insertions(+) diff --git a/src/glue/CCharacterComponent.cpp b/src/glue/CCharacterComponent.cpp index 439bcc1..2762cb4 100644 --- a/src/glue/CCharacterComponent.cpp +++ b/src/glue/CCharacterComponent.cpp @@ -7,6 +7,20 @@ CCharacterComponent* CCharacterComponent::AllocComponent() { return STORM_NEW(CCharacterComponent); } +void CCharacterComponent::GeosRenderPrep() { + // TODO + + // Default all sections (0 - 2000) to hidden + this->m_data.model->SetGeometryVisible(0, 2000, 0); + + // Show base "skin" section (0) + this->m_data.model->SetGeometryVisible(0, 0, 1); + + // TODO + + this->m_flags &= ~0x4; +} + void CCharacterComponent::Init(ComponentData* data, const char* a3) { if (data->model) { data->model->Release(); @@ -18,5 +32,13 @@ void CCharacterComponent::Init(ComponentData* data, const char* a3) { } void CCharacterComponent::RenderPrep(int32_t a2) { + if (this->m_data.flags & 0x1) { + if (this->m_flags & 0x4) { + this->GeosRenderPrep(); + } + + return; + } + // TODO } diff --git a/src/glue/CCharacterComponent.hpp b/src/glue/CCharacterComponent.hpp index d9953a1..5069ba8 100644 --- a/src/glue/CCharacterComponent.hpp +++ b/src/glue/CCharacterComponent.hpp @@ -25,9 +25,11 @@ class CCharacterComponent { static CCharacterComponent* AllocComponent(); // Member variables + uint32_t m_flags = 0x1 | 0x2 | 0x4; ComponentData m_data; // Member functions + void GeosRenderPrep(); void Init(ComponentData* data, const char* a3); void RenderPrep(int32_t a2); };