feat(component): add CCharacterComponent::GetPreferences

This commit is contained in:
fallenoak 2025-12-30 14:56:51 -06:00
parent db53fb07bc
commit c6110b561e
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
3 changed files with 27 additions and 0 deletions

View File

@ -1048,6 +1048,21 @@ void CCharacterComponent::GeosRenderPrep() {
this->m_flags &= ~0x4;
}
void CCharacterComponent::GetPreferences(CharacterPreferences* preferences) {
if (!preferences) {
return;
}
preferences->raceID = this->m_data.raceID;
preferences->sexID = this->m_data.sexID;
preferences->classID = this->m_data.classID;
preferences->hairColorID = this->m_data.hairColorID;
preferences->skinColorID = this->m_data.skinColorID;
preferences->faceID = this->m_data.faceID;
preferences->facialHairStyleID = this->m_data.facialHairStyleID;
preferences->hairStyleID = this->m_data.hairStyleID;
}
CharSectionsRec* CCharacterComponent::GetSectionsRecord(COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex, int32_t colorIndex, bool* found) {
return ComponentGetSectionsRecord(
CCharacterComponent::s_chrVarArray,

View File

@ -87,6 +87,7 @@ class CCharacterComponent {
void CreateBaseTexture();
void* CreateTexture(const ItemDisplayInfoRec* displayRec, int32_t section);
void GeosRenderPrep();
void GetPreferences(CharacterPreferences* preferences);
CharSectionsRec* GetSectionsRecord(COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex, int32_t colorIndex, bool* found);
int32_t Init(ComponentData* data, const char* a3);
int32_t ItemsLoaded(int32_t a2);

View File

@ -91,6 +91,17 @@ enum ITEM_SLOT {
NUM_ITEM_SLOT
};
struct CharacterPreferences {
int32_t raceID;
int32_t sexID;
int32_t classID;
int32_t hairColorID;
int32_t skinColorID;
int32_t faceID;
int32_t facialHairStyleID;
int32_t hairStyleID;
};
struct ComponentData {
int32_t raceID = 0;
int32_t sexID = 0;