mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(model): load skin sections in CM2Model::InitializeLoaded
This commit is contained in:
parent
d18e8cf608
commit
801fbc43b9
@ -990,7 +990,24 @@ int32_t CM2Model::InitializeLoaded() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
|
||||||
|
if (this->m_shared->skinProfile->skinSections.Count()) {
|
||||||
|
this->m_skinSections = reinterpret_cast<uint32_t*>(&data[0]);
|
||||||
|
data += (sizeof(uint32_t) * this->m_shared->skinProfile->skinSections.Count());
|
||||||
|
|
||||||
|
if (this->model30) {
|
||||||
|
memcpy(this->m_skinSections, model30->m_skinSections, sizeof(uint32_t) * this->m_shared->skinProfile->skinSections.Count());
|
||||||
|
} else {
|
||||||
|
// Mark all skin sections as visible by default
|
||||||
|
for (int32_t i = 0; i < this->m_shared->skinProfile->skinSections.Count(); i++) {
|
||||||
|
auto modelSkinSection = &this->m_skinSections[i];
|
||||||
|
|
||||||
|
if (modelSkinSection) {
|
||||||
|
*modelSkinSection = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this->m_shared->m_data->colors.Count()) {
|
if (this->m_shared->m_data->colors.Count()) {
|
||||||
this->m_colors = reinterpret_cast<M2ModelColor*>(&data[0]);
|
this->m_colors = reinterpret_cast<M2ModelColor*>(&data[0]);
|
||||||
|
|||||||
@ -99,6 +99,7 @@ class CM2Model {
|
|||||||
M2ModelBone* m_bones = nullptr;
|
M2ModelBone* m_bones = nullptr;
|
||||||
C44Matrix* m_boneMatrices = nullptr;
|
C44Matrix* m_boneMatrices = nullptr;
|
||||||
M2ModelColor* m_colors = nullptr;
|
M2ModelColor* m_colors = nullptr;
|
||||||
|
uint32_t* m_skinSections = nullptr;
|
||||||
HTEXTURE* m_textures = nullptr;
|
HTEXTURE* m_textures = nullptr;
|
||||||
M2ModelTextureWeight* m_textureWeights = nullptr;
|
M2ModelTextureWeight* m_textureWeights = nullptr;
|
||||||
C44Matrix* m_textureMatrices = nullptr;
|
C44Matrix* m_textureMatrices = nullptr;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user