finish CKMesh remain reading and ctor

This commit is contained in:
2023-09-20 14:42:44 +08:00
parent 0a85832d63
commit a06f6a58c9
6 changed files with 171 additions and 25 deletions

View File

@ -183,6 +183,17 @@ namespace LibCmo::CK2 {
return false;
}
bool CKStateChunk::ReadObjectPointer(ObjImpls::CKObject** obj) {
CK_ID cache;
bool ret = ReadObjectID(&cache);
if (ret) {
*obj = m_BindContext->GetObject(cache);
} else {
*obj = nullptr;
}
return ret;
}
bool CKStateChunk::ReadManagerInt(CKGUID* guid, CKINT* intval) {
if (guid == nullptr || intval == nullptr) return false;
@ -374,7 +385,7 @@ namespace LibCmo::CK2 {
/* ========== Sequence Functions ==========*/
bool CKStateChunk::ReadObjectIDSequence(XContainer::XArray<CK_ID>* ls) {
bool CKStateChunk::ReadObjectIDSequence(XContainer::XObjectArray* ls) {
if (ls == nullptr) return false;
ls->clear();