diff --git a/BMap/BMap.vcxproj b/BMap/BMap.vcxproj
index c21a414..ec9c6e6 100644
--- a/BMap/BMap.vcxproj
+++ b/BMap/BMap.vcxproj
@@ -100,7 +100,7 @@
true
LIBCMO_EXPORTING;LIBCMO_BUILD_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;../IronPad;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;../IronPad;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
@@ -120,7 +120,7 @@
true
LIBCMO_EXPORTING;LIBCMO_BUILD_RELEASE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;../IronPad;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;../IronPad;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
@@ -140,7 +140,7 @@
true
LIBCMO_EXPORTING;LIBCMO_BUILD_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;../IronPad;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;../IronPad;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
@@ -160,7 +160,7 @@
true
LIBCMO_EXPORTING;LIBCMO_BUILD_RELEASE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;../IronPad;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;../IronPad;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
diff --git a/IronPad/IronPad.vcxproj b/IronPad/IronPad.vcxproj
index 6f4a752..2a22b81 100644
--- a/IronPad/IronPad.vcxproj
+++ b/IronPad/IronPad.vcxproj
@@ -100,7 +100,7 @@
true
LIBCMO_BUILD_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
@@ -119,7 +119,7 @@
true
LIBCMO_BUILD_RELEASE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
@@ -138,7 +138,7 @@
true
LIBCMO_BUILD_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
@@ -159,7 +159,7 @@
true
LIBCMO_BUILD_RELEASE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
diff --git a/LibCmo/CK2/CKStateChunkReader.cpp b/LibCmo/CK2/CKStateChunkReader.cpp
index c1b93a4..0ee286b 100644
--- a/LibCmo/CK2/CKStateChunkReader.cpp
+++ b/LibCmo/CK2/CKStateChunkReader.cpp
@@ -337,8 +337,8 @@ namespace LibCmo::CK2 {
}
CKStateChunk::Buffer_t CKStateChunk::ReadBufferWrapper() {
- void* cache;
- CKDWORD size;
+ void* cache = nullptr;
+ CKDWORD size = 0;
if (!ReadBuffer(&cache, &size)) {
return Buffer_t();
}
diff --git a/Unvirt/StructFormatter.cpp b/Unvirt/StructFormatter.cpp
index 959f51e..c85b95f 100644
--- a/Unvirt/StructFormatter.cpp
+++ b/Unvirt/StructFormatter.cpp
@@ -337,6 +337,23 @@ namespace Unvirt::StructFormatter {
PrintPointer(obj->GetFaceMaterialSlotIndexs());
fprintf(stdout, "\t0x%" PRIxCKDWORD " bytes\tMaterialSlotIndexs\n", obj->GetFaceCount() * CKSizeof(LibCmo::CKWORD));
+ // mtl slot data
+ fputs("== Material Slot ==\n", stdout);
+ 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);
+ for (LibCmo::CKDWORD i = 0; i < slotcount; ++i) {
+ LibCmo::CK2::ObjImpls::CKMaterial* mtl = pMtlSlots[i];
+
+ fprintf(stdout, "#%" PRIuCKDWORD "\t", i);
+ PrintPointer(mtl);
+ fputc('\t', stdout);
+ if (mtl != nullptr)
+ PrintCKSTRING(mtl->GetName());
+ fputc('\n', stdout);
+ }
+
}
#pragma endregion
diff --git a/Unvirt/Unvirt.vcxproj b/Unvirt/Unvirt.vcxproj
index 4d9e252..4d3f4f1 100644
--- a/Unvirt/Unvirt.vcxproj
+++ b/Unvirt/Unvirt.vcxproj
@@ -100,7 +100,7 @@
true
LIBCMO_BUILD_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;../IronPad;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;../IronPad;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
@@ -120,7 +120,7 @@
true
LIBCMO_BUILD_RELEASE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;../IronPad;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;../IronPad;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
@@ -140,7 +140,7 @@
true
LIBCMO_BUILD_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;../IronPad;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;../IronPad;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true
@@ -160,7 +160,7 @@
true
LIBCMO_BUILD_RELEASE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- $(ZLIB_PATH);../LibCmo;../IronPad;$(STB_PATH);%(AdditionalIncludeDirectories)
+ ../LibCmo;../IronPad;%(AdditionalIncludeDirectories)
stdcpp20
/utf-8 %(AdditionalOptions)
true