mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(component): partially implement CCharacterComponent::SetSkinColor
This commit is contained in:
parent
17537d454d
commit
bdc76b2b79
@ -83,6 +83,10 @@ void CCharacterComponent::Init(ComponentData* data, const char* a3) {
|
|||||||
this->m_data = *data;
|
this->m_data = *data;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
this->SetSkinColor(this->m_data.skinColorID, false, true, a3);
|
||||||
|
|
||||||
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CCharacterComponent::ItemsLoaded(int32_t a2) {
|
int32_t CCharacterComponent::ItemsLoaded(int32_t a2) {
|
||||||
@ -91,6 +95,10 @@ int32_t CCharacterComponent::ItemsLoaded(int32_t a2) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::LoadBaseVariation(COMPONENT_VARIATIONS sectionIndex, int32_t textureIndex, int32_t variationIndex, int32_t colorIndex, COMPONENT_SECTIONS section, const char* a7) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
void CCharacterComponent::PrepSections() {
|
void CCharacterComponent::PrepSections() {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -143,6 +151,65 @@ void CCharacterComponent::RenderPrepSections() {
|
|||||||
s_bInRenderPrep = 0;
|
s_bInRenderPrep = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::ReplaceExtraSkinTexture(const char* a2) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::SetFace(int32_t faceID, bool a3, const char* a4) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::SetSkinColor(int32_t skinColorID, bool a3, bool a4, const char* a5) {
|
||||||
|
bool isNPC = this->m_data.flags & 0x1;
|
||||||
|
|
||||||
|
this->m_data.skinColorID = skinColorID;
|
||||||
|
|
||||||
|
if (isNPC) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ComponentValidateBase(CCharacterComponent::s_chrVarArray, this->m_data.raceID, this->m_data.sexID, VARIATION_SKIN, 0, skinColorID)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto numColors = ComponentGetNumColors(
|
||||||
|
CCharacterComponent::s_chrVarArray,
|
||||||
|
this->m_data.raceID,
|
||||||
|
this->m_data.sexID,
|
||||||
|
VARIATION_SKIN,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
|
auto sectionsRec = ComponentGetSectionsRecord(
|
||||||
|
CCharacterComponent::s_chrVarArray,
|
||||||
|
this->m_data.raceID,
|
||||||
|
this->m_data.sexID,
|
||||||
|
VARIATION_SKIN,
|
||||||
|
0,
|
||||||
|
skinColorID,
|
||||||
|
nullptr
|
||||||
|
);
|
||||||
|
|
||||||
|
if (skinColorID < numColors && sectionsRec && !(sectionsRec->m_flags & 0x8)) {
|
||||||
|
// TODO underwear
|
||||||
|
}
|
||||||
|
|
||||||
|
this->ReplaceExtraSkinTexture(a5);
|
||||||
|
|
||||||
|
this->LoadBaseVariation(
|
||||||
|
VARIATION_SKIN,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
this->m_data.skinColorID,
|
||||||
|
SECTION_TORSO_UPPER,
|
||||||
|
a5
|
||||||
|
);
|
||||||
|
|
||||||
|
this->SetFace(this->m_data.faceID, a3, a5);
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
int32_t CCharacterComponent::VariationsLoaded(int32_t a2) {
|
int32_t CCharacterComponent::VariationsLoaded(int32_t a2) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
|||||||
@ -69,9 +69,13 @@ class CCharacterComponent {
|
|||||||
CharSectionsRec* GetSectionsRecord(COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex, int32_t colorIndex, bool* found);
|
CharSectionsRec* GetSectionsRecord(COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex, int32_t colorIndex, bool* found);
|
||||||
void Init(ComponentData* data, const char* a3);
|
void Init(ComponentData* data, const char* a3);
|
||||||
int32_t ItemsLoaded(int32_t a2);
|
int32_t ItemsLoaded(int32_t a2);
|
||||||
|
void LoadBaseVariation(COMPONENT_VARIATIONS sectionIndex, int32_t textureIndex, int32_t variationIndex, int32_t colorIndex, COMPONENT_SECTIONS section, const char* a7);
|
||||||
void PrepSections();
|
void PrepSections();
|
||||||
int32_t RenderPrep(int32_t a2);
|
int32_t RenderPrep(int32_t a2);
|
||||||
void RenderPrepSections();
|
void RenderPrepSections();
|
||||||
|
void ReplaceExtraSkinTexture(const char* a2);
|
||||||
|
void SetFace(int32_t faceID, bool a3, const char* a4);
|
||||||
|
void SetSkinColor(int32_t skinColorID, bool a3, bool a4, const char* a5);
|
||||||
int32_t VariationsLoaded(int32_t a2);
|
int32_t VariationsLoaded(int32_t a2);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user