feat(component): add CCharacterComponent::ClearItemDisplay

This commit is contained in:
fallenoak 2025-10-28 21:11:57 -05:00
parent ea51e2e20f
commit a431b30cf9
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 16 additions and 0 deletions

View File

@ -654,6 +654,21 @@ void CCharacterComponent::UpdateBaseTexture(EGxTexCommand cmd, uint32_t width, u
}
}
void CCharacterComponent::ClearItemDisplay(COMPONENT_SECTIONS section, int32_t priority) {
if (priority == -1) {
return;
}
if (this->m_itemDisplays[section].texture[priority]) {
TextureCacheDestroyTexture(this->m_itemDisplays[section].texture[priority]);
this->m_itemDisplays[section].texture[priority] = nullptr;
}
this->m_itemDisplays[section].displayID[priority] = 0;
this->m_itemDisplays[section].priorityDirty &= ~(1 << priority);
}
void CCharacterComponent::CreateBaseTexture() {
auto dataFormat = this->m_textureFormat == GxTex_Dxt1
? GxTex_Dxt1

View File

@ -80,6 +80,7 @@ class CCharacterComponent {
ComponentItemDisplay m_itemDisplays[NUM_COMPONENT_SECTIONS] = {};
// Member functions
void ClearItemDisplay(COMPONENT_SECTIONS section, int32_t priority);
void CreateBaseTexture();
void GeosRenderPrep();
CharSectionsRec* GetSectionsRecord(COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex, int32_t colorIndex, bool* found);