1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-12-03 10:23:10 +01:00

Upgrade projects, packages, and fix various compilation issues. (#3)

This commit is contained in:
ncblakely 2022-09-04 19:59:58 -07:00 committed by GitHub
parent 99bbea82aa
commit 038b0a9d29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 701 additions and 426 deletions

3
.gitignore vendored
View File

@ -3,6 +3,9 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# Vcpkg
vcpkg_installed
# User-specific files
*.rsuser
*.suo

File diff suppressed because it is too large Load Diff

View File

@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

View File

@ -24,17 +24,17 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Hybrid|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@ -62,11 +62,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Label="Vcpkg">
<VcpkgEnabled>false</VcpkgEnabled>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Hybrid|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<AdditionalIncludeDirectories>$(ADSK_3DSMAX_SDK_2021)\include;$(GIANTS_SDK_PATH)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ADSK_3DSMAX_SDK_2021)\include;$(GIANTS_SDK_PATH)\Include;..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;GIANTSIMP_EXPORTS;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -96,14 +99,15 @@
<ImportLibrary>$(OutDir)GiantsImp.lib</ImportLibrary>
</Link>
<PostBuildEvent>
<Command>copy "$(TargetPath)" "$(ADSK_3DSMAX_x64_2021)\stdplugs\$(TargetName).dli</Command>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<AdditionalIncludeDirectories>$(ADSK_3DSMAX_SDK_2021)\include;$(GIANTS_SDK_PATH)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ADSK_3DSMAX_SDK_2021)\include;$(GIANTS_SDK_PATH)\Include;..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GIANTSIMP_EXPORTS;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@ -131,13 +135,14 @@
</DataExecutionPrevention>
</Link>
<PostBuildEvent>
<Command>copy "$(TargetPath)" "$(ADSK_3DSMAX_x64_2021)\stdplugs\$(TargetName).dli</Command>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MinSpace</Optimization>
<AdditionalIncludeDirectories>$(ADSK_3DSMAX_SDK_2021)\include;$(GIANTS_SDK_PATH)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ADSK_3DSMAX_SDK_2021)\include;$(GIANTS_SDK_PATH)\Include;..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GIANTSIMP_EXPORTS;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@ -164,7 +169,8 @@
<ImportLibrary>$(OutDir)GiantsImp.lib</ImportLibrary>
</Link>
<PostBuildEvent>
<Command>copy "$(TargetPath)" "$(ADSK_3DSMAX_x64_2021)\stdplugs\$(TargetName).dli</Command>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
@ -189,4 +195,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Target Name="PostBuild" AfterTargets="Build">
<Message Condition="'$(ADSK_3DSMAX_x64_2021)' != ''" Text="imp_gbs: Copying output file to 3dsmax plugins directory." Importance="High" />
<Copy Condition="'$(ADSK_3DSMAX_x64_2021)' != ''" SourceFiles="$(TargetPath)" DestinationFiles="$(ADSK_3DSMAX_x64_2021)\stdplugs\$(TargetName).dli" SkipUnchangedFiles="true" OverwriteReadOnlyFiles="true" />
</Target>
</Project>

View File

@ -14,4 +14,4 @@
#include <string>
// Game SDK includes
#include <DataTypes.h>
#include <Sdk/Include/Core/Public/DataTypes.h>

View File

@ -51,7 +51,10 @@ struct P4D
P4D() noexcept { }
explicit P4D(float x, float y, float z, float w) noexcept : x(x), y(y), z(z), w(w) { }
float x, y, z, w;
float x = 0;
float y = 0;
float z = 0;
float w = 0;
};
struct P3D

View File

@ -6,13 +6,13 @@ namespace ECS
template<typename TComponent>
void EntityComponentEditor(TComponent& component)
{
static_assert(false, "No specialization has been defined for the component.");
// No specialization has been defined for the component
}
template <typename T>
inline T EntityValueParser(const std::string& inputValue)
{
static_assert(false, "No parser is defined for the property type.");
// No parser is defined for the property type
}
template<>

View File

