From 3e334ca73109c0ab9e8cfa56878347055e4e78ba Mon Sep 17 00:00:00 2001 From: Zero Fanker Date: Wed, 10 Apr 2024 22:41:58 -0400 Subject: [PATCH] support x64 --- 3rdParty/xcc/Library/StdAfx.h | 1 + 3rdParty/xcc/Library/XCC Library.vcxproj | 130 ++++++++++ 3rdParty/xcc/misc/blowfish.h | 1 + 3rdParty/xcc/misc/tmp_ts_file.h | 2 +- 3rdParty/xcc/misc/vartypes.h | 1 + 3rdParty/xcc/misc/vxl_file.h | 2 +- MissionEditor.sln | 56 ++++ MissionEditor/FinalSunDlg.cpp | 6 +- MissionEditor/FinalSunDlg.h | 2 +- MissionEditor/IsoView.cpp | 2 +- MissionEditor/IsoView.h | 2 +- MissionEditor/MapOpenDialog.cpp | 2 +- MissionEditor/MissionEditor.vcxproj | 241 ++++++++++++++++++ MissionEditorPackLib/MissionEditorPackLib.cpp | 12 +- .../MissionEditorPackLib.vcxproj | 103 ++++++++ MissionEditorPackLib/Vec3.h | 2 +- 16 files changed, 549 insertions(+), 16 deletions(-) diff --git a/3rdParty/xcc/Library/StdAfx.h b/3rdParty/xcc/Library/StdAfx.h index ce37391..45cdcb9 100644 --- a/3rdParty/xcc/Library/StdAfx.h +++ b/3rdParty/xcc/Library/StdAfx.h @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/3rdParty/xcc/Library/XCC Library.vcxproj b/3rdParty/xcc/Library/XCC Library.vcxproj index 857d3f8..2b8ff7c 100644 --- a/3rdParty/xcc/Library/XCC Library.vcxproj +++ b/3rdParty/xcc/Library/XCC Library.vcxproj @@ -5,18 +5,34 @@ DebugMinimal Win32 + + DebugMinimal + x64 + Debug Win32 + + Debug + x64 + ReleaseMinimal Win32 + + ReleaseMinimal + x64 + Release Win32 + + Release + x64 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A} @@ -34,6 +50,15 @@ true v143 + + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ + StaticLibrary + Dynamic + MultiByte + true + v143 + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ @@ -43,6 +68,15 @@ true v143 + + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ + StaticLibrary + Dynamic + MultiByte + true + v143 + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ @@ -51,6 +85,14 @@ MultiByte v143 + + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ + StaticLibrary + Dynamic + MultiByte + v143 + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ @@ -59,6 +101,14 @@ MultiByte v143 + + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ + StaticLibrary + Dynamic + MultiByte + v143 + @@ -86,18 +136,34 @@ + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 @@ -120,6 +186,21 @@ 0x0413 + + + Disabled + _DEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Use + stdafx.h + stdcpp20 + + + _DEBUG;%(PreprocessorDefinitions) + 0x0413 + + Disabled @@ -135,6 +216,21 @@ 0x0413 + + + Disabled + _DEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Use + stdafx.h + stdcpplatest + + + _DEBUG;%(PreprocessorDefinitions) + 0x0413 + + NDEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) @@ -150,6 +246,21 @@ 0x0413 + + + NDEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + stdafx.h + stdcpplatest + + + NDEBUG;%(PreprocessorDefinitions) + 0x0413 + + NDEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) @@ -165,6 +276,21 @@ 0x0413 + + + NDEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Use + stdafx.h + stdcpplatest + + + NDEBUG;%(PreprocessorDefinitions) + 0x0413 + + true @@ -350,9 +476,13 @@ Create + Create Create + Create Create + Create Create + Create diff --git a/3rdParty/xcc/misc/blowfish.h b/3rdParty/xcc/misc/blowfish.h index 72a3f3f..62aab66 100644 --- a/3rdParty/xcc/misc/blowfish.h +++ b/3rdParty/xcc/misc/blowfish.h @@ -19,6 +19,7 @@ #pragma once #include +#include class Cblowfish { diff --git a/3rdParty/xcc/misc/tmp_ts_file.h b/3rdParty/xcc/misc/tmp_ts_file.h index 43958bf..b31f52b 100644 --- a/3rdParty/xcc/misc/tmp_ts_file.h +++ b/3rdParty/xcc/misc/tmp_ts_file.h @@ -34,7 +34,7 @@ public: bool is_valid() const { const t_tmp_ts_header& h = header(); - int size = get_size(); + auto const size = get_size(); if (sizeof(t_tmp_ts_header) > size || !h.cblocks_x || !h.cblocks_y || h.cx != 48 && h.cx != 60 || diff --git a/3rdParty/xcc/misc/vartypes.h b/3rdParty/xcc/misc/vartypes.h index 9621128..8f6482c 100644 --- a/3rdParty/xcc/misc/vartypes.h +++ b/3rdParty/xcc/misc/vartypes.h @@ -1,3 +1,4 @@ +#pragma once /* XCC Utilities and Library Copyright (C) 2000 Olaf van der Spek diff --git a/3rdParty/xcc/misc/vxl_file.h b/3rdParty/xcc/misc/vxl_file.h index 5dd1857..576bcd3 100644 --- a/3rdParty/xcc/misc/vxl_file.h +++ b/3rdParty/xcc/misc/vxl_file.h @@ -45,7 +45,7 @@ public: int get_c_spans(int i) const { - return get_section_tailer(i)->span_end_ofs - get_section_tailer(i)->span_start_ofs >> 2; + return (get_section_tailer(i)->span_end_ofs - get_section_tailer(i)->span_start_ofs) >> 2; } int get_c_section_tailers() const diff --git a/MissionEditor.sln b/MissionEditor.sln index 53dd158..4b2facd 100644 --- a/MissionEditor.sln +++ b/MissionEditor.sln @@ -18,63 +18,119 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution FinalAlertDebug YR|Win32 = FinalAlertDebug YR|Win32 + FinalAlertDebug YR|x64 = FinalAlertDebug YR|x64 FinalAlertDebug|Win32 = FinalAlertDebug|Win32 + FinalAlertDebug|x64 = FinalAlertDebug|x64 FinalAlertRelease YR|Win32 = FinalAlertRelease YR|Win32 + FinalAlertRelease YR|x64 = FinalAlertRelease YR|x64 FinalAlertRelease|Win32 = FinalAlertRelease|Win32 + FinalAlertRelease|x64 = FinalAlertRelease|x64 FinalSunDebug|Win32 = FinalSunDebug|Win32 + FinalSunDebug|x64 = FinalSunDebug|x64 FinalSunRelease|Win32 = FinalSunRelease|Win32 + FinalSunRelease|x64 = FinalSunRelease|x64 Template|Win32 = Template|Win32 + Template|x64 = Template|x64 Tests FinalAlertDebug YR|Win32 = Tests FinalAlertDebug YR|Win32 + Tests FinalAlertDebug YR|x64 = Tests FinalAlertDebug YR|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertDebug YR|Win32.ActiveCfg = FinalAlertDebug YR|Win32 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertDebug YR|Win32.Build.0 = FinalAlertDebug YR|Win32 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertDebug YR|x64.ActiveCfg = FinalAlertDebug YR|x64 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertDebug YR|x64.Build.0 = FinalAlertDebug YR|x64 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertDebug|Win32.ActiveCfg = FinalAlertDebug|Win32 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertDebug|Win32.Build.0 = FinalAlertDebug|Win32 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertDebug|x64.ActiveCfg = FinalAlertDebug|x64 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertDebug|x64.Build.0 = FinalAlertDebug|x64 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertRelease YR|Win32.ActiveCfg = FinalAlertRelease YR|Win32 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertRelease YR|Win32.Build.0 = FinalAlertRelease YR|Win32 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertRelease YR|x64.ActiveCfg = FinalAlertRelease YR|x64 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertRelease YR|x64.Build.0 = FinalAlertRelease YR|x64 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertRelease|Win32.ActiveCfg = FinalAlertRelease|Win32 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertRelease|Win32.Build.0 = FinalAlertRelease|Win32 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertRelease|x64.ActiveCfg = FinalAlertRelease|x64 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalAlertRelease|x64.Build.0 = FinalAlertRelease|x64 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalSunDebug|Win32.ActiveCfg = FinalSunDebug|Win32 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalSunDebug|Win32.Build.0 = FinalSunDebug|Win32 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalSunDebug|x64.ActiveCfg = FinalSunDebug|x64 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalSunDebug|x64.Build.0 = FinalSunDebug|x64 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalSunRelease|Win32.ActiveCfg = FinalSunRelease|Win32 {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalSunRelease|Win32.Build.0 = FinalSunRelease|Win32 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalSunRelease|x64.ActiveCfg = FinalSunRelease|x64 + {9326D29A-6547-42B9-A668-519F3C0720A9}.FinalSunRelease|x64.Build.0 = FinalSunRelease|x64 {9326D29A-6547-42B9-A668-519F3C0720A9}.Template|Win32.ActiveCfg = Template|Win32 {9326D29A-6547-42B9-A668-519F3C0720A9}.Template|Win32.Build.0 = Template|Win32 + {9326D29A-6547-42B9-A668-519F3C0720A9}.Template|x64.ActiveCfg = Template|x64 + {9326D29A-6547-42B9-A668-519F3C0720A9}.Template|x64.Build.0 = Template|x64 {9326D29A-6547-42B9-A668-519F3C0720A9}.Tests FinalAlertDebug YR|Win32.ActiveCfg = Tests FinalAlertDebug YR|Win32 {9326D29A-6547-42B9-A668-519F3C0720A9}.Tests FinalAlertDebug YR|Win32.Build.0 = Tests FinalAlertDebug YR|Win32 + {9326D29A-6547-42B9-A668-519F3C0720A9}.Tests FinalAlertDebug YR|x64.ActiveCfg = Tests FinalAlertDebug YR|x64 + {9326D29A-6547-42B9-A668-519F3C0720A9}.Tests FinalAlertDebug YR|x64.Build.0 = Tests FinalAlertDebug YR|x64 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertDebug YR|Win32.ActiveCfg = Debug|Win32 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertDebug YR|Win32.Build.0 = Debug|Win32 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertDebug YR|x64.ActiveCfg = Debug|x64 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertDebug YR|x64.Build.0 = Debug|x64 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertDebug|Win32.ActiveCfg = Debug|Win32 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertDebug|Win32.Build.0 = Debug|Win32 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertDebug|x64.ActiveCfg = Debug|x64 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertDebug|x64.Build.0 = Debug|x64 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertRelease YR|Win32.ActiveCfg = Release|Win32 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertRelease YR|Win32.Build.0 = Release|Win32 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertRelease YR|x64.ActiveCfg = Release|x64 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertRelease YR|x64.Build.0 = Release|x64 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertRelease|Win32.ActiveCfg = Release|Win32 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertRelease|Win32.Build.0 = Release|Win32 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertRelease|x64.ActiveCfg = Release|x64 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalAlertRelease|x64.Build.0 = Release|x64 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalSunDebug|Win32.ActiveCfg = Debug|Win32 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalSunDebug|Win32.Build.0 = Debug|Win32 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalSunDebug|x64.ActiveCfg = Debug|x64 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalSunDebug|x64.Build.0 = Debug|x64 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalSunRelease|Win32.ActiveCfg = Release|Win32 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalSunRelease|Win32.Build.0 = Release|Win32 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalSunRelease|x64.ActiveCfg = Release|x64 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.FinalSunRelease|x64.Build.0 = Release|x64 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.Template|Win32.ActiveCfg = Debug|Win32 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.Template|Win32.Build.0 = Debug|Win32 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.Template|x64.ActiveCfg = Debug|x64 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.Template|x64.Build.0 = Debug|x64 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.Tests FinalAlertDebug YR|Win32.ActiveCfg = Debug|Win32 {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.Tests FinalAlertDebug YR|Win32.Build.0 = Debug|Win32 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.Tests FinalAlertDebug YR|x64.ActiveCfg = Debug|x64 + {DEB40EF0-E215-4C2F-A0AD-3742E2E01A8C}.Tests FinalAlertDebug YR|x64.Build.0 = Debug|x64 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertDebug YR|Win32.ActiveCfg = DebugMinimal|Win32 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertDebug YR|Win32.Build.0 = DebugMinimal|Win32 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertDebug YR|x64.ActiveCfg = Debug|x64 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertDebug YR|x64.Build.0 = Debug|x64 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertDebug|Win32.ActiveCfg = DebugMinimal|Win32 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertDebug|Win32.Build.0 = DebugMinimal|Win32 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertDebug|x64.ActiveCfg = Debug|x64 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertDebug|x64.Build.0 = Debug|x64 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertRelease YR|Win32.ActiveCfg = ReleaseMinimal|Win32 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertRelease YR|Win32.Build.0 = ReleaseMinimal|Win32 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertRelease YR|x64.ActiveCfg = Release|x64 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertRelease YR|x64.Build.0 = Release|x64 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertRelease|Win32.ActiveCfg = ReleaseMinimal|Win32 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertRelease|Win32.Build.0 = ReleaseMinimal|Win32 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertRelease|x64.ActiveCfg = Release|x64 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalAlertRelease|x64.Build.0 = Release|x64 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalSunDebug|Win32.ActiveCfg = DebugMinimal|Win32 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalSunDebug|Win32.Build.0 = DebugMinimal|Win32 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalSunDebug|x64.ActiveCfg = Debug|x64 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalSunDebug|x64.Build.0 = Debug|x64 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalSunRelease|Win32.ActiveCfg = ReleaseMinimal|Win32 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalSunRelease|Win32.Build.0 = ReleaseMinimal|Win32 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalSunRelease|x64.ActiveCfg = Release|x64 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.FinalSunRelease|x64.Build.0 = Release|x64 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.Template|Win32.ActiveCfg = ReleaseMinimal|Win32 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.Template|Win32.Build.0 = ReleaseMinimal|Win32 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.Template|x64.ActiveCfg = DebugMinimal|x64 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.Template|x64.Build.0 = DebugMinimal|x64 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.Tests FinalAlertDebug YR|Win32.ActiveCfg = DebugMinimal|Win32 {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.Tests FinalAlertDebug YR|Win32.Build.0 = DebugMinimal|Win32 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.Tests FinalAlertDebug YR|x64.ActiveCfg = Debug|x64 + {5E445578-CB45-4D82-9A1C-FC7D3E8D866A}.Tests FinalAlertDebug YR|x64.Build.0 = Debug|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/MissionEditor/FinalSunDlg.cpp b/MissionEditor/FinalSunDlg.cpp index bba628f..076c2ca 100644 --- a/MissionEditor/FinalSunDlg.cpp +++ b/MissionEditor/FinalSunDlg.cpp @@ -2705,7 +2705,7 @@ BOOL CFinalSunDlg::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) if(pHead->code==TTN_NEEDTEXT) { TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pHead; - UINT nID =pHead->idFrom; + auto nID =pHead->idFrom; if (pTTT->uFlags & TTF_IDISHWND) { // idFrom ist der HWND des Tools @@ -3090,7 +3090,7 @@ LONG __stdcall ExceptionHandler( CString s_add; char adress[50]; char c[50]; - itoa((int)ExceptionInfo->ExceptionRecord->ExceptionAddress, adress, 16); + itoa((std::ptrdiff_t)ExceptionInfo->ExceptionRecord->ExceptionAddress, adress, 16); s="Unknown exception"; switch(ExceptionInfo->ExceptionRecord->ExceptionCode) { @@ -3252,7 +3252,7 @@ LONG __stdcall ExceptionHandler( return EXCEPTION_EXECUTE_HANDLER;//EXCEPTION_CONTINUE_SEARCH;//EXCEPTION_EXECUTE_HANDLER; } -int CFinalSunDlg::DoModal() +INT_PTR CFinalSunDlg::DoModal() { int res=0; SetUnhandledExceptionFilter(ExceptionHandler); diff --git a/MissionEditor/FinalSunDlg.h b/MissionEditor/FinalSunDlg.h index 20081c1..54bbb4c 100644 --- a/MissionEditor/FinalSunDlg.h +++ b/MissionEditor/FinalSunDlg.h @@ -109,7 +109,7 @@ public: //{{AFX_VIRTUAL(CFinalSunDlg) public: virtual BOOL OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult); - virtual int DoModal(); + virtual INT_PTR DoModal(); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV-Unterstützung virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); diff --git a/MissionEditor/IsoView.cpp b/MissionEditor/IsoView.cpp index eb648a1..a1c71a2 100644 --- a/MissionEditor/IsoView.cpp +++ b/MissionEditor/IsoView.cpp @@ -5216,7 +5216,7 @@ void CIsoView::PlaceCurrentObjectAt(int x, int y) } -void CIsoView::OnTimer(UINT nIDEvent) +void CIsoView::OnTimer(UINT_PTR nIDEvent) { // theApp.m_loading->FreeAll(); // theApp.m_loading->InitPics(); diff --git a/MissionEditor/IsoView.h b/MissionEditor/IsoView.h index 41b3e8d..0a56abb 100644 --- a/MissionEditor/IsoView.h +++ b/MissionEditor/IsoView.h @@ -137,7 +137,7 @@ protected: afx_msg void OnDeadChar(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnRButtonDown(UINT nFlags, CPoint point); afx_msg void OnKillFocus(CWnd* pNewWnd); //}}AFX_MSG diff --git a/MissionEditor/MapOpenDialog.cpp b/MissionEditor/MapOpenDialog.cpp index fe896b5..a2aa0f1 100644 --- a/MissionEditor/MapOpenDialog.cpp +++ b/MissionEditor/MapOpenDialog.cpp @@ -35,7 +35,7 @@ static char THIS_FILE[] = __FILE__; ///////////////////////////////////////////////////////////////////////////// // CMapOpenDialog -UINT CALLBACK OFNHookProc( +UINT_PTR CALLBACK OFNHookProc( HWND hdlg, // handle to child dialog window UINT uiMsg, // message identifier WPARAM wParam, // message parameter diff --git a/MissionEditor/MissionEditor.vcxproj b/MissionEditor/MissionEditor.vcxproj index 4481e92..79bd618 100644 --- a/MissionEditor/MissionEditor.vcxproj +++ b/MissionEditor/MissionEditor.vcxproj @@ -1,6 +1,22 @@  + + FinalAlertDebug YR + x64 + + + FinalAlertDebug + x64 + + + FinalAlertRelease YR + x64 + + + FinalAlertRelease + x64 + FinalSunDebug Win32 @@ -21,18 +37,34 @@ FinalAlertRelease Win32 + + FinalSunDebug + x64 + FinalSunRelease Win32 + + FinalSunRelease + x64 + Template Win32 + + Template + x64 + Tests FinalAlertDebug YR Win32 + + Tests FinalAlertDebug YR + x64 + MissionEditor @@ -50,54 +82,103 @@ Application v143 + + Application + v143 + Application v143 Dynamic MultiByte + + Application + v143 + Dynamic + MultiByte + Application v143 Dynamic MultiByte + + Application + v143 + Dynamic + MultiByte + Application v143 Dynamic MultiByte + + Application + v143 + Dynamic + MultiByte + Application v143 Dynamic MultiByte + + Application + v143 + Dynamic + MultiByte + Application v143 Dynamic MultiByte + + Application + v143 + Dynamic + MultiByte + Application v143 Dynamic MultiByte + + Application + v143 + Dynamic + MultiByte + Application v143 Dynamic MultiByte + + Application + v143 + Dynamic + MultiByte + + + + @@ -105,6 +186,13 @@ + + + + + + + @@ -112,6 +200,13 @@ + + + + + + + @@ -119,6 +214,13 @@ + + + + + + + @@ -126,6 +228,13 @@ + + + + + + + @@ -133,6 +242,13 @@ + + + + + + + @@ -140,6 +256,13 @@ + + + + + + + @@ -148,35 +271,71 @@ + + + + + + + + true FinalAlert2YR_D + + true + FinalAlert2YR_D + true FinalAlert2YRTestsd + + true + FinalAlert2YRTestsd + true FinalAlert2_D + + true + FinalAlert2_D + false FinalAlert2 + + false + FinalAlert2 + false FinalAlert2YR + + false + FinalAlert2YR + true FinalSun_D + + true + FinalSun_D + false FinalSun + + false + FinalSun + RA2_MODE;YR_MODE;%(PreprocessorDefinitions) @@ -186,6 +345,15 @@ RA2_MODE;YR_MODE;%(PreprocessorDefinitions) + + + RA2_MODE;YR_MODE;%(PreprocessorDefinitions) + ..\MissionEditorPackLib + + + RA2_MODE;YR_MODE;%(PreprocessorDefinitions) + + RA2_MODE;YR_MODE;%(PreprocessorDefinitions) @@ -195,6 +363,15 @@ RA2_MODE;YR_MODE;%(PreprocessorDefinitions) + + + RA2_MODE;YR_MODE;%(PreprocessorDefinitions) + ..\MissionEditorPackLib + + + RA2_MODE;YR_MODE;%(PreprocessorDefinitions) + + RA2_MODE;%(PreprocessorDefinitions) @@ -204,6 +381,15 @@ RA2_MODE;RA2_MODE_ICON;%(PreprocessorDefinitions) + + + RA2_MODE;%(PreprocessorDefinitions) + ..\MissionEditorPackLib + + + RA2_MODE;RA2_MODE_ICON;%(PreprocessorDefinitions) + + RA2_MODE;%(PreprocessorDefinitions) @@ -213,6 +399,15 @@ RA2_MODE;RA2_MODE_ICON;%(PreprocessorDefinitions) + + + RA2_MODE;%(PreprocessorDefinitions) + ..\MissionEditorPackLib + + + RA2_MODE;RA2_MODE_ICON;%(PreprocessorDefinitions) + + RA2_MODE;YR_MODE;%(PreprocessorDefinitions) @@ -222,6 +417,15 @@ RA2_MODE;YR_MODE;%(PreprocessorDefinitions) + + + RA2_MODE;YR_MODE;%(PreprocessorDefinitions) + ..\MissionEditorPackLib + + + RA2_MODE;YR_MODE;%(PreprocessorDefinitions) + + TS_MODE;%(PreprocessorDefinitions) @@ -231,6 +435,15 @@ TS_MODE;%(PreprocessorDefinitions) + + + TS_MODE;%(PreprocessorDefinitions) + ..\MissionEditorPackLib + + + TS_MODE;%(PreprocessorDefinitions) + + TS_MODE;%(PreprocessorDefinitions) @@ -240,11 +453,25 @@ TS_MODE;%(PreprocessorDefinitions) + + + TS_MODE;%(PreprocessorDefinitions) + ..\MissionEditorPackLib + + + TS_MODE;%(PreprocessorDefinitions) + + ..\MissionEditorPackLib + + + ..\MissionEditorPackLib + + @@ -306,19 +533,33 @@ Create + Create Create + Create stdafx.h + stdafx.h stdafx.h + stdafx.h Create + Create stdafx.h + stdafx.h Create + Create stdafx.h + stdafx.h Create + Create stdafx.h + stdafx.h Create + Create stdafx.h + stdafx.h Create + Create stdafx.h + stdafx.h diff --git a/MissionEditorPackLib/MissionEditorPackLib.cpp b/MissionEditorPackLib/MissionEditorPackLib.cpp index d8fc816..1c26174 100644 --- a/MissionEditorPackLib/MissionEditorPackLib.cpp +++ b/MissionEditorPackLib/MissionEditorPackLib.cpp @@ -1765,7 +1765,7 @@ namespace FSunPackLib Vec3f secMinVec, secMaxVec; GetVXLSectionBounds(i, rotation, postHVAOffset, secMinVec, secMaxVec); auto extent = secMaxVec - secMinVec; - auto volume = extent.x() * extent.y() * extent.z(); + auto volume = static_cast(extent.x() * extent.y() * extent.z()); if (volume >= iLargestVolume) { iLargestVolume = volume; @@ -1785,8 +1785,8 @@ namespace FSunPackLib const auto extents = (maxCoords - minCoords); - int rtWidth = ceil(extents.x()); - int rtHeight = ceil(extents.y()); + int rtWidth = static_cast(ceil(extents.x())); + int rtHeight = static_cast(ceil(extents.y())); const int c_pixels = rtWidth * rtHeight; // MYASSERT(c_pixels,1); @@ -2000,7 +2000,7 @@ namespace FSunPackLib Vec3f secMinVec, secMaxVec; GetVXLSectionBounds(i, rotation, modelOffset, secMinVec, secMaxVec); auto extent = secMaxVec - secMinVec; - auto volume = extent.x() * extent.y() * extent.z(); + auto volume = static_cast(extent.x() * extent.y() * extent.z()); if (volume >= iLargestVolume) { iLargestVolume = volume; @@ -2021,8 +2021,8 @@ namespace FSunPackLib const auto extents = (maxCoords - minCoords); - int rtWidth = ceil(extents.x()) + 1; - int rtHeight = ceil(extents.y()) + 1; + int rtWidth = static_cast(ceil(extents.x()) + 1); + int rtHeight = static_cast(ceil(extents.y()) + 1); const int c_pixels = rtWidth * rtHeight; MYASSERT(c_pixels, 1); diff --git a/MissionEditorPackLib/MissionEditorPackLib.vcxproj b/MissionEditorPackLib/MissionEditorPackLib.vcxproj index a5a559a..5921876 100644 --- a/MissionEditorPackLib/MissionEditorPackLib.vcxproj +++ b/MissionEditorPackLib/MissionEditorPackLib.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + @@ -25,12 +33,24 @@ false MultiByte + + StaticLibrary + v143 + false + MultiByte + StaticLibrary v143 false MultiByte + + StaticLibrary + v143 + false + MultiByte + @@ -38,22 +58,41 @@ + + + + + + + + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ false + + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ + false + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ true $(ProjectName)d + + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ + true + $(ProjectName)d + MultiThreadedDLL @@ -86,6 +125,38 @@ .\MissionEditorPackLib.def + + + MultiThreadedDLL + Default + true + false + MaxSpeed + true + Level3 + ..\3rdParty\xcc\misc;.\;%(AdditionalIncludeDirectories) + NDEBUG;EF;WIN32;_LIB;NO_XIF_SUPPORT;NO_FT_SUPPORT;NO_AVI_SUPPORT;XCC_MINIMAL_BUILD;%(PreprocessorDefinitions) + .\Release\ + .\Release\MissionEditorPackLib.pch + .\Release\ + .\Release\ + stdcpp20 + + + 0x0407 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\MissionEditorPackLib.bsc + + + true + + + .\MissionEditorPackLib.def + + MultiThreadedDebugDLL @@ -118,6 +189,38 @@ .\MissionEditorPackLib.def + + + MultiThreadedDebugDLL + Default + Disabled + true + Level3 + ProgramDatabase + ..\3rdParty\xcc\misc;.\;%(AdditionalIncludeDirectories) + .\Debug\ + .\Debug\MissionEditorPackLib.pch + .\Debug\ + .\Debug\ + EnableFastChecks + stdcpp20 + _DEBUG;WIN32;_LIB;NO_XIF_SUPPORT;NO_FT_SUPPORT;NO_AVI_SUPPORT;XCC_MINIMAL_BUILD;%(PreprocessorDefinitions) + + + 0x0407 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\MissionEditorPackLib.bsc + + + true + + + .\MissionEditorPackLib.def + + diff --git a/MissionEditorPackLib/Vec3.h b/MissionEditorPackLib/Vec3.h index 5c46886..70a5969 100644 --- a/MissionEditorPackLib/Vec3.h +++ b/MissionEditorPackLib/Vec3.h @@ -50,7 +50,7 @@ public: inline T length() const { - return sqrt(squaredLength()); + return static_cast(sqrt(squaredLength())); } inline T squaredLength() const