#pragma once #include "CKDefines.hpp" #include #include namespace LibCmo::CK2 { constexpr const CKDWORD CKVERSION = 0x05082002; namespace PredefinedGuids { constexpr const CKDWORD OBJECT_MANAGER_GUID1 = 0x7cbb3b91; constexpr const CKDWORD ATTRIBUTE_MANAGER_GUID1 = 0x3d242466; constexpr const CKDWORD MESSAGE_MANAGER_GUID1 = 0x466a0fac; constexpr const CKDWORD FLOOR_MANAGER_GUID1 = 0x420936f9; constexpr const CKDWORD COLLISION_MANAGER_GUID1 = 0x38244712; constexpr const CKDWORD GRID_MANAGER_GUID1 = 0x7f004791; constexpr const CKDWORD TIME_MANAGER_GUID1 = 0x89ce7b32; constexpr const CKDWORD BEHAVIOR_MANAGER_GUID1 = 0x58d621ae; constexpr const CKDWORD INPUT_MANAGER_GUID1 = 0xf787c904; constexpr const CKDWORD SOUND_MANAGER_GUID1 = 0xdce135f6; constexpr const CKDWORD MIDI_MANAGER_GUID1 = 0x594154a6; constexpr const CKDWORD INTERFACE_MANAGER_GUID1 = 0x9a4b8e3d; constexpr const CKDWORD RENDER_MANAGER_GUID1 = 0xa213c8d5; constexpr const CKDWORD PARAMETER_MANAGER_GUID1 = 0x9ce57ab6; constexpr const CKDWORD PATH_MANAGER_GUID1 = 0x15fd54b9; constexpr const CKDWORD VARIABLE_MANAGER_GUID1 = 0x98cc3cc9; constexpr const CKGUID OBJECT_MANAGER_GUID{ OBJECT_MANAGER_GUID1 ,0 }; constexpr const CKGUID ATTRIBUTE_MANAGER_GUID{ ATTRIBUTE_MANAGER_GUID1, 0 }; constexpr const CKGUID MESSAGE_MANAGER_GUID{ MESSAGE_MANAGER_GUID1 ,0 }; constexpr const CKGUID TIME_MANAGER_GUID{ TIME_MANAGER_GUID1 ,0 }; constexpr const CKGUID SOUND_MANAGER_GUID{ SOUND_MANAGER_GUID1 ,0 }; constexpr const CKGUID MIDI_MANAGER_GUID{ MIDI_MANAGER_GUID1 ,0 }; constexpr const CKGUID INPUT_MANAGER_GUID{ INPUT_MANAGER_GUID1 ,0 }; constexpr const CKGUID BEHAVIOR_MANAGER_GUID{ BEHAVIOR_MANAGER_GUID1 ,0 }; constexpr const CKGUID FLOOR_MANAGER_GUID{ FLOOR_MANAGER_GUID1 ,0 }; constexpr const CKGUID COLLISION_MANAGER_GUID{ COLLISION_MANAGER_GUID1 ,0 }; constexpr const CKGUID GRID_MANAGER_GUID{ GRID_MANAGER_GUID1 ,0 }; constexpr const CKGUID INTERFACE_MANAGER_GUID{ INTERFACE_MANAGER_GUID1 ,0 }; constexpr const CKGUID RENDER_MANAGER_GUID{ RENDER_MANAGER_GUID1 ,0 }; constexpr const CKGUID PARAMETER_MANAGER_GUID{ PARAMETER_MANAGER_GUID1 ,0 }; constexpr const CKGUID PATH_MANAGER_GUID{ PATH_MANAGER_GUID1 ,0 }; constexpr const CKGUID VARIABLE_MANAGER_GUID{ VARIABLE_MANAGER_GUID1 ,0 }; } enum class CK_CLASSID : uint32_t { CKCID_OBJECT = 1, CKCID_PARAMETERIN = 2, CKCID_PARAMETEROPERATION = 4, CKCID_STATE = 5, CKCID_BEHAVIORLINK = 6, CKCID_BEHAVIOR = 8, CKCID_BEHAVIORIO = 9, CKCID_RENDERCONTEXT = 12, CKCID_KINEMATICCHAIN = 13, CKCID_SCENEOBJECT = 11, CKCID_OBJECTANIMATION = 15, CKCID_ANIMATION = 16, CKCID_KEYEDANIMATION = 18, CKCID_BEOBJECT = 19, CKCID_DATAARRAY = 52, CKCID_SCENE = 10, CKCID_LEVEL = 21, CKCID_PLACE = 22, CKCID_GROUP = 23, CKCID_SOUND = 24, CKCID_WAVESOUND = 25, CKCID_MIDISOUND = 26, CKCID_MATERIAL = 30, CKCID_TEXTURE = 31, CKCID_MESH = 32, CKCID_PATCHMESH = 53, CKCID_RENDEROBJECT = 47, CKCID_2DENTITY = 27, CKCID_SPRITE = 28, CKCID_SPRITETEXT = 29, CKCID_3DENTITY = 33, CKCID_GRID = 50, CKCID_CURVEPOINT = 36, CKCID_SPRITE3D = 37, CKCID_CURVE = 43, CKCID_CAMERA = 34, CKCID_TARGETCAMERA = 35, CKCID_LIGHT = 38, CKCID_TARGETLIGHT = 39, CKCID_CHARACTER = 40, CKCID_3DOBJECT = 41, CKCID_BODYPART = 42, CKCID_PARAMETER = 46, CKCID_PARAMETERLOCAL = 45, CKCID_PARAMETEROUT = 3, CKCID_INTERFACEOBJECTMANAGER = 48, CKCID_CRITICALSECTION = 49, CKCID_LAYER = 51, CKCID_PROGRESSIVEMESH = 54, CKCID_SYNCHRO = 20, CKCID_OBJECTARRAY = 80, CKCID_SCENEOBJECTDESC = 81, CKCID_ATTRIBUTEMANAGER = 82, CKCID_MESSAGEMANAGER = 83, CKCID_COLLISIONMANAGER = 84, CKCID_OBJECTMANAGER = 85, CKCID_FLOORMANAGER = 86, CKCID_RENDERMANAGER = 87, CKCID_BEHAVIORMANAGER = 88, CKCID_INPUTMANAGER = 89, CKCID_PARAMETERMANAGER = 90, CKCID_GRIDMANAGER = 91, CKCID_SOUNDMANAGER = 92, CKCID_TIMEMANAGER = 93, CKCID_CUIKBEHDATA = static_cast(-1), CKCID_MAXCLASSID = 55, CKCID_MAXMAXCLASSID = 128 }; enum class CKERROR : int32_t { CKERR_OK = 0, CKERR_INVALIDPARAMETER = -1, CKERR_INVALIDPARAMETERTYPE = -2, CKERR_INVALIDSIZE = -3, CKERR_INVALIDOPERATION = -4, CKERR_OPERATIONNOTIMPLEMENTED = -5, CKERR_OUTOFMEMORY = -6, CKERR_NOTIMPLEMENTED = -7, CKERR_NOTFOUND = -11, CKERR_NOLEVEL = -13, CKERR_CANCREATERENDERCONTEXT = -14, CKERR_NOTIFICATIONNOTHANDLED = -16, CKERR_ALREADYPRESENT = -17, CKERR_INVALIDRENDERCONTEXT = -18, CKERR_RENDERCONTEXTINACTIVE = -19, CKERR_NOLOADPLUGINS = -20, CKERR_NOSAVEPLUGINS = -21, CKERR_INVALIDFILE = -22, CKERR_INVALIDPLUGIN = -23, CKERR_NOTINITIALIZED = -24, CKERR_INVALIDMESSAGE = -25, CKERR_INVALIDPROTOTYPE = -28, CKERR_NODLLFOUND = -29, CKERR_ALREADYREGISTREDDLL = -30, CKERR_INVALIDDLL = -31, CKERR_INVALIDOBJECT = -34, CKERR_INVALIDCONDSOLEWINDOW = -35, CKERR_INVALIDKINEMATICCHAIN = -36, CKERR_NOKEYBOARD = -37, CKERR_NOMOUSE = -38, CKERR_NOJOYSTICK = -39, CKERR_INCOMPATIBLEPARAMETERS = -40, CKERR_NORENDERENGINE = -44, CKERR_NOCURRENTLEVEL = -45, CKERR_SOUNDDISABLED = -46, CKERR_DINPUTDISABLED = -47, CKERR_INVALIDGUID = -48, CKERR_NOTENOUGHDISKPLACE = -49, CKERR_CANTWRITETOFILE = -50, CKERR_BEHAVIORADDDENIEDBYCB = -51, CKERR_INCOMPATIBLECLASSID = -52, CKERR_MANAGERALREADYEXISTS = -53, CKERR_PAUSED = -54, CKERR_PLUGINSMISSING = -55, CKERR_OBSOLETEVIRTOOLS = -56, CKERR_FILECRCERROR = -57, CKERR_ALREADYFULLSCREEN = -58, CKERR_CANCELLED = -59, CKERR_NOANIMATIONKEY = -121, CKERR_INVALIDINDEX = -122, CKERR_INVALIDANIMATION = -123 }; enum class CK_FILE_WRITEMODE : uint32_t { CKFILE_UNCOMPRESSED = 0, CKFILE_CHUNKCOMPRESSED_OLD = 1, CKFILE_EXTERNALTEXTURES_OLD = 2, CKFILE_FORVIEWER = 4, CKFILE_WHOLECOMPRESSED = 8 }; enum class CK_LOAD_FLAGS : uint32_t { CK_LOAD_ANIMATION = 1 << 0, CK_LOAD_GEOMETRY = 1 << 1, CK_LOAD_DEFAULT = CK_LOAD_GEOMETRY | CK_LOAD_ANIMATION, CK_LOAD_ASCHARACTER = 1 << 2, CK_LOAD_DODIALOG = 1 << 3, CK_LOAD_AS_DYNAMIC_OBJECT = 1 << 4, CK_LOAD_AUTOMATICMODE = 1 << 5, CK_LOAD_CHECKDUPLICATES = 1 << 6, CK_LOAD_CHECKDEPENDENCIES = 1 << 7, CK_LOAD_ONLYBEHAVIORS = 1 << 8 }; enum class CK_FO_OPTIONS : uint32_t { CK_FO_DEFAULT = 0, CK_FO_RENAMEOBJECT, CK_FO_REPLACEOBJECT, CK_FO_DONTLOADOBJECT }; enum class CK_PLUGIN_TYPE : uint32_t { CKPLUGIN_BITMAP_READER = 0, CKPLUGIN_SOUND_READER = 1, CKPLUGIN_MODEL_READER = 2, CKPLUGIN_MANAGER_DLL = 3, CKPLUGIN_BEHAVIOR_DLL = 4, CKPLUGIN_RENDERENGINE_DLL = 5, CKPLUGIN_MOVIE_READER = 6, CKPLUGIN_EXTENSION_DLL = 7 }; enum class CK_STATECHUNK_DATAVERSION : uint32_t { CHUNKDATA_OLDVERSION = 0, CHUNKDATA_BASEVERSION = 1, CHUNK_WAVESOUND_VERSION2 = 2, CHUNK_WAVESOUND_VERSION3 = 3, CHUNK_MATERIAL_VERSION_ZTEST = 4, CHUNK_MAJORCHANGE_VERSION = 5, CHUNK_MACCHANGE_VERSION = 6, CHUNK_WAVESOUND_VERSION4 = 7, CHUNK_SCENECHANGE_VERSION = 8, CHUNK_MESHCHANGE_VERSION = 9, CHUNK_DEV_2_1 = 10, CHUNKDATA_CURRENTVERSION = CHUNK_DEV_2_1 }; enum class CK_STATECHUNK_CHUNKVERSION : uint32_t { CHUNK_VERSIONBASE = 0, CHUNK_VERSION1 = 4, CHUNK_VERSION2 = 5, CHUNK_VERSION3 = 6, CHUNK_VERSION4 = 7 }; enum class CK_STATECHUNK_CHUNKOPTIONS : uint32_t { CHNK_OPTION_IDS = 0x01, CHNK_OPTION_MAN = 0x02, CHNK_OPTION_CHN = 0x04, CHNK_OPTION_FILE = 0x08, CHNK_OPTION_ALLOWDYN = 0x10, CHNK_OPTION_LISTBIG = 0x20, CHNK_DONTDELETE_PTR = 0x40, CHNK_DONTDELETE_PARSER = 0x80 }; enum class CK_OBJECT_FLAGS : uint32_t { CK_OBJECT_INTERFACEOBJ = 0x00000001, CK_OBJECT_PRIVATE = 0x00000002, CK_OBJECT_INTERFACEMARK = 0x00000004, CK_OBJECT_FREEID = 0x00000008, CK_OBJECT_TOBEDELETED = 0x00000010, CK_OBJECT_NOTTOBESAVED = 0x00000020, CK_OBJECT_VISIBLE = 0x00000040, CK_OBJECT_NAMESHARED = 0x00000080, CK_OBJECT_DYNAMIC = 0x00000108, CK_OBJECT_HIERACHICALHIDE = 0x00000200, CK_OBJECT_UPTODATE = 0x00000400, CK_OBJECT_TEMPMARKER = 0x00000800, CK_OBJECT_ONLYFORFILEREFERENCE = 0x00001000, CK_OBJECT_NOTTOBEDELETED = 0x00002000, CK_OBJECT_APPDATA = 0x00004000, CK_OBJECT_SINGLEACTIVITY = 0x00008000, CK_OBJECT_LOADSKIPBEOBJECT = 0x00010000, CK_OBJECT_NOTTOBELISTEDANDSAVED = 0x00000023, CK_PARAMETEROUT_SETTINGS = 0x00400000, CK_PARAMETEROUT_PARAMOP = 0x00800000, CK_PARAMETERIN_DISABLED = 0x01000000, CK_PARAMETERIN_THIS = 0x02000000, CK_PARAMETERIN_SHARED = 0x04000000, CK_PARAMETEROUT_DELETEAFTERUSE = 0x08000000, CK_OBJECT_PARAMMASK = 0x0FC00000, CK_BEHAVIORIO_IN = 0x10000000, CK_BEHAVIORIO_OUT = 0x20000000, CK_BEHAVIORIO_ACTIVE = 0x40000000, CK_OBJECT_IOTYPEMASK = 0x30000000, CK_OBJECT_IOMASK = 0xF0000000, CKBEHAVIORLINK_RESERVED = 0x10000000, CKBEHAVIORLINK_ACTIVATEDLASTFRAME = 0x20000000, CK_OBJECT_BEHAVIORLINKMASK = 0x30000000 }; }