@ -1,6 +1,6 @@
#pragma once
#include "DetourNavMeshQuery.h"
#include "recastnavigation/Detour/Include/DetourNavMeshQuery.h"
namespace Nav
{

View File

@ -1,7 +1,7 @@
#pragma once
#include "DebugDraw.h"
#include "DetourDebugDraw.h"
#include "recastnavigation/DebugUtils/Include/DebugDraw.h"
#include "recastnavigation/DebugUtils/Include/DetourDebugDraw.h"
namespace Nav
{

View File

@ -30,14 +30,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
@ -45,14 +45,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Static</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Static</UseOfMfc>
@ -91,8 +91,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<VcpkgAdditionalInstallOptions>--feature-flags=versions</VcpkgAdditionalInstallOptions>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<VcpkgAdditionalInstallOptions>--feature-flags=versions</VcpkgAdditionalInstallOptions>
</PropertyGroup>
<PropertyGroup Label="Vcpkg">
<VcpkgEnableManifest>true</VcpkgEnableManifest>
</PropertyGroup>

View File

@ -154,17 +154,21 @@ void ServerDialog::RefreshPlayers()
PlayersListCtrl.SetSelectionMark(savedSelection);
}
void ServerDialog::HandlePlayerConnected(const GameServerEvent& event)
EventListenerResult ServerDialog::HandlePlayerConnected(const GameServerEvent& event)
{
RefreshPlayers();
return EventListenerResult::Continue;
}
void ServerDialog::HandlePlayerDisconnected(const GameServerEvent& event)
EventListenerResult ServerDialog::HandlePlayerDisconnected(const GameServerEvent& event)
{
RefreshPlayers();
return EventListenerResult::Continue;
}
void ServerDialog::HandleChatMessage(const GameServerEvent& event)
EventListenerResult ServerDialog::HandleChatMessage(const GameServerEvent& event)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
@ -174,9 +178,11 @@ void ServerDialog::HandleChatMessage(const GameServerEvent& event)
ConsoleEditBox.ReplaceSel(chatMessageEvent.message.data());
ConsoleEditBox.SetSel(-1, 0);
ConsoleEditBox.ReplaceSel("\n");
return EventListenerResult::Continue;
}
void ServerDialog::HandleWorldLoaded(const GameServerEvent& event)
EventListenerResult ServerDialog::HandleWorldLoaded(const GameServerEvent& event)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
@ -184,6 +190,8 @@ void ServerDialog::HandleWorldLoaded(const GameServerEvent& event)
auto details = pGameServer->GetGameDetails();
return EventListenerResult::Continue;
// TODO: Connect to world state controls
}

View File

@ -22,10 +22,10 @@ public:
void CloseDialog() override;
void ShowDialog() override;
void HandlePlayerConnected(const GameServerEvent& event);
void HandlePlayerDisconnected(const GameServerEvent& event);
void HandleChatMessage(const GameServerEvent& event);
void HandleWorldLoaded(const GameServerEvent& event);
EventListenerResult HandlePlayerConnected(const GameServerEvent& event);
EventListenerResult HandlePlayerDisconnected(const GameServerEvent& event);
EventListenerResult HandleChatMessage(const GameServerEvent& event);
EventListenerResult HandleWorldLoaded(const GameServerEvent& event);
// MFC methods
BOOL OnInitDialog() override;

View File

@ -20,4 +20,5 @@
#pragma warning(push, 1)
#pragma warning (disable : ALL_CODE_ANALYSIS_WARNINGS)
#include <fmt/format.h>
#include <fmt/printf.h>
#pragma warning(pop)

View File

@ -1,7 +0,0 @@
{
"name": "server-console",
"version-string": "1.0.0",
"dependencies": [
"fmt"
]
}

View File

@ -18,12 +18,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

9
vcpkg.json Normal file
View File

@ -0,0 +1,9 @@
{
"dependencies": [
{
"name": "fmt",
"version>=": "9.0.0"
}
],
"builtin-baseline": "88b1071e39f13b632644d9d953738d345a4ac055"
}