almost finish vt file reader

This commit is contained in:
2023-02-18 14:14:29 +08:00
parent 522660e65a
commit 4173de5d2c
3 changed files with 65 additions and 14 deletions

View File

@ -41,14 +41,18 @@ int main() {
CKContext* ctx = NULL;
Assert(!CKCreateContext(&ctx, NULL, 0), "Fail to execute CKCreateContext()");
// call saver
// call reader
CKObjectArray* array = CreateCKObjectArray();
CKObject* objs = ctx->CreateObject(CKCID_OBJECT, "fuck dassault", CK_OBJECTCREATION_NONAMECHECK, NULL);
array->AddIfNotHere(objs);
Assert(!ctx->Load("Language.old.nmo", array, CK_LOAD_DEFAULT, NULL), "Fail to load CMO file");
CKDependencies* dep = CKGetDefaultClassDependencies(CK_DEPENDENCIES_SAVE);
dep->m_Flags = CK_DEPENDENCIES_FULL;
Assert(!ctx->Save("result.cmo", array, 0xFFFFFFFF, dep, NULL), "Fail to save CMO file");
// call saver
//CKObjectArray* array = CreateCKObjectArray();
//CKObject* objs = ctx->CreateObject(CKCID_OBJECT, "fuck dassault", CK_OBJECTCREATION_NONAMECHECK, NULL);
//array->AddIfNotHere(objs);
//CKDependencies* dep = CKGetDefaultClassDependencies(CK_DEPENDENCIES_SAVE);
//dep->m_Flags = CK_DEPENDENCIES_FULL;
//Assert(!ctx->Save("result.cmo", array, 0xFFFFFFFF, dep, NULL), "Fail to save CMO file");
DeleteCKObjectArray(array);
CKCloseContext(ctx);