write shit

This commit is contained in:
2023-09-20 10:49:32 +08:00
parent 69f702a6d2
commit d66716acd7
14 changed files with 178 additions and 348 deletions

View File

@ -53,9 +53,15 @@ namespace LibCmo::CK2::ObjImpls {
XContainer::XObjectPointerArray potentials;
chunk->ReadXObjectPointerArray(potentials);
for (const auto& ptr : potentials) {
if (ptr == nullptr) continue;
XContainer::NSXObjectPointerArray::AddIfNotHere(m_PotentialMeshes, ptr);
}
// add current mesh to potential meshes
if (m_CurrentMesh != nullptr) {
XContainer::NSXObjectPointerArray::AddIfNotHere(m_PotentialMeshes, m_CurrentMesh);
}
}
// read core entity data
@ -88,6 +94,8 @@ namespace LibCmo::CK2::ObjImpls {
}
// read matrix
// reset
m_WorldMatrix.ResetToIdentity();
// force read as vector3
chunk->ReadStruct(reinterpret_cast<VxMath::VxVector3*>(&m_WorldMatrix[0]));
chunk->ReadStruct(reinterpret_cast<VxMath::VxVector3*>(&m_WorldMatrix[1]));
@ -139,7 +147,12 @@ namespace LibCmo::CK2::ObjImpls {
chunk->ReadStruct(m_ZOrder);
}
} else {
// MARK: compatibility code removed because I don't need them
return false;
}
// MARK: skin and bone are skipped.
return true;
}