diff --git a/CodeGen/EnumsMigration/CppWriter.java b/CodeGen/EnumsMigration/CppWriter.java index 23bc945..5aa8178 100644 --- a/CodeGen/EnumsMigration/CppWriter.java +++ b/CodeGen/EnumsMigration/CppWriter.java @@ -111,8 +111,8 @@ public class CppWriter { IndentHelper indent = new IndentHelper(writer, CommonHelper.LangType.Cpp); // write type defination (just to let user know what the type is) - indent.puts("// struct GeneralReflection { const char* mName; };"); - indent.puts("// template"); + indent.puts("// struct GeneralReflection { const char8_t* mName; };"); + indent.puts("// template, int> = 0>"); indent.puts("// using GeneralReflectionArray = std::vector>;"); indent.puts(""); @@ -138,7 +138,7 @@ public class CppWriter { // write enum desc entries for (EnumsHelper.EnumEntry_t enumEntry_t : enum_t.mEntries) { - indent.printf("{ LibCmo::%s::%s::%s, {\"%s\"} },", CommonHelper.getCKPartsNamespace(parts), + indent.printf("{ LibCmo::%s::%s::%s, { u8\"%s\" } },", CommonHelper.getCKPartsNamespace(parts), enum_t.mEnumName, enumEntry_t.mEntryName, enumEntry_t.mEntryName); } @@ -209,7 +209,7 @@ public class CppWriter { IndentHelper indent = new IndentHelper(writer, CommonHelper.LangType.Cpp); // write type defination (just to let user know what the type is) - indent.puts("// struct CkErrorReflection { const char* mName; const char* mDescription; };"); + indent.puts("// struct CkErrorReflection { const char8_t* mName; const char8_t* mDescription; };"); indent.puts("// using CkErrorReflectionArray = std::vector>;"); indent.puts(""); @@ -224,7 +224,7 @@ public class CppWriter { if (comment == null) comment = ""; - indent.printf("{ LibCmo::CK2::CKERROR::%s, { \"%s\", \"%s\" } },", entry.mEntryName, entry.mEntryName, + indent.printf("{ LibCmo::CK2::CKERROR::%s, { u8\"%s\", u8\"%s\" } },", entry.mEntryName, entry.mEntryName, comment); } indent.dec(); @@ -249,7 +249,7 @@ public class CppWriter { IndentHelper indent = new IndentHelper(writer, CommonHelper.LangType.Cpp); // write type defination (just to let user know what the type is) - indent.puts("// struct CkClassidReflection { std::vector mHierarchy; };"); + indent.puts("// struct CkClassidReflection { std::vector mHierarchy; };"); indent.puts("// using CkClassidReflectionArray = std::vector>;"); indent.puts(""); @@ -262,8 +262,8 @@ public class CppWriter { EnumsHelper.EnumEntryWithHierarchy_t specialized = (EnumsHelper.EnumEntryWithHierarchy_t) entry; String hierarchy = specialized.mHierarchy.stream().map(value -> value.mEntryName) - .collect(Collectors.joining("\", \"")); - indent.printf("{ LibCmo::CK2::CK_CLASSID::%s, { { \"%s\" } } },", entry.mEntryName, hierarchy); + .collect(Collectors.joining("\", u8\"")); + indent.printf("{ LibCmo::CK2::CK_CLASSID::%s, { { u8\"%s\" } } },", entry.mEntryName, hierarchy); } indent.dec(); indent.puts("};"); diff --git a/LibCmo/CK2/CKContext.hpp b/LibCmo/CK2/CKContext.hpp index aa5b5e6..eacb3bd 100644 --- a/LibCmo/CK2/CKContext.hpp +++ b/LibCmo/CK2/CKContext.hpp @@ -109,6 +109,7 @@ namespace LibCmo::CK2 { * The encoding of ordinary is specified by encoding sequence. * If we fail to do convertion, the result will leave to blank and output a message to CKContext. * However, if you use this function with blank encoding sequence, it will raise exception. + * So becore using this function, please make sure that you have checked by calling IsValidEncoding(). */ void GetUTF8String(const std::string& native_name, XContainer::XString& u8_name); /** @@ -120,6 +121,7 @@ namespace LibCmo::CK2 { * The encoding of ordinary is specified by encoding sequence. * If we fail to do convertion, the result will leave to blank and output a message to CKContext. * However, if you use this function with blank encoding sequence, it will raise exception. + * So becore using this function, please make sure that you have checked by calling IsValidEncoding(). */ void GetOrdinaryString(const XContainer::XString& u8_name, std::string& native_name); /** diff --git a/LibCmo/CK2/CKFileReader.cpp b/LibCmo/CK2/CKFileReader.cpp index f5b7814..0b58376 100644 --- a/LibCmo/CK2/CKFileReader.cpp +++ b/LibCmo/CK2/CKFileReader.cpp @@ -18,6 +18,8 @@ namespace LibCmo::CK2 { CKERROR CKFileReader::ShallowLoad(CKSTRING u8_filename) { // check document status if (this->m_Done) return CKERROR::CKERR_CANCELLED; + // check CKContext encoding sequence + if (!this->m_Ctx->IsValidEncoding()) return CKERROR::CKERR_CANCELLED; // check file and open memory if (u8_filename == nullptr) return CKERROR::CKERR_INVALIDPARAMETER; @@ -35,6 +37,8 @@ namespace LibCmo::CK2 { if (err != CKERROR::CKERR_OK) return err; // other data will be free automatically + // set done flag and return + this->m_Done = true; return CKERROR::CKERR_OK; } @@ -335,6 +339,8 @@ namespace LibCmo::CK2 { CKERROR CKFileReader::DeepLoad(CKSTRING u8_filename) { // check document status if (this->m_Done) return CKERROR::CKERR_CANCELLED; + // check CKContext encoding sequence + if (!this->m_Ctx->IsValidEncoding()) return CKERROR::CKERR_CANCELLED; // ========== prepare work ========== CKERROR err = CKERROR::CKERR_OK; @@ -342,6 +348,8 @@ namespace LibCmo::CK2 { // get shallow document first err = this->ShallowLoad(u8_filename); if (err != CKERROR::CKERR_OK) return err; + // reset done flag because we need further processing + this->m_Done = false; // ========== create object first ========== for (auto& obj : this->m_FileObjects) { @@ -387,6 +395,10 @@ namespace LibCmo::CK2 { } // ========== finalize work ========== + + + // set done flag and return + this->m_Done = true; return CKERROR::CKERR_OK; } diff --git a/LibCmo/CK2/CKFileWriter.cpp b/LibCmo/CK2/CKFileWriter.cpp index fab82f3..b652218 100644 --- a/LibCmo/CK2/CKFileWriter.cpp +++ b/LibCmo/CK2/CKFileWriter.cpp @@ -12,6 +12,8 @@ namespace LibCmo::CK2 { CKERROR CKFileWriter::Save(CKSTRING u8_filename) { // check document status if (this->m_Done) return CKERROR::CKERR_CANCELLED; + // check CKContext encoding sequence + if (!this->m_Ctx->IsValidEncoding()) return CKERROR::CKERR_CANCELLED; // encoding conv helper std::string name_conv; @@ -347,6 +349,8 @@ namespace LibCmo::CK2 { // close file std::fclose(fs); + // set done flag and return + this->m_Done = true; return CKERROR::CKERR_OK; } diff --git a/LibCmo/CK2/CKTypes.hpp b/LibCmo/CK2/CKTypes.hpp index 510a095..98a5774 100644 --- a/LibCmo/CK2/CKTypes.hpp +++ b/LibCmo/CK2/CKTypes.hpp @@ -89,6 +89,11 @@ namespace LibCmo { #define PRI_CKSTRING "s" #define PRI_CKCHAR "c" +#define CKBYTE_C(v) UINT8_C(v) +#define CKWORD_C(v) UINT16_C(v) +#define CKDWORD_C(v) UINT32_C(v) +#define CKQWORD_C(v) UINT64_C(v) + #define PRIuCKBYTE PRIu8 #define PRIuCKWORD PRIu16 #define PRIuCKDWORD PRIu32 @@ -104,6 +109,8 @@ namespace LibCmo { #define PRIXCKDWORD PRIX32 #define PRIXCKQWORD PRIX64 +#define CKINT_C(v) INT32_C(v) + #define PRIiCKINT PRIi32 #define PRIfCKFLOAT "f" diff --git a/LibCmo/CK2/ObjImpls/CKTexture.cpp b/LibCmo/CK2/ObjImpls/CKTexture.cpp index 035a672..af6b544 100644 --- a/LibCmo/CK2/ObjImpls/CKTexture.cpp +++ b/LibCmo/CK2/ObjImpls/CKTexture.cpp @@ -15,6 +15,7 @@ namespace LibCmo::CK2::ObjImpls { * All pointers should translate to DWORD(32 bit) for platform independent. * Otherwise this struct may be corrupted in x64 platform because pointer is QWORD in x64. */ +#pragma pack(4) struct FakeBitmapProperties { CKINT m_Size; struct { @@ -23,7 +24,7 @@ namespace LibCmo::CK2::ObjImpls { }m_ReaderGuid; struct { // fake CKFileExtension - CKCHAR m_Data[4]; + char m_Data[4]; }m_Ext; struct { // fake VxImageDescEx @@ -60,6 +61,7 @@ namespace LibCmo::CK2::ObjImpls { }m_Format; /*void**/CKPTR m_Data; }; +#pragma pack() CKTexture::CKTexture(CKContext* ctx, CK_ID ckid, CKSTRING name) : CKBeObject(ctx, ckid, name), @@ -184,10 +186,12 @@ namespace LibCmo::CK2::ObjImpls { // setup ext and guid props.m_ReaderGuid.d1 = realprops.m_ReaderGuid.d1; props.m_ReaderGuid.d2 = realprops.m_ReaderGuid.d2; + std::string ext; + m_Context->GetOrdinaryString(realprops.m_Ext.GetExt(), ext); std::memcpy( - props.m_Ext.m_Data, - realprops.m_Ext.GetExt(), - std::min(CKSizeof(props.m_Ext.m_Data), realprops.m_Ext.GetSize()) + props.m_Ext.m_Data, + ext.c_str(), + std::min(CKSizeof(props.m_Ext.m_Data) - CKDWORD_C(1), static_cast(ext.size())) ); // write fake one @@ -308,9 +312,14 @@ namespace LibCmo::CK2::ObjImpls { if (buf != nullptr) { FakeBitmapProperties* props = static_cast(buf.get()); + // get utf8 extension + XContainer::XString ext; + m_Context->GetUTF8String(props->m_Ext.m_Data, ext); + + // get my bitmap prop CKBitmapProperties myprops( CKGUID(props->m_ReaderGuid.d1, props->m_ReaderGuid.d2), - props->m_Ext.m_Data + ext.c_str() ); m_ImageHost.SetSaveFormat(myprops); } diff --git a/Unvirt/AccessibleValue.cpp b/Unvirt/AccessibleValue.cpp index f87acc2..0a01769 100644 --- a/Unvirt/AccessibleValue.cpp +++ b/Unvirt/AccessibleValue.cpp @@ -4,181 +4,159 @@ namespace Unvirt::AccessibleValue { -#pragma region File Formatter +#pragma region Size Formatter - std::string GetReadableFileSize(uint64_t size) { - std::string strl; - static double denominator = (double)0b1111111111; - uint64_t probe = size; + std::u8string GetReadableFileSize(uint64_t _size) { + static constexpr double base = 1024.0; + static const std::vector units { + u8"B", u8"KiB", u8"MiB", u8"GiB", u8"TiB", u8"PiB", u8"EiB" + }; - // check bytes - if ((probe >> 10) == UINT64_C(0)) { - StringHelper::StdstringPrintf(strl, "%" PRIu64 "Bytes", probe); - return strl; + double size = static_cast(_size); + size_t unit_index = 0u; + + while (size >= base && (unit_index + 1u) < units.size()) { + size /= base; + ++unit_index; } - probe >>= 10; - - // check kb - if ((probe >> 10) == UINT64_C(0)) { - StringHelper::StdstringPrintf(strl, "%.2lfKiB", size / static_cast(UINT64_C(1) << 10)); - return strl; - } - probe >>= 10; - - // check mb - if ((probe >> 10) == UINT64_C(0)) { - StringHelper::StdstringPrintf(strl, "%.2lfMiB", size / static_cast(UINT64_C(1) << 20)); - return strl; - } - probe >>= 10; - - // otherwise gb - StringHelper::StdstringPrintf(strl, "%.2lfGiB", size / static_cast(UINT64_C(1) << 30)); - return strl; + return YYCC::StringHelper::Printf(u8"%.2lf%s", size, units[unit_index]); } #pragma endregion #pragma region CKERROR CK_CLASSID Data - struct CkClassidReflection { std::vector mHierarchy; }; + struct CkClassidReflection { std::vector mHierarchy; }; using CkClassidReflectionArray = std::vector>; - struct CkErrorReflection { const char* mName; const char* mDescription; }; + struct CkErrorReflection { const char8_t* mName; const char8_t* mDescription; }; using CkErrorReflectionArray = std::vector>; namespace EnumDesc { - const GeneralReflectionArray CK_FILE_WRITEMODE { - { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_UNCOMPRESSED, {"CKFILE_UNCOMPRESSED"} }, - { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_CHUNKCOMPRESSED_OLD, {"CKFILE_CHUNKCOMPRESSED_OLD"} }, - { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_EXTERNALTEXTURES_OLD, {"CKFILE_EXTERNALTEXTURES_OLD"} }, - { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_FORVIEWER, {"CKFILE_FORVIEWER"} }, - { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_WHOLECOMPRESSED, {"CKFILE_WHOLECOMPRESSED"} }, - }; const CkClassidReflectionArray CK_CLASSID { - { LibCmo::CK2::CK_CLASSID::CKCID_OBJECT, { { "CKCID_OBJECT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETERIN, { { "CKCID_OBJECT", "CKCID_PARAMETERIN" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETEROPERATION, { { "CKCID_OBJECT", "CKCID_PARAMETEROPERATION" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_STATE, { { "CKCID_OBJECT", "CKCID_STATE" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_BEHAVIORLINK, { { "CKCID_OBJECT", "CKCID_BEHAVIORLINK" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_BEHAVIOR, { { "CKCID_OBJECT", "CKCID_BEHAVIOR" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_BEHAVIORIO, { { "CKCID_OBJECT", "CKCID_BEHAVIORIO" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_RENDERCONTEXT, { { "CKCID_OBJECT", "CKCID_RENDERCONTEXT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_KINEMATICCHAIN, { { "CKCID_OBJECT", "CKCID_KINEMATICCHAIN" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_SCENEOBJECT, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_OBJECTANIMATION, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_OBJECTANIMATION" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_ANIMATION, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_ANIMATION" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_KEYEDANIMATION, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_ANIMATION", "CKCID_KEYEDANIMATION" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_BEOBJECT, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_DATAARRAY, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_DATAARRAY" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_SCENE, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_SCENE" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_LEVEL, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_LEVEL" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_PLACE, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_PLACE" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_GROUP, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_GROUP" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_SOUND, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_SOUND" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_WAVESOUND, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_SOUND", "CKCID_WAVESOUND" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_MIDISOUND, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_SOUND", "CKCID_MIDISOUND" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_MATERIAL, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_MATERIAL" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_TEXTURE, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_TEXTURE" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_MESH, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_MESH" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_PATCHMESH, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_MESH", "CKCID_PATCHMESH" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_RENDEROBJECT, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_RENDEROBJECT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_2DENTITY, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_RENDEROBJECT", "CKCID_2DENTITY" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_SPRITE, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_RENDEROBJECT", "CKCID_2DENTITY", "CKCID_SPRITE" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_SPRITETEXT, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_RENDEROBJECT", "CKCID_2DENTITY", "CKCID_SPRITETEXT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_3DENTITY, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_GRID, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_GRID" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_CURVEPOINT, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_CURVEPOINT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_SPRITE3D, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_SPRITE3D" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_CURVE, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_CURVE" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_CAMERA, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_CAMERA" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_TARGETCAMERA, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_CAMERA", "CKCID_TARGETCAMERA" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_LIGHT, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_LIGHT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_TARGETLIGHT, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_LIGHT", "CKCID_TARGETLIGHT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_CHARACTER, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_CHARACTER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_3DOBJECT, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_3DOBJECT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_BODYPART, { { "CKCID_OBJECT", "CKCID_SCENEOBJECT", "CKCID_BEOBJECT", "CKCID_3DENTITY", "CKCID_3DOBJECT", "CKCID_BODYPART" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETER, { { "CKCID_OBJECT", "CKCID_PARAMETER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETERLOCAL, { { "CKCID_OBJECT", "CKCID_PARAMETER", "CKCID_PARAMETERLOCAL" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETEROUT, { { "CKCID_OBJECT", "CKCID_PARAMETER", "CKCID_PARAMETEROUT" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_INTERFACEOBJECTMANAGER, { { "CKCID_OBJECT", "CKCID_INTERFACEOBJECTMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_CRITICALSECTION, { { "CKCID_OBJECT", "CKCID_CRITICALSECTION" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_LAYER, { { "CKCID_OBJECT", "CKCID_LAYER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_PROGRESSIVEMESH, { { "CKCID_OBJECT", "CKCID_PROGRESSIVEMESH" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_SYNCHRO, { { "CKCID_OBJECT", "CKCID_SYNCHRO" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_OBJECTARRAY, { { "CKCID_OBJECTARRAY" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_SCENEOBJECTDESC, { { "CKCID_SCENEOBJECTDESC" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_ATTRIBUTEMANAGER, { { "CKCID_ATTRIBUTEMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_MESSAGEMANAGER, { { "CKCID_MESSAGEMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_COLLISIONMANAGER, { { "CKCID_COLLISIONMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_OBJECTMANAGER, { { "CKCID_OBJECTMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_FLOORMANAGER, { { "CKCID_FLOORMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_RENDERMANAGER, { { "CKCID_RENDERMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_BEHAVIORMANAGER, { { "CKCID_BEHAVIORMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_INPUTMANAGER, { { "CKCID_INPUTMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETERMANAGER, { { "CKCID_PARAMETERMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_GRIDMANAGER, { { "CKCID_GRIDMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_SOUNDMANAGER, { { "CKCID_SOUNDMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_TIMEMANAGER, { { "CKCID_TIMEMANAGER" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_CUIKBEHDATA, { { "CKCID_CUIKBEHDATA" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_MAXCLASSID, { { "CKCID_MAXCLASSID" } } }, - { LibCmo::CK2::CK_CLASSID::CKCID_MAXMAXCLASSID, { { "CKCID_MAXMAXCLASSID" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_OBJECT, { { u8"CKCID_OBJECT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETERIN, { { u8"CKCID_OBJECT", u8"CKCID_PARAMETERIN" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETEROPERATION, { { u8"CKCID_OBJECT", u8"CKCID_PARAMETEROPERATION" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_STATE, { { u8"CKCID_OBJECT", u8"CKCID_STATE" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_BEHAVIORLINK, { { u8"CKCID_OBJECT", u8"CKCID_BEHAVIORLINK" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_BEHAVIOR, { { u8"CKCID_OBJECT", u8"CKCID_BEHAVIOR" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_BEHAVIORIO, { { u8"CKCID_OBJECT", u8"CKCID_BEHAVIORIO" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_RENDERCONTEXT, { { u8"CKCID_OBJECT", u8"CKCID_RENDERCONTEXT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_KINEMATICCHAIN, { { u8"CKCID_OBJECT", u8"CKCID_KINEMATICCHAIN" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_SCENEOBJECT, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_OBJECTANIMATION, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_OBJECTANIMATION" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_ANIMATION, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_ANIMATION" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_KEYEDANIMATION, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_ANIMATION", u8"CKCID_KEYEDANIMATION" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_BEOBJECT, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_DATAARRAY, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_DATAARRAY" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_SCENE, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_SCENE" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_LEVEL, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_LEVEL" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_PLACE, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_PLACE" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_GROUP, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_GROUP" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_SOUND, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_SOUND" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_WAVESOUND, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_SOUND", u8"CKCID_WAVESOUND" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_MIDISOUND, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_SOUND", u8"CKCID_MIDISOUND" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_MATERIAL, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_MATERIAL" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_TEXTURE, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_TEXTURE" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_MESH, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_MESH" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_PATCHMESH, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_MESH", u8"CKCID_PATCHMESH" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_RENDEROBJECT, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_RENDEROBJECT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_2DENTITY, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_RENDEROBJECT", u8"CKCID_2DENTITY" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_SPRITE, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_RENDEROBJECT", u8"CKCID_2DENTITY", u8"CKCID_SPRITE" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_SPRITETEXT, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_RENDEROBJECT", u8"CKCID_2DENTITY", u8"CKCID_SPRITETEXT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_3DENTITY, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_GRID, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_GRID" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_CURVEPOINT, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_CURVEPOINT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_SPRITE3D, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_SPRITE3D" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_CURVE, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_CURVE" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_CAMERA, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_CAMERA" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_TARGETCAMERA, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_CAMERA", u8"CKCID_TARGETCAMERA" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_LIGHT, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_LIGHT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_TARGETLIGHT, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_LIGHT", u8"CKCID_TARGETLIGHT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_CHARACTER, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_CHARACTER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_3DOBJECT, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_3DOBJECT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_BODYPART, { { u8"CKCID_OBJECT", u8"CKCID_SCENEOBJECT", u8"CKCID_BEOBJECT", u8"CKCID_3DENTITY", u8"CKCID_3DOBJECT", u8"CKCID_BODYPART" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETER, { { u8"CKCID_OBJECT", u8"CKCID_PARAMETER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETERLOCAL, { { u8"CKCID_OBJECT", u8"CKCID_PARAMETER", u8"CKCID_PARAMETERLOCAL" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETEROUT, { { u8"CKCID_OBJECT", u8"CKCID_PARAMETER", u8"CKCID_PARAMETEROUT" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_INTERFACEOBJECTMANAGER, { { u8"CKCID_OBJECT", u8"CKCID_INTERFACEOBJECTMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_CRITICALSECTION, { { u8"CKCID_OBJECT", u8"CKCID_CRITICALSECTION" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_LAYER, { { u8"CKCID_OBJECT", u8"CKCID_LAYER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_PROGRESSIVEMESH, { { u8"CKCID_OBJECT", u8"CKCID_PROGRESSIVEMESH" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_SYNCHRO, { { u8"CKCID_OBJECT", u8"CKCID_SYNCHRO" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_OBJECTARRAY, { { u8"CKCID_OBJECTARRAY" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_SCENEOBJECTDESC, { { u8"CKCID_SCENEOBJECTDESC" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_ATTRIBUTEMANAGER, { { u8"CKCID_ATTRIBUTEMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_MESSAGEMANAGER, { { u8"CKCID_MESSAGEMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_COLLISIONMANAGER, { { u8"CKCID_COLLISIONMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_OBJECTMANAGER, { { u8"CKCID_OBJECTMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_FLOORMANAGER, { { u8"CKCID_FLOORMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_RENDERMANAGER, { { u8"CKCID_RENDERMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_BEHAVIORMANAGER, { { u8"CKCID_BEHAVIORMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_INPUTMANAGER, { { u8"CKCID_INPUTMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_PARAMETERMANAGER, { { u8"CKCID_PARAMETERMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_GRIDMANAGER, { { u8"CKCID_GRIDMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_SOUNDMANAGER, { { u8"CKCID_SOUNDMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_TIMEMANAGER, { { u8"CKCID_TIMEMANAGER" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_CUIKBEHDATA, { { u8"CKCID_CUIKBEHDATA" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_MAXCLASSID, { { u8"CKCID_MAXCLASSID" } } }, + { LibCmo::CK2::CK_CLASSID::CKCID_MAXMAXCLASSID, { { u8"CKCID_MAXMAXCLASSID" } } }, }; const CkErrorReflectionArray CKERROR { - { LibCmo::CK2::CKERROR::CKERR_OK, { "CKERR_OK", "Operation successful " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDPARAMETER, { "CKERR_INVALIDPARAMETER", "One of the parameter passed to the function was invalid " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDPARAMETERTYPE, { "CKERR_INVALIDPARAMETERTYPE", "One of the parameter passed to the function was invalid " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDSIZE, { "CKERR_INVALIDSIZE", "The parameter size was invalid " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDOPERATION, { "CKERR_INVALIDOPERATION", "The operation type didn't exist " } }, - { LibCmo::CK2::CKERROR::CKERR_OPERATIONNOTIMPLEMENTED, { "CKERR_OPERATIONNOTIMPLEMENTED", "The function used to execute the operation is not yet implemented " } }, - { LibCmo::CK2::CKERROR::CKERR_OUTOFMEMORY, { "CKERR_OUTOFMEMORY", "There was not enough memory to perform the action " } }, - { LibCmo::CK2::CKERROR::CKERR_NOTIMPLEMENTED, { "CKERR_NOTIMPLEMENTED", "The function is not yet implemented " } }, - { LibCmo::CK2::CKERROR::CKERR_NOTFOUND, { "CKERR_NOTFOUND", "There was an attempt to remove something not present " } }, - { LibCmo::CK2::CKERROR::CKERR_NOLEVEL, { "CKERR_NOLEVEL", "There is no level currently created " } }, - { LibCmo::CK2::CKERROR::CKERR_CANCREATERENDERCONTEXT, { "CKERR_CANCREATERENDERCONTEXT", " " } }, - { LibCmo::CK2::CKERROR::CKERR_NOTIFICATIONNOTHANDLED, { "CKERR_NOTIFICATIONNOTHANDLED", "The notification message was not used " } }, - { LibCmo::CK2::CKERROR::CKERR_ALREADYPRESENT, { "CKERR_ALREADYPRESENT", "Attempt to add an item that was already present " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDRENDERCONTEXT, { "CKERR_INVALIDRENDERCONTEXT", "the render context is not valid " } }, - { LibCmo::CK2::CKERROR::CKERR_RENDERCONTEXTINACTIVE, { "CKERR_RENDERCONTEXTINACTIVE", "the render context is not activated for rendering " } }, - { LibCmo::CK2::CKERROR::CKERR_NOLOADPLUGINS, { "CKERR_NOLOADPLUGINS", "there was no plugins to load this kind of file " } }, - { LibCmo::CK2::CKERROR::CKERR_NOSAVEPLUGINS, { "CKERR_NOSAVEPLUGINS", "there was no plugins to save this kind of file " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDFILE, { "CKERR_INVALIDFILE", "attempt to load an invalid file " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDPLUGIN, { "CKERR_INVALIDPLUGIN", "attempt to load with an invalid plugin " } }, - { LibCmo::CK2::CKERROR::CKERR_NOTINITIALIZED, { "CKERR_NOTINITIALIZED", "attempt use an object that wasnt initialized " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDMESSAGE, { "CKERR_INVALIDMESSAGE", "attempt use a message type that wasn't registred " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDPROTOTYPE, { "CKERR_INVALIDPROTOTYPE", "attempt use an invalid prototype " } }, - { LibCmo::CK2::CKERROR::CKERR_NODLLFOUND, { "CKERR_NODLLFOUND", "No dll file found in the parse directory " } }, - { LibCmo::CK2::CKERROR::CKERR_ALREADYREGISTREDDLL, { "CKERR_ALREADYREGISTREDDLL", "this dll has already been registred " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDDLL, { "CKERR_INVALIDDLL", "this dll does not contain information to create the prototype " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDOBJECT, { "CKERR_INVALIDOBJECT", "Invalid Object (attempt to Get an object from an invalid ID) " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDCONDSOLEWINDOW, { "CKERR_INVALIDCONDSOLEWINDOW", "Invalid window was provided as console window " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDKINEMATICCHAIN, { "CKERR_INVALIDKINEMATICCHAIN", "Invalid kinematic chain ( end and start effector may not be part of the same hierarchy ) " } }, - { LibCmo::CK2::CKERROR::CKERR_NOKEYBOARD, { "CKERR_NOKEYBOARD", "Keyboard not attached or not working properly " } }, - { LibCmo::CK2::CKERROR::CKERR_NOMOUSE, { "CKERR_NOMOUSE", "Mouse not attached or not working properly " } }, - { LibCmo::CK2::CKERROR::CKERR_NOJOYSTICK, { "CKERR_NOJOYSTICK", "Joystick not attached or not working properly " } }, - { LibCmo::CK2::CKERROR::CKERR_INCOMPATIBLEPARAMETERS, { "CKERR_INCOMPATIBLEPARAMETERS", "Try to link imcompatible Parameters " } }, - { LibCmo::CK2::CKERROR::CKERR_NORENDERENGINE, { "CKERR_NORENDERENGINE", "There is no render engine dll " } }, - { LibCmo::CK2::CKERROR::CKERR_NOCURRENTLEVEL, { "CKERR_NOCURRENTLEVEL", "There is no current level (use CKSetCurrentLevel ) " } }, - { LibCmo::CK2::CKERROR::CKERR_SOUNDDISABLED, { "CKERR_SOUNDDISABLED", "Sound Management has been disabled " } }, - { LibCmo::CK2::CKERROR::CKERR_DINPUTDISABLED, { "CKERR_DINPUTDISABLED", "DirectInput Management has been disabled " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDGUID, { "CKERR_INVALIDGUID", "Guid is already in use or invalid " } }, - { LibCmo::CK2::CKERROR::CKERR_NOTENOUGHDISKPLACE, { "CKERR_NOTENOUGHDISKPLACE", "There was no more free space on disk when trying to save a file " } }, - { LibCmo::CK2::CKERROR::CKERR_CANTWRITETOFILE, { "CKERR_CANTWRITETOFILE", "Impossible to write to file (write-protection ?) " } }, - { LibCmo::CK2::CKERROR::CKERR_BEHAVIORADDDENIEDBYCB, { "CKERR_BEHAVIORADDDENIEDBYCB", "The behavior cannnot be added to this entity " } }, - { LibCmo::CK2::CKERROR::CKERR_INCOMPATIBLECLASSID, { "CKERR_INCOMPATIBLECLASSID", "The behavior cannnot be added to this entity " } }, - { LibCmo::CK2::CKERROR::CKERR_MANAGERALREADYEXISTS, { "CKERR_MANAGERALREADYEXISTS", "A manager was registered more than once " } }, - { LibCmo::CK2::CKERROR::CKERR_PAUSED, { "CKERR_PAUSED", "CKprocess or TimeManager process while CK is paused will fail " } }, - { LibCmo::CK2::CKERROR::CKERR_PLUGINSMISSING, { "CKERR_PLUGINSMISSING", "Some plugins were missing whileloading a file " } }, - { LibCmo::CK2::CKERROR::CKERR_OBSOLETEVIRTOOLS, { "CKERR_OBSOLETEVIRTOOLS", "Virtools version too old to load this file " } }, - { LibCmo::CK2::CKERROR::CKERR_FILECRCERROR, { "CKERR_FILECRCERROR", "CRC Error while loading file " } }, - { LibCmo::CK2::CKERROR::CKERR_ALREADYFULLSCREEN, { "CKERR_ALREADYFULLSCREEN", "A Render context is already in Fullscreen Mode " } }, - { LibCmo::CK2::CKERROR::CKERR_CANCELLED, { "CKERR_CANCELLED", "Operation was cancelled by user " } }, - { LibCmo::CK2::CKERROR::CKERR_NOANIMATIONKEY, { "CKERR_NOANIMATIONKEY", "there were no animation key at the given index " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDINDEX, { "CKERR_INVALIDINDEX", "attemp to acces an animation key with an invalid index " } }, - { LibCmo::CK2::CKERROR::CKERR_INVALIDANIMATION, { "CKERR_INVALIDANIMATION", "the animation is invalid (no entity associated or zero length) " } }, + { LibCmo::CK2::CKERROR::CKERR_OK, { u8"CKERR_OK", u8"Operation successful " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDPARAMETER, { u8"CKERR_INVALIDPARAMETER", u8"One of the parameter passed to the function was invalid " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDPARAMETERTYPE, { u8"CKERR_INVALIDPARAMETERTYPE", u8"One of the parameter passed to the function was invalid " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDSIZE, { u8"CKERR_INVALIDSIZE", u8"The parameter size was invalid " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDOPERATION, { u8"CKERR_INVALIDOPERATION", u8"The operation type didn't exist " } }, + { LibCmo::CK2::CKERROR::CKERR_OPERATIONNOTIMPLEMENTED, { u8"CKERR_OPERATIONNOTIMPLEMENTED", u8"The function used to execute the operation is not yet implemented " } }, + { LibCmo::CK2::CKERROR::CKERR_OUTOFMEMORY, { u8"CKERR_OUTOFMEMORY", u8"There was not enough memory to perform the action " } }, + { LibCmo::CK2::CKERROR::CKERR_NOTIMPLEMENTED, { u8"CKERR_NOTIMPLEMENTED", u8"The function is not yet implemented " } }, + { LibCmo::CK2::CKERROR::CKERR_NOTFOUND, { u8"CKERR_NOTFOUND", u8"There was an attempt to remove something not present " } }, + { LibCmo::CK2::CKERROR::CKERR_NOLEVEL, { u8"CKERR_NOLEVEL", u8"There is no level currently created " } }, + { LibCmo::CK2::CKERROR::CKERR_CANCREATERENDERCONTEXT, { u8"CKERR_CANCREATERENDERCONTEXT", u8" " } }, + { LibCmo::CK2::CKERROR::CKERR_NOTIFICATIONNOTHANDLED, { u8"CKERR_NOTIFICATIONNOTHANDLED", u8"The notification message was not used " } }, + { LibCmo::CK2::CKERROR::CKERR_ALREADYPRESENT, { u8"CKERR_ALREADYPRESENT", u8"Attempt to add an item that was already present " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDRENDERCONTEXT, { u8"CKERR_INVALIDRENDERCONTEXT", u8"the render context is not valid " } }, + { LibCmo::CK2::CKERROR::CKERR_RENDERCONTEXTINACTIVE, { u8"CKERR_RENDERCONTEXTINACTIVE", u8"the render context is not activated for rendering " } }, + { LibCmo::CK2::CKERROR::CKERR_NOLOADPLUGINS, { u8"CKERR_NOLOADPLUGINS", u8"there was no plugins to load this kind of file " } }, + { LibCmo::CK2::CKERROR::CKERR_NOSAVEPLUGINS, { u8"CKERR_NOSAVEPLUGINS", u8"there was no plugins to save this kind of file " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDFILE, { u8"CKERR_INVALIDFILE", u8"attempt to load an invalid file " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDPLUGIN, { u8"CKERR_INVALIDPLUGIN", u8"attempt to load with an invalid plugin " } }, + { LibCmo::CK2::CKERROR::CKERR_NOTINITIALIZED, { u8"CKERR_NOTINITIALIZED", u8"attempt use an object that wasnt initialized " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDMESSAGE, { u8"CKERR_INVALIDMESSAGE", u8"attempt use a message type that wasn't registred " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDPROTOTYPE, { u8"CKERR_INVALIDPROTOTYPE", u8"attempt use an invalid prototype " } }, + { LibCmo::CK2::CKERROR::CKERR_NODLLFOUND, { u8"CKERR_NODLLFOUND", u8"No dll file found in the parse directory " } }, + { LibCmo::CK2::CKERROR::CKERR_ALREADYREGISTREDDLL, { u8"CKERR_ALREADYREGISTREDDLL", u8"this dll has already been registred " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDDLL, { u8"CKERR_INVALIDDLL", u8"this dll does not contain information to create the prototype " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDOBJECT, { u8"CKERR_INVALIDOBJECT", u8"Invalid Object (attempt to Get an object from an invalid ID) " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDCONDSOLEWINDOW, { u8"CKERR_INVALIDCONDSOLEWINDOW", u8"Invalid window was provided as console window " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDKINEMATICCHAIN, { u8"CKERR_INVALIDKINEMATICCHAIN", u8"Invalid kinematic chain ( end and start effector may not be part of the same hierarchy ) " } }, + { LibCmo::CK2::CKERROR::CKERR_NOKEYBOARD, { u8"CKERR_NOKEYBOARD", u8"Keyboard not attached or not working properly " } }, + { LibCmo::CK2::CKERROR::CKERR_NOMOUSE, { u8"CKERR_NOMOUSE", u8"Mouse not attached or not working properly " } }, + { LibCmo::CK2::CKERROR::CKERR_NOJOYSTICK, { u8"CKERR_NOJOYSTICK", u8"Joystick not attached or not working properly " } }, + { LibCmo::CK2::CKERROR::CKERR_INCOMPATIBLEPARAMETERS, { u8"CKERR_INCOMPATIBLEPARAMETERS", u8"Try to link imcompatible Parameters " } }, + { LibCmo::CK2::CKERROR::CKERR_NORENDERENGINE, { u8"CKERR_NORENDERENGINE", u8"There is no render engine dll " } }, + { LibCmo::CK2::CKERROR::CKERR_NOCURRENTLEVEL, { u8"CKERR_NOCURRENTLEVEL", u8"There is no current level (use CKSetCurrentLevel ) " } }, + { LibCmo::CK2::CKERROR::CKERR_SOUNDDISABLED, { u8"CKERR_SOUNDDISABLED", u8"Sound Management has been disabled " } }, + { LibCmo::CK2::CKERROR::CKERR_DINPUTDISABLED, { u8"CKERR_DINPUTDISABLED", u8"DirectInput Management has been disabled " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDGUID, { u8"CKERR_INVALIDGUID", u8"Guid is already in use or invalid " } }, + { LibCmo::CK2::CKERROR::CKERR_NOTENOUGHDISKPLACE, { u8"CKERR_NOTENOUGHDISKPLACE", u8"There was no more free space on disk when trying to save a file " } }, + { LibCmo::CK2::CKERROR::CKERR_CANTWRITETOFILE, { u8"CKERR_CANTWRITETOFILE", u8"Impossible to write to file (write-protection ?) " } }, + { LibCmo::CK2::CKERROR::CKERR_BEHAVIORADDDENIEDBYCB, { u8"CKERR_BEHAVIORADDDENIEDBYCB", u8"The behavior cannnot be added to this entity " } }, + { LibCmo::CK2::CKERROR::CKERR_INCOMPATIBLECLASSID, { u8"CKERR_INCOMPATIBLECLASSID", u8"The behavior cannnot be added to this entity " } }, + { LibCmo::CK2::CKERROR::CKERR_MANAGERALREADYEXISTS, { u8"CKERR_MANAGERALREADYEXISTS", u8"A manager was registered more than once " } }, + { LibCmo::CK2::CKERROR::CKERR_PAUSED, { u8"CKERR_PAUSED", u8"CKprocess or TimeManager process while CK is paused will fail " } }, + { LibCmo::CK2::CKERROR::CKERR_PLUGINSMISSING, { u8"CKERR_PLUGINSMISSING", u8"Some plugins were missing whileloading a file " } }, + { LibCmo::CK2::CKERROR::CKERR_OBSOLETEVIRTOOLS, { u8"CKERR_OBSOLETEVIRTOOLS", u8"Virtools version too old to load this file " } }, + { LibCmo::CK2::CKERROR::CKERR_FILECRCERROR, { u8"CKERR_FILECRCERROR", u8"CRC Error while loading file " } }, + { LibCmo::CK2::CKERROR::CKERR_ALREADYFULLSCREEN, { u8"CKERR_ALREADYFULLSCREEN", u8"A Render context is already in Fullscreen Mode " } }, + { LibCmo::CK2::CKERROR::CKERR_CANCELLED, { u8"CKERR_CANCELLED", u8"Operation was cancelled by user " } }, + { LibCmo::CK2::CKERROR::CKERR_NOANIMATIONKEY, { u8"CKERR_NOANIMATIONKEY", u8"there were no animation key at the given index " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDINDEX, { u8"CKERR_INVALIDINDEX", u8"attemp to acces an animation key with an invalid index " } }, + { LibCmo::CK2::CKERROR::CKERR_INVALIDANIMATION, { u8"CKERR_INVALIDANIMATION", u8"the animation is invalid (no entity associated or zero length) " } }, }; } @@ -196,13 +174,13 @@ namespace Unvirt::AccessibleValue { return nullptr; } - std::string GetCkErrorName(LibCmo::CK2::CKERROR err) { + std::u8string GetCkErrorName(LibCmo::CK2::CKERROR err) { const CkErrorReflection* node = GetCkError(err); if (node != nullptr) return node->mName; else return c_InvalidEnumName; } - std::string GetCkErrorDescription(LibCmo::CK2::CKERROR err) { + std::u8string GetCkErrorDescription(LibCmo::CK2::CKERROR err) { const CkErrorReflection* node = GetCkError(err); if (node != nullptr) return node->mDescription; else return c_InvalidEnumName; @@ -217,22 +195,22 @@ namespace Unvirt::AccessibleValue { return nullptr; } - std::string GetClassIdName(LibCmo::CK2::CK_CLASSID cls) { + std::u8string GetClassIdName(LibCmo::CK2::CK_CLASSID cls) { const CkClassidReflection* node = GetCkClassid(cls); if (node == nullptr) return c_InvalidEnumName; else return node->mHierarchy.back(); } - std::string GetClassIdHierarchy(LibCmo::CK2::CK_CLASSID cls) { + std::u8string GetClassIdHierarchy(LibCmo::CK2::CK_CLASSID cls) { const CkClassidReflection* node = GetCkClassid(cls); if (node == nullptr) return c_InvalidEnumName; - std::string strl; - for (auto& hierarchy_node : node->mHierarchy) { - if (!strl.empty()) strl += " -> "; - strl += hierarchy_node; + std::u8string ret; + for (const auto* hierarchy_node : node->mHierarchy) { + if (!ret.empty()) ret += u8" -> "; + ret += hierarchy_node; } - return strl; + return ret; } #pragma endregion @@ -241,285 +219,350 @@ namespace Unvirt::AccessibleValue { namespace EnumDesc { + const GeneralReflectionArray CK_FILE_WRITEMODE { + { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_UNCOMPRESSED, { u8"CKFILE_UNCOMPRESSED" } }, + { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_CHUNKCOMPRESSED_OLD, { u8"CKFILE_CHUNKCOMPRESSED_OLD" } }, + { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_EXTERNALTEXTURES_OLD, { u8"CKFILE_EXTERNALTEXTURES_OLD" } }, + { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_FORVIEWER, { u8"CKFILE_FORVIEWER" } }, + { LibCmo::CK2::CK_FILE_WRITEMODE::CKFILE_WHOLECOMPRESSED, { u8"CKFILE_WHOLECOMPRESSED" } }, + }; + const GeneralReflectionArray CK_LOAD_FLAGS { + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_ANIMATION, { u8"CK_LOAD_ANIMATION" } }, + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_GEOMETRY, { u8"CK_LOAD_GEOMETRY" } }, + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_DEFAULT, { u8"CK_LOAD_DEFAULT" } }, + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_ASCHARACTER, { u8"CK_LOAD_ASCHARACTER" } }, + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_DODIALOG, { u8"CK_LOAD_DODIALOG" } }, + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_AS_DYNAMIC_OBJECT, { u8"CK_LOAD_AS_DYNAMIC_OBJECT" } }, + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_AUTOMATICMODE, { u8"CK_LOAD_AUTOMATICMODE" } }, + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_CHECKDUPLICATES, { u8"CK_LOAD_CHECKDUPLICATES" } }, + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_CHECKDEPENDENCIES, { u8"CK_LOAD_CHECKDEPENDENCIES" } }, + { LibCmo::CK2::CK_LOAD_FLAGS::CK_LOAD_ONLYBEHAVIORS, { u8"CK_LOAD_ONLYBEHAVIORS" } }, + }; const GeneralReflectionArray CK_FO_OPTIONS { - { LibCmo::CK2::CK_FO_OPTIONS::CK_FO_DEFAULT, {"CK_FO_DEFAULT"} }, - { LibCmo::CK2::CK_FO_OPTIONS::CK_FO_RENAMEOBJECT, {"CK_FO_RENAMEOBJECT"} }, - { LibCmo::CK2::CK_FO_OPTIONS::CK_FO_REPLACEOBJECT, {"CK_FO_REPLACEOBJECT"} }, - { LibCmo::CK2::CK_FO_OPTIONS::CK_FO_DONTLOADOBJECT, {"CK_FO_DONTLOADOBJECT"} }, + { LibCmo::CK2::CK_FO_OPTIONS::CK_FO_DEFAULT, { u8"CK_FO_DEFAULT" } }, + { LibCmo::CK2::CK_FO_OPTIONS::CK_FO_RENAMEOBJECT, { u8"CK_FO_RENAMEOBJECT" } }, + { LibCmo::CK2::CK_FO_OPTIONS::CK_FO_REPLACEOBJECT, { u8"CK_FO_REPLACEOBJECT" } }, + { LibCmo::CK2::CK_FO_OPTIONS::CK_FO_DONTLOADOBJECT, { u8"CK_FO_DONTLOADOBJECT" } }, + }; + const GeneralReflectionArray CK_LOADMODE { + { LibCmo::CK2::CK_LOADMODE::CKLOAD_INVALID, { u8"CKLOAD_INVALID" } }, + { LibCmo::CK2::CK_LOADMODE::CKLOAD_OK, { u8"CKLOAD_OK" } }, + { LibCmo::CK2::CK_LOADMODE::CKLOAD_REPLACE, { u8"CKLOAD_REPLACE" } }, + { LibCmo::CK2::CK_LOADMODE::CKLOAD_RENAME, { u8"CKLOAD_RENAME" } }, + { LibCmo::CK2::CK_LOADMODE::CKLOAD_USECURRENT, { u8"CKLOAD_USECURRENT" } }, + }; + const GeneralReflectionArray CK_OBJECTCREATION_OPTIONS { + { LibCmo::CK2::CK_OBJECTCREATION_OPTIONS::CK_OBJECTCREATION_NONAMECHECK, { u8"CK_OBJECTCREATION_NONAMECHECK" } }, + { LibCmo::CK2::CK_OBJECTCREATION_OPTIONS::CK_OBJECTCREATION_REPLACE, { u8"CK_OBJECTCREATION_REPLACE" } }, + { LibCmo::CK2::CK_OBJECTCREATION_OPTIONS::CK_OBJECTCREATION_RENAME, { u8"CK_OBJECTCREATION_RENAME" } }, + { LibCmo::CK2::CK_OBJECTCREATION_OPTIONS::CK_OBJECTCREATION_USECURRENT, { u8"CK_OBJECTCREATION_USECURRENT" } }, + { LibCmo::CK2::CK_OBJECTCREATION_OPTIONS::CK_OBJECTCREATION_ASK, { u8"CK_OBJECTCREATION_ASK" } }, + { LibCmo::CK2::CK_OBJECTCREATION_OPTIONS::CK_OBJECTCREATION_FLAGSMASK, { u8"CK_OBJECTCREATION_FLAGSMASK" } }, + { LibCmo::CK2::CK_OBJECTCREATION_OPTIONS::CK_OBJECTCREATION_DYNAMIC, { u8"CK_OBJECTCREATION_DYNAMIC" } }, + { LibCmo::CK2::CK_OBJECTCREATION_OPTIONS::CK_OBJECTCREATION_ACTIVATE, { u8"CK_OBJECTCREATION_ACTIVATE" } }, + { LibCmo::CK2::CK_OBJECTCREATION_OPTIONS::CK_OBJECTCREATION_NONAMECOPY, { u8"CK_OBJECTCREATION_NONAMECOPY" } }, + }; + const GeneralReflectionArray CK_PLUGIN_TYPE { + { LibCmo::CK2::CK_PLUGIN_TYPE::CKPLUGIN_BITMAP_READER, { u8"CKPLUGIN_BITMAP_READER" } }, + { LibCmo::CK2::CK_PLUGIN_TYPE::CKPLUGIN_SOUND_READER, { u8"CKPLUGIN_SOUND_READER" } }, + { LibCmo::CK2::CK_PLUGIN_TYPE::CKPLUGIN_MODEL_READER, { u8"CKPLUGIN_MODEL_READER" } }, + { LibCmo::CK2::CK_PLUGIN_TYPE::CKPLUGIN_MANAGER_DLL, { u8"CKPLUGIN_MANAGER_DLL" } }, + { LibCmo::CK2::CK_PLUGIN_TYPE::CKPLUGIN_BEHAVIOR_DLL, { u8"CKPLUGIN_BEHAVIOR_DLL" } }, + { LibCmo::CK2::CK_PLUGIN_TYPE::CKPLUGIN_RENDERENGINE_DLL, { u8"CKPLUGIN_RENDERENGINE_DLL" } }, + { LibCmo::CK2::CK_PLUGIN_TYPE::CKPLUGIN_MOVIE_READER, { u8"CKPLUGIN_MOVIE_READER" } }, + { LibCmo::CK2::CK_PLUGIN_TYPE::CKPLUGIN_EXTENSION_DLL, { u8"CKPLUGIN_EXTENSION_DLL" } }, }; const GeneralReflectionArray CK_STATECHUNK_CHUNKOPTIONS { - { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_IDS, {"CHNK_OPTION_IDS"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_MAN, {"CHNK_OPTION_MAN"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_CHN, {"CHNK_OPTION_CHN"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_FILE, {"CHNK_OPTION_FILE"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_ALLOWDYN, {"CHNK_OPTION_ALLOWDYN"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_LISTBIG, {"CHNK_OPTION_LISTBIG"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_DONTDELETE_PTR, {"CHNK_DONTDELETE_PTR"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_DONTDELETE_PARSER, {"CHNK_DONTDELETE_PARSER"} }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_IDS, { u8"CHNK_OPTION_IDS" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_MAN, { u8"CHNK_OPTION_MAN" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_CHN, { u8"CHNK_OPTION_CHN" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_FILE, { u8"CHNK_OPTION_FILE" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_ALLOWDYN, { u8"CHNK_OPTION_ALLOWDYN" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_OPTION_LISTBIG, { u8"CHNK_OPTION_LISTBIG" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_DONTDELETE_PTR, { u8"CHNK_DONTDELETE_PTR" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKOPTIONS::CHNK_DONTDELETE_PARSER, { u8"CHNK_DONTDELETE_PARSER" } }, }; const GeneralReflectionArray CK_STATECHUNK_DATAVERSION { - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNKDATA_OLDVERSION, {"CHUNKDATA_OLDVERSION"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNKDATA_BASEVERSION, {"CHUNKDATA_BASEVERSION"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_WAVESOUND_VERSION2, {"CHUNK_WAVESOUND_VERSION2"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_WAVESOUND_VERSION3, {"CHUNK_WAVESOUND_VERSION3"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_MATERIAL_VERSION_ZTEST, {"CHUNK_MATERIAL_VERSION_ZTEST"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_MAJORCHANGE_VERSION, {"CHUNK_MAJORCHANGE_VERSION"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_MACCHANGE_VERSION, {"CHUNK_MACCHANGE_VERSION"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_WAVESOUND_VERSION4, {"CHUNK_WAVESOUND_VERSION4"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_SCENECHANGE_VERSION, {"CHUNK_SCENECHANGE_VERSION"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_MESHCHANGE_VERSION, {"CHUNK_MESHCHANGE_VERSION"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_DEV_2_1, {"CHUNK_DEV_2_1"} }, - { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNKDATA_CURRENTVERSION, {"CHUNKDATA_CURRENTVERSION"} }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNKDATA_OLDVERSION, { u8"CHUNKDATA_OLDVERSION" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNKDATA_BASEVERSION, { u8"CHUNKDATA_BASEVERSION" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_WAVESOUND_VERSION2, { u8"CHUNK_WAVESOUND_VERSION2" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_WAVESOUND_VERSION3, { u8"CHUNK_WAVESOUND_VERSION3" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_MATERIAL_VERSION_ZTEST, { u8"CHUNK_MATERIAL_VERSION_ZTEST" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_MAJORCHANGE_VERSION, { u8"CHUNK_MAJORCHANGE_VERSION" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_MACCHANGE_VERSION, { u8"CHUNK_MACCHANGE_VERSION" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_WAVESOUND_VERSION4, { u8"CHUNK_WAVESOUND_VERSION4" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_SCENECHANGE_VERSION, { u8"CHUNK_SCENECHANGE_VERSION" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_MESHCHANGE_VERSION, { u8"CHUNK_MESHCHANGE_VERSION" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNK_DEV_2_1, { u8"CHUNK_DEV_2_1" } }, + { LibCmo::CK2::CK_STATECHUNK_DATAVERSION::CHUNKDATA_CURRENTVERSION, { u8"CHUNKDATA_CURRENTVERSION" } }, }; const GeneralReflectionArray CK_STATECHUNK_CHUNKVERSION { - { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSIONBASE, {"CHUNK_VERSIONBASE"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSION1, {"CHUNK_VERSION1"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSION2, {"CHUNK_VERSION2"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSION3, {"CHUNK_VERSION3"} }, - { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSION4, {"CHUNK_VERSION4"} }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSIONBASE, { u8"CHUNK_VERSIONBASE" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSION1, { u8"CHUNK_VERSION1" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSION2, { u8"CHUNK_VERSION2" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSION3, { u8"CHUNK_VERSION3" } }, + { LibCmo::CK2::CK_STATECHUNK_CHUNKVERSION::CHUNK_VERSION4, { u8"CHUNK_VERSION4" } }, + }; + const GeneralReflectionArray CK_OBJECT_SHOWOPTION { + { LibCmo::CK2::CK_OBJECT_SHOWOPTION::CKHIDE, { u8"CKHIDE" } }, + { LibCmo::CK2::CK_OBJECT_SHOWOPTION::CKSHOW, { u8"CKSHOW" } }, + { LibCmo::CK2::CK_OBJECT_SHOWOPTION::CKHIERARCHICALHIDE, { u8"CKHIERARCHICALHIDE" } }, }; const GeneralReflectionArray CK_OBJECT_FLAGS { - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_INTERFACEOBJ, {"CK_OBJECT_INTERFACEOBJ"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_PRIVATE, {"CK_OBJECT_PRIVATE"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_INTERFACEMARK, {"CK_OBJECT_INTERFACEMARK"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_FREEID, {"CK_OBJECT_FREEID"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_TOBEDELETED, {"CK_OBJECT_TOBEDELETED"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_NOTTOBESAVED, {"CK_OBJECT_NOTTOBESAVED"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_VISIBLE, {"CK_OBJECT_VISIBLE"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_NAMESHARED, {"CK_OBJECT_NAMESHARED"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_DYNAMIC, {"CK_OBJECT_DYNAMIC"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_HIERACHICALHIDE, {"CK_OBJECT_HIERACHICALHIDE"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_UPTODATE, {"CK_OBJECT_UPTODATE"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_TEMPMARKER, {"CK_OBJECT_TEMPMARKER"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_ONLYFORFILEREFERENCE, {"CK_OBJECT_ONLYFORFILEREFERENCE"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_NOTTOBEDELETED, {"CK_OBJECT_NOTTOBEDELETED"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_APPDATA, {"CK_OBJECT_APPDATA"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_SINGLEACTIVITY, {"CK_OBJECT_SINGLEACTIVITY"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_LOADSKIPBEOBJECT, {"CK_OBJECT_LOADSKIPBEOBJECT"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_NOTTOBELISTEDANDSAVED, {"CK_OBJECT_NOTTOBELISTEDANDSAVED"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETEROUT_SETTINGS, {"CK_PARAMETEROUT_SETTINGS"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETEROUT_PARAMOP, {"CK_PARAMETEROUT_PARAMOP"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETERIN_DISABLED, {"CK_PARAMETERIN_DISABLED"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETERIN_THIS, {"CK_PARAMETERIN_THIS"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETERIN_SHARED, {"CK_PARAMETERIN_SHARED"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETEROUT_DELETEAFTERUSE, {"CK_PARAMETEROUT_DELETEAFTERUSE"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_PARAMMASK, {"CK_OBJECT_PARAMMASK"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_BEHAVIORIO_IN, {"CK_BEHAVIORIO_IN"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_BEHAVIORIO_OUT, {"CK_BEHAVIORIO_OUT"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_BEHAVIORIO_ACTIVE, {"CK_BEHAVIORIO_ACTIVE"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_IOTYPEMASK, {"CK_OBJECT_IOTYPEMASK"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_IOMASK, {"CK_OBJECT_IOMASK"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CKBEHAVIORLINK_RESERVED, {"CKBEHAVIORLINK_RESERVED"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CKBEHAVIORLINK_ACTIVATEDLASTFRAME, {"CKBEHAVIORLINK_ACTIVATEDLASTFRAME"} }, - { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_BEHAVIORLINKMASK, {"CK_OBJECT_BEHAVIORLINKMASK"} }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_INTERFACEOBJ, { u8"CK_OBJECT_INTERFACEOBJ" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_PRIVATE, { u8"CK_OBJECT_PRIVATE" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_INTERFACEMARK, { u8"CK_OBJECT_INTERFACEMARK" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_FREEID, { u8"CK_OBJECT_FREEID" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_TOBEDELETED, { u8"CK_OBJECT_TOBEDELETED" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_NOTTOBESAVED, { u8"CK_OBJECT_NOTTOBESAVED" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_VISIBLE, { u8"CK_OBJECT_VISIBLE" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_NAMESHARED, { u8"CK_OBJECT_NAMESHARED" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_DYNAMIC, { u8"CK_OBJECT_DYNAMIC" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_HIERACHICALHIDE, { u8"CK_OBJECT_HIERACHICALHIDE" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_UPTODATE, { u8"CK_OBJECT_UPTODATE" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_TEMPMARKER, { u8"CK_OBJECT_TEMPMARKER" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_ONLYFORFILEREFERENCE, { u8"CK_OBJECT_ONLYFORFILEREFERENCE" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_NOTTOBEDELETED, { u8"CK_OBJECT_NOTTOBEDELETED" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_APPDATA, { u8"CK_OBJECT_APPDATA" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_SINGLEACTIVITY, { u8"CK_OBJECT_SINGLEACTIVITY" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_LOADSKIPBEOBJECT, { u8"CK_OBJECT_LOADSKIPBEOBJECT" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_NOTTOBELISTEDANDSAVED, { u8"CK_OBJECT_NOTTOBELISTEDANDSAVED" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETEROUT_SETTINGS, { u8"CK_PARAMETEROUT_SETTINGS" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETEROUT_PARAMOP, { u8"CK_PARAMETEROUT_PARAMOP" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETERIN_DISABLED, { u8"CK_PARAMETERIN_DISABLED" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETERIN_THIS, { u8"CK_PARAMETERIN_THIS" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETERIN_SHARED, { u8"CK_PARAMETERIN_SHARED" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_PARAMETEROUT_DELETEAFTERUSE, { u8"CK_PARAMETEROUT_DELETEAFTERUSE" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_PARAMMASK, { u8"CK_OBJECT_PARAMMASK" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_BEHAVIORIO_IN, { u8"CK_BEHAVIORIO_IN" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_BEHAVIORIO_OUT, { u8"CK_BEHAVIORIO_OUT" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_BEHAVIORIO_ACTIVE, { u8"CK_BEHAVIORIO_ACTIVE" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_IOTYPEMASK, { u8"CK_OBJECT_IOTYPEMASK" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_IOMASK, { u8"CK_OBJECT_IOMASK" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CKBEHAVIORLINK_RESERVED, { u8"CKBEHAVIORLINK_RESERVED" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CKBEHAVIORLINK_ACTIVATEDLASTFRAME, { u8"CKBEHAVIORLINK_ACTIVATEDLASTFRAME" } }, + { LibCmo::CK2::CK_OBJECT_FLAGS::CK_OBJECT_BEHAVIORLINKMASK, { u8"CK_OBJECT_BEHAVIORLINKMASK" } }, }; const GeneralReflectionArray CK_3DENTITY_FLAGS { - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_DUMMY, {"CK_3DENTITY_DUMMY"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_FRAME, {"CK_3DENTITY_FRAME"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_RESERVED0, {"CK_3DENTITY_RESERVED0"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_TARGETLIGHT, {"CK_3DENTITY_TARGETLIGHT"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_TARGETCAMERA, {"CK_3DENTITY_TARGETCAMERA"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_IGNOREANIMATION, {"CK_3DENTITY_IGNOREANIMATION"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_HIERARCHICALOBSTACLE, {"CK_3DENTITY_HIERARCHICALOBSTACLE"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_UPDATELASTFRAME, {"CK_3DENTITY_UPDATELASTFRAME"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_CAMERAIGNOREASPECT, {"CK_3DENTITY_CAMERAIGNOREASPECT"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_DISABLESKINPROCESS, {"CK_3DENTITY_DISABLESKINPROCESS"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_ENABLESKINOFFSET, {"CK_3DENTITY_ENABLESKINOFFSET"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_PLACEVALID, {"CK_3DENTITY_PLACEVALID"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_PARENTVALID, {"CK_3DENTITY_PARENTVALID"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_IKJOINTVALID, {"CK_3DENTITY_IKJOINTVALID"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_PORTAL, {"CK_3DENTITY_PORTAL"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_ZORDERVALID, {"CK_3DENTITY_ZORDERVALID"} }, - { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_CHARACTERDOPROCESS, {"CK_3DENTITY_CHARACTERDOPROCESS"} }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_DUMMY, { u8"CK_3DENTITY_DUMMY" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_FRAME, { u8"CK_3DENTITY_FRAME" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_RESERVED0, { u8"CK_3DENTITY_RESERVED0" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_TARGETLIGHT, { u8"CK_3DENTITY_TARGETLIGHT" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_TARGETCAMERA, { u8"CK_3DENTITY_TARGETCAMERA" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_IGNOREANIMATION, { u8"CK_3DENTITY_IGNOREANIMATION" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_HIERARCHICALOBSTACLE, { u8"CK_3DENTITY_HIERARCHICALOBSTACLE" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_UPDATELASTFRAME, { u8"CK_3DENTITY_UPDATELASTFRAME" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_CAMERAIGNOREASPECT, { u8"CK_3DENTITY_CAMERAIGNOREASPECT" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_DISABLESKINPROCESS, { u8"CK_3DENTITY_DISABLESKINPROCESS" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_ENABLESKINOFFSET, { u8"CK_3DENTITY_ENABLESKINOFFSET" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_PLACEVALID, { u8"CK_3DENTITY_PLACEVALID" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_PARENTVALID, { u8"CK_3DENTITY_PARENTVALID" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_IKJOINTVALID, { u8"CK_3DENTITY_IKJOINTVALID" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_PORTAL, { u8"CK_3DENTITY_PORTAL" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_ZORDERVALID, { u8"CK_3DENTITY_ZORDERVALID" } }, + { LibCmo::CK2::CK_3DENTITY_FLAGS::CK_3DENTITY_CHARACTERDOPROCESS, { u8"CK_3DENTITY_CHARACTERDOPROCESS" } }, }; const GeneralReflectionArray CK_TEXTURE_SAVEOPTIONS { - { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_RAWDATA, {"CKTEXTURE_RAWDATA"} }, - { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_EXTERNAL, {"CKTEXTURE_EXTERNAL"} }, - { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_IMAGEFORMAT, {"CKTEXTURE_IMAGEFORMAT"} }, - { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_USEGLOBAL, {"CKTEXTURE_USEGLOBAL"} }, - { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_INCLUDEORIGINALFILE, {"CKTEXTURE_INCLUDEORIGINALFILE"} }, + { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_RAWDATA, { u8"CKTEXTURE_RAWDATA" } }, + { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_EXTERNAL, { u8"CKTEXTURE_EXTERNAL" } }, + { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_IMAGEFORMAT, { u8"CKTEXTURE_IMAGEFORMAT" } }, + { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_USEGLOBAL, { u8"CKTEXTURE_USEGLOBAL" } }, + { LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_INCLUDEORIGINALFILE, { u8"CKTEXTURE_INCLUDEORIGINALFILE" } }, + }; + const GeneralReflectionArray CK_SOUND_SAVEOPTIONS { + { LibCmo::CK2::CK_SOUND_SAVEOPTIONS::CKSOUND_EXTERNAL, { u8"CKSOUND_EXTERNAL" } }, + { LibCmo::CK2::CK_SOUND_SAVEOPTIONS::CKSOUND_INCLUDEORIGINALFILE, { u8"CKSOUND_INCLUDEORIGINALFILE" } }, + { LibCmo::CK2::CK_SOUND_SAVEOPTIONS::CKSOUND_USEGLOBAL, { u8"CKSOUND_USEGLOBAL" } }, }; const GeneralReflectionArray CK_BITMAPDATA_FLAGS { - { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_INVALID, {"CKBITMAPDATA_INVALID"} }, - { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_TRANSPARENT, {"CKBITMAPDATA_TRANSPARENT"} }, - { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_FORCERESTORE, {"CKBITMAPDATA_FORCERESTORE"} }, - { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_CLAMPUPTODATE, {"CKBITMAPDATA_CLAMPUPTODATE"} }, - { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_CUBEMAP, {"CKBITMAPDATA_CUBEMAP"} }, - { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_FREEVIDEOMEMORY, {"CKBITMAPDATA_FREEVIDEOMEMORY"} }, - { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_DYNAMIC, {"CKBITMAPDATA_DYNAMIC"} }, + { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_INVALID, { u8"CKBITMAPDATA_INVALID" } }, + { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_TRANSPARENT, { u8"CKBITMAPDATA_TRANSPARENT" } }, + { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_FORCERESTORE, { u8"CKBITMAPDATA_FORCERESTORE" } }, + { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_CLAMPUPTODATE, { u8"CKBITMAPDATA_CLAMPUPTODATE" } }, + { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_CUBEMAP, { u8"CKBITMAPDATA_CUBEMAP" } }, + { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_FREEVIDEOMEMORY, { u8"CKBITMAPDATA_FREEVIDEOMEMORY" } }, + { LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_DYNAMIC, { u8"CKBITMAPDATA_DYNAMIC" } }, }; const GeneralReflectionArray VX_PIXELFORMAT { - { LibCmo::VxMath::VX_PIXELFORMAT::UNKNOWN_PF, {"UNKNOWN_PF"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_32_ARGB8888, {"_32_ARGB8888"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_32_RGB888, {"_32_RGB888"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_24_RGB888, {"_24_RGB888"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_RGB565, {"_16_RGB565"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_RGB555, {"_16_RGB555"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_ARGB1555, {"_16_ARGB1555"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_ARGB4444, {"_16_ARGB4444"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_8_RGB332, {"_8_RGB332"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_8_ARGB2222, {"_8_ARGB2222"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_32_ABGR8888, {"_32_ABGR8888"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_32_RGBA8888, {"_32_RGBA8888"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_32_BGRA8888, {"_32_BGRA8888"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_32_BGR888, {"_32_BGR888"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_24_BGR888, {"_24_BGR888"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_BGR565, {"_16_BGR565"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_BGR555, {"_16_BGR555"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_ABGR1555, {"_16_ABGR1555"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_ABGR4444, {"_16_ABGR4444"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_DXT1, {"_DXT1"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_DXT2, {"_DXT2"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_DXT3, {"_DXT3"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_DXT4, {"_DXT4"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_DXT5, {"_DXT5"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_V8U8, {"_16_V8U8"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_32_V16U16, {"_32_V16U16"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_16_L6V5U5, {"_16_L6V5U5"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_32_X8L8V8U8, {"_32_X8L8V8U8"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_8_ABGR8888_CLUT, {"_8_ABGR8888_CLUT"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_8_ARGB8888_CLUT, {"_8_ARGB8888_CLUT"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_4_ABGR8888_CLUT, {"_4_ABGR8888_CLUT"} }, - { LibCmo::VxMath::VX_PIXELFORMAT::_4_ARGB8888_CLUT, {"_4_ARGB8888_CLUT"} }, + { LibCmo::VxMath::VX_PIXELFORMAT::UNKNOWN_PF, { u8"UNKNOWN_PF" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_32_ARGB8888, { u8"_32_ARGB8888" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_32_RGB888, { u8"_32_RGB888" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_24_RGB888, { u8"_24_RGB888" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_RGB565, { u8"_16_RGB565" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_RGB555, { u8"_16_RGB555" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_ARGB1555, { u8"_16_ARGB1555" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_ARGB4444, { u8"_16_ARGB4444" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_8_RGB332, { u8"_8_RGB332" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_8_ARGB2222, { u8"_8_ARGB2222" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_32_ABGR8888, { u8"_32_ABGR8888" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_32_RGBA8888, { u8"_32_RGBA8888" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_32_BGRA8888, { u8"_32_BGRA8888" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_32_BGR888, { u8"_32_BGR888" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_24_BGR888, { u8"_24_BGR888" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_BGR565, { u8"_16_BGR565" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_BGR555, { u8"_16_BGR555" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_ABGR1555, { u8"_16_ABGR1555" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_ABGR4444, { u8"_16_ABGR4444" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_DXT1, { u8"_DXT1" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_DXT2, { u8"_DXT2" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_DXT3, { u8"_DXT3" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_DXT4, { u8"_DXT4" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_DXT5, { u8"_DXT5" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_V8U8, { u8"_16_V8U8" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_32_V16U16, { u8"_32_V16U16" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_16_L6V5U5, { u8"_16_L6V5U5" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_32_X8L8V8U8, { u8"_32_X8L8V8U8" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_8_ABGR8888_CLUT, { u8"_8_ABGR8888_CLUT" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_8_ARGB8888_CLUT, { u8"_8_ARGB8888_CLUT" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_4_ABGR8888_CLUT, { u8"_4_ABGR8888_CLUT" } }, + { LibCmo::VxMath::VX_PIXELFORMAT::_4_ARGB8888_CLUT, { u8"_4_ARGB8888_CLUT" } }, }; const GeneralReflectionArray VXTEXTURE_BLENDMODE { - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_DECAL, {"VXTEXTUREBLEND_DECAL"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MODULATE, {"VXTEXTUREBLEND_MODULATE"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_DECALALPHA, {"VXTEXTUREBLEND_DECALALPHA"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MODULATEALPHA, {"VXTEXTUREBLEND_MODULATEALPHA"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_DECALMASK, {"VXTEXTUREBLEND_DECALMASK"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MODULATEMASK, {"VXTEXTUREBLEND_MODULATEMASK"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_COPY, {"VXTEXTUREBLEND_COPY"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_ADD, {"VXTEXTUREBLEND_ADD"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_DOTPRODUCT3, {"VXTEXTUREBLEND_DOTPRODUCT3"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MAX, {"VXTEXTUREBLEND_MAX"} }, - { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MASK, {"VXTEXTUREBLEND_MASK"} }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_DECAL, { u8"VXTEXTUREBLEND_DECAL" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MODULATE, { u8"VXTEXTUREBLEND_MODULATE" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_DECALALPHA, { u8"VXTEXTUREBLEND_DECALALPHA" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MODULATEALPHA, { u8"VXTEXTUREBLEND_MODULATEALPHA" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_DECALMASK, { u8"VXTEXTUREBLEND_DECALMASK" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MODULATEMASK, { u8"VXTEXTUREBLEND_MODULATEMASK" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_COPY, { u8"VXTEXTUREBLEND_COPY" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_ADD, { u8"VXTEXTUREBLEND_ADD" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_DOTPRODUCT3, { u8"VXTEXTUREBLEND_DOTPRODUCT3" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MAX, { u8"VXTEXTUREBLEND_MAX" } }, + { LibCmo::VxMath::VXTEXTURE_BLENDMODE::VXTEXTUREBLEND_MASK, { u8"VXTEXTUREBLEND_MASK" } }, }; const GeneralReflectionArray VXTEXTURE_FILTERMODE { - { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_NEAREST, {"VXTEXTUREFILTER_NEAREST"} }, - { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_LINEAR, {"VXTEXTUREFILTER_LINEAR"} }, - { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_MIPNEAREST, {"VXTEXTUREFILTER_MIPNEAREST"} }, - { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_MIPLINEAR, {"VXTEXTUREFILTER_MIPLINEAR"} }, - { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_LINEARMIPNEAREST, {"VXTEXTUREFILTER_LINEARMIPNEAREST"} }, - { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_LINEARMIPLINEAR, {"VXTEXTUREFILTER_LINEARMIPLINEAR"} }, - { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_ANISOTROPIC, {"VXTEXTUREFILTER_ANISOTROPIC"} }, - { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_MASK, {"VXTEXTUREFILTER_MASK"} }, + { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_NEAREST, { u8"VXTEXTUREFILTER_NEAREST" } }, + { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_LINEAR, { u8"VXTEXTUREFILTER_LINEAR" } }, + { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_MIPNEAREST, { u8"VXTEXTUREFILTER_MIPNEAREST" } }, + { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_MIPLINEAR, { u8"VXTEXTUREFILTER_MIPLINEAR" } }, + { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_LINEARMIPNEAREST, { u8"VXTEXTUREFILTER_LINEARMIPNEAREST" } }, + { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_LINEARMIPLINEAR, { u8"VXTEXTUREFILTER_LINEARMIPLINEAR" } }, + { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_ANISOTROPIC, { u8"VXTEXTUREFILTER_ANISOTROPIC" } }, + { LibCmo::VxMath::VXTEXTURE_FILTERMODE::VXTEXTUREFILTER_MASK, { u8"VXTEXTUREFILTER_MASK" } }, }; const GeneralReflectionArray VXBLEND_MODE { - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_ZERO, {"VXBLEND_ZERO"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_ONE, {"VXBLEND_ONE"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_SRCCOLOR, {"VXBLEND_SRCCOLOR"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_INVSRCCOLOR, {"VXBLEND_INVSRCCOLOR"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_SRCALPHA, {"VXBLEND_SRCALPHA"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_INVSRCALPHA, {"VXBLEND_INVSRCALPHA"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_DESTALPHA, {"VXBLEND_DESTALPHA"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_INVDESTALPHA, {"VXBLEND_INVDESTALPHA"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_DESTCOLOR, {"VXBLEND_DESTCOLOR"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_INVDESTCOLOR, {"VXBLEND_INVDESTCOLOR"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_SRCALPHASAT, {"VXBLEND_SRCALPHASAT"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_BOTHSRCALPHA, {"VXBLEND_BOTHSRCALPHA"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_BOTHINVSRCALPHA, {"VXBLEND_BOTHINVSRCALPHA"} }, - { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_MASK, {"VXBLEND_MASK"} }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_ZERO, { u8"VXBLEND_ZERO" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_ONE, { u8"VXBLEND_ONE" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_SRCCOLOR, { u8"VXBLEND_SRCCOLOR" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_INVSRCCOLOR, { u8"VXBLEND_INVSRCCOLOR" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_SRCALPHA, { u8"VXBLEND_SRCALPHA" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_INVSRCALPHA, { u8"VXBLEND_INVSRCALPHA" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_DESTALPHA, { u8"VXBLEND_DESTALPHA" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_INVDESTALPHA, { u8"VXBLEND_INVDESTALPHA" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_DESTCOLOR, { u8"VXBLEND_DESTCOLOR" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_INVDESTCOLOR, { u8"VXBLEND_INVDESTCOLOR" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_SRCALPHASAT, { u8"VXBLEND_SRCALPHASAT" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_BOTHSRCALPHA, { u8"VXBLEND_BOTHSRCALPHA" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_BOTHINVSRCALPHA, { u8"VXBLEND_BOTHINVSRCALPHA" } }, + { LibCmo::VxMath::VXBLEND_MODE::VXBLEND_MASK, { u8"VXBLEND_MASK" } }, }; const GeneralReflectionArray VXTEXTURE_ADDRESSMODE { - { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSWRAP, {"VXTEXTURE_ADDRESSWRAP"} }, - { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSMIRROR, {"VXTEXTURE_ADDRESSMIRROR"} }, - { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSCLAMP, {"VXTEXTURE_ADDRESSCLAMP"} }, - { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSBORDER, {"VXTEXTURE_ADDRESSBORDER"} }, - { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSMIRRORONCE, {"VXTEXTURE_ADDRESSMIRRORONCE"} }, - { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSMASK, {"VXTEXTURE_ADDRESSMASK"} }, + { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSWRAP, { u8"VXTEXTURE_ADDRESSWRAP" } }, + { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSMIRROR, { u8"VXTEXTURE_ADDRESSMIRROR" } }, + { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSCLAMP, { u8"VXTEXTURE_ADDRESSCLAMP" } }, + { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSBORDER, { u8"VXTEXTURE_ADDRESSBORDER" } }, + { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSMIRRORONCE, { u8"VXTEXTURE_ADDRESSMIRRORONCE" } }, + { LibCmo::VxMath::VXTEXTURE_ADDRESSMODE::VXTEXTURE_ADDRESSMASK, { u8"VXTEXTURE_ADDRESSMASK" } }, }; const GeneralReflectionArray VXFILL_MODE { - { LibCmo::VxMath::VXFILL_MODE::VXFILL_POINT, {"VXFILL_POINT"} }, - { LibCmo::VxMath::VXFILL_MODE::VXFILL_WIREFRAME, {"VXFILL_WIREFRAME"} }, - { LibCmo::VxMath::VXFILL_MODE::VXFILL_SOLID, {"VXFILL_SOLID"} }, - { LibCmo::VxMath::VXFILL_MODE::VXFILL_MASK, {"VXFILL_MASK"} }, + { LibCmo::VxMath::VXFILL_MODE::VXFILL_POINT, { u8"VXFILL_POINT" } }, + { LibCmo::VxMath::VXFILL_MODE::VXFILL_WIREFRAME, { u8"VXFILL_WIREFRAME" } }, + { LibCmo::VxMath::VXFILL_MODE::VXFILL_SOLID, { u8"VXFILL_SOLID" } }, + { LibCmo::VxMath::VXFILL_MODE::VXFILL_MASK, { u8"VXFILL_MASK" } }, }; const GeneralReflectionArray VXSHADE_MODE { - { LibCmo::VxMath::VXSHADE_MODE::VXSHADE_FLAT, {"VXSHADE_FLAT"} }, - { LibCmo::VxMath::VXSHADE_MODE::VXSHADE_GOURAUD, {"VXSHADE_GOURAUD"} }, - { LibCmo::VxMath::VXSHADE_MODE::VXSHADE_PHONG, {"VXSHADE_PHONG"} }, - { LibCmo::VxMath::VXSHADE_MODE::VXSHADE_MASK, {"VXSHADE_MASK"} }, + { LibCmo::VxMath::VXSHADE_MODE::VXSHADE_FLAT, { u8"VXSHADE_FLAT" } }, + { LibCmo::VxMath::VXSHADE_MODE::VXSHADE_GOURAUD, { u8"VXSHADE_GOURAUD" } }, + { LibCmo::VxMath::VXSHADE_MODE::VXSHADE_PHONG, { u8"VXSHADE_PHONG" } }, + { LibCmo::VxMath::VXSHADE_MODE::VXSHADE_MASK, { u8"VXSHADE_MASK" } }, }; const GeneralReflectionArray VXCMPFUNC { - { LibCmo::VxMath::VXCMPFUNC::VXCMP_NEVER, {"VXCMP_NEVER"} }, - { LibCmo::VxMath::VXCMPFUNC::VXCMP_LESS, {"VXCMP_LESS"} }, - { LibCmo::VxMath::VXCMPFUNC::VXCMP_EQUAL, {"VXCMP_EQUAL"} }, - { LibCmo::VxMath::VXCMPFUNC::VXCMP_LESSEQUAL, {"VXCMP_LESSEQUAL"} }, - { LibCmo::VxMath::VXCMPFUNC::VXCMP_GREATER, {"VXCMP_GREATER"} }, - { LibCmo::VxMath::VXCMPFUNC::VXCMP_NOTEQUAL, {"VXCMP_NOTEQUAL"} }, - { LibCmo::VxMath::VXCMPFUNC::VXCMP_GREATEREQUAL, {"VXCMP_GREATEREQUAL"} }, - { LibCmo::VxMath::VXCMPFUNC::VXCMP_ALWAYS, {"VXCMP_ALWAYS"} }, - { LibCmo::VxMath::VXCMPFUNC::VXCMP_MASK, {"VXCMP_MASK"} }, + { LibCmo::VxMath::VXCMPFUNC::VXCMP_NEVER, { u8"VXCMP_NEVER" } }, + { LibCmo::VxMath::VXCMPFUNC::VXCMP_LESS, { u8"VXCMP_LESS" } }, + { LibCmo::VxMath::VXCMPFUNC::VXCMP_EQUAL, { u8"VXCMP_EQUAL" } }, + { LibCmo::VxMath::VXCMPFUNC::VXCMP_LESSEQUAL, { u8"VXCMP_LESSEQUAL" } }, + { LibCmo::VxMath::VXCMPFUNC::VXCMP_GREATER, { u8"VXCMP_GREATER" } }, + { LibCmo::VxMath::VXCMPFUNC::VXCMP_NOTEQUAL, { u8"VXCMP_NOTEQUAL" } }, + { LibCmo::VxMath::VXCMPFUNC::VXCMP_GREATEREQUAL, { u8"VXCMP_GREATEREQUAL" } }, + { LibCmo::VxMath::VXCMPFUNC::VXCMP_ALWAYS, { u8"VXCMP_ALWAYS" } }, + { LibCmo::VxMath::VXCMPFUNC::VXCMP_MASK, { u8"VXCMP_MASK" } }, }; const GeneralReflectionArray VX_EFFECT { - { LibCmo::VxMath::VX_EFFECT::VXEFFECT_NONE, {"VXEFFECT_NONE"} }, - { LibCmo::VxMath::VX_EFFECT::VXEFFECT_TEXGEN, {"VXEFFECT_TEXGEN"} }, - { LibCmo::VxMath::VX_EFFECT::VXEFFECT_TEXGENREF, {"VXEFFECT_TEXGENREF"} }, - { LibCmo::VxMath::VX_EFFECT::VXEFFECT_BUMPENV, {"VXEFFECT_BUMPENV"} }, - { LibCmo::VxMath::VX_EFFECT::VXEFFECT_DP3, {"VXEFFECT_DP3"} }, - { LibCmo::VxMath::VX_EFFECT::VXEFFECT_2TEXTURES, {"VXEFFECT_2TEXTURES"} }, - { LibCmo::VxMath::VX_EFFECT::VXEFFECT_3TEXTURES, {"VXEFFECT_3TEXTURES"} }, - { LibCmo::VxMath::VX_EFFECT::VXEFFECT_MASK, {"VXEFFECT_MASK"} }, + { LibCmo::VxMath::VX_EFFECT::VXEFFECT_NONE, { u8"VXEFFECT_NONE" } }, + { LibCmo::VxMath::VX_EFFECT::VXEFFECT_TEXGEN, { u8"VXEFFECT_TEXGEN" } }, + { LibCmo::VxMath::VX_EFFECT::VXEFFECT_TEXGENREF, { u8"VXEFFECT_TEXGENREF" } }, + { LibCmo::VxMath::VX_EFFECT::VXEFFECT_BUMPENV, { u8"VXEFFECT_BUMPENV" } }, + { LibCmo::VxMath::VX_EFFECT::VXEFFECT_DP3, { u8"VXEFFECT_DP3" } }, + { LibCmo::VxMath::VX_EFFECT::VXEFFECT_2TEXTURES, { u8"VXEFFECT_2TEXTURES" } }, + { LibCmo::VxMath::VX_EFFECT::VXEFFECT_3TEXTURES, { u8"VXEFFECT_3TEXTURES" } }, + { LibCmo::VxMath::VX_EFFECT::VXEFFECT_MASK, { u8"VXEFFECT_MASK" } }, }; const GeneralReflectionArray VX_MOVEABLE_FLAGS { - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_PICKABLE, {"VX_MOVEABLE_PICKABLE"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE, {"VX_MOVEABLE_VISIBLE"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_UPTODATE, {"VX_MOVEABLE_UPTODATE"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RENDERCHANNELS, {"VX_MOVEABLE_RENDERCHANNELS"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_USERBOX, {"VX_MOVEABLE_USERBOX"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_EXTENTSUPTODATE, {"VX_MOVEABLE_EXTENTSUPTODATE"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_BOXVALID, {"VX_MOVEABLE_BOXVALID"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RENDERLAST, {"VX_MOVEABLE_RENDERLAST"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HASMOVED, {"VX_MOVEABLE_HASMOVED"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_WORLDALIGNED, {"VX_MOVEABLE_WORLDALIGNED"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_NOZBUFFERWRITE, {"VX_MOVEABLE_NOZBUFFERWRITE"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RENDERFIRST, {"VX_MOVEABLE_RENDERFIRST"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_NOZBUFFERTEST, {"VX_MOVEABLE_NOZBUFFERTEST"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_INVERSEWORLDMATVALID, {"VX_MOVEABLE_INVERSEWORLDMATVALID"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_DONTUPDATEFROMPARENT, {"VX_MOVEABLE_DONTUPDATEFROMPARENT"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_INDIRECTMATRIX, {"VX_MOVEABLE_INDIRECTMATRIX"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_ZBUFONLY, {"VX_MOVEABLE_ZBUFONLY"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_STENCILONLY, {"VX_MOVEABLE_STENCILONLY"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE, {"VX_MOVEABLE_HIERARCHICALHIDE"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_CHARACTERRENDERED, {"VX_MOVEABLE_CHARACTERRENDERED"} }, - { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RESERVED2, {"VX_MOVEABLE_RESERVED2"} }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_PICKABLE, { u8"VX_MOVEABLE_PICKABLE" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE, { u8"VX_MOVEABLE_VISIBLE" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_UPTODATE, { u8"VX_MOVEABLE_UPTODATE" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RENDERCHANNELS, { u8"VX_MOVEABLE_RENDERCHANNELS" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_USERBOX, { u8"VX_MOVEABLE_USERBOX" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_EXTENTSUPTODATE, { u8"VX_MOVEABLE_EXTENTSUPTODATE" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_BOXVALID, { u8"VX_MOVEABLE_BOXVALID" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RENDERLAST, { u8"VX_MOVEABLE_RENDERLAST" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HASMOVED, { u8"VX_MOVEABLE_HASMOVED" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_WORLDALIGNED, { u8"VX_MOVEABLE_WORLDALIGNED" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_NOZBUFFERWRITE, { u8"VX_MOVEABLE_NOZBUFFERWRITE" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RENDERFIRST, { u8"VX_MOVEABLE_RENDERFIRST" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_NOZBUFFERTEST, { u8"VX_MOVEABLE_NOZBUFFERTEST" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_INVERSEWORLDMATVALID, { u8"VX_MOVEABLE_INVERSEWORLDMATVALID" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_DONTUPDATEFROMPARENT, { u8"VX_MOVEABLE_DONTUPDATEFROMPARENT" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_INDIRECTMATRIX, { u8"VX_MOVEABLE_INDIRECTMATRIX" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_ZBUFONLY, { u8"VX_MOVEABLE_ZBUFONLY" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_STENCILONLY, { u8"VX_MOVEABLE_STENCILONLY" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE, { u8"VX_MOVEABLE_HIERARCHICALHIDE" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_CHARACTERRENDERED, { u8"VX_MOVEABLE_CHARACTERRENDERED" } }, + { LibCmo::VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RESERVED2, { u8"VX_MOVEABLE_RESERVED2" } }, }; const GeneralReflectionArray VXMESH_FLAGS { - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_BOUNDINGUPTODATE, {"VXMESH_BOUNDINGUPTODATE"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_VISIBLE, {"VXMESH_VISIBLE"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_OPTIMIZED, {"VXMESH_OPTIMIZED"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_RENDERCHANNELS, {"VXMESH_RENDERCHANNELS"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_HASTRANSPARENCY, {"VXMESH_HASTRANSPARENCY"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_PRELITMODE, {"VXMESH_PRELITMODE"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_WRAPU, {"VXMESH_WRAPU"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_WRAPV, {"VXMESH_WRAPV"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_FORCETRANSPARENCY, {"VXMESH_FORCETRANSPARENCY"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_TRANSPARENCYUPTODATE, {"VXMESH_TRANSPARENCYUPTODATE"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_UV_CHANGED, {"VXMESH_UV_CHANGED"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_NORMAL_CHANGED, {"VXMESH_NORMAL_CHANGED"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_COLOR_CHANGED, {"VXMESH_COLOR_CHANGED"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_POS_CHANGED, {"VXMESH_POS_CHANGED"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_HINTDYNAMIC, {"VXMESH_HINTDYNAMIC"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_GENNORMALS, {"VXMESH_GENNORMALS"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_PROCEDURALUV, {"VXMESH_PROCEDURALUV"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_PROCEDURALPOS, {"VXMESH_PROCEDURALPOS"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_STRIPIFY, {"VXMESH_STRIPIFY"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_MONOMATERIAL, {"VXMESH_MONOMATERIAL"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_PM_BUILDNORM, {"VXMESH_PM_BUILDNORM"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_BWEIGHTS_CHANGED, {"VXMESH_BWEIGHTS_CHANGED"} }, - { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_ALLFLAGS, {"VXMESH_ALLFLAGS"} }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_BOUNDINGUPTODATE, { u8"VXMESH_BOUNDINGUPTODATE" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_VISIBLE, { u8"VXMESH_VISIBLE" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_OPTIMIZED, { u8"VXMESH_OPTIMIZED" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_RENDERCHANNELS, { u8"VXMESH_RENDERCHANNELS" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_HASTRANSPARENCY, { u8"VXMESH_HASTRANSPARENCY" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_PRELITMODE, { u8"VXMESH_PRELITMODE" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_WRAPU, { u8"VXMESH_WRAPU" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_WRAPV, { u8"VXMESH_WRAPV" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_FORCETRANSPARENCY, { u8"VXMESH_FORCETRANSPARENCY" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_TRANSPARENCYUPTODATE, { u8"VXMESH_TRANSPARENCYUPTODATE" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_UV_CHANGED, { u8"VXMESH_UV_CHANGED" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_NORMAL_CHANGED, { u8"VXMESH_NORMAL_CHANGED" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_COLOR_CHANGED, { u8"VXMESH_COLOR_CHANGED" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_POS_CHANGED, { u8"VXMESH_POS_CHANGED" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_HINTDYNAMIC, { u8"VXMESH_HINTDYNAMIC" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_GENNORMALS, { u8"VXMESH_GENNORMALS" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_PROCEDURALUV, { u8"VXMESH_PROCEDURALUV" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_PROCEDURALPOS, { u8"VXMESH_PROCEDURALPOS" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_STRIPIFY, { u8"VXMESH_STRIPIFY" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_MONOMATERIAL, { u8"VXMESH_MONOMATERIAL" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_PM_BUILDNORM, { u8"VXMESH_PM_BUILDNORM" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_BWEIGHTS_CHANGED, { u8"VXMESH_BWEIGHTS_CHANGED" } }, + { LibCmo::VxMath::VXMESH_FLAGS::VXMESH_ALLFLAGS, { u8"VXMESH_ALLFLAGS" } }, }; const GeneralReflectionArray VXMESH_LITMODE { - { LibCmo::VxMath::VXMESH_LITMODE::VX_PRELITMESH, {"VX_PRELITMESH"} }, - { LibCmo::VxMath::VXMESH_LITMODE::VX_LITMESH, {"VX_LITMESH"} }, + { LibCmo::VxMath::VXMESH_LITMODE::VX_PRELITMESH, { u8"VX_PRELITMESH" } }, + { LibCmo::VxMath::VXMESH_LITMODE::VX_LITMESH, { u8"VX_LITMESH" } }, + }; + const GeneralReflectionArray VXCHANNEL_FLAGS { + { LibCmo::VxMath::VXCHANNEL_FLAGS::VXCHANNEL_ACTIVE, { u8"VXCHANNEL_ACTIVE" } }, + { LibCmo::VxMath::VXCHANNEL_FLAGS::VXCHANNEL_SAMEUV, { u8"VXCHANNEL_SAMEUV" } }, + { LibCmo::VxMath::VXCHANNEL_FLAGS::VXCHANNEL_NOTLIT, { u8"VXCHANNEL_NOTLIT" } }, + { LibCmo::VxMath::VXCHANNEL_FLAGS::VXCHANNEL_MONO, { u8"VXCHANNEL_MONO" } }, + { LibCmo::VxMath::VXCHANNEL_FLAGS::VXCHANNEL_RESERVED1, { u8"VXCHANNEL_RESERVED1" } }, + { LibCmo::VxMath::VXCHANNEL_FLAGS::VXCHANNEL_LAST, { u8"VXCHANNEL_LAST" } }, }; const GeneralReflectionArray VXTEXTURE_WRAPMODE { - { LibCmo::VxMath::VXTEXTURE_WRAPMODE::VXTEXTUREWRAP_NONE, {"VXTEXTUREWRAP_NONE"} }, - { LibCmo::VxMath::VXTEXTURE_WRAPMODE::VXTEXTUREWRAP_U, {"VXTEXTUREWRAP_U"} }, - { LibCmo::VxMath::VXTEXTURE_WRAPMODE::VXTEXTUREWRAP_V, {"VXTEXTUREWRAP_V"} }, - { LibCmo::VxMath::VXTEXTURE_WRAPMODE::VXTEXTUREWRAP_UV, {"VXTEXTUREWRAP_UV"} }, + { LibCmo::VxMath::VXTEXTURE_WRAPMODE::VXTEXTUREWRAP_NONE, { u8"VXTEXTUREWRAP_NONE" } }, + { LibCmo::VxMath::VXTEXTURE_WRAPMODE::VXTEXTUREWRAP_U, { u8"VXTEXTUREWRAP_U" } }, + { LibCmo::VxMath::VXTEXTURE_WRAPMODE::VXTEXTUREWRAP_V, { u8"VXTEXTUREWRAP_V" } }, + { LibCmo::VxMath::VXTEXTURE_WRAPMODE::VXTEXTUREWRAP_UV, { u8"VXTEXTUREWRAP_UV" } }, }; } diff --git a/Unvirt/AccessibleValue.hpp b/Unvirt/AccessibleValue.hpp index ef63650..e9f8b9f 100644 --- a/Unvirt/AccessibleValue.hpp +++ b/Unvirt/AccessibleValue.hpp @@ -1,41 +1,59 @@ #pragma once #include -#include "StringHelper.hpp" #include #include +#include namespace Unvirt { namespace AccessibleValue { - constexpr const char c_InvalidEnumName[] = "[undefined]"; + constexpr const char8_t c_InvalidEnumName[] = u8"[undefined]"; - struct GeneralReflection { const char* mName; }; - template +#pragma region Size Formatter + + std::u8string GetReadableFileSize(uint64_t _size); + +#pragma endregion + +#pragma region CKERROR CK_CLASSID Data + + std::u8string GetCkErrorName(LibCmo::CK2::CKERROR err); + std::u8string GetCkErrorDescription(LibCmo::CK2::CKERROR err); + + std::u8string GetClassIdName(LibCmo::CK2::CK_CLASSID cls); + std::u8string GetClassIdHierarchy(LibCmo::CK2::CK_CLASSID cls); + +#pragma endregion + +#pragma region Other Enums + + struct GeneralReflection { const char8_t* mName; }; + template, int> = 0> using GeneralReflectionArray = std::vector>; - template - std::string GetEnumName(_Ty val, const GeneralReflectionArray<_Ty>& desc) { - std::string strl; + template, int> = 0> + std::u8string GetEnumName(_Ty val, const GeneralReflectionArray<_Ty>& desc) { + std::u8string strl; for (auto& item : desc) { if (item.first == val) { strl = item.second.mName; return strl; } } - StringHelper::StdstringPrintf(strl, "%s (0x%08" PRIXCKDWORD ")", - c_InvalidEnumName, + YYCC::StringHelper::Printf(strl, u8"%s (0x%08" PRIXCKDWORD ")", + c_InvalidEnumName, static_cast(val) ); return strl; } - template - std::string GetFlagEnumName(_Ty val, const GeneralReflectionArray<_Ty>& desc, const char* splitor) { - std::string strl, cache; + template, int> = 0> + std::u8string GetFlagEnumName(_Ty val, const GeneralReflectionArray<_Ty>& desc, const char8_t* splitor = u8" ", const char8_t* indent = u8"") { + std::u8string strl, cache; for (auto& item : desc) { // if it have exacelt same entry, return directly if (item.first == val) { - StringHelper::StdstringPrintf(strl, "%s (0x%08" PRIXCKDWORD ")", + YYCC::StringHelper::Printf(strl, u8"%s (0x%08" PRIXCKDWORD ")", item.second.mName, static_cast(item.first) ); @@ -44,11 +62,18 @@ namespace Unvirt { // check flag match if (LibCmo::EnumsHelper::Has(val, item.first)) { + // add splittor if it not the first entry if (strl.size() != 0u && splitor != nullptr) { strl += splitor; } - StringHelper::StdstringPrintf(cache, "%s (0x%08" PRIXCKDWORD ")", + // add indent if possible + if (indent != nullptr) { + strl += indent; + } + + // add value self. + YYCC::StringHelper::Printf(cache, u8"%s (0x%08" PRIXCKDWORD ")", item.second.mName, static_cast(item.first) ); @@ -58,8 +83,8 @@ namespace Unvirt { // if nothing was gotten. set to undefined if (strl.size() == 0u) { - StringHelper::StdstringPrintf(strl, "%s (0x%08" PRIXCKDWORD ")", - c_InvalidEnumName, + YYCC::StringHelper::Printf(strl, u8"%s (0x%08" PRIXCKDWORD ")", + c_InvalidEnumName, static_cast(val) ); } @@ -67,13 +92,6 @@ namespace Unvirt { return strl; } - std::string GetClassIdName(LibCmo::CK2::CK_CLASSID cls); - std::string GetCkErrorName(LibCmo::CK2::CKERROR err); - std::string GetClassIdHierarchy(LibCmo::CK2::CK_CLASSID cls); - std::string GetCkErrorDescription(LibCmo::CK2::CKERROR err); - - std::string GetReadableFileSize(uint64_t size); - namespace EnumDesc { extern const GeneralReflectionArray CK_FILE_WRITEMODE; extern const GeneralReflectionArray CK_FO_OPTIONS; @@ -100,5 +118,7 @@ namespace Unvirt { extern const GeneralReflectionArray VXTEXTURE_WRAPMODE; } +#pragma endregion + } } diff --git a/Unvirt/CMakeLists.txt b/Unvirt/CMakeLists.txt index aa49f37..b2f692b 100644 --- a/Unvirt/CMakeLists.txt +++ b/Unvirt/CMakeLists.txt @@ -5,7 +5,6 @@ target_sources(Unvirt PRIVATE AccessibleValue.cpp CmdHelper.cpp - StringHelper.cpp StructFormatter.cpp TerminalHelper.cpp UnvirtContext.cpp @@ -18,7 +17,6 @@ FILE_SET HEADERS FILES AccessibleValue.hpp CmdHelper.hpp - StringHelper.hpp StructFormatter.hpp TerminalHelper.hpp UnvirtContext.hpp diff --git a/Unvirt/StringHelper.cpp b/Unvirt/StringHelper.cpp deleted file mode 100644 index bcc61f1..0000000 --- a/Unvirt/StringHelper.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "StringHelper.hpp" -#include - -namespace Unvirt::StringHelper { - - void StdstringPrintf(std::string& strl, const char* format, ...) { - va_list argptr; - va_start(argptr, format); - StdstringVPrintf(strl, format, argptr); - va_end(argptr); - } - - void StdstringVPrintf(std::string& strl, const char* format, va_list argptr) { - va_list args1; - va_copy(args1, argptr); - va_list args2; - va_copy(args2, argptr); - - int count = std::vsnprintf(nullptr, 0, format, args1); - if (count < 0) throw new std::length_error("Invalid length returned by vsnprintf."); - va_end(args1); - - strl.resize(count); - int write_result = std::vsnprintf(strl.data(), strl.size() + 1, format, args2); - va_end(args2); - - if (write_result < 0 || write_result > count) throw new std::length_error("Invalid write result in vsnprintf."); - } - -} diff --git a/Unvirt/StringHelper.hpp b/Unvirt/StringHelper.hpp deleted file mode 100644 index 67f664a..0000000 --- a/Unvirt/StringHelper.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include -#include - -namespace Unvirt::StringHelper { - - void StdstringPrintf(std::string& strl, const char* format, ...); - void StdstringVPrintf(std::string& strl, const char* format, va_list argptr); - -} diff --git a/Unvirt/StructFormatter.cpp b/Unvirt/StructFormatter.cpp index cd84456..a936555 100644 --- a/Unvirt/StructFormatter.cpp +++ b/Unvirt/StructFormatter.cpp @@ -1,59 +1,65 @@ #include "StructFormatter.hpp" + +#include #include "AccessibleValue.hpp" #include "TerminalHelper.hpp" +namespace Console = YYCC::ConsoleHelper; + namespace Unvirt::StructFormatter { #pragma region Assist Functions - static void PrintCKSTRING(LibCmo::CKSTRING name) { + static std::u8string PrintCKSTRING(LibCmo::CKSTRING name) { + std::u8string ret; if (name == nullptr) { - fputs(UNVIRT_TERMCOL_LIGHT_MAGENTA(("")), stdout); + ret = YYCC_COLOR_LIGHT_MAGENTA(u8""); } else { - if (name[0] == '\0') { - fputs(UNVIRT_TERMCOL_LIGHT_MAGENTA(("")), stdout); + if (name[0] == u8'\0') { + ret = YYCC_COLOR_LIGHT_MAGENTA(u8""); } else { - fputs(name, stdout); + ret = name; } } + return ret; } - static void PrintPointer(const void* ptr) { + static std::u8string PrintPointer(const void* ptr) { + std::u8string ret; if (ptr == nullptr) { - fputs(UNVIRT_TERMCOL_LIGHT_CYAN(("")), stdout); + ret = YYCC_COLOR_LIGHT_CYAN(u8""); } else { -#if UINTPTR_MAX == UINT32_MAX - // 32 bit. padding 8 zero - fprintf(stdout, "<0x%08" PRIxPTR ">", reinterpret_cast(ptr)); -#else - // 64 bit. padding 16 zero - fprintf(stdout, "<0x%016" PRIxPTR ">", reinterpret_cast(ptr)); -#endif + YYCC::StringHelper::Printf(ret, u8"<0x%" PRI_XPTR_LEFT_PADDING PRIxPTR ">", reinterpret_cast(ptr)); } + return ret; } - static void PrintCKGUID(const LibCmo::CK2::CKGUID& guid) { - fprintf(stdout, "<0x%08" PRIxCKDWORD ", 0x%08" PRIxCKDWORD ">", guid.d1, guid.d2); + static std::u8string PrintCKGUID(const LibCmo::CK2::CKGUID& guid) { + return YYCC::StringHelper::Printf(u8"<0x%08" PRIxCKDWORD ", 0x%08" PRIxCKDWORD ">", guid.d1, guid.d2); } - static void PrintBool(bool v) { - fputs(v ? "true" : "false", stdout); + static std::u8string PrintBool(bool v) { + return (v ? u8"true" : u8"false"); } - static void PrintColorfulBool(bool v) { - fputs(v ? UNVIRT_TERMCOL_LIGHT_GREEN(("Yes")) : UNVIRT_TERMCOL_LIGHT_RED(("No")), stdout); + static std::u8string PrintColorfulBool(bool v) { + return (v ? YYCC_COLOR_LIGHT_GREEN(u8"Yes") : YYCC_COLOR_LIGHT_RED(u8"No")); } - static void PrintColor(const LibCmo::VxMath::VxColor& col) { - LibCmo::CKDWORD argb = col.ToARGB(); + static std::u8string PrintColor(LibCmo::CKDWORD argb) { LibCmo::CKDWORD a = (argb & 0xFF000000) >> 24, r = (argb & 0x00FF0000) >> 16, g = (argb & 0x0000FF00) >> 8, b = (argb & 0x000000FF); - fprintf(stdout, "A:%" PRIuCKDWORD " (%.4" PRIfCKFLOAT ") RGB(%" PRIuCKDWORD ", %" PRIuCKDWORD ", %" PRIuCKDWORD ") RGB#%02" PRIxCKDWORD "%02" PRIxCKDWORD "%02" PRIxCKDWORD " RGBA#%02" PRIxCKDWORD "%02" PRIxCKDWORD "%02" PRIxCKDWORD "%02" PRIxCKDWORD, - a, col.a, + LibCmo::CKFLOAT fa = static_cast(a) / 255.0f; + return YYCC::StringHelper::Printf( + u8"A:%" PRIuCKDWORD " (%.4" PRIfCKFLOAT ") " + "RGB(%" PRIuCKDWORD ", %" PRIuCKDWORD ", %" PRIuCKDWORD ") " + "RGB#%02" PRIxCKDWORD "%02" PRIxCKDWORD "%02" PRIxCKDWORD " " + "RGBA#%02" PRIxCKDWORD "%02" PRIxCKDWORD "%02" PRIxCKDWORD "%02" PRIxCKDWORD, + a, fa, r, g, b, r, g, b, r, g, b, a ); } - static void PrintColor(LibCmo::CKDWORD argb) { - PrintColor(LibCmo::VxMath::VxColor(argb)); + static std::u8string PrintColor(const LibCmo::VxMath::VxColor& col) { + return PrintColor(col.ToARGB()); } template @@ -63,7 +69,7 @@ namespace Unvirt::StructFormatter { // check page overflow if (page * pageitems >= data.size()) { - fputs(UNVIRT_TERMCOL_LIGHT_RED(("Page out of range.\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"Page out of range.")); return; } @@ -80,7 +86,7 @@ namespace Unvirt::StructFormatter { printEntryFct(counter, data[counter]); } - fprintf(stdout, "Page %" PRIuSIZET " of %" PRIuSIZET "\n", page + 1, fullpage); + Console::FormatLine(u8"Page %" PRIuSIZET " of %" PRIuSIZET, page + 1, fullpage); } #pragma endregion @@ -88,281 +94,281 @@ namespace Unvirt::StructFormatter { #pragma region Object Printer static void PrintCKObjectDetail(LibCmo::CK2::ObjImpls::CKObject* obj) { - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKObject\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKObject")); // print name - fputs("Name: ", stdout); - PrintCKSTRING(obj->GetName()); - fputc('\n', stdout); + Console::FormatLine(u8"Name: %s", PrintCKSTRING(obj->GetName()).c_str()); // print id - fprintf(stdout, "CK ID: %" PRIuCKID "\n", obj->GetID()); + Console::FormatLine(u8"CK ID: %" PRIuCKID, obj->GetID()); // print class id - fprintf(stdout, "Class ID: %" PRIiCLASSID " (%s)\n", obj->GetClassID(), AccessibleValue::GetClassIdHierarchy(obj->GetClassID()).c_str()); + Console::FormatLine(u8"Class ID: %" PRIiCLASSID " (%s)", obj->GetClassID(), AccessibleValue::GetClassIdHierarchy(obj->GetClassID()).c_str()); // print flags - fputs("Flags:\n", stdout); - fputs(AccessibleValue::GetFlagEnumName(obj->GetObjectFlags(), AccessibleValue::EnumDesc::CK_OBJECT_FLAGS, "\n").c_str(), stdout); - fputc('\n', stdout); + Console::WriteLine(u8"Flags:"); + Console::WriteLine(AccessibleValue::GetFlagEnumName(obj->GetObjectFlags(), AccessibleValue::EnumDesc::CK_OBJECT_FLAGS, u8"\n", u8"\t").c_str()); } static void PrintCKSceneObjectDetail(LibCmo::CK2::ObjImpls::CKSceneObject* obj) { PrintCKObjectDetail(obj); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKSceneObject\n")), stdout); - fputs(UNVIRT_TERMCOL_LIGHT_RED(("No Data\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKSceneObject")); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"No Data")); } static void PrintCKBeObjectDetail(LibCmo::CK2::ObjImpls::CKBeObject* obj) { PrintCKSceneObjectDetail(obj); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKBeObject\n")), stdout); - fputs(UNVIRT_TERMCOL_LIGHT_RED(("No Data\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKBeObject")); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"No Data")); } static void PrintCKGroupDetail(LibCmo::CK2::ObjImpls::CKGroup* obj) { PrintCKBeObjectDetail(obj); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKGroup\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKGroup")); LibCmo::CKDWORD count = obj->GetObjectCount(); - fprintf(stdout, "Group Object Count: %" PRIuCKDWORD "\n", count); - fputs("CKID\tType\tObject\tName\n", stdout); + Console::FormatLine(u8"Group Object Count: %" PRIuCKDWORD, count); + Console::WriteLine(u8"CKID\tType\tObject\tName"); for (LibCmo::CKDWORD i = 0; i < count; ++i) { LibCmo::CK2::ObjImpls::CKBeObject* beobj = obj->GetObject(i); - fprintf(stdout, "%" PRIuCKID "\t", beobj->GetID()); - fputs(AccessibleValue::GetClassIdName(beobj->GetClassID()).c_str(), stdout); - fputc('\t', stdout); - PrintPointer(beobj); - fputc('\t', stdout); - PrintCKSTRING(beobj->GetName()); - fputc('\n', stdout); + Console::FormatLine(u8"%" PRIuCKID "\t%s\t%s\t%s", + beobj->GetID(), + AccessibleValue::GetClassIdName(beobj->GetClassID()).c_str(), + PrintPointer(beobj).c_str(), + PrintCKSTRING(beobj->GetName()).c_str() + ); } } static void PrintCKRenderObjectDetail(LibCmo::CK2::ObjImpls::CKRenderObject* obj) { PrintCKBeObjectDetail(obj); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKRenderObject\n")), stdout); - fputs(UNVIRT_TERMCOL_LIGHT_RED(("No Data\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKRenderObject")); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"No Data")); } static void PrintCK3dEntityDetail(LibCmo::CK2::ObjImpls::CK3dEntity* obj) { PrintCKRenderObjectDetail(obj); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CK3dEntity\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CK3dEntity")); - fputs("== World Matrix ==\n", stdout); + Console::WriteLine(u8"== World Matrix =="); auto mat = obj->GetWorldMatrix(); for (LibCmo::CKDWORD i = 0; i < 4; ++i) { - fprintf(stdout, "%+" PRIeCKFLOAT "\t%+" PRIeCKFLOAT "\t%+" PRIeCKFLOAT "\t%+" PRIeCKFLOAT "\n", + Console::FormatLine(u8"%+" PRIeCKFLOAT "\t%+" PRIeCKFLOAT "\t%+" PRIeCKFLOAT "\t%+" PRIeCKFLOAT, mat[i].x, mat[i].y, mat[i].z, mat[i].w ); } - fputs("== Flags ==\n", stdout); - fputs("3dEntity Flags:\n", stdout); - fputs(AccessibleValue::GetFlagEnumName(obj->GetEntityFlags(), AccessibleValue::EnumDesc::CK_3DENTITY_FLAGS, "\n").c_str(), stdout); - fputc('\n', stdout); - fputs("Moveable Flags:\n", stdout); - fputs(AccessibleValue::GetFlagEnumName(obj->GetMoveableFlags(), AccessibleValue::EnumDesc::VX_MOVEABLE_FLAGS, "\n").c_str(), stdout); - fputc('\n', stdout); + Console::WriteLine(u8"== Flags =="); + Console::WriteLine(u8"3dEntity Flags:"); + Console::WriteLine(AccessibleValue::GetFlagEnumName(obj->GetEntityFlags(), AccessibleValue::EnumDesc::CK_3DENTITY_FLAGS, u8"\n", u8"\t").c_str()); + Console::WriteLine(u8"Moveable Flags:"); + Console::WriteLine(AccessibleValue::GetFlagEnumName(obj->GetMoveableFlags(), AccessibleValue::EnumDesc::VX_MOVEABLE_FLAGS, u8"\n", u8"\t").c_str()); - fputs("== Meshs ==\n", stdout); - fputs("Index\tAddress\tName\n", stdout); + Console::WriteLine(u8"== Meshs =="); + Console::WriteLine(u8"Index\tAddress\tName"); // print current mesh - auto curmesh = obj->GetCurrentMesh(); - fputs("->\t", stdout); - PrintPointer(curmesh); - fputc('\t', stdout); - if (curmesh != nullptr) - PrintCKSTRING(curmesh->GetName()); - fputc('\n', stdout); + { + auto curmesh = obj->GetCurrentMesh(); + Console::Format(u8"->\t%s", + PrintPointer(curmesh).c_str() + ); + if (curmesh != nullptr) { + Console::FormatLine(u8"\t%s", + PrintCKSTRING(curmesh->GetName()).c_str() + ); + } else { + Console::WriteLine(u8""); + } + } + // print other meshes for (LibCmo::CKDWORD i = 0; i < obj->GetPotentialMeshCount(); ++i) { auto thismesh = obj->GetPotentialMesh(i); - fprintf(stdout, "#%" PRIuCKDWORD "\t", i); - PrintPointer(thismesh); - fputc('\t', stdout); - PrintCKSTRING(thismesh->GetName()); - fputc('\n', stdout); + Console::FormatLine(u8"#%" PRIuCKDWORD "\t%s\t%s", + i, + PrintPointer(thismesh).c_str(), + PrintCKSTRING(thismesh->GetName()).c_str() + ); } } static void PrintCK3dObjectDetail(LibCmo::CK2::ObjImpls::CK3dObject* obj) { PrintCK3dEntityDetail(obj); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CK3dObject\n")), stdout); - fputs(UNVIRT_TERMCOL_LIGHT_RED(("No Data\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CK3dObject")); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"No Data")); } static void PrintCKTextureDetail(LibCmo::CK2::ObjImpls::CKTexture* obj) { PrintCKBeObjectDetail(obj); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKTexture\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKTexture")); // texture - fputs("== Texture ==\n", stdout); + Console::WriteLine(u8"== Texture =="); LibCmo::CK2::CKBitmapData& bd = obj->GetUnderlyingData(); LibCmo::CKDWORD slot_count = bd.GetSlotCount(); - fprintf(stdout, "Slot Count: %" PRIuCKDWORD "\n", slot_count); - fprintf(stdout, "Current Slot: %" PRIuCKDWORD "\n", bd.GetCurrentSlot()); + Console::FormatLine(u8"Slot Count: %" PRIuCKDWORD, slot_count); + Console::FormatLine(u8"Current Slot: %" PRIuCKDWORD, bd.GetCurrentSlot()); - fputs("Index\tWidth\tHeight\tImage Addr\tImage Size\tFilename\n", stdout); + Console::WriteLine(u8"Index\tWidth\tHeight\tImage Addr\tImage Size\tFilename"); for (LibCmo::CKDWORD i = 0; i < slot_count; ++i) { auto desc = bd.GetImageDesc(i); - fprintf(stdout, "#%" PRIuCKDWORD "\t", i); - fprintf(stdout, "%" PRIuCKDWORD "\t%" PRIuCKDWORD "\t", desc->GetWidth(), desc->GetHeight()); - PrintPointer(desc->GetImage()); - fputc('\t', stdout); - fprintf(stdout, "0x%" PRIxCKDWORD " bytes\t", desc->GetImageSize()); - PrintCKSTRING(bd.GetSlotFileName(i)); - fputc('\n', stdout); + Console::FormatLine(u8"#%" PRIuCKDWORD "\t%" PRIuCKDWORD "\t%" PRIuCKDWORD "\t0x%" PRIxCKDWORD " bytes\t", + i, + desc->GetWidth(), + desc->GetHeight(), + PrintPointer(desc->GetImage()).c_str(), + desc->GetImageSize(), + PrintCKSTRING(bd.GetSlotFileName(i)).c_str() + ); } // other data - fputs("== Misc ==\n", stdout); - fprintf(stdout, "Video Format: %s\n", AccessibleValue::GetEnumName(obj->GetVideoFormat(), AccessibleValue::EnumDesc::VX_PIXELFORMAT).c_str()); - fprintf(stdout, "Save Option: %s\n", AccessibleValue::GetEnumName(bd.GetSaveOptions(), AccessibleValue::EnumDesc::CK_TEXTURE_SAVEOPTIONS).c_str()); - fprintf(stdout, "Pick Threshold: %" PRIuCKDWORD "\n", bd.GetPickThreshold()); - fputs("Transparent Color: ", stdout); - PrintColor(bd.GetTransparentColor()); - fputc('\n', stdout); + Console::WriteLine(u8"== Misc =="); + Console::FormatLine(u8"Video Format: %s", AccessibleValue::GetEnumName(obj->GetVideoFormat(), AccessibleValue::EnumDesc::VX_PIXELFORMAT).c_str()); + Console::FormatLine(u8"Save Option: %s", AccessibleValue::GetEnumName(bd.GetSaveOptions(), AccessibleValue::EnumDesc::CK_TEXTURE_SAVEOPTIONS).c_str()); + Console::FormatLine(u8"Pick Threshold: %" PRIuCKDWORD, bd.GetPickThreshold()); + Console::FormatLine(u8"Transparent Color: %s", PrintColor(bd.GetTransparentColor()).c_str()); - fputs("Bitmap Flags:\n", stdout); - fputs(AccessibleValue::GetFlagEnumName(bd.GetBitmapFlags(), AccessibleValue::EnumDesc::CK_BITMAPDATA_FLAGS, "\n").c_str(), stdout); - fputc('\n', stdout); + Console::WriteLine(u8"Bitmap Flags:"); + Console::WriteLine(AccessibleValue::GetFlagEnumName(bd.GetBitmapFlags(), AccessibleValue::EnumDesc::CK_BITMAPDATA_FLAGS, u8"\n", u8"\t").c_str()); } static void PrintCKMaterialDetail(LibCmo::CK2::ObjImpls::CKMaterial* obj) { PrintCKBeObjectDetail(obj); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKMaterial\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKMaterial")); // color - fputs("== Color ==\n", stdout); + Console::WriteLine(u8"== Color =="); - fputs("Diffuse: ", stdout); + Console::Write(u8"Diffuse: "); PrintColor(obj->GetDiffuse()); - fputc('\n', stdout); - fputs("Ambient: ", stdout); + Console::Write(u8"\n"); + Console::Write(u8"Ambient: "); PrintColor(obj->GetAmbient()); - fputc('\n', stdout); - fputs("Specular: ", stdout); + Console::Write(u8"\n"); + Console::Write(u8"Specular: "); PrintColor(obj->GetSpecular()); - fputc('\n', stdout); - fputs("Emissive: ", stdout); + Console::Write(u8"\n"); + Console::Write(u8"Emissive: "); PrintColor(obj->GetEmissive()); - fputc('\n', stdout); + Console::Write(u8"\n"); - fprintf(stdout, "Specular Power: %.2" PRIfCKFLOAT "\n", obj->GetSpecularPower()); + Console::FormatLine(u8"Specular Power: %.2" PRIfCKFLOAT, obj->GetSpecularPower()); // basic data - fputs("== Basic ==\n", stdout); - fputs("Both Sided: ", stdout); + Console::WriteLine(u8"== Basic =="); + Console::Write(u8"Both Sided: "); PrintBool(obj->GetTwoSidedEnabled()); - fputc('\n', stdout); - fprintf(stdout, "Fill Mode: %s\n", AccessibleValue::GetEnumName(obj->GetFillMode(), AccessibleValue::EnumDesc::VXFILL_MODE).c_str()); - fprintf(stdout, "Shade Mode: %s\n", AccessibleValue::GetEnumName(obj->GetShadeMode(), AccessibleValue::EnumDesc::VXSHADE_MODE).c_str()); + Console::Write(u8"\n"); + Console::FormatLine(u8"Fill Mode: %s", AccessibleValue::GetEnumName(obj->GetFillMode(), AccessibleValue::EnumDesc::VXFILL_MODE).c_str()); + Console::FormatLine(u8"Shade Mode: %s", AccessibleValue::GetEnumName(obj->GetShadeMode(), AccessibleValue::EnumDesc::VXSHADE_MODE).c_str()); // textures - fputs("== Texture ==\n", stdout); - fputs("Textures:\n", stdout); - fputs("Index\tAddress\tName\n", stdout); + Console::WriteLine(u8"== Texture =="); + Console::WriteLine(u8"Textures:"); + Console::WriteLine(u8"Index\tAddress\tName"); for (LibCmo::CKDWORD i = 0; i < 4; ++i) { auto tex = obj->GetTexture(i); - fprintf(stdout, "#%" PRIuCKDWORD "\t", i); - PrintPointer(tex); - fputc('\t', stdout); - if (tex != nullptr) - PrintCKSTRING(tex->GetName()); - fputc('\n', stdout); + if (tex != nullptr) { + Console::FormatLine(u8"#%" PRIuCKDWORD "\t%s\t%s", + i, + PrintPointer(tex), + PrintCKSTRING(tex->GetName()).c_str() + ); + } else { + Console::FormatLine(u8"#%" PRIuCKDWORD "\t%s", + i, + PrintPointer(tex) + ); + } } - fprintf(stdout, "Texture Blend: %s\n", AccessibleValue::GetEnumName(obj->GetTextureBlendMode(), AccessibleValue::EnumDesc::VXTEXTURE_BLENDMODE).c_str()); - fprintf(stdout, "Filter Min: %s\n", AccessibleValue::GetEnumName(obj->GetTextureMinMode(), AccessibleValue::EnumDesc::VXTEXTURE_FILTERMODE).c_str()); - fprintf(stdout, "Filter Mag: %s\n", AccessibleValue::GetEnumName(obj->GetTextureMagMode(), AccessibleValue::EnumDesc::VXTEXTURE_FILTERMODE).c_str()); - fprintf(stdout, "Address Mode: %s\n", AccessibleValue::GetEnumName(obj->GetTextureAddressMode(), AccessibleValue::EnumDesc::VXTEXTURE_ADDRESSMODE).c_str()); - fputs("Perspective Correct: ", stdout); + Console::FormatLine(u8"Texture Blend: %s", AccessibleValue::GetEnumName(obj->GetTextureBlendMode(), AccessibleValue::EnumDesc::VXTEXTURE_BLENDMODE).c_str()); + Console::FormatLine(u8"Filter Min: %s", AccessibleValue::GetEnumName(obj->GetTextureMinMode(), AccessibleValue::EnumDesc::VXTEXTURE_FILTERMODE).c_str()); + Console::FormatLine(u8"Filter Mag: %s", AccessibleValue::GetEnumName(obj->GetTextureMagMode(), AccessibleValue::EnumDesc::VXTEXTURE_FILTERMODE).c_str()); + Console::FormatLine(u8"Address Mode: %s", AccessibleValue::GetEnumName(obj->GetTextureAddressMode(), AccessibleValue::EnumDesc::VXTEXTURE_ADDRESSMODE).c_str()); + Console::Write(u8"Perspective Correct: "); PrintBool(obj->GetPerspectiveCorrectionEnabled()); - fputc('\n', stdout); + Console::Write(u8"\n"); // alpha test - fputs("== Alpha Test ==\n", stdout); - fputs("Enabled: ", stdout); + Console::WriteLine(u8"== Alpha Test =="); + Console::Write(u8"Enabled: "); PrintBool(obj->GetAlphaTestEnabled()); - fputc('\n', stdout); - fprintf(stdout, "Alpha Function: %s\n", AccessibleValue::GetEnumName(obj->GetAlphaFunc(), AccessibleValue::EnumDesc::VXCMPFUNC).c_str()); - fprintf(stdout, "Alpha Ref Value: %" PRIuCKBYTE "\n", obj->GetAlphaRef()); + Console::Write(u8"\n"); + Console::FormatLine(u8"Alpha Function: %s", AccessibleValue::GetEnumName(obj->GetAlphaFunc(), AccessibleValue::EnumDesc::VXCMPFUNC).c_str()); + Console::FormatLine(u8"Alpha Ref Value: %" PRIuCKBYTE, obj->GetAlphaRef()); // alpha blend - fputs("== Alpha Blend ==\n", stdout); - fputs("Enabled: ", stdout); + Console::WriteLine(u8"== Alpha Blend =="); + Console::Write(u8"Enabled: "); PrintBool(obj->GetAlphaBlendEnabled()); - fputc('\n', stdout); - fprintf(stdout, "Source Blend: %s\n", AccessibleValue::GetEnumName(obj->GetSourceBlend(), AccessibleValue::EnumDesc::VXBLEND_MODE).c_str()); - fprintf(stdout, "Destination Blend: %s\n", AccessibleValue::GetEnumName(obj->GetDestBlend(), AccessibleValue::EnumDesc::VXBLEND_MODE).c_str()); + Console::Write(u8"\n"); + Console::FormatLine(u8"Source Blend: %s", AccessibleValue::GetEnumName(obj->GetSourceBlend(), AccessibleValue::EnumDesc::VXBLEND_MODE).c_str()); + Console::FormatLine(u8"Destination Blend: %s", AccessibleValue::GetEnumName(obj->GetDestBlend(), AccessibleValue::EnumDesc::VXBLEND_MODE).c_str()); // z buffer - fputs("== Z-Buffer Write ==\n", stdout); - fputs("Enabled: ", stdout); + Console::WriteLine(u8"== Z-Buffer Write =="); + Console::Write(u8"Enabled: "); PrintBool(obj->GetZWriteEnabled()); - fputc('\n', stdout); - fprintf(stdout, "Z Compare Function: %s\n", AccessibleValue::GetEnumName(obj->GetZFunc(), AccessibleValue::EnumDesc::VXCMPFUNC).c_str()); + Console::Write(u8"\n"); + Console::FormatLine(u8"Z Compare Function: %s", AccessibleValue::GetEnumName(obj->GetZFunc(), AccessibleValue::EnumDesc::VXCMPFUNC).c_str()); // effect - fputs("== Effect ==\n", stdout); - fprintf(stdout, "Effect: %s\n", AccessibleValue::GetEnumName(obj->GetEffect(), AccessibleValue::EnumDesc::VX_EFFECT).c_str()); + Console::WriteLine(u8"== Effect =="); + Console::FormatLine(u8"Effect: %s", AccessibleValue::GetEnumName(obj->GetEffect(), AccessibleValue::EnumDesc::VX_EFFECT).c_str()); } static void PrintCKMeshDetail(LibCmo::CK2::ObjImpls::CKMesh* obj) { PrintCKBeObjectDetail(obj); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKMesh\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKMesh")); - fputs("== Flags ==\n", stdout); - fputs("Mesh Flags:\n", stdout); - fputs(AccessibleValue::GetFlagEnumName(obj->GetMeshFlags(), AccessibleValue::EnumDesc::VXMESH_FLAGS, "\n").c_str(), stdout); - fputc('\n', stdout); - fputs("Lit Mode: ", stdout); - fputs(AccessibleValue::GetEnumName(obj->GetLitMode(), AccessibleValue::EnumDesc::VXMESH_LITMODE).c_str(), stdout); - fputc('\n', stdout); - fputs("Wrap Mode: ", stdout); - fputs(AccessibleValue::GetEnumName(obj->GetWrapMode(), AccessibleValue::EnumDesc::VXTEXTURE_WRAPMODE).c_str(), stdout); - fputc('\n', stdout); + Console::WriteLine(u8"== Flags =="); + Console::WriteLine(u8"Mesh Flags:"); + Console::WriteLine(AccessibleValue::GetFlagEnumName(obj->GetMeshFlags(), AccessibleValue::EnumDesc::VXMESH_FLAGS, u8"\n").c_str()); + Console::FormatLine(u8"Lit Mode: %s", AccessibleValue::GetEnumName(obj->GetLitMode(), AccessibleValue::EnumDesc::VXMESH_LITMODE).c_str()); + Console::FormatLine(u8"Wrap Mode: %s", AccessibleValue::GetEnumName(obj->GetWrapMode(), AccessibleValue::EnumDesc::VXTEXTURE_WRAPMODE).c_str()); // vertex data - fputs("== Vertex ==\n", stdout); - fprintf(stdout, "Vertex Count: %" PRIuCKDWORD "\n", obj->GetVertexCount()); - fputs("Address\tSize\tType\n", stdout); + Console::WriteLine(u8"== Vertex =="); + Console::FormatLine(u8"Vertex Count: %" PRIuCKDWORD, obj->GetVertexCount()); + Console::WriteLine(u8"Address\tSize\tType"); PrintPointer(obj->GetVertexPositions()); - fprintf(stdout, "\t0x%" PRIxCKDWORD " bytes\tPositions\n", obj->GetVertexCount() * CKSizeof(LibCmo::VxMath::VxVector3)); + Console::FormatLine(u8"\t0x%" PRIxCKDWORD " bytes\tPositions", obj->GetVertexCount() * CKSizeof(LibCmo::VxMath::VxVector3)); PrintPointer(obj->GetVertexNormals()); - fprintf(stdout, "\t0x%" PRIxCKDWORD " bytes\tNormals\n", obj->GetVertexCount() * CKSizeof(LibCmo::VxMath::VxVector3)); + Console::FormatLine(u8"\t0x%" PRIxCKDWORD " bytes\tNormals", obj->GetVertexCount() * CKSizeof(LibCmo::VxMath::VxVector3)); PrintPointer(obj->GetVertexUVs()); - fprintf(stdout, "\t0x%" PRIxCKDWORD " bytes\tUVs\n", obj->GetVertexCount() * CKSizeof(LibCmo::VxMath::VxVector2)); + Console::FormatLine(u8"\t0x%" PRIxCKDWORD " bytes\tUVs", obj->GetVertexCount() * CKSizeof(LibCmo::VxMath::VxVector2)); PrintPointer(obj->GetVertexColors()); - fprintf(stdout, "\t0x%" PRIxCKDWORD " bytes\tColors\n", obj->GetVertexCount() * CKSizeof(LibCmo::CKDWORD)); + Console::FormatLine(u8"\t0x%" PRIxCKDWORD " bytes\tColors", obj->GetVertexCount() * CKSizeof(LibCmo::CKDWORD)); PrintPointer(obj->GetVertexSpecularColors()); - fprintf(stdout, "\t0x%" PRIxCKDWORD " bytes\tSpecularColors\n", obj->GetVertexCount() * CKSizeof(LibCmo::CKDWORD)); + Console::FormatLine(u8"\t0x%" PRIxCKDWORD " bytes\tSpecularColors", obj->GetVertexCount() * CKSizeof(LibCmo::CKDWORD)); // face data - fputs("== Face ==\n", stdout); - fprintf(stdout, "Face Count: %" PRIuCKDWORD "\n", obj->GetFaceCount()); - fputs("Address\tSize\tType\n", stdout); + Console::WriteLine(u8"== Face =="); + Console::FormatLine(u8"Face Count: %" PRIuCKDWORD, obj->GetFaceCount()); + Console::WriteLine(u8"Address\tSize\tType"); PrintPointer(obj->GetFaceIndices()); - fprintf(stdout, "\t0x%" PRIxCKDWORD " bytes\tIndices\n", obj->GetFaceCount() * 3 * CKSizeof(LibCmo::CKWORD)); + Console::FormatLine(u8"\t0x%" PRIxCKDWORD " bytes\tIndices", obj->GetFaceCount() * 3 * CKSizeof(LibCmo::CKWORD)); PrintPointer(obj->GetFaceMaterialSlotIndexs()); - fprintf(stdout, "\t0x%" PRIxCKDWORD " bytes\tMaterialSlotIndexs\n", obj->GetFaceCount() * CKSizeof(LibCmo::CKWORD)); + Console::FormatLine(u8"\t0x%" PRIxCKDWORD " bytes\tMaterialSlotIndexs", obj->GetFaceCount() * CKSizeof(LibCmo::CKWORD)); // mtl slot data - fputs("== Material Slot ==\n", stdout); + Console::WriteLine(u8"== Material Slot =="); LibCmo::CKDWORD slotcount = obj->GetMaterialSlotCount(); LibCmo::CK2::ObjImpls::CKMaterial** pMtlSlots = obj->GetMaterialSlots(); - fprintf(stdout, "Material Slot Count: %" PRIuCKDWORD "\n", slotcount); - fputs("Index\tAddress\tName\n", stdout); + Console::FormatLine(u8"Material Slot Count: %" PRIuCKDWORD, slotcount); + Console::WriteLine(u8"Index\tAddress\tName"); for (LibCmo::CKDWORD i = 0; i < slotcount; ++i) { LibCmo::CK2::ObjImpls::CKMaterial* mtl = pMtlSlots[i]; - fprintf(stdout, "#%" PRIuCKDWORD "\t", i); + Console::Format(u8"#%" PRIuCKDWORD "\t", i); PrintPointer(mtl); - fputc('\t', stdout); + Console::Write(u8"\t"); if (mtl != nullptr) PrintCKSTRING(mtl->GetName()); - fputc('\n', stdout); + Console::Write(u8"\n"); } } @@ -372,93 +378,87 @@ namespace Unvirt::StructFormatter { void PrintCKFileInfo(const LibCmo::CK2::CKFileInfo& fileinfo) { - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKFileInfo\n")), stdout); - fprintf(stdout, "FileVersion: %" PRIuCKDWORD "\n", fileinfo.FileVersion); - fprintf(stdout, "CKVersion: %02" PRIxCKDWORD "/%02" PRIxCKDWORD "/%04" PRIxCKDWORD "\n", + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKFileInfo")); + Console::FormatLine(u8"FileVersion: %" PRIuCKDWORD, fileinfo.FileVersion); + LibCmo::CKDWORD ck_series[3] { (fileinfo.CKVersion >> 24) & 0xFF, (fileinfo.CKVersion >> 16) & 0xFF, (fileinfo.CKVersion >> 0) & 0xFFFF + }; + Console::FormatLine(u8"CKVersion: %02" PRIxCKDWORD "/%02" PRIxCKDWORD "/%04" PRIxCKDWORD, + ck_series[0], ck_series[1], ck_series[2] ); - LibCmo::CKDWORD product_series[4] { (fileinfo.ProductBuild >> 24) & 0xFF, (fileinfo.ProductBuild >> 16) & 0xFF, (fileinfo.ProductBuild >> 8) & 0xFF, (fileinfo.ProductBuild >> 0) & 0xFF, }; - fprintf(stdout, "Product (Version / Build): %" PRIuCKDWORD " / %" PRIuCKDWORD ".%" PRIuCKDWORD ".%" PRIuCKDWORD ".%" PRIuCKDWORD "\n", + Console::FormatLine(u8"Product (Version / Build): %" PRIuCKDWORD " / %" PRIuCKDWORD ".%" PRIuCKDWORD ".%" PRIuCKDWORD ".%" PRIuCKDWORD, fileinfo.ProductVersion, product_series[0], product_series[1], product_series[2], product_series[3] ); - fprintf(stdout, "Save Flags: %s\n", AccessibleValue::GetFlagEnumName( - fileinfo.FileWriteMode, AccessibleValue::EnumDesc::CK_FILE_WRITEMODE, ", " - ).c_str()); - - fprintf(stdout, "File Size: %s\n", AccessibleValue::GetReadableFileSize(fileinfo.FileSize).c_str()); - - fprintf(stdout, "Crc: 0x%" PRIxCKDWORD "\n", fileinfo.Crc); - fputc('\n', stdout); - - - fputs("Hdr1 (Pack / UnPack): ", stdout); - fprintf(stdout, "%s / ", AccessibleValue::GetReadableFileSize(fileinfo.Hdr1PackSize).c_str()); - fprintf(stdout, "%s\n", AccessibleValue::GetReadableFileSize(fileinfo.Hdr1UnPackSize).c_str()); - - fputs("Data (Pack / UnPack): ", stdout); - fprintf(stdout, "%s / ", AccessibleValue::GetReadableFileSize(fileinfo.DataPackSize).c_str()); - fprintf(stdout, "%s\n", AccessibleValue::GetReadableFileSize(fileinfo.DataUnPackSize).c_str()); - fputc('\n', stdout); - - - fprintf(stdout, "Manager Count: %" PRIuCKDWORD "\nObject Count: %" PRIuCKDWORD "\nMax ID Saved: %" PRIuCKID "\n", - fileinfo.ManagerCount, fileinfo.ObjectCount, fileinfo.MaxIDSaved + Console::FormatLine(u8"Save Flags: %s", + AccessibleValue::GetFlagEnumName(fileinfo.FileWriteMode, AccessibleValue::EnumDesc::CK_FILE_WRITEMODE, u8", ").c_str() ); + Console::FormatLine(u8"File Size: %s", AccessibleValue::GetReadableFileSize(fileinfo.FileSize).c_str()); + + Console::FormatLine(u8"Crc: 0x%" PRIxCKDWORD, fileinfo.Crc); + Console::WriteLine(u8""); + + + Console::FormatLine(u8"Hdr1 (Pack / UnPack): %s / %s", + AccessibleValue::GetReadableFileSize(fileinfo.Hdr1PackSize).c_str(), + AccessibleValue::GetReadableFileSize(fileinfo.Hdr1UnPackSize).c_str() + ); + + Console::FormatLine(u8"Data (Pack / UnPack): %s / %s", + AccessibleValue::GetReadableFileSize(fileinfo.DataPackSize).c_str(), + AccessibleValue::GetReadableFileSize(fileinfo.DataUnPackSize).c_str() + ); + Console::WriteLine(u8""); + + + Console::FormatLine(u8"Manager Count: %" PRIuCKDWORD, fileinfo.ManagerCount); + Console::FormatLine(u8"Object Count: %" PRIuCKDWORD, fileinfo.ObjectCount); + Console::FormatLine(u8"Max ID Saved: %" PRIuCKID, fileinfo.MaxIDSaved); + } #pragma region Object List Printer static void PrintObjectListHeader(bool full_detail) { if (full_detail) { - fputs("SaveFlags\tOptions\tCK ID\tFile CK ID\tFile Index\tPack Size\tIndex\tType\tCKObject\tCKStateChunk\tName\n", stdout); + Console::WriteLine(u8"SaveFlags\tOptions\tCK ID\tFile CK ID\tFile Index\tPack Size\tIndex\tType\tCKObject\tCKStateChunk\tName"); } else { - fputs("Index\tType\tObject\tChunk\tName\n", stdout); + Console::WriteLine(u8"Index\tType\tObject\tChunk\tName"); } } static void PrintObjectListEntry(const LibCmo::CK2::CKFileObject& obj, const LibCmo::CK2::CKFileInfo& fileinfo, size_t entry_index, bool full_detail) { if (full_detail) { - fprintf(stdout, "0x%08" PRIxCKDWORD "\t", obj.SaveFlags); - fputs(AccessibleValue::GetEnumName(obj.Options, AccessibleValue::EnumDesc::CK_FO_OPTIONS).c_str(), stdout); - fputc('\t', stdout); + Console::FormatLine(u8"0x%08" PRIxCKDWORD, obj.SaveFlags); + Console::FormatLine(u8"\t%s", AccessibleValue::GetEnumName(obj.Options, AccessibleValue::EnumDesc::CK_FO_OPTIONS).c_str()); - fprintf(stdout, "%" PRIuCKID "\t", obj.CreatedObjectId); - fprintf(stdout, "%" PRIuCKID "\t", obj.ObjectId); + Console::FormatLine(u8"\t%" PRIuCKID "\t%" PRIuCKID, + obj.CreatedObjectId, + obj.ObjectId + ); - fprintf(stdout, "0x%08" PRIxCKDWORD " (Rel: 0x%08" PRIxCKDWORD ")\t", + Console::FormatLine(u8"\t0x%08" PRIxCKDWORD " (Rel: 0x%08" PRIxCKDWORD ")", obj.FileIndex, - obj.FileIndex - CKSizeof(LibCmo::CK2::CKRawFileInfo) - fileinfo.Hdr1UnPackSize); - fprintf(stdout, "0x%08" PRIxCKDWORD "\t", obj.PackSize); - - fprintf(stdout, "#%" PRIuSIZET "\t", entry_index); - fputs(AccessibleValue::GetClassIdName(obj.ObjectCid).c_str(), stdout); - fputc('\t', stdout); - PrintPointer(obj.ObjPtr); - fputc('\t', stdout); - PrintPointer(obj.Data); - fputc('\t', stdout); - PrintCKSTRING(LibCmo::XContainer::NSXString::ToCKSTRING(obj.Name)); - fputc('\n', stdout); - } else { - fprintf(stdout, "#%" PRIuSIZET "\t", entry_index); - fputs(AccessibleValue::GetClassIdName(obj.ObjectCid).c_str(), stdout); - fputc('\t', stdout); - PrintColorfulBool(obj.ObjPtr != nullptr); - fputc('\t', stdout); - PrintColorfulBool(obj.Data != nullptr); - fputc('\t', stdout); - PrintCKSTRING(LibCmo::XContainer::NSXString::ToCKSTRING(obj.Name)); - fputc('\n', stdout); + obj.FileIndex - CKSizeof(LibCmo::CK2::CKRawFileInfo) - fileinfo.Hdr1UnPackSize + ); + Console::FormatLine(u8"\t0x%08" PRIxCKDWORD, obj.PackSize); } + // following items are shared by full details and simple layout + Console::FormatLine(u8"\t#%" PRIuSIZET "\t%s\t%s\t%s\t%s", + entry_index, + AccessibleValue::GetClassIdName(obj.ObjectCid).c_str(), + PrintColorfulBool(obj.ObjPtr != nullptr).c_str(), + PrintColorfulBool(obj.Data != nullptr).c_str(), + PrintCKSTRING(LibCmo::XContainer::NSXString::ToCKSTRING(obj.Name)) + ); } void PrintObjectList( const LibCmo::XContainer::XArray& ls, @@ -466,7 +466,7 @@ namespace Unvirt::StructFormatter { size_t page, size_t pageitems, bool full_detail) { - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKFileObject\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKFileObject")); GeneralPrintList(ls, page, pageitems, [full_detail]() -> void { PrintObjectListHeader(full_detail); @@ -483,8 +483,8 @@ namespace Unvirt::StructFormatter { const LibCmo::CK2::CKFileInfo& fileinfo, size_t page, size_t pageitems, bool full_detail) { - - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKFileObject Searching Result\n")), stdout); + + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKFileObject Searching Result")); GeneralPrintList(idxls, page, pageitems, [full_detail]() -> void { PrintObjectListHeader(full_detail); @@ -497,29 +497,29 @@ namespace Unvirt::StructFormatter { ); } - + #pragma endregion #pragma region Manager List Printer static void PrintManagerListHeader(bool full_detail) { // manager list now do not affected by list style because it is enough short - fputs("Index\tCKGUID\tCKStateChunk\n", stdout); + Console::WriteLine(u8"Index\tCKGUID\tCKStateChunk"); } static void PrintManagerListEntry(const LibCmo::CK2::CKFileManagerData& mgr, size_t entry_index, bool full_detail) { // not affected by list style. - fprintf(stdout, "#%" PRIuSIZET "\t", entry_index); - PrintCKGUID(mgr.Manager); - fputc('\t', stdout); - PrintPointer(mgr.Data); - fputc('\n', stdout); + Console::FormatLine(u8"#%" PRIuSIZET "\t%s\t%s", + entry_index, + PrintCKGUID(mgr.Manager).c_str(), + PrintPointer(mgr.Data).c_str() + ); } void PrintManagerList( const LibCmo::XContainer::XArray& ls, size_t page, size_t pageitems, bool full_detail) { - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKFileManager\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKFileManager")); GeneralPrintList(ls, page, pageitems, [full_detail]() -> void { // print header @@ -537,8 +537,8 @@ namespace Unvirt::StructFormatter { const LibCmo::XContainer::XArray& ls, size_t page, size_t pageitems, bool full_detail) { - - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKFileManager Searching Result\n")), stdout); + + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKFileManager Searching Result")); GeneralPrintList(idxls, page, pageitems, [full_detail]() -> void { PrintManagerListHeader(full_detail); @@ -550,12 +550,12 @@ namespace Unvirt::StructFormatter { ); } - + #pragma endregion void PrintCKObject(const LibCmo::CK2::ObjImpls::CKObject* obj) { if (obj == nullptr) { - fputs(UNVIRT_TERMCOL_LIGHT_RED(("Null Object\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"Null Object")); return; } @@ -592,26 +592,26 @@ namespace Unvirt::StructFormatter { PrintCKMeshDetail(static_cast(mobj)); break; default: - fputs(UNVIRT_TERMCOL_LIGHT_RED(("Not Implemented.\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"Not Implemented.")); break; } } void PrintCKBaseManager(const LibCmo::CK2::MgrImpls::CKBaseManager* mgr) { - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKBaseManager\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKBaseManager")); if (mgr == nullptr) { - fputs(UNVIRT_TERMCOL_LIGHT_RED(("Null Manager\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"Null Manager")); return; } - fputs(UNVIRT_TERMCOL_LIGHT_RED(("Not Implemented.\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"Not Implemented.")); } void PrintCKStateChunk(const LibCmo::CK2::CKStateChunk* chunk) { - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKStateChunk\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"CKStateChunk")); if (chunk == nullptr) { - fputs(UNVIRT_TERMCOL_LIGHT_RED(("Null Chunk\n")), stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_RED(u8"Null Chunk")); return; } @@ -621,42 +621,40 @@ namespace Unvirt::StructFormatter { // write profile const auto profile = operchunk->GetStateChunkProfile(); - fputs("Type: ", stdout); - fputs(AccessibleValue::GetClassIdName(profile.m_ClassId).c_str(), stdout); - fputc('\n', stdout); + Console::FormatLine(u8"Type: %s", AccessibleValue::GetClassIdName(profile.m_ClassId).c_str()); - fprintf(stdout, "Version (Data / Chunk): %" PRIuCKDWORD " (%s) / %" PRIuCKDWORD " (%s)\n", + Console::FormatLine(u8"Version (Data / Chunk): %" PRIuCKDWORD " (%s) / %" PRIuCKDWORD " (%s)", static_cast(profile.m_DataVersion), AccessibleValue::GetEnumName(profile.m_DataVersion, AccessibleValue::EnumDesc::CK_STATECHUNK_DATAVERSION).c_str(), - static_cast(profile.m_ChunkVersion), AccessibleValue::GetEnumName(profile.m_ChunkVersion, AccessibleValue::EnumDesc::CK_STATECHUNK_CHUNKVERSION).c_str()); - fprintf(stdout, "List (Object / Chunk / Manager): %" PRIuCKDWORD " / %" PRIuCKDWORD " / %" PRIuCKDWORD "\n", + static_cast(profile.m_ChunkVersion), AccessibleValue::GetEnumName(profile.m_ChunkVersion, AccessibleValue::EnumDesc::CK_STATECHUNK_CHUNKVERSION).c_str() + ); + Console::FormatLine(u8"List (Object / Chunk / Manager): %" PRIuCKDWORD " / %" PRIuCKDWORD " / %" PRIuCKDWORD, static_cast(profile.m_ObjectListSize), static_cast(profile.m_ChunkListSize), - static_cast(profile.m_ManagerListSize)); + static_cast(profile.m_ManagerListSize) + ); - fputs("Data: ", stdout); - PrintPointer(profile.m_pData); - fprintf(stdout, " (0x%" PRIxCKDWORD " DWORD)\n", profile.m_DataDwSize); + Console::FormatLine(u8"Data: %s (0x%" PRIxCKDWORD " DWORD)", + PrintPointer(profile.m_pData).c_str(), + profile.m_DataDwSize + ); - fputs("Bind CKFile: ", stdout); - PrintPointer(profile.m_BindFile); - fputc('\n', stdout); - - fputs("Bind CKContext: ", stdout); - PrintPointer(profile.m_BindContext); - fputc('\n', stdout); + Console::FormatLine(u8"Bind CKFile: %s", PrintPointer(profile.m_BindFile).c_str()); + Console::FormatLine(u8"Bind CKContext: %s", PrintPointer(profile.m_BindContext).c_str()); // write identifiers operchunk->StartRead(); const auto collection = operchunk->GetIdentifiersProfile(); operchunk->StopRead(); - fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("Identifiers\n")), stdout); - fputs("Identifier\tData Pointer\tData Size\n", stdout); + Console::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"Identifiers")); + Console::WriteLine(u8"Identifier\tData Pointer\tData Size"); for (const auto& ident : collection) { - fprintf(stdout, "0x%08" PRIxCKDWORD "\t", ident.m_Identifier); - PrintPointer(ident.m_DataPtr); - fputc('\t', stdout); - fprintf(stdout, "%" PRIuCKDWORD " (%" PRIuCKDWORD " DWORD + %" PRIuCKDWORD ")\n", - ident.m_AreaSize, ident.m_AreaSize / CKSizeof(LibCmo::CKDWORD), ident.m_AreaSize % CKSizeof(LibCmo::CKDWORD)); + Console::FormatLine(u8"0x%08" PRIxCKDWORD "\t%s\t%" PRIuCKDWORD " (%" PRIuCKDWORD " DWORD + %" PRIuCKDWORD ")\n", + ident.m_Identifier, + PrintPointer(ident.m_DataPtr).c_str(), + ident.m_AreaSize, + ident.m_AreaSize / CKSizeof(LibCmo::CKDWORD), + ident.m_AreaSize % CKSizeof(LibCmo::CKDWORD) + ); } } diff --git a/Unvirt/Unvirt.cpp b/Unvirt/Unvirt.cpp index 631dce9..24750f4 100644 --- a/Unvirt/Unvirt.cpp +++ b/Unvirt/Unvirt.cpp @@ -1,16 +1,21 @@ +#include #include "UnvirtContext.hpp" -#include int main(int argc, char* argv[]) { - - // start iron pad - IronPad::IronPadRegister(); + // register exception handler on windows release +#if defined(LIBCMO_BUILD_RELEASE) && (YYCC_OS == YYCC_OS_WINDOWS) + YYCC::ExceptionHelper::Register(); +#endif + + // run core Unvirt::Context::UnvirtContext ctx; ctx.Run(); - // stop iron pad - IronPad::IronPadUnregister(); + // unregister exception handler on windows release +#if defined(LIBCMO_BUILD_RELEASE) && (YYCC_OS == YYCC_OS_WINDOWS) + YYCC::ExceptionHelper::Register(); +#endif return 0; }