write some boring struct in VxTypes

This commit is contained in:
yyc12345 2023-09-13 22:33:41 +08:00
parent 33c02d292b
commit 8894b1ccad
34 changed files with 396 additions and 981 deletions

8
.gitignore vendored
View File

@ -3,14 +3,14 @@
*.cmo
*.nms
*.vmo
PyCmoOld/
out/
temp/
.vscode/
CodeGen.old/
CodeGen/dest/*.hpp
CodeGen/dest/*.cpp
CodeGen/*.hpp
CodeGen/*.cpp
CodeGen/EnumsMigration/dest/*.hpp
CodeGen/EnumsMigration/dest/*.cpp
## CMake Banned
CMakeLists.txt.user

124
CodeGen/VxVectors.py Normal file
View File

@ -0,0 +1,124 @@
def GetTmplDecl(svars: tuple[str]) -> str:
return f'float {", ".join(svars)};'
def GetTmplCtor1(sname: str, svars: tuple[str]) -> str:
return f'{sname}() : {", ".join(map(lambda x: f"{x}(0.0f)", svars))} {{}}'
def GetTmplCtor2(sname: str, svars: tuple[str]) -> str:
return f'{sname}({", ".join(map(lambda x: f"float _{x}", svars))}) : {", ".join(map(lambda x: f"{x}(_{x})", svars))} {{}}'
def GetTmplCopyCtor(sname: str, svars: tuple[str]) -> str:
return f'{sname}(const {sname}& rhs) : {", ".join(map(lambda x: f"{x}(rhs.{x})", svars))} {{}}'
def GetTmplMoveCtor(sname: str, svars: tuple[str]) -> str:
return f'{sname}({sname}&& rhs) : {", ".join(map(lambda x: f"{x}(rhs.{x})", svars))} {{}}'
def GetTmplOperAssignCopy(sname: str, svars: tuple[str]) -> str:
sp: str = '\n\t\t'
return f"""\t{sname}& operator=(const {sname}& rhs) {{
\t\t{sp.join(map(lambda x: f'{x} = rhs.{x};', svars))}
\t\treturn *this;
\t}}"""
def GetTmplOperAssignMove(sname: str, svars: tuple[str]) -> str:
sp: str = '\n\t\t'
return f"""\t{sname}& operator=({sname}&& rhs) {{
\t\t{sp.join(map(lambda x: f'{x} = rhs.{x};', svars))}
\t\treturn *this;
\t}}"""
def GetTmplOperOffset(sname: str, svars: tuple[str]) -> str:
sp: str = '\n\t\t\t'
return f"""\tfloat& operator[](size_t i) {{
\t\tswitch (i) {{
\t\t\t{sp.join(map(lambda x: f'case {x}: return {svars[x]};', range(len(svars))))}
\t\t\tdefault: return {svars[0]};
\t\t}}
\t}}"""
def GetTmplOperAddMinus(sname: str, svars: tuple[str], oper: str) -> str:
sp: str = '\n\t\t'
return f"""\t{sname}& operator{oper}=(const {sname}& rhs) {{
\t\t{sp.join(map(lambda x: f'{x} {oper}= rhs.{x};', svars))}
\t\treturn *this;
\t}}
\tfriend {sname} operator{oper}(const {sname}& lhs, const {sname}& rhs) {{
\t\treturn {sname}({', '.join(map(lambda x: f'lhs.{x} {oper} rhs.{x}', svars))});
\t}}"""
def GetTmplOperMul(sname: str, svars: tuple[str]) -> str:
sp: str = '\n\t\t'
return f"""\t{sname}& operator*=(float rhs) {{
\t\t{sp.join(map(lambda x: f'{x} *= rhs;', svars))}
\t\treturn *this;
\t}}
\tfriend {sname} operator*(const {sname}& lhs, float rhs) {{
\t\treturn {sname}({', '.join(map(lambda x: f'lhs.{x} * rhs', svars))});
\t}}
\tfriend {sname} operator*(float lhs, const {sname}& rhs) {{
\t\treturn {sname}({', '.join(map(lambda x: f'lhs * rhs.{x}', svars))});
\t}}"""
def GetTmplOperDiv(sname: str, svars: tuple[str]) -> str:
sp: str = '\n\t\t'
return f"""\t{sname}& operator/=(float rhs) {{
\t\tif (rhs == 0.0f) return *this;
\t\t{sp.join(map(lambda x: f'{x} /= rhs;', svars))}
\t\treturn *this;
\t}}
\tfriend {sname} operator/(const {sname}& lhs, float rhs) {{
\t\tif (rhs == 0.0f) return {sname}({', '.join(map(lambda x: '0.0f', range(len(svars))))});
\t\treturn {sname}({', '.join(map(lambda x: f'lhs.{x} / rhs', svars))});
\t}}"""
def GetTmplOperEqual(sname: str, svars: tuple[str]) -> str:
sp: str = '\n\t\t'
return f"""\tbool operator==(const {sname}& rhs) const {{
\t\treturn ({' && '.join(map(lambda x: f'{x} == rhs.{x}', svars))});
\t}}
\tbool operator!=(const {sname}& rhs) const {{
\t\treturn !(*this == rhs);
\t}}"""
def GetTmplVector(sname: str, svars: tuple[str]) -> str:
return f"""
struct {sname} {{
\t{GetTmplDecl(svars)}
\t{GetTmplCtor1(sname, svars)}
\t{GetTmplCtor2(sname, svars)}
\tLIBCMO_DEFAULT_COPY_MOVE({sname});
{GetTmplOperOffset(sname, svars)}
{GetTmplOperAddMinus(sname, svars, '+')}
{GetTmplOperAddMinus(sname, svars, '-')}
{GetTmplOperMul(sname, svars)}
{GetTmplOperDiv(sname, svars)}
{GetTmplOperEqual(sname, svars)}
}};
"""
def GetTmplOthers(sname: str, svars: tuple[str]) -> str:
return f"""
struct {sname} {{
\t{GetTmplDecl(svars)}
\t{GetTmplCtor1(sname, svars)} // set your custom init.
\t{GetTmplCtor2(sname, svars)}
\tLIBCMO_DEFAULT_COPY_MOVE({sname});
{GetTmplOperOffset(sname, svars)}
{GetTmplOperEqual(sname, svars)}
}};
"""
# use LIBCMO_DEFAULT_COPY_MOVE instead of these outputs.
#\t{GetTmplCopyCtor(sname, svars)}
#\t{GetTmplMoveCtor(sname, svars)}
#{GetTmplOperAssignCopy(sname, svars)}
#{GetTmplOperAssignMove(sname, svars)}
if __name__ == '__main__':
with open('VxTypes.hpp', 'w', encoding='utf-8') as fs:
fs.write(GetTmplVector('VxVector2', ('x', 'y', )))
fs.write(GetTmplVector('VxVector3', ('x', 'y', 'z', )))
fs.write(GetTmplVector('VxVector4', ('x', 'y', 'z', 'w', )))
fs.write(GetTmplOthers('VxQuaternion', ('x', 'y', 'z', 'w', )))
fs.write(GetTmplOthers('VxColor', ('r', 'g', 'b', 'a', )))

View File

@ -9,6 +9,9 @@ namespace LibCmo::CK2::ObjImpls {
* Because Virtools directly write a raw struct into file,
* and our defines are different with Virtools.
* So we need create a fake struct.
* @remark
* 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.
*/
struct FakeBitmapProperties {
CKINT m_Size;
@ -50,10 +53,10 @@ namespace LibCmo::CK2::ObjImpls {
CK2::CKWORD BytesPerColorEntry; ///< ColorMap Stride
CK2::CKWORD ColorMapEntries; ///< If other than 0 image is palletized
CK2::CKBYTE* ColorMap; ///< Palette colors
CK2::CKBYTE* Image; ///< Image
/*CK2::CKBYTE**/CK2::CKDWORD ColorMap; ///< Palette colors
/*CK2::CKBYTE**/CK2::CKDWORD Image; ///< Image
}m_Format;
void* m_Data;
/*void**/CK2::CKDWORD m_Data;
};
CKTexture::CKTexture(CKContext* ctx, CK_ID ckid, CKSTRING name) :

View File

@ -23,40 +23,262 @@ namespace LibCmo::VxMath {
class VxMemoryMappedFile;
//---- Misc
/**
* @brief Class representation of a Vector in 3 dimensions
*/
struct VxVector {
float x, y, z;
VxVector() : x(0.0f), y(0.0f), z(0.0f) {}
VxVector(float f) : x(f), y(f), z(f) {}
VxVector(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {}
VxVector(const float f[3]) : x(f[0]), y(f[1]), z(f[2]) {}
};
/**
* @brief Class representation of a Vector in 2 dimensions
*/
struct Vx2DVector {
struct VxVector2 {
float x, y;
Vx2DVector() : x(0.0f), y(0.0f) {}
Vx2DVector(float f) : x(f), y(f) {}
Vx2DVector(float _x, float _y) : x(_x), y(_y) {}
Vx2DVector(CK2::CKINT iX, CK2::CKINT iY) : x((float)iX), y((float)iY) {}
Vx2DVector(const float f[2]) : x(f[0]), y(f[1]) {}
VxVector2() : x(0.0f), y(0.0f) {}
VxVector2(float _x, float _y) : x(_x), y(_y) {}
LIBCMO_DEFAULT_COPY_MOVE(VxVector2);
float& operator[](size_t i) {
switch (i) {
case 0: return x;
case 1: return y;
default: return x;
}
}
VxVector2& operator+=(const VxVector2& rhs) {
x += rhs.x;
y += rhs.y;
return *this;
}
friend VxVector2 operator+(const VxVector2& lhs, const VxVector2& rhs) {
return VxVector2(lhs.x + rhs.x, lhs.y + rhs.y);
}
VxVector2& operator-=(const VxVector2& rhs) {
x -= rhs.x;
y -= rhs.y;
return *this;
}
friend VxVector2 operator-(const VxVector2& lhs, const VxVector2& rhs) {
return VxVector2(lhs.x - rhs.x, lhs.y - rhs.y);
}
VxVector2& operator*=(float rhs) {
x *= rhs;
y *= rhs;
return *this;
}
friend VxVector2 operator*(const VxVector2& lhs, float rhs) {
return VxVector2(lhs.x * rhs, lhs.y * rhs);
}
friend VxVector2 operator*(float lhs, const VxVector2& rhs) {
return VxVector2(lhs * rhs.x, lhs * rhs.y);
}
VxVector2& operator/=(float rhs) {
if (rhs == 0.0f) return *this;
x /= rhs;
y /= rhs;
return *this;
}
friend VxVector2 operator/(const VxVector2& lhs, float rhs) {
if (rhs == 0.0f) return VxVector2(0.0f, 0.0f);
return VxVector2(lhs.x / rhs, lhs.y / rhs);
}
bool operator==(const VxVector2& rhs) const {
return (x == rhs.x && y == rhs.y);
}
bool operator!=(const VxVector2& rhs) const {
return !(*this == rhs);
}
};
struct VxVector3 {
float x, y, z;
VxVector3() : x(0.0f), y(0.0f), z(0.0f) {}
VxVector3(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {}
LIBCMO_DEFAULT_COPY_MOVE(VxVector3);
float& operator[](size_t i) {
switch (i) {
case 0: return x;
case 1: return y;
case 2: return z;
default: return x;
}
}
VxVector3& operator+=(const VxVector3& rhs) {
x += rhs.x;
y += rhs.y;
z += rhs.z;
return *this;
}
friend VxVector3 operator+(const VxVector3& lhs, const VxVector3& rhs) {
return VxVector3(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z);
}
VxVector3& operator-=(const VxVector3& rhs) {
x -= rhs.x;
y -= rhs.y;
z -= rhs.z;
return *this;
}
friend VxVector3 operator-(const VxVector3& lhs, const VxVector3& rhs) {
return VxVector3(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z);
}
VxVector3& operator*=(float rhs) {
x *= rhs;
y *= rhs;
z *= rhs;
return *this;
}
friend VxVector3 operator*(const VxVector3& lhs, float rhs) {
return VxVector3(lhs.x * rhs, lhs.y * rhs, lhs.z * rhs);
}
friend VxVector3 operator*(float lhs, const VxVector3& rhs) {
return VxVector3(lhs * rhs.x, lhs * rhs.y, lhs * rhs.z);
}
VxVector3& operator/=(float rhs) {
if (rhs == 0.0f) return *this;
x /= rhs;
y /= rhs;
z /= rhs;
return *this;
}
friend VxVector3 operator/(const VxVector3& lhs, float rhs) {
if (rhs == 0.0f) return VxVector3(0.0f, 0.0f, 0.0f);
return VxVector3(lhs.x / rhs, lhs.y / rhs, lhs.z / rhs);
}
bool operator==(const VxVector3& rhs) const {
return (x == rhs.x && y == rhs.y && z == rhs.z);
}
bool operator!=(const VxVector3& rhs) const {
return !(*this == rhs);
}
};
struct VxVector4 {
float x, y, z, w;
VxVector4() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {}
VxVector4(float _x, float _y, float _z, float _w) : x(_x), y(_y), z(_z), w(_w) {}
LIBCMO_DEFAULT_COPY_MOVE(VxVector4);
float& operator[](size_t i) {
switch (i) {
case 0: return x;
case 1: return y;
case 2: return z;
case 3: return w;
default: return x;
}
}
VxVector4& operator+=(const VxVector4& rhs) {
x += rhs.x;
y += rhs.y;
z += rhs.z;
w += rhs.w;
return *this;
}
friend VxVector4 operator+(const VxVector4& lhs, const VxVector4& rhs) {
return VxVector4(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z, lhs.w + rhs.w);
}
VxVector4& operator-=(const VxVector4& rhs) {
x -= rhs.x;
y -= rhs.y;
z -= rhs.z;
w -= rhs.w;
return *this;
}
friend VxVector4 operator-(const VxVector4& lhs, const VxVector4& rhs) {
return VxVector4(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z, lhs.w - rhs.w);
}
VxVector4& operator*=(float rhs) {
x *= rhs;
y *= rhs;
z *= rhs;
w *= rhs;
return *this;
}
friend VxVector4 operator*(const VxVector4& lhs, float rhs) {
return VxVector4(lhs.x * rhs, lhs.y * rhs, lhs.z * rhs, lhs.w * rhs);
}
friend VxVector4 operator*(float lhs, const VxVector4& rhs) {
return VxVector4(lhs * rhs.x, lhs * rhs.y, lhs * rhs.z, lhs * rhs.w);
}
VxVector4& operator/=(float rhs) {
if (rhs == 0.0f) return *this;
x /= rhs;
y /= rhs;
z /= rhs;
w /= rhs;
return *this;
}
friend VxVector4 operator/(const VxVector4& lhs, float rhs) {
if (rhs == 0.0f) return VxVector4(0.0f, 0.0f, 0.0f, 0.0f);
return VxVector4(lhs.x / rhs, lhs.y / rhs, lhs.z / rhs, lhs.w / rhs);
}
bool operator==(const VxVector4& rhs) const {
return (x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w);
}
bool operator!=(const VxVector4& rhs) const {
return !(*this == rhs);
}
};
/**
* @brief Class representation of a Quaternion
*/
struct VxQuaternion {
float x, y, z, w;
VxQuaternion() : x(0.0f), y(0.0f), z(0.0f), w(1.0f) {} // set your custom init.
VxQuaternion(float _x, float _y, float _z, float _w) : x(_x), y(_y), z(_z), w(_w) {}
LIBCMO_DEFAULT_COPY_MOVE(VxQuaternion);
float& operator[](size_t i) {
switch (i) {
case 0: return x;
case 1: return y;
case 2: return z;
case 3: return w;
default: return x;
}
}
bool operator==(const VxQuaternion& rhs) const {
return (x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w);
}
bool operator!=(const VxQuaternion& rhs) const {
return !(*this == rhs);
}
};
VxQuaternion() : x(0.0f), y(0.0f), z(0.0f), w(1.0f) {}
VxQuaternion(float X, float Y, float Z, float W) : x(X), y(Y), z(Z), w(W) {}
struct VxColor {
float r, g, b, a;
VxColor() : r(0.0f), g(0.0f), b(0.0f), a(1.0f) {} // set your custom init.
VxColor(float _r, float _g, float _b, float _a) : r(_r), g(_g), b(_b), a(_a) {}
VxColor(CK2::CKDWORD argb) {
a = ((argb & 0xFF000000) >> 24) / 255.0f;
r = ((argb & 0x00FF0000) >> 16) / 255.0f;
g = ((argb & 0x0000FF00) >> 8) / 255.0f;
b = ((argb & 0x000000FF) >> 0) / 255.0f;
}
LIBCMO_DEFAULT_COPY_MOVE(VxColor);
CK2::CKDWORD ToARGB() const {
CK2::CKDWORD argb = 0;
argb |= static_cast<CK2::CKDWORD>(a * 255.0f);
argb <<= 8;
argb |= static_cast<CK2::CKDWORD>(r * 255.0f);
argb <<= 8;
argb |= static_cast<CK2::CKDWORD>(g * 255.0f);
argb <<= 8;
argb |= static_cast<CK2::CKDWORD>(b * 255.0f);
return argb;
}
void Regulate() {
if (r > 1.0f) r = 1.0f;
else if (r < 0.0f) r = 0.0f;
if (g > 1.0f) g = 1.0f;
else if (g < 0.0f) g= 0.0f;
if (b > 1.0f) b = 1.0f;
else if (b < 0.0f) b = 0.0f;
if (a > 1.0f) a = 1.0f;
else if (a < 0.0f) a = 0.0f;
}
float& operator[](size_t i) {
switch (i) {
case 0: return r;
case 1: return g;
case 2: return b;
case 3: return a;
default: return r;
}
}
bool operator==(const VxColor& rhs) const {
return (r == rhs.r && g == rhs.g && b == rhs.b && a == rhs.a);
}
bool operator!=(const VxColor& rhs) const {
return !(*this == rhs);
}
};
struct VxMatrix {
@ -67,6 +289,18 @@ namespace LibCmo::VxMath {
m_Data[0][0] = m_Data[1][1] = m_Data[2][2] = m_Data[3][3] = 1.0f;
}
VxMatrix(float m[4][4]) : m_Data() { std::memcpy(m_Data, m, sizeof(m_Data)); }
LIBCMO_DEFAULT_COPY_MOVE(VxMatrix);
VxVector4& operator[](size_t i) {
if (i >= 4) i = 0;
return *(reinterpret_cast<VxVector4*>(m_Data) + i);
}
bool operator==(const VxMatrix& rhs) const {
return std::memcmp(m_Data, rhs.m_Data, sizeof(m_Data)) == 0;
}
bool operator!=(const VxMatrix& rhs) const {
return !(*this == rhs);
}
};
/**

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<BML_PATH>D:\BallanceModLoader</BML_PATH>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup>
<BuildMacro Include="BML_PATH">
<Value>$(BML_PATH)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@ -1,232 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{c8d9cfff-442c-4ccb-80d7-02b6b2e7412f}</ProjectGuid>
<RootNamespace>VirtoolsProbe</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibRef.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibRef.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(SolutionDir)temp\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(SolutionDir)temp\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>BML_EXPORT=;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>$(BML_PATH)\virtools;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>BML_EXPORT=;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>$(BML_PATH)\virtools;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\BallanceModLoader\virtools\CK2dCurve.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CK2dCurvePoint.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CK2dEntity.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CK3dEntity.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKAttributeManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBaseManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBehavior.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBehaviorIO.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBehaviorManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBehaviorPrototype.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBeObject.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBitmapData.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKCamera.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKCollisionManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKContext.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKDataArray.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKGlobals.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKGroup.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKInputManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKLevel.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKLight.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKMaterial.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKMesh.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKMessage.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKMessageManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKObject.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKObjectArray.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKObjectDeclaration.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKParameter.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKParameterIn.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKParameterManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKParameterOperation.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKPathManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKPluginManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKRenderContext.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKRenderManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKRenderObject.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKScene.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSceneObject.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSound.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSoundManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSprite.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSprite3D.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSpriteText.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKStateObject.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKTexture.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\CKTimeManager.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\VxMath.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\VxMatrix.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\VxQuaternion.cpp" />
<ClCompile Include="..\..\BallanceModLoader\virtools\XString.cpp" />
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\BallanceModLoader\virtools\CK2dCurve.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CK2dCurvePoint.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CK2dEntity.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CK3dEntity.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKAll.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKAttributeManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBaseManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBehavior.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBehaviorIO.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBehaviorManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBehaviorPrototype.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBeObject.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBitmapData.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKCamera.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKCollisionManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKContext.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKDataArray.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKDef.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKdefines2.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKDependencies.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKEnums.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKError.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKGlobals.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKGroup.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKInputManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKLevel.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKLight.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKMaterial.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKMesh.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKMessage.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKMessageManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKObject.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKObjectArray.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKObjectDeclaration.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKParameter.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKParameterIn.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKParameterManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKParameterOperation.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKPathManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKPluginManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKRenderContext.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKRenderManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKRenderObject.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKScene.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSceneObject.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSound.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSoundManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSprite.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSprite3D.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSpriteText.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKStateObject.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKTexture.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKTimeManager.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\CKTypes.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\Vx2dVector.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxAllocator.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxColor.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxFrustum.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxMath.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxMathDefines.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxMatrix.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxMutex.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxPlane.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxQuaternion.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxRay.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxRect.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxSphere.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\VxVector.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XArray.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XBitArray.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XClassArray.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XHashFun.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XHashTable.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XObjectArray.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XSArray.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XSHashTable.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XSmartPtr.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XString.h" />
<ClInclude Include="..\..\BallanceModLoader\virtools\XUtil.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,420 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resources">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Headers\Virtools">
<UniqueIdentifier>{13a4e7ed-2c5b-49a5-a201-e5fb5cfd701c}</UniqueIdentifier>
</Filter>
<Filter Include="Sources\Virtools">
<UniqueIdentifier>{970d5dc3-c8f4-4cb0-aea4-2caa12194d95}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CK2dCurve.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CK2dCurvePoint.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CK2dEntity.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CK3dEntity.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKAttributeManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBaseManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBehavior.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBehaviorIO.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBehaviorManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBehaviorPrototype.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBeObject.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKBitmapData.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKCamera.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKCollisionManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKContext.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKDataArray.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKGlobals.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKGroup.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKInputManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKLevel.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKLight.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKMaterial.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKMesh.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKMessage.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKMessageManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKObject.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKObjectArray.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKObjectDeclaration.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKParameter.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKParameterIn.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKParameterManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKParameterOperation.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKPathManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKPluginManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKRenderContext.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKRenderManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKRenderObject.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKScene.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSceneObject.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSound.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSoundManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSprite.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSprite3D.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKSpriteText.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKStateObject.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKTexture.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\CKTimeManager.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\VxMath.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\VxMatrix.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\VxQuaternion.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
<ClCompile Include="..\..\BallanceModLoader\virtools\XString.cpp">
<Filter>Sources\Virtools</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\BallanceModLoader\virtools\CK2dCurve.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CK2dCurvePoint.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CK2dEntity.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CK3dEntity.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKAll.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKAttributeManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBaseManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBehavior.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBehaviorIO.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBehaviorManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBehaviorPrototype.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBeObject.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKBitmapData.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKCamera.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKCollisionManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKContext.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKDataArray.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKDef.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKdefines2.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKDependencies.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKEnums.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKError.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKGlobals.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKGroup.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKInputManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKLevel.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKLight.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKMaterial.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKMesh.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKMessage.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKMessageManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKObject.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKObjectArray.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKObjectDeclaration.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKParameter.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKParameterIn.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKParameterManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKParameterOperation.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKPathManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKPluginManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKRenderContext.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKRenderManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKRenderObject.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKScene.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSceneObject.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSound.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSoundManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSprite.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSprite3D.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKSpriteText.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKStateObject.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKTexture.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKTimeManager.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\CKTypes.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\Vx2dVector.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxAllocator.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxColor.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxFrustum.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxMath.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxMathDefines.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxMatrix.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxMutex.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxPlane.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxQuaternion.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxRay.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxRect.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxSphere.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\VxVector.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XArray.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XBitArray.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XClassArray.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XHashFun.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XHashTable.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XObjectArray.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XSArray.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XSHashTable.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XSmartPtr.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XString.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
<ClInclude Include="..\..\BallanceModLoader\virtools\XUtil.h">
<Filter>Headers\Virtools</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -1,272 +0,0 @@
#include <CKAll.h>
#include <iostream>
#include <filesystem>
#include <string>
#include <vector>
#include <map>
#include <Windows.h>
#include <Psapi.h>
#define BUFFER_SIZE 1024
void Assert(bool cond, const char* desc) {
if (!cond) {
std::cout << desc << std::endl;
ExitProcess(0);
}
}
struct MyModuleInfo {
intptr_t BaseOfDll;
intptr_t EntryPoint;
std::string ModuleName;
};
std::map<intptr_t, MyModuleInfo> ConstructModuleList() {
std::map<intptr_t, MyModuleInfo> result;
HANDLE hProc = GetCurrentProcess();
HMODULE* hMods = new HMODULE[1024];
TCHAR* szModName = new TCHAR[MAX_PATH];
MODULEINFO infoMod;
DWORD cbNeeded;
DWORD nameLen;
if (EnumProcessModules(hProc, hMods, sizeof(HMODULE) * 1024, &cbNeeded)) {
for (DWORD i = 0; i < (cbNeeded / sizeof(HMODULE)); ++i) {
MyModuleInfo data;
nameLen = GetModuleBaseName(hProc, hMods[i], szModName, MAX_PATH);
if (nameLen) {
data.ModuleName.resize(nameLen);
memcpy(data.ModuleName.data(), szModName, nameLen * sizeof(TCHAR));
} else data.ModuleName = "";
if (GetModuleInformation(hProc, hMods[i], &infoMod, sizeof(infoMod))) {
data.BaseOfDll = reinterpret_cast<intptr_t>(infoMod.lpBaseOfDll);
data.EntryPoint = reinterpret_cast<intptr_t>(infoMod.EntryPoint);
} else {
data.BaseOfDll = 0;
data.EntryPoint = 0;
}
result.emplace(data.BaseOfDll, data);
}
}
delete[] hMods;
delete[] szModName;
return result;
}
void PrintVTable(std::map<intptr_t, MyModuleInfo>& modules, CKDWORD* pCls, size_t vtable_len, char indent) {
if (pCls == nullptr) {
fputc('\n', stdout);
return;
}
CKDWORD* vtable = *(reinterpret_cast<CKDWORD**>(pCls));
for (size_t i = 0; i < vtable_len; ++i) {
intptr_t addr = vtable[i];
const auto& it = modules.lower_bound(addr);
if (it != modules.end() && it != modules.begin()) {
const auto& itt = std::prev(it);
fprintf(stdout, "%s::", itt->second.ModuleName.c_str());
addr = addr - itt->second.BaseOfDll;
if (itt->second.ModuleName == "CK2_3D.dll")
addr += 0x10000000u;
else if (itt->second.ModuleName == "CK2.dll")
addr += 0x24000000u;
}
fprintf(stdout, "%08X%c", addr, indent);
}
fputc('\n', stdout);
}
int main() {
Assert(LoadLibrary("CK2.dll"), "Error loading CK2.dll");
Assert(!CKStartUp(), "CKStartUp Error");
std::string sharedStorage;
sharedStorage.resize(BUFFER_SIZE);
std::filesystem::path rootPath, rePath, magPath, plgPath, bbPath;
GetModuleFileName(NULL, sharedStorage.data(), BUFFER_SIZE);
rootPath = sharedStorage;
rootPath = rootPath.parent_path();
rePath = rootPath / "RenderEngines";
magPath = rootPath / "Managers";
plgPath = rootPath / "Plugins";
bbPath = rootPath / "BuildingBlocks";
CKPluginManager* pluginManager = CKGetPluginManager();
int k = 0;
k += pluginManager->ParsePlugins((char*)rePath.string().c_str());
k += pluginManager->ParsePlugins((char*)magPath.string().c_str());
k += pluginManager->ParsePlugins((char*)plgPath.string().c_str());
k += pluginManager->ParsePlugins((char*)bbPath.string().c_str());
std::cout << "Total loaded modules count: " << k << std::endl;
CKContext* ctx = NULL;
Assert(!CKCreateContext(&ctx, NULL, 0), "Fail to execute CKCreateContext()");
std::cout << "Press any key to run..." << std::endl;
system("pause");
// print CKObject vtable
//static std::vector<CK_CLASSID> cls{
// CKCID_OBJECT,
// CKCID_PARAMETERIN,
// CKCID_PARAMETEROPERATION,
// CKCID_STATE,
// CKCID_BEHAVIORLINK,
// CKCID_BEHAVIOR,
// CKCID_BEHAVIORIO,
// CKCID_RENDERCONTEXT,
// CKCID_KINEMATICCHAIN,
// CKCID_SCENEOBJECT,
// CKCID_OBJECTANIMATION,
// CKCID_ANIMATION,
// CKCID_KEYEDANIMATION,
// CKCID_BEOBJECT,
// CKCID_DATAARRAY,
// CKCID_SCENE,
// CKCID_LEVEL,
// CKCID_PLACE,
// CKCID_GROUP,
// CKCID_SOUND,
// CKCID_WAVESOUND,
// CKCID_MIDISOUND,
// CKCID_MATERIAL,
// CKCID_TEXTURE,
// CKCID_MESH,
// CKCID_PATCHMESH,
// CKCID_RENDEROBJECT,
// CKCID_2DENTITY,
// CKCID_SPRITE,
// CKCID_SPRITETEXT,
// CKCID_3DENTITY,
// CKCID_GRID,
// CKCID_CURVEPOINT,
// CKCID_SPRITE3D,
// CKCID_CURVE,
// CKCID_CAMERA,
// CKCID_TARGETCAMERA,
// CKCID_LIGHT,
// CKCID_TARGETLIGHT,
// CKCID_CHARACTER,
// CKCID_3DOBJECT,
// CKCID_BODYPART,
// CKCID_PARAMETER,
// CKCID_PARAMETERLOCAL,
// CKCID_PARAMETERVARIABLE,
// CKCID_PARAMETEROUT,
// CKCID_INTERFACEOBJECTMANAGER,
// CKCID_CRITICALSECTION,
// CKCID_LAYER,
// CKCID_PROGRESSIVEMESH,
// CKCID_SYNCHRO
//};
//static std::vector<const char*> clsname{
// "CKCID_OBJECT",
// "CKCID_PARAMETERIN",
// "CKCID_PARAMETEROPERATION",
// "CKCID_STATE",
// "CKCID_BEHAVIORLINK",
// "CKCID_BEHAVIOR",
// "CKCID_BEHAVIORIO",
// "CKCID_RENDERCONTEXT",
// "CKCID_KINEMATICCHAIN",
// "CKCID_SCENEOBJECT",
// "CKCID_OBJECTANIMATION",
// "CKCID_ANIMATION",
// "CKCID_KEYEDANIMATION",
// "CKCID_BEOBJECT",
// "CKCID_DATAARRAY",
// "CKCID_SCENE",
// "CKCID_LEVEL",
// "CKCID_PLACE",
// "CKCID_GROUP",
// "CKCID_SOUND",
// "CKCID_WAVESOUND",
// "CKCID_MIDISOUND",
// "CKCID_MATERIAL",
// "CKCID_TEXTURE",
// "CKCID_MESH",
// "CKCID_PATCHMESH",
// "CKCID_RENDEROBJECT",
// "CKCID_2DENTITY",
// "CKCID_SPRITE",
// "CKCID_SPRITETEXT",
// "CKCID_3DENTITY",
// "CKCID_GRID",
// "CKCID_CURVEPOINT",
// "CKCID_SPRITE3D",
// "CKCID_CURVE",
// "CKCID_CAMERA",
// "CKCID_TARGETCAMERA",
// "CKCID_LIGHT",
// "CKCID_TARGETLIGHT",
// "CKCID_CHARACTER",
// "CKCID_3DOBJECT",
// "CKCID_BODYPART",
// "CKCID_PARAMETER",
// "CKCID_PARAMETERLOCAL",
// "CKCID_PARAMETERVARIABLE",
// "CKCID_PARAMETEROUT",
// "CKCID_INTERFACEOBJECTMANAGER",
// "CKCID_CRITICALSECTION",
// "CKCID_LAYER",
// "CKCID_PROGRESSIVEMESH",
// "CKCID_SYNCHRO"
//};
//
//auto moduleInfos = ConstructModuleList();
//fputs("Class Name,Class Id,Show(),IsHiddenByParent(),CanBeHide(),IsVisible(),~dtor(),GetClassID(),PreSave(),Save(),Load(),PostLoad(),PreDelete(),CheckPreDeletion(),CheckPostDeletion(),GetMemoryOccupation(),IsObjectUsed(),PrepareDependencies(),RemapDependencies(),Copy(),\n", stdout);
//for (size_t j = 0; j < cls.size(); ++j) {
// CK_CLASSID item = cls[j];
// const char* itemname = clsname[j];
// CKObject* obj = ctx->CreateObject(item, NULL, CK_OBJECTCREATION_NONAMECHECK, NULL);
// fprintf(stdout, "%s,%d,", itemname, item);
// PrintVTable(moduleInfos, reinterpret_cast<CKDWORD*>(obj), 18);
//}
// print manager vtables
auto moduleInfos = ConstructModuleList();
int count = ctx->GetManagerCount();
for (int i = 0; i < count; ++i) {
CKBaseManager* mgr = ctx->GetManager(i);
CKSTRING name = mgr->GetName();
CKGUID guid = mgr->GetGuid();
fprintf(stdout, "%s\t0x%08x, 0x%08x\t", name, guid.d1, guid.d2);
PrintVTable(moduleInfos, reinterpret_cast<CKDWORD*>(mgr), 30, '\t');
}
// call reader
//CKObjectArray* array = CreateCKObjectArray();
//Assert(!ctx->Load("Language.old.nmo", array, CK_LOAD_DEFAULT, NULL), "Fail to load CMO file");
// call saver
//CKObjectArray* array = CreateCKObjectArray();
//CKObject* objs = ctx->CreateObject(CKCID_OBJECT, "fuck dassault", CK_OBJECTCREATION_NONAMECHECK, NULL);
//array->AddIfNotHere(objs);
//CKDependencies* dep = CKGetDefaultClassDependencies(CK_DEPENDENCIES_SAVE);
//dep->m_Flags = CK_DEPENDENCIES_FULL;
//Assert(!ctx->Save("result.cmo", array, 0xFFFFFFFF, dep, NULL), "Fail to save CMO file");
//DeleteCKObjectArray(array);
std::cout << "Press any key to exit..." << std::endl;
system("pause");
CKCloseContext(ctx);
CKShutdown();
return 0;
}

View File

@ -10,8 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Unvirt", "Unvirt\Unvirt.vcx
{70F64F8D-099C-4C21-B29C-0A8F1E22FB2E} = {70F64F8D-099C-4C21-B29C-0A8F1E22FB2E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VirtoolsProbe", "VirtoolsProbe\VirtoolsProbe.vcxproj", "{C8D9CFFF-442C-4CCB-80D7-02B6B2E7412F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@ -36,12 +34,6 @@ Global
{77E7ADB6-0D0C-4BA4-8DE7-A284C7F83941}.Release|x64.Build.0 = Release|x64
{77E7ADB6-0D0C-4BA4-8DE7-A284C7F83941}.Release|x86.ActiveCfg = Release|Win32
{77E7ADB6-0D0C-4BA4-8DE7-A284C7F83941}.Release|x86.Build.0 = Release|Win32
{C8D9CFFF-442C-4CCB-80D7-02B6B2E7412F}.Debug|x64.ActiveCfg = Debug|Win32
{C8D9CFFF-442C-4CCB-80D7-02B6B2E7412F}.Debug|x86.ActiveCfg = Debug|Win32
{C8D9CFFF-442C-4CCB-80D7-02B6B2E7412F}.Debug|x86.Build.0 = Debug|Win32
{C8D9CFFF-442C-4CCB-80D7-02B6B2E7412F}.Release|x64.ActiveCfg = Release|Win32
{C8D9CFFF-442C-4CCB-80D7-02B6B2E7412F}.Release|x86.ActiveCfg = Release|Win32
{C8D9CFFF-442C-4CCB-80D7-02B6B2E7412F}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE