start moving non-UI code into helper library (#1261)

This commit is contained in:
Jamiras
2025-11-20 10:26:01 -07:00
committed by GitHub
parent df9d42b56d
commit f360ece932
195 changed files with 1250 additions and 1760 deletions
+8 -4
View File
@@ -44,11 +44,13 @@ jobs:
uses: Malcolmnixon/Setup-VSTest@v4
- name: Build
run: msbuild.exe -m RA_Integration.sln -p:Configuration=Release -p:Platform=Win32
- name: Run lib Tests
run: vstest.console bin\Win32\Release\RADevKit.Tests.dll
- name: Run DLL Tests
run: vstest.console bin\Win32\Release\tests\RA_Integration\RA_Integration.Tests.dll
run: vstest.console bin\Win32\Release\RA_Integration.Tests.dll
- name: Run Interface Tests
# requires the DLL to have been built
run: vstest.console bin\Win32\Release\tests\RA_Interface\RA_Interface.Tests.dll
run: vstest.console bin\Win32\Release\RA_Interface.Tests.dll
Win64-Tests:
runs-on: windows-latest
@@ -63,10 +65,12 @@ jobs:
uses: Malcolmnixon/Setup-VSTest@v4
- name: Build
run: msbuild.exe -m RA_Integration.sln -p:Configuration=Release -p:Platform=x64
- name: Run lib Tests
run: vstest.console bin\x64\Release\RADevKit.Tests.dll
- name: Run DLL Tests
run: vstest.console bin\x64\Release\tests\RA_Integration\RA_Integration.Tests.dll
run: vstest.console bin\x64\Release\RA_Integration.Tests.dll
- name: Run Interface Tests
run: vstest.console bin\x64\Release\tests\RA_Interface\RA_Interface.Tests.dll
run: vstest.console bin\x64\Release\RA_Interface.Tests.dll
Win32-Analysis:
runs-on: windows-latest
+56 -82
View File
@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33829.357
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RA_Integration", "src\RA_Integration.vcxproj", "{825CB292-F069-4B27-82CF-3417746ACDF3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{264665A7-BA65-4F48-B565-6D97245E2B88}"
ProjectSection(SolutionItems) = preProject
.clang-format = .clang-format
@@ -12,10 +10,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
src\ra_rules.ruleset = src\ra_rules.ruleset
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RA_Integration.Tests", "tests\RA_Integration.Tests.vcxproj", "{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcheevos", "src\rcheevos.vcxproj", "{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RADevKit", "src\devkit\RADevKit.vcxproj", "{8AE21D54-F905-44E1-90E5-D22E346BFF39}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RADevKit.Tests", "tests\devkit\RADevKit.Tests.vcxproj.vcxproj", "{6131C3D1-165E-4F39-A44C-94F01EAA03C5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RA_Integration", "src\RA_Integration.vcxproj", "{825CB292-F069-4B27-82CF-3417746ACDF3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RA_Integration.Tests", "tests\RA_Integration.Tests.vcxproj", "{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RA_Interface.Tests", "tests\RA_Interface.Tests.vcxproj", "{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}"
EndProject
Global
@@ -26,62 +30,8 @@ Global
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release-vista|Win32 = Release-vista|Win32
Release-vista|x64 = Release-vista|x64
ReleaseWithDebug|Win32 = ReleaseWithDebug|Win32
ReleaseWithDebug|x64 = ReleaseWithDebug|x64
Release-xp|Win32 = Release-xp|Win32
Release-xp|x64 = Release-xp|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{825CB292-F069-4B27-82CF-3417746ACDF3}.Analysis|Win32.ActiveCfg = Analysis|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Analysis|Win32.Build.0 = Analysis|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Analysis|x64.ActiveCfg = Analysis|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Analysis|x64.Build.0 = Analysis|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Debug|Win32.ActiveCfg = Debug|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Debug|Win32.Build.0 = Debug|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Debug|x64.ActiveCfg = Debug|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Debug|x64.Build.0 = Debug|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release|Win32.ActiveCfg = Release|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release|Win32.Build.0 = Release|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release|x64.ActiveCfg = Release|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release|x64.Build.0 = Release|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release-vista|Win32.ActiveCfg = Release-vista|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release-vista|Win32.Build.0 = Release-vista|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release-vista|x64.ActiveCfg = Release-vista|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release-vista|x64.Build.0 = Release-vista|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.ReleaseWithDebug|Win32.ActiveCfg = ReleaseWithDebug|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.ReleaseWithDebug|Win32.Build.0 = ReleaseWithDebug|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.ReleaseWithDebug|x64.ActiveCfg = ReleaseWithDebug|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.ReleaseWithDebug|x64.Build.0 = ReleaseWithDebug|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release-xp|Win32.ActiveCfg = Release-xp|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release-xp|Win32.Build.0 = Release-xp|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release-xp|x64.ActiveCfg = Release-xp|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release-xp|x64.Build.0 = Release-xp|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Analysis|Win32.ActiveCfg = Analysis|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Analysis|Win32.Build.0 = Analysis|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Analysis|x64.ActiveCfg = Analysis|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Analysis|x64.Build.0 = Analysis|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Debug|Win32.ActiveCfg = Debug|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Debug|Win32.Build.0 = Debug|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Debug|x64.ActiveCfg = Debug|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Debug|x64.Build.0 = Debug|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release|Win32.ActiveCfg = Release|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release|Win32.Build.0 = Release|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release|x64.ActiveCfg = Release|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release|x64.Build.0 = Release|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release-vista|Win32.ActiveCfg = Release|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release-vista|Win32.Build.0 = Release|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release-vista|x64.ActiveCfg = Release|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release-vista|x64.Build.0 = Release|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.ReleaseWithDebug|Win32.ActiveCfg = Release|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.ReleaseWithDebug|Win32.Build.0 = Release|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.ReleaseWithDebug|x64.ActiveCfg = Release|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.ReleaseWithDebug|x64.Build.0 = Release|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release-xp|Win32.ActiveCfg = Release-xp|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release-xp|Win32.Build.0 = Release-xp|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release-xp|x64.ActiveCfg = Release-xp|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release-xp|x64.Build.0 = Release-xp|x64
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Analysis|Win32.ActiveCfg = Release|Win32
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Analysis|Win32.Build.0 = Release|Win32
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Analysis|x64.ActiveCfg = Release|x64
@@ -94,18 +44,54 @@ Global
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release|Win32.Build.0 = Release|Win32
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release|x64.ActiveCfg = Release|x64
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release|x64.Build.0 = Release|x64
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release-vista|Win32.ActiveCfg = Release|Win32
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release-vista|Win32.Build.0 = Release|Win32
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release-vista|x64.ActiveCfg = Release|x64
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release-vista|x64.Build.0 = Release|x64
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.ReleaseWithDebug|Win32.ActiveCfg = Release|Win32
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.ReleaseWithDebug|Win32.Build.0 = Release|Win32
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.ReleaseWithDebug|x64.ActiveCfg = Release|x64
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.ReleaseWithDebug|x64.Build.0 = Release|x64
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release-xp|Win32.ActiveCfg = Release|Win32
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release-xp|Win32.Build.0 = Release|Win32
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release-xp|x64.ActiveCfg = Release|x64
{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}.Release-xp|x64.Build.0 = Release|x64
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Analysis|Win32.ActiveCfg = Analysis|Win32
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Analysis|Win32.Build.0 = Analysis|Win32
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Analysis|x64.ActiveCfg = Analysis|x64
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Analysis|x64.Build.0 = Analysis|x64
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Debug|Win32.ActiveCfg = Debug|Win32
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Debug|Win32.Build.0 = Debug|Win32
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Debug|x64.ActiveCfg = Debug|x64
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Debug|x64.Build.0 = Debug|x64
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Release|Win32.ActiveCfg = Release|Win32
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Release|Win32.Build.0 = Release|Win32
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Release|x64.ActiveCfg = Release|x64
{8AE21D54-F905-44E1-90E5-D22E346BFF39}.Release|x64.Build.0 = Release|x64
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Analysis|Win32.ActiveCfg = Analysis|Win32
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Analysis|Win32.Build.0 = Analysis|Win32
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Analysis|x64.ActiveCfg = Analysis|x64
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Analysis|x64.Build.0 = Analysis|x64
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Debug|Win32.ActiveCfg = Debug|Win32
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Debug|Win32.Build.0 = Debug|Win32
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Debug|x64.ActiveCfg = Debug|x64
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Debug|x64.Build.0 = Debug|x64
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Release|Win32.ActiveCfg = Release|Win32
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Release|Win32.Build.0 = Release|Win32
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Release|x64.ActiveCfg = Release|x64
{6131C3D1-165E-4F39-A44C-94F01EAA03C5}.Release|x64.Build.0 = Release|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Analysis|Win32.ActiveCfg = Analysis|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Analysis|Win32.Build.0 = Analysis|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Analysis|x64.ActiveCfg = Analysis|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Analysis|x64.Build.0 = Analysis|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Debug|Win32.ActiveCfg = Debug|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Debug|Win32.Build.0 = Debug|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Debug|x64.ActiveCfg = Debug|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Debug|x64.Build.0 = Debug|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release|Win32.ActiveCfg = Release|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release|Win32.Build.0 = Release|Win32
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release|x64.ActiveCfg = Release|x64
{825CB292-F069-4B27-82CF-3417746ACDF3}.Release|x64.Build.0 = Release|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Analysis|Win32.ActiveCfg = Analysis|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Analysis|Win32.Build.0 = Analysis|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Analysis|x64.ActiveCfg = Analysis|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Analysis|x64.Build.0 = Analysis|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Debug|Win32.ActiveCfg = Debug|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Debug|Win32.Build.0 = Debug|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Debug|x64.ActiveCfg = Debug|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Debug|x64.Build.0 = Debug|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release|Win32.ActiveCfg = Release|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release|Win32.Build.0 = Release|Win32
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release|x64.ActiveCfg = Release|x64
{876DEBDF-C7C8-4713-8CEF-EBDEE65306A7}.Release|x64.Build.0 = Release|x64
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Analysis|Win32.ActiveCfg = Release|Win32
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Analysis|x64.ActiveCfg = Release|x64
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Analysis|x64.Build.0 = Release|x64
@@ -117,18 +103,6 @@ Global
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release|Win32.Build.0 = Release|Win32
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release|x64.ActiveCfg = Release|x64
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release|x64.Build.0 = Release|x64
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release-vista|Win32.ActiveCfg = Release|Win32
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release-vista|Win32.Build.0 = Release|Win32
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release-vista|x64.ActiveCfg = Release|x64
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release-vista|x64.Build.0 = Release|x64
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.ReleaseWithDebug|Win32.ActiveCfg = Release|Win32
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.ReleaseWithDebug|Win32.Build.0 = Release|Win32
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.ReleaseWithDebug|x64.ActiveCfg = Release|x64
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.ReleaseWithDebug|x64.Build.0 = Release|x64
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release-xp|Win32.ActiveCfg = Release-xp|Win32
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release-xp|Win32.Build.0 = Release-xp|Win32
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release-xp|x64.ActiveCfg = Release-xp|x64
{F78C2C8B-55DD-4252-A38F-F4D252D14DF8}.Release-xp|x64.Build.0 = Release-xp|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+1 -1
View File
@@ -2,7 +2,7 @@
#include "RA_BuildVer.h"
#include "RA_Defs.h"
#include "RA_Log.h"
#include "util\Log.hh"
#include "RA_Resource.h"
#include "api\IServer.hh"
+1 -1
View File
@@ -2,7 +2,7 @@
#include "Exports.hh"
#include "RA_Log.h"
#include "util\Log.hh"
#include "data\context\SessionTracker.hh"
+2 -1
View File
@@ -1,6 +1,7 @@
#include "RA_Defs.h"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "services\ServiceLocator.hh"
#include "data\context\EmulatorContext.hh"
+3 -11
View File
@@ -2,7 +2,7 @@
#define RA_DEFS_H
#pragma once
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#if !(RA_EXPORTS || RA_UTEST)
#include "windows_nodefines.h"
@@ -26,7 +26,7 @@
// Version Information is integrated into tags
#else
#include "RA_Log.h"
#include "util\Log.hh"
#include "RA_Json.h"
// RA-Only
@@ -103,7 +103,7 @@ public:
pLT ={ rect.left, rect.top };
pRB ={ rect.right, rect.bottom };
HWND__* const restrict parentHwnd = ::GetParent(contentHwnd);
HWND__* const _RESTRICT parentHwnd = ::GetParent(contentHwnd);
check = ::ScreenToClient(parentHwnd, &pLT);
assert(check != 0);
check = ::ScreenToClient(parentHwnd, &pRB);
@@ -169,12 +169,4 @@ _NODISCARD std::string ByteAddressToString(_In_ ByteAddress nAddr);
_NODISCARD ByteAddress ByteAddressFromString(_In_ const std::string& sByteAddress);
} // namespace ra
#if _MBCS
_CONSTANT_VAR RA_MAX_PATH{ _MAX_PATH }; // multibyte max path
#elif _UNICODE
_CONSTANT_VAR RA_MAX_PATH{ 32767 }; // Unicode max path
#else
#error Unknown character set detected!
#endif /* _MBCS */
#endif // !RA_DEFS_H
+49 -231
View File
@@ -17,30 +17,6 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-xp|Win32">
<Configuration>Release-xp</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-xp|x64">
<Configuration>Release-xp</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-vista|Win32">
<Configuration>Release-vista</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-vista|x64">
<Configuration>Release-vista</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseWithDebug|Win32">
<Configuration>ReleaseWithDebug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseWithDebug|x64">
<Configuration>ReleaseWithDebug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -50,9 +26,54 @@
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<None Include="$(SolutionDir)\src\base.props">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>RA_Integration</ProjectName>
<ProjectGuid>{825CB292-F069-4B27-82CF-3417746ACDF3}</ProjectGuid>
<TargetName Condition="'$(Platform)'!='x64'">RA_Integration</TargetName>
<TargetName Condition="'$(Platform)'=='x64'">RA_Integration-x64</TargetName>
<RootNamespace>ra</RootNamespace>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\src\base.props" />
</ImportGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>RC_CLIENT_SUPPORTS_HASH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir);$(RapidJSON_IncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
</ClCompile>
<PreBuildEvent>
<Command>"$(SolutionDir)RAInterface\MakeBuildVer.bat" "$(SolutionDir)src\RA_BuildVer.h" RAIntegration RA_INTEGRATION</Command>
</PreBuildEvent>
<PostBuildEvent Condition="'$(Configuration)'!='Analysis'">
<Command>
IF "$(LocalDebuggerWorkingDirectory)"=="" GOTO done
IF NOT EXIST $(LocalDebuggerWorkingDirectory) GOTO done
echo Copying $(Configuration) DLL to $(LocalDebuggerWorkingDirectory)
copy /y $(TargetPath) $(LocalDebuggerWorkingDirectory)\$(TargetFileName)
:done
</Command>
</PostBuildEvent>
<Link>
<AdditionalDependencies>windowscodecs.lib;winmm.lib;Winhttp.lib;user32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="data\context\GameAssets.cpp" />
<ClCompile Include="data\ModelProperty.cpp" />
<ClCompile Include="api\ApiCall.cpp" />
<ClCompile Include="api\impl\ConnectedServer.cpp" />
<ClCompile Include="api\impl\DisconnectedServer.cpp" />
@@ -87,7 +108,6 @@
<ClCompile Include="RA_ImageFactory.cpp" />
<ClCompile Include="RA_Json.cpp" />
<ClCompile Include="RA_md5factory.cpp" />
<ClCompile Include="RA_StringUtils.cpp" />
<ClCompile Include="services\AchievementLogicSerializer.cpp" />
<ClCompile Include="services\AchievementRuntime.cpp" />
<ClCompile Include="services\AchievementRuntimeExports.cpp" />
@@ -216,7 +236,6 @@
<ClInclude Include="data\DataModelCollection.hh" />
<ClInclude Include="data\ModelBase.hh" />
<ClInclude Include="data\ModelCollectionBase.hh" />
<ClInclude Include="data\ModelProperty.hh" />
<ClInclude Include="data\ModelPropertyContainer.hh" />
<ClInclude Include="data\models\AchievementModel.hh" />
<ClInclude Include="data\models\AssetModelBase.hh" />
@@ -238,14 +257,11 @@
<ClInclude Include="RA_BuildVer.h" />
<ClInclude Include="RA_Core.h" />
<ClInclude Include="RA_Defs.h" />
<ClInclude Include="ra_fwd.h" />
<ClInclude Include="RA_ImageFactory.h" />
<ClInclude Include="RA_Json.h" />
<ClInclude Include="RA_Log.h" />
<ClInclude Include="ra_math.h" />
<ClInclude Include="RA_md5factory.h" />
<ClInclude Include="RA_Resource.h" />
<ClInclude Include="RA_StringUtils.h" />
<ClInclude Include="services\AchievementLogicSerializer.hh" />
<ClInclude Include="services\AchievementRuntime.hh" />
<ClInclude Include="services\AchievementRuntimeExports.hh" />
@@ -413,213 +429,15 @@
<ResourceCompile Include="RA_Version.rc">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_DEBUG;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-xp|x64'">_USING_V110_SDK71_;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-vista|x64'">_USING_V110_SDK71_;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="base.props">
<SubType>Designer</SubType>
</None>
<None Include="ra_type_traits.h" />
<None Include="ra_utility.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="devkit\RADevKit.vcxproj">
<Project>{8ae21d54-f905-44e1-90e5-d22e346bff39}</Project>
</ProjectReference>
<ProjectReference Include="rcheevos.vcxproj">
<Project>{9d55ebe7-1392-4fa1-a9b9-f022f764ce35}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>RA_Integration</ProjectName>
<ProjectGuid>{825CB292-F069-4B27-82CF-3417746ACDF3}</ProjectGuid>
<TargetName Condition="'$(Platform)'!='x64'">RA_Integration</TargetName>
<TargetName Condition="'$(Platform)'=='x64'">RA_Integration-x64</TargetName>
<RootNamespace>RA_Integration</RootNamespace>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release-xp'" Label="Configuration">
<PlatformToolset>v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release-vista'" Label="Configuration">
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='ReleaseWithDebug'" Label="Configuration">
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="base.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Label="Configuration">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Analysis'">
<CodeAnalysisRuleSet>ra_rules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CAExcludePath>$(RapidJSON_IncludeDir);$(CAExcludePath)</CAExcludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release-xp'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release-vista'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='ReleaseWithDebug'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ControlFlowGuard>false</ControlFlowGuard>
<ShowIncludes>false</ShowIncludes>
<ConformanceMode>true</ConformanceMode>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>
<AdditionalDependencies>windowscodecs.lib;winmm.lib;Winhttp.lib;user32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<SubSystem>Windows</SubSystem>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Analysis'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ControlFlowGuard>false</ControlFlowGuard>
<ShowIncludes>false</ShowIncludes>
<ConformanceMode>true</ConformanceMode>
<EnablePREfast>true</EnablePREfast>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<Link>
<AdditionalDependencies>windowscodecs.lib;winmm.lib;Winhttp.lib;user32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<SubSystem>Windows</SubSystem>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<PostBuildEvent>
<Command />
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<Optimization>Full</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<AdditionalDependencies>windowscodecs.lib;winmm.lib;Winhttp.lib;user32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release-xp'">
<ClCompile>
<Optimization>Full</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<AdditionalDependencies>windowscodecs.lib;winmm.lib;Winhttp.lib;user32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release-vista'">
<ClCompile>
<Optimization>Full</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<AdditionalDependencies>windowscodecs.lib;winmm.lib;Winhttp.lib;user32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='ReleaseWithDebug'">
<ClCompile>
<Optimization>Full</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LinkTimeCodeGeneration>UseFastLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</ClCompile>
<Link>
<AdditionalDependencies>windowscodecs.lib;winmm.lib;Winhttp.lib;user32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+4 -28
View File
@@ -19,9 +19,6 @@
<Filter Include="Services\Impl">
<UniqueIdentifier>{3b94374b-a06e-4994-b6f8-3a2f5e215803}</UniqueIdentifier>
</Filter>
<Filter Include="Helpers">
<UniqueIdentifier>{cd433aa7-9c74-461e-ba0e-3ce327a59b7a}</UniqueIdentifier>
</Filter>
<Filter Include="UI\ViewModels">
<UniqueIdentifier>{0badbd6c-a477-4f69-b999-f27b050c3a17}</UniqueIdentifier>
</Filter>
@@ -96,9 +93,6 @@
<ClCompile Include="ui\win32\Desktop.cpp">
<Filter>UI\Win32</Filter>
</ClCompile>
<ClCompile Include="RA_StringUtils.cpp">
<Filter>Services</Filter>
</ClCompile>
<ClCompile Include="RA_Json.cpp">
<Filter>Services</Filter>
</ClCompile>
@@ -333,9 +327,6 @@
<ClCompile Include="data\context\UserContext.cpp">
<Filter>Data\Context</Filter>
</ClCompile>
<ClCompile Include="data\ModelProperty.cpp">
<Filter>Data</Filter>
</ClCompile>
<ClCompile Include="data\ModelPropertyContainer.cpp">
<Filter>Data</Filter>
</ClCompile>
@@ -491,18 +482,12 @@
<ClInclude Include="services\SearchResults.h">
<Filter>Services</Filter>
</ClInclude>
<ClInclude Include="ra_fwd.h">
<Filter>Helpers</Filter>
</ClInclude>
<ClInclude Include="services\IFileSystem.hh">
<Filter>Services</Filter>
</ClInclude>
<ClInclude Include="services\impl\WindowsFileSystem.hh">
<Filter>Services\Impl</Filter>
</ClInclude>
<ClInclude Include="RA_StringUtils.h">
<Filter>Services</Filter>
</ClInclude>
<ClInclude Include="services\impl\StringTextReader.hh">
<Filter>Services\Impl</Filter>
</ClInclude>
@@ -620,9 +605,6 @@
<ClInclude Include="Exports.hh">
<Filter>Interface</Filter>
</ClInclude>
<ClInclude Include="ra_math.h">
<Filter>Helpers</Filter>
</ClInclude>
<ClInclude Include="api\ApiCall.hh">
<Filter>API</Filter>
</ClInclude>
@@ -926,9 +908,6 @@
<ClInclude Include="data\ModelPropertyContainer.hh">
<Filter>Data</Filter>
</ClInclude>
<ClInclude Include="data\ModelProperty.hh">
<Filter>Data</Filter>
</ClInclude>
<ClInclude Include="data\DataModelBase.hh">
<Filter>Data</Filter>
</ClInclude>
@@ -1124,6 +1103,9 @@
<ClInclude Include="data\NotifyTargetSet.hh">
<Filter>Data</Filter>
</ClInclude>
<ClInclude Include="services\impl\MessageDispatcher.hh">
<Filter>Services\Impl</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="RA_Shared.rc">
@@ -1134,12 +1116,6 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="ra_type_traits.h">
<Filter>Helpers</Filter>
</None>
<None Include="ra_utility.h">
<Filter>Helpers</Filter>
</None>
<None Include="base.props" />
<None Include="$(SolutionDir)\src\base.props" />
</ItemGroup>
</Project>
-2
View File
@@ -1,7 +1,5 @@
#include "ApiCall.hh"
#include "ra_fwd.h"
#include "api\IServer.hh"
#include "services\ServiceLocator.hh"
-2
View File
@@ -4,8 +4,6 @@
#include "ApiCall.hh"
#include "ra_fwd.h"
namespace ra {
namespace api {
+2 -1
View File
@@ -2,6 +2,7 @@
#include "DisconnectedServer.hh"
#include "RA_Defs.h"
#include "util\Log.hh"
#include "RA_md5factory.h"
@@ -351,7 +352,7 @@ static bool ValidateResponse(int nResult, const rc_api_response_t& api_response,
return true;
}
static bool DoUpload(const std::string& sHost, const char* restrict sApiName, const char* restrict sRequestName,
static bool DoUpload(const std::string& sHost, const char* _RESTRICT sApiName, const char* _RESTRICT sRequestName,
const std::wstring& sFilePath, ApiResponseBase& pResponse, rapidjson::Document& document)
{
const auto& pFileSystem = ra::services::ServiceLocator::Get<ra::services::IFileSystem>();
+2 -2
View File
@@ -4,7 +4,7 @@
#include "api/IServer.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include <string>
@@ -98,7 +98,7 @@ public:
protected:
template<typename TResponse>
inline typename TResponse UnsupportedApi(const char* const restrict apiName) const
inline typename TResponse UnsupportedApi(const char* const _RESTRICT apiName) const
{
static_assert(std::is_base_of<ApiResponseBase, TResponse>::value, "TResponse must derive from ApiResponseBase");
+94 -41
View File
@@ -1,19 +1,34 @@
<?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">
<RA_DIR>$(SolutionDir)</RA_DIR>
<RapidJSON_IncludeDir>$(RA_DIR)rapidjson\include\</RapidJSON_IncludeDir>
<rcheevos_IncludePath>$(RA_DIR)rcheevos\include\</rcheevos_IncludePath>
<RAInterface_IncludePath>$(RA_DIR)RAInterface</RAInterface_IncludePath>
<RA_SourceDir>$(RA_DIR)src\</RA_SourceDir>
<GSL_IncludeDir>$(RA_DIR)GSL\include\</GSL_IncludeDir>
<RA_IncludePath>$(RA_DIR);$(RA_SourceDir);$(RAInterface_IncludePath);$(RapidJSON_IncludeDir);$(rcheevos_IncludePath);$(GSL_IncludeDir)</RA_IncludePath>
<XPDeprecationWarning>true</XPDeprecationWarning>
<RapidJSON_IncludeDir>$(SolutionDir)rapidjson\include\</RapidJSON_IncludeDir>
<rcheevos_IncludePath>$(SolutionDir)rcheevos\include\</rcheevos_IncludePath>
<RAInterface_IncludePath>$(SolutionDir)RAInterface</RAInterface_IncludePath>
<RA_SourceDir>$(SolutionDir)src\</RA_SourceDir>
<RA_DevKitSourceDir>$(SolutionDir)src\devkit\</RA_DevKitSourceDir>
<GSL_IncludePath>$(SolutionDir)GSL\include\</GSL_IncludePath>
<MSTest_IncludePath>$(VCInstallDir)UnitTest\include\</MSTest_IncludePath>
<RA_IncludePath>$(RA_DevKitSourceDir);$(RA_SourceDir);$(rcheevos_IncludePath);$(GSL_IncludePath)</RA_IncludePath>
</PropertyGroup>
<PropertyGroup>
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)obj\$(Platform)\$(Configuration)\</IntDir>
<IntDir>$(SolutionDir)obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<UseDebugLibraries>true</UseDebugLibraries>
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Analysis'">
<UseDebugLibraries>false</UseDebugLibraries>
<CodeAnalysisRuleSet>$(RA_SourceDir)\ra_rules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CAExcludePath>$(RapidJSON_IncludeDir);$(CAExcludePath)</CAExcludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<LinkIncremental>false</LinkIncremental>
<UseDebugLibraries>true</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
@@ -22,42 +37,80 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<ClCompile>
<CompileAs>CompileAsCpp</CompileAs>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WarningLevel>Level4</WarningLevel>
<AdditionalIncludeDirectories>$(RA_IncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<FloatingPointExceptions>true</FloatingPointExceptions>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAs>CompileAsCpp</CompileAs>
<AdditionalIncludeDirectories>$(RA_IncludePath)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<PreprocessorDefinitions>_ARCH=$(PlatformArchitecture);RC_CLIENT_SUPPORTS_HASH;RA_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc>
</ClCompile>
<PreBuildEvent>
<Command>"$(SolutionDir)RAInterface\MakeBuildVer.bat" "$(SolutionDir)src\RA_BuildVer.h" RAIntegration RA_INTEGRATION</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>
IF "$(LocalDebuggerWorkingDirectory)"=="" GOTO done
IF NOT EXIST $(LocalDebuggerWorkingDirectory) GOTO done
echo Copying $(Configuration) DLL to $(LocalDebuggerWorkingDirectory)
copy /y $(TargetPath) $(LocalDebuggerWorkingDirectory)\$(TargetFileName)
:done
</Command>
</PostBuildEvent>
<Link>
<ProgramDatabaseFile>$(LocalDebuggerWorkingDirectory)\$(TargetName).pdb</ProgramDatabaseFile>
<ProgramDatabaseFile>$(OutDir)\$(TargetName).pdb</ProgramDatabaseFile>
<IgnoreSpecificDefaultLibraries>libc.lib, libcmt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ControlFlowGuard>false</ControlFlowGuard>
<ShowIncludes>false</ShowIncludes>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Analysis'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ControlFlowGuard>false</ControlFlowGuard>
<ShowIncludes>false</ShowIncludes>
<ConformanceMode>true</ConformanceMode>
<EnablePREfast>true</EnablePREfast>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="RA_DIR">
<Value>$(RA_DIR)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="RapidJSON_IncludeDir">
<Value>$(RapidJSON_IncludeDir)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
@@ -74,17 +127,17 @@
<Value>$(RA_SourceDir)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="GSL_IncludeDir">
<Value>$(GSL_IncludeDir)</Value>
<BuildMacro Include="RA_DevKitSourceDir">
<Value>$(RA_DevKitSourceDir)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="GSL_IncludePath">
<Value>$(GSL_IncludePath)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="RA_IncludePath">
<Value>$(RA_IncludePath)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="XPDeprecationWarning">
<Value>$(XPDeprecationWarning)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
</ItemGroup>
</Project>
+1 -1
View File
@@ -2,7 +2,7 @@
#define RA_DATA_ASYNCOBJECT_HH
#pragma once
#include "ra_fwd.h"
#include "util\GSL.hh"
namespace ra {
namespace data {
+1 -1
View File
@@ -30,7 +30,7 @@ public:
void RemoveNotifyTarget(NotifyTarget& pTarget) noexcept
{
#ifdef RA_UTEST
#ifdef DEBUG
GSL_SUPPRESS_F6 Expects(!m_bDestructed);
#endif
m_vNotifyTargets.Remove(pTarget);
+1 -1
View File
@@ -4,7 +4,7 @@
#include "ModelBase.hh"
#include "ra_utility.h"
#include "util\TypeCasts.hh"
namespace ra {
namespace data {
+2 -4
View File
@@ -2,9 +2,7 @@
#define RA_DATA_MODEL_PROPERTY_CONTAINER_H
#pragma once
#include "ra_fwd.h"
#include "ModelProperty.hh"
#include "data\ModelProperty.hh"
namespace ra {
namespace data {
@@ -14,7 +12,7 @@ class ModelPropertyContainer
public:
GSL_SUPPRESS_F6 ModelPropertyContainer() = default;
#ifdef RA_UTEST
#ifdef DEBUG
virtual ~ModelPropertyContainer() noexcept {
m_bDestructed = true;
}
+2 -2
View File
@@ -2,7 +2,7 @@
#define RA_DATA_NOTIFYTARGET_SET_H
#pragma once
#include "ra_fwd.h"
#include "util\GSL.hh"
namespace ra {
namespace data {
@@ -76,7 +76,7 @@ public:
auto begin() const noexcept { return m_pBegin; }
auto end() const noexcept { return m_pEnd; }
size_t size() const
size_t size() const noexcept
{
return m_pEnd.m_pCurrent - m_pBegin.m_pCurrent;
}
+2 -2
View File
@@ -1,7 +1,7 @@
#include "ConsoleContext.hh"
#include "RA_Log.h"
#include "RA_StringUtils.h"
#include "util\Log.hh"
#include "util\Strings.hh"
#include <rc_consoles.h>
+1 -1
View File
@@ -3,8 +3,8 @@
#pragma once
#include "RAInterface\RA_Consoles.h"
#include "ra_fwd.h"
#include "data\Types.hh"
#include "util\GSL.hh"
#include <string>
+2 -2
View File
@@ -2,9 +2,9 @@
#include "Exports.hh"
#include "RA_BuildVer.h"
#include "RA_Log.h"
#include "RA_Resource.h"
#include "RA_StringUtils.h"
#include "util\Log.hh"
#include "util\Strings.hh"
#include "api\LatestClient.hh"
-1
View File
@@ -5,7 +5,6 @@
#include "RAInterface\RA_Emulators.h"
#include "data\Types.hh"
#include "ra_fwd.h"
#include <string>
+1 -1
View File
@@ -1,7 +1,7 @@
#include "GameAssets.hh"
#include "Exports.hh"
#include "RA_Log.h"
#include "util\Log.hh"
#include "GameContext.hh"
+2 -2
View File
@@ -3,9 +3,9 @@
#include "Exports.hh"
#include "RA_Defs.h"
#include "RA_Log.h"
#include "RA_md5factory.h"
#include "RA_StringUtils.h"
#include "util\Log.hh"
#include "util\Strings.hh"
#include "data\context\ConsoleContext.hh"
#include "data\context\EmulatorContext.hh"
+2 -2
View File
@@ -1,9 +1,9 @@
#include "SessionTracker.hh"
#include "Exports.hh"
#include "RA_Log.h"
#include "RA_md5factory.h"
#include "RA_StringUtils.h"
#include "util\Log.hh"
#include "util\Strings.hh"
#include "data\context\GameContext.hh"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "UserContext.hh"
#include "Exports.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "api\impl\DisconnectedServer.hh"
+1 -1
View File
@@ -1,6 +1,6 @@
#include "AchievementModel.hh"
#include "RA_Log.h"
#include "util\Log.hh"
#include "data\context\GameContext.hh"
+1 -2
View File
@@ -6,8 +6,7 @@
#include "data\DataModelBase.hh"
#include "RA_StringUtils.h"
#include "ra_utility.h"
#include "util\Strings.hh"
namespace ra {
namespace data {
+1 -2
View File
@@ -5,8 +5,7 @@
#include "services\ServiceLocator.hh"
#include "RA_StringUtils.h"
#include "ra_utility.h"
#include "util\Strings.hh"
namespace ra {
namespace data {
+1 -1
View File
@@ -1,6 +1,6 @@
#include "TriggerValidation.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "RA_Defs.h"
#include "data/context/ConsoleContext.hh"
+1 -1
View File
@@ -1,6 +1,6 @@
#include "MemBlock.hh"
#include "ra_fwd.h"
#include "util\GSL.hh"
namespace ra {
namespace data {
+67
View File
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Analysis|Win32">
<Configuration>Analysis</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Analysis|x64">
<Configuration>Analysis</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<None Include="$(SolutionDir)\src\base.props">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>RADevKit</ProjectName>
<ProjectGuid>{8AE21D54-F905-44E1-90E5-D22E346BFF39}</ProjectGuid>
<TargetName>RADevKit</TargetName>
<RootNamespace>ra</RootNamespace>
<ConfigurationType>StaticLibrary</ConfigurationType>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\src\base.props" />
</ImportGroup>
<ItemGroup>
<ClCompile Include="data\ModelProperty.cpp" />
<ClCompile Include="util\GSL.cpp" />
<ClCompile Include="util\Strings.cpp" />
<ClInclude Include="data\ModelProperty.hh" />
<ClInclude Include="services\ILogger.hh" />
<ClInclude Include="services\IMessageDispatcher.hh" />
<ClInclude Include="services\ServiceLocator.hh" />
<ClInclude Include="util\Compat.hh" />
<ClInclude Include="util\EnumOps.hh" />
<ClInclude Include="util\GSL.hh" />
<ClInclude Include="util\Log.hh" />
<ClInclude Include="util\Strings.hh" />
<ClInclude Include="util\TypeCasts.hh" />
<ClInclude Include="util\TypeTraits.hh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
+61
View File
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<None Include="$(SolutionDir)\src\base.props" />
</ItemGroup>
<ItemGroup>
<Filter Include="data">
<UniqueIdentifier>{b8643d27-258d-476b-854a-da94989facbf}</UniqueIdentifier>
</Filter>
<Filter Include="util">
<UniqueIdentifier>{a189cb4e-de59-400e-9d9b-f3d601b41605}</UniqueIdentifier>
</Filter>
<Filter Include="services">
<UniqueIdentifier>{f4590fbd-6bec-47dc-a679-380442fca29e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="data\ModelProperty.hh">
<Filter>data</Filter>
</ClInclude>
<ClInclude Include="services\ServiceLocator.hh">
<Filter>services</Filter>
</ClInclude>
<ClInclude Include="services\ILogger.hh">
<Filter>services</Filter>
</ClInclude>
<ClInclude Include="util\GSL.hh">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="util\Compat.hh">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="util\Strings.hh">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="util\Log.hh">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="util\TypeCasts.hh">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="util\TypeTraits.hh">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="util\EnumOps.hh">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="services\IMessageDispatcher.hh" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="data\ModelProperty.cpp">
<Filter>data</Filter>
</ClCompile>
<ClCompile Include="util\GSL.cpp">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="util\Strings.cpp">
<Filter>util</Filter>
</ClCompile>
</ItemGroup>
</Project>
@@ -1,6 +1,7 @@
#include "ModelProperty.hh"
#include "ra_fwd.h"
#include <memory>
#include <vector>
namespace ra {
namespace data {
@@ -9,45 +10,50 @@ namespace data {
// and therefore initialized in a sequential manner when the DLL is loaded. s_vProperties is a vector of _references_,
// but you can't declare a vector of reference types, so it's implemented as a vector of pointers. Don't worry about
// deleting the pointers, they should be pointing to the static ModelProperties, which aren't allocated.
int ModelPropertyBase::s_nNextKey = 1;
std::vector<ModelPropertyBase*> ModelPropertyBase::s_vProperties;
static int s_nNextKey = 1;
static std::unique_ptr<std::vector<ModelPropertyBase*>> s_vProperties;
_Use_decl_annotations_ ModelPropertyBase::ModelPropertyBase(const char* const sTypeName,
const char* const sPropertyName) :
m_sTypeName{sTypeName},
m_sPropertyName{sPropertyName}
m_sTypeName(sTypeName),
m_sPropertyName(sPropertyName)
{
// ASSERT: ModelProperties are static variables and constructed when the DLL is loaded.
// We cannot reasonably use a mutex because it cannot be locked during static initialization in WinXP.
// ASSERT: The vector is implicitly sorted as new items are allocated higher keys and added to the end of the
// vector.
m_nKey = s_nNextKey++;
if (s_vProperties.empty())
// ASSERT: The vector is implicitly sorted as new items are allocated higher keys and
// added to the end of the vector.
if (s_vProperties == nullptr)
{
s_vProperties.reserve(128);
// If you encounter this exception, make sure ModelProperty.cpp appears before any files that use it in the
// vsproj file. The linker will initialize static objects in the order that they're linked, so any
// ModelProperty that gets initialized before the ModelPropertyBase class is initialized may be lost.
Expects(m_nKey == 1);
s_vProperties = std::make_unique<std::vector<ModelPropertyBase*>>();
s_vProperties->reserve(128);
s_nNextKey = 1;
}
s_vProperties.push_back(this);
m_nKey = s_nNextKey++;
s_vProperties->push_back(this);
}
ModelPropertyBase::~ModelPropertyBase() noexcept
{
auto iter = std::find(s_vProperties.begin(), s_vProperties.end(), this);
if (iter != s_vProperties.end())
s_vProperties.erase(iter);
if (!s_vProperties || s_vProperties->empty())
return;
auto iter = std::find(s_vProperties->begin(), s_vProperties->end(), this);
if (iter != s_vProperties->end())
{
s_vProperties->erase(iter);
if (s_vProperties->empty())
s_nNextKey = 1;
}
}
const ModelPropertyBase* ModelPropertyBase::GetPropertyForKey(int nKey)
{
ModelPropertyBase search(nKey);
auto iter = std::lower_bound(s_vProperties.begin(), s_vProperties.end(), &search,
[](const ModelPropertyBase* restrict left, const ModelPropertyBase* restrict right)
auto iter = std::lower_bound(s_vProperties->begin(), s_vProperties->end(), &search,
[](const ModelPropertyBase* left, const ModelPropertyBase* right)
{
if (left == nullptr)
return (right != nullptr);
@@ -56,7 +62,7 @@ const ModelPropertyBase* ModelPropertyBase::GetPropertyForKey(int nKey)
return left->GetKey() < right->GetKey();
});
return (iter == s_vProperties.end() ? nullptr : *iter);
return (iter == s_vProperties->end() ? nullptr : *iter);
}
} // namespace data
@@ -2,7 +2,10 @@
#define RA_DATA_MODEL_PROPERTY_H
#pragma once
#include "ra_fwd.h"
#include "util/Compat.hh"
#include "util/GSL.hh"
#include <map>
namespace ra {
namespace data {
@@ -59,12 +62,9 @@ protected:
explicit ModelPropertyBase(_In_ int nKey) noexcept { m_nKey = nKey; } // for binary search
private:
int m_nKey{};
const char* m_sTypeName{};
const char* m_sPropertyName{};
static std::vector<ModelPropertyBase*> s_vProperties;
static int s_nNextKey;
int m_nKey = 0;
const char* m_sTypeName = nullptr;
const char* m_sPropertyName = nullptr;
};
template<class T>
@@ -74,7 +74,8 @@ public:
explicit ModelProperty(const char* sTypeName, const char* sPropertyName, T tDefaultValue) :
ModelPropertyBase(sTypeName, sPropertyName),
m_tDefaultValue(tDefaultValue)
{}
{
}
/// <summary>
/// Gets the default value for the property.
+36
View File
@@ -0,0 +1,36 @@
#ifndef RA_SERVICES_IMESSAGE_DISPATCHER_HH
#define RA_SERVICES_IMESSAGE_DISPATCHER_HH
#pragma once
#include <string>
namespace ra {
namespace services {
class IMessageDispatcher
{
public:
virtual ~IMessageDispatcher() noexcept = default;
IMessageDispatcher(const IMessageDispatcher&) noexcept = delete;
IMessageDispatcher& operator=(const IMessageDispatcher&) noexcept = delete;
IMessageDispatcher(IMessageDispatcher&&) noexcept = delete;
IMessageDispatcher& operator=(IMessageDispatcher&&) noexcept = delete;
/// <summary>
/// Dispatches a message.
/// </summary>
virtual void ReportMessage(const std::wstring& sSummary, const std::wstring& sDetail) const = 0;
/// <summary>
/// Dispatches an error message.
/// </summary>
virtual void ReportErrorMessage(const std::wstring& sSummary, const std::wstring& sDetail) const = 0;
protected:
IMessageDispatcher() noexcept = default;
};
} // namespace services
} // namespace ra
#endif // !RA_SERVICES_IMESSAGE_DISPATCHER_HH
@@ -5,7 +5,7 @@
#include "services\ILogger.hh"
#ifndef NDEBUG
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#endif
namespace ra {
+31
View File
@@ -0,0 +1,31 @@
#ifndef RA_COMPAT_HH
#define RA_COMPAT_HH
#pragma once
/* ===== function prototype macros ===== */
//#define _DEPRECATED [[deprecated]]
//#define _DEPRECATEDR(reason) [[deprecated(reason)]]
//#define _FALLTHROUGH [[fallthrough]] //; you need ';' at the end
#define _UNUSED [[maybe_unused]]
#define _CONSTANT_VAR inline constexpr auto
//
#define _CONSTANT_LOC constexpr auto // local vars can't be inline
#define _CONSTANT_FN _CONSTANT_VAR
#ifndef __STDC_VERSION__
#define __STDC_VERSION__ 0
#endif /* !__STDC_VERSION__ */
#if __STDC_VERSION__ >= 199901L
/* "restrict" is a keyword */
#define _RESTRICT restrict
#elif defined(__GNUC__) || defined(__clang__)
#define _RESTRICT __restrict__
#elif defined(_MSC_VER)
#define _RESTRICT __restrict
#else
#define _RESTRICT restrict
#endif /* __STDC_VERSION__ >= 199901L */
#endif /* !RA_COMPAT_HH */
@@ -1,81 +1,13 @@
#ifndef RA_UTILITY_H
#define RA_UTILITY_H
#ifndef RA_ENUM_OPS_H
#define RA_ENUM_OPS_H
#pragma once
#include "ra_fwd.h"
#include "ra_type_traits.h"
#include "util\Compat.hh"
#include "util\TypeCasts.hh"
#include "util\TypeTraits.hh"
/*
For most of these functions you won't have to specify the template argument
as it will be auto-deduced unless stated otherwise.
*/
namespace ra {
template<typename SignedType, typename = std::enable_if_t<std::is_signed_v<SignedType>>>
_NODISCARD _CONSTANT_FN to_unsigned(_In_ SignedType st) noexcept
{
return gsl::narrow_cast<std::make_unsigned_t<SignedType>>(st);
}
template<typename UnsignedType, typename = std::enable_if_t<std::is_unsigned_v<UnsignedType>>>
_NODISCARD _CONSTANT_FN to_signed(_In_ UnsignedType st) noexcept
{
return gsl::narrow_cast<std::make_signed_t<UnsignedType>>(st);
}
template<typename Enum, typename = std::enable_if_t<std::is_enum_v<Enum>>>
_NODISCARD _CONSTANT_VAR etoi(_In_ Enum e) noexcept
{
return static_cast<std::underlying_type_t<Enum>>(e);
}
template<typename Enum, typename Integral = std::underlying_type_t<Enum>,
typename = std::enable_if_t<std::is_enum_v<Enum> && std::is_integral_v<Integral> &&
std::is_convertible_v<Integral, std::underlying_type_t<Enum>>>>
_NODISCARD _CONSTANT_VAR itoe(_In_ Integral i) noexcept
{
return static_cast<Enum>(i);
}
// function alias templates for etoi (EnumToIntegral) and itoe (IntegralToEnum)
template<typename Enum> _CONSTANT_VAR to_integral{etoi<Enum>};
template<typename Enum, typename Integral = std::underlying_type_t<Enum>> _CONSTANT_VAR to_enum{itoe<Enum, Integral>};
/// <summary>Calculates the size of any standard fstream.</summary>
/// <param name="filename">The filename.</param>
/// <typeparam name="CharT">
/// The character type, it should be auto deduced if valid. Otherwise you'll
/// get an intellisense error.
/// </typeparam>
/// <returns>The size of the file stream.</returns>
template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>>
_NODISCARD _CONSTANT_FN filesize(_In_ const std::basic_string<CharT>& filename) noexcept
{
using file_type = std::basic_fstream<CharT>;
file_type file{filename, std::ios::in | std::ios::ate | std::ios::binary};
return file.tellg();
} // end function filesize
/// <summary>Calculates the size of any standard fstream.</summary>
/// <param name="filename">The filename.</param>
/// <typeparam name="CharT">
/// The character type, it should be auto deduced if valid. Otherwise you'll
/// get an intellisense error.
/// </typeparam>
/// <returns>The size of the file stream.</returns>
/// <remarks>
/// This overload is provided as a safe-guard against unexpected lifetimes.
/// </remarks>
template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>>
_NODISCARD _CONSTANT_FN filesize(std::basic_string<CharT>&& filename) noexcept
{
using file_type = std::basic_fstream<CharT>;
auto bstr{std::move(filename)};
file_type file{bstr, std::ios::in | std::ios::ate | std::ios::binary};
return file.tellg();
} // end function filesize
// Don't depend on std::rel_ops for stuff here because it assumes each parameter
// has the same type
/// <summary>
@@ -204,4 +136,4 @@ _CONSTANT_FN& operator-=(_Inout_ Enum& a, _In_ std::underlying_type_t<Enum> b) n
} // namespace ra
#endif // !RA_UTILITY_H
#endif // !RA_ENUM_OPS
+68
View File
@@ -0,0 +1,68 @@
#include "gsl.hh"
#include "services\ILogger.hh"
#include "services\IMessageDispatcher.hh"
#include "services\ServiceLocator.hh"
#include "util\Log.hh"
#include "util\Strings.hh"
static inline constexpr const char* __gsl_filename(const char* const str)
{
if (str == nullptr)
return str;
if (str[0] == 's' && str[1] == 'r' && str[2] == 'c' && str[3] == '\\')
return str;
const char* scan = str;
if (scan == nullptr)
return str;
while (*scan != '\\')
{
if (!*scan)
return str;
scan++;
}
return __gsl_filename(scan + 1);
}
#ifdef NDEBUG
void __gsl_contract_handler(const char* const file, unsigned int line)
{
static char buffer[128];
snprintf(buffer, sizeof(buffer), "Assertion failure at %s: %u", __gsl_filename(file), line);
if (ra::services::ServiceLocator::Exists<ra::services::ILogger>())
{
RA_LOG_ERR(buffer);
}
if (ra::services::ServiceLocator::Exists<ra::services::IMessageDispatcher>())
{
ra::services::ServiceLocator::Get<ra::services::IMessageDispatcher>()
.ReportErrorMessage(L"Unexpected error", ra::Widen(buffer));
}
gsl::details::throw_exception(gsl::fail_fast(buffer));
}
#else
void __gsl_contract_handler(const char* const file, unsigned int line, const char* const error)
{
const char* const filename = __gsl_filename(file);
const auto sError = ra::StringPrintf("Assertion failure at %s: %d: %s", filename, line, error);
if (ra::services::ServiceLocator::Exists<ra::services::ILogger>())
{
RA_LOG_ERR("%s", sError.c_str());
}
_wassert(ra::Widen(error).c_str(), ra::Widen(filename).c_str(), line);
}
#endif
+43
View File
@@ -0,0 +1,43 @@
#ifndef RA_GSL_HH
#define RA_GSL_HH
#pragma once
#define GSL_THROW_ON_CONTRACT_VIOLATION
#include <gsl\gsl>
// the default GSL Expects() macro throws an exception, which we don't try to catch anywhere.
// replace it with our custom handler, which will log and report the error before throwing it.
#ifndef RA_UTEST
#ifdef NDEBUG
extern void __gsl_contract_handler(const char* const file, unsigned int line);
#undef Expects
#define Expects(cond) (GSL_LIKELY(cond) ? static_cast<void>(0) : __gsl_contract_handler(__FILE__, __LINE__))
#else
extern void __gsl_contract_handler(const char* const file, unsigned int line, const char* const error);
#undef Expects
#define Expects(cond) (GSL_LIKELY(cond) ? static_cast<void>(0) : __gsl_contract_handler(__FILE__, __LINE__, GSL_STRINGIFY(cond)))
#endif
#endif
/* Use these for code analysis suppressions if needed */
/* clang-format off */
#define GSL_SUPPRESS_BOUNDS4 GSL_SUPPRESS(bounds.4)
#define GSL_SUPPRESS_C128 GSL_SUPPRESS(c.128)
#define GSL_SUPPRESS_CON3 GSL_SUPPRESS(con.3)
#define GSL_SUPPRESS_CON4 GSL_SUPPRESS(con.4)
#define GSL_SUPPRESS_ENUM3 GSL_SUPPRESS(enum.3)
#define GSL_SUPPRESS_ES47 GSL_SUPPRESS(es.47)
#define GSL_SUPPRESS_F4 GSL_SUPPRESS(f.4)
#define GSL_SUPPRESS_F6 GSL_SUPPRESS(f.6)
#define GSL_SUPPRESS_F23 GSL_SUPPRESS(f.23)
#define GSL_SUPPRESS_IO5 GSL_SUPPRESS(io.5)
#define GSL_SUPPRESS_R3 GSL_SUPPRESS(r.3)
#define GSL_SUPPRESS_R30 GSL_SUPPRESS(r.30)
#define GSL_SUPPRESS_R32 GSL_SUPPRESS(r.32)
#define GSL_SUPPRESS_TYPE1 GSL_SUPPRESS(type.1)
#define GSL_SUPPRESS_TYPE3 GSL_SUPPRESS(type.3)
#define GSL_SUPPRESS_TYPE4 GSL_SUPPRESS(type.4)
#define GSL_SUPPRESS_TYPE6 GSL_SUPPRESS(type.6)
/* clang-format on */
#endif /* !RA_GSL_HH */
+4 -5
View File
@@ -1,5 +1,5 @@
#ifndef RA_LOG_H
#define RA_LOG_H
#ifndef RA_LOG_HH
#define RA_LOG_HH
#pragma once
#include "services\ILogger.hh"
@@ -10,9 +10,8 @@
#else
#include "RA_StringUtils.h"
#include "services\ServiceLocator.hh"
#include "util\Strings.hh"
#define RA_LOG_LEVEL(lvl, ...) \
{ \
@@ -27,4 +26,4 @@
#define RA_LOG_WARN(...) RA_LOG_LEVEL(ra::services::LogLevel::Warn, __VA_ARGS__)
#define RA_LOG_ERR(...) RA_LOG_LEVEL(ra::services::LogLevel::Error, __VA_ARGS__)
#endif // !RA_LOG_H
#endif // !RA_LOG_HH
@@ -1,4 +1,11 @@
#include "RA_StringUtils.h"
#include "Strings.hh"
#include "TypeCasts.hh"
// TODO: not rely on Windows API
// for ::MultiByteToWideChar and ::WideCharToMultiByte
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
namespace ra {
@@ -1,8 +1,16 @@
#ifndef RA_STRINGUTILS_H
#define RA_STRINGUTILS_H
#ifndef RA_STRINGS_HH
#define RA_STRINGS_HH
#pragma once
#include "ra_utility.h"
#include "Compat.hh"
#include "GSL.hh"
#include "TypeCasts.hh"
#include "TypeTraits.hh"
#include <iomanip>
#include <sstream>
#include <string>
#include <variant>
namespace ra {
@@ -382,7 +390,7 @@ public:
}
template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>, typename T, typename... Ts>
void AppendPrintf(const CharT* const restrict pFormat, const T& restrict value, Ts&&... args)
void AppendPrintf(const CharT* const _RESTRICT pFormat, const T& _RESTRICT value, Ts&&... args)
{
auto* pScan = pFormat;
Expects(pScan != nullptr);
@@ -497,11 +505,11 @@ private:
public:
explicit PendingString(std::string&& arg) noexcept : String{std::move(arg)}, DataType{Type::String} {}
explicit PendingString(std::wstring&& arg) noexcept : WString{std::move(arg)}, DataType{Type::WString} {}
explicit PendingString(_In_z_ const char* const restrict ptr, std::size_t len) noexcept :
explicit PendingString(_In_z_ const char* const _RESTRICT ptr, std::size_t len) noexcept :
Ref{std::string_view{ptr, len}},
DataType{Type::CharRef}
{}
explicit PendingString(_In_z_ const wchar_t* const restrict ptr, std::size_t len) noexcept :
explicit PendingString(_In_z_ const wchar_t* const _RESTRICT ptr, std::size_t len) noexcept :
Ref{std::wstring_view{ptr, len}},
DataType{Type::WCharRef}
{}
@@ -574,7 +582,7 @@ std::wstring BuildWString(Ts&&... args)
/// Constructs a <see cref="std::basic_string" /> from a format string and parameters
/// </summary>
template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>, typename... Ts>
_NODISCARD inline auto StringPrintf(_In_z_ _Printf_format_string_ const CharT* const __restrict sFormat, Ts&&... args)
_NODISCARD inline auto StringPrintf(_In_z_ _Printf_format_string_ const CharT* const _RESTRICT sFormat, Ts&&... args)
{
Expects(sFormat != nullptr);
@@ -768,7 +776,7 @@ GSL_SUPPRESS_F6 _NODISCARD bool StringStartsWith(_In_ const std::basic_string<Ch
/// </summary>
template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>>
GSL_SUPPRESS_F6 _NODISCARD bool StringStartsWith(_In_ const std::basic_string<CharT>& sString,
_In_ const CharT* restrict sMatch) noexcept
_In_ const CharT* _RESTRICT sMatch) noexcept
{
const auto sMatchLen = tcslen_s(sMatch);
if (sMatchLen > sString.length())
@@ -781,8 +789,8 @@ GSL_SUPPRESS_F6 _NODISCARD bool StringStartsWith(_In_ const std::basic_string<Ch
/// Determines if <paramref name="sString" /> starts with <paramref name="sMatch" />.
/// </summary>
template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>>
GSL_SUPPRESS_F6 _NODISCARD bool StringStartsWith(_In_ const CharT* restrict sString,
_In_ const CharT* restrict sMatch) noexcept
GSL_SUPPRESS_F6 _NODISCARD bool StringStartsWith(_In_ const CharT* _RESTRICT sString,
_In_ const CharT* _RESTRICT sMatch) noexcept
{
const auto sMatchLen = tcslen_s(sMatch);
if (sMatchLen > tcslen_s(sString))
@@ -809,7 +817,7 @@ GSL_SUPPRESS_F6 _NODISCARD bool StringEndsWith(_In_ const std::basic_string<Char
/// </summary>
template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>>
GSL_SUPPRESS_F6 _NODISCARD bool StringEndsWith(_In_ const std::basic_string<CharT>& sString,
_In_ const CharT* restrict sMatch) noexcept
_In_ const CharT* _RESTRICT sMatch) noexcept
{
const auto sMatchLen = tcslen_s(sMatch);
if (sMatchLen > sString.length())
@@ -822,8 +830,8 @@ GSL_SUPPRESS_F6 _NODISCARD bool StringEndsWith(_In_ const std::basic_string<Char
/// Determines if <paramref name="sString" /> ends with <paramref name="sMatch" />.
/// </summary>
template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>>
GSL_SUPPRESS_F6 _NODISCARD bool StringEndsWith(_In_ const CharT* restrict sString,
_In_ const CharT* restrict sMatch) noexcept
GSL_SUPPRESS_F6 _NODISCARD bool StringEndsWith(_In_ const CharT* _RESTRICT sString,
_In_ const CharT* _RESTRICT sMatch) noexcept
{
const auto sMatchLen = tcslen_s(sMatch);
const auto sStringLen = tcslen_s(sString);
@@ -875,4 +883,4 @@ std::string Base64(const std::string& sString);
#define NativeStrType std::string
#endif
#endif // !RA_STRINGUTILS_H
#endif // !RA_STRINGS_HH
+80
View File
@@ -0,0 +1,80 @@
#ifndef RA_TYPE_CASTS_HH
#define RA_TYPE_CASTS_HH
#pragma once
#include "TypeTraits.hh"
/*
For most of these functions you won't have to specify the template argument
as it will be auto-deduced unless stated otherwise.
*/
namespace ra {
/* to_unsigned - convert a signed value to an unsigned value */
template<typename SignedType, typename = std::enable_if_t<std::is_signed_v<SignedType>>>
_NODISCARD _CONSTANT_FN to_unsigned(_In_ SignedType st) noexcept
{
return gsl::narrow_cast<std::make_unsigned_t<SignedType>>(st);
}
/* to_signed - convert an unsigned value to a signed value */
template<typename UnsignedType, typename = std::enable_if_t<std::is_unsigned_v<UnsignedType>>>
_NODISCARD _CONSTANT_FN to_signed(_In_ UnsignedType st) noexcept
{
return gsl::narrow_cast<std::make_signed_t<UnsignedType>>(st);
}
/* etoi - convert an enum to an int */
template<typename Enum, typename = std::enable_if_t<std::is_enum_v<Enum>>>
_NODISCARD _CONSTANT_VAR etoi(_In_ Enum e) noexcept
{
return static_cast<std::underlying_type_t<Enum>>(e);
}
/* itoe - convert an int to an enum */
template<typename Enum, typename Integral = std::underlying_type_t<Enum>,
typename = std::enable_if_t<std::is_enum_v<Enum> && std::is_integral_v<Integral> &&
std::is_convertible_v<Integral, std::underlying_type_t<Enum>>>>
_NODISCARD _CONSTANT_VAR itoe(_In_ Integral i) noexcept
{
return static_cast<Enum>(i);
}
/* ftol - convert a float to a long */
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline auto ftol(_In_ FloatingPoint fp) noexcept
{
return std::lround(fp);
}
/* ftoi - convert a float to an int */
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline int ftoi(_In_ FloatingPoint fp) noexcept
{
return std::lround(fp);
}
/* ftoll - convert a float to a long long */
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline auto ftoll(_In_ FloatingPoint fp) noexcept
{
return std::llround(fp);
}
/* ftoul - convert a float to an unsigned long */
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline auto ftoul(_In_ FloatingPoint fp) noexcept
{
return to_unsigned(std::lround(fp));
}
/* ftoull - convert a float to an unsigned long long */
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline auto ftoull(_In_ FloatingPoint fp) noexcept
{
return to_unsigned(std::llround(fp));
}
} // namespace ra
#endif // !RA_TYPE_CASTS_H
@@ -1,20 +1,10 @@
#ifndef RA_TYPE_TRAITS_H
#define RA_TYPE_TRAITS_H
#ifndef RA_TYPE_TRAITS_HH
#define RA_TYPE_TRAITS_HH
#pragma once
#if _HAS_CXX17
#ifndef _CONSTANT_VAR
#define _CONSTANT_VAR inline constexpr auto
#endif // !_CONSTANT_VAR
#else
#ifndef _CONSTANT_VAR
#define _CONSTANT_VAR constexpr auto
#endif // !_CONSTANT_VAR
#endif // _HAS_CXX17
#include "Compat.hh"
#ifndef _CONSTANT_FN
#define _CONSTANT_FN _CONSTANT_VAR
#endif // !_CONSTANT_FN
#include <type_traits>
namespace ra {
namespace detail {
@@ -157,4 +147,4 @@ _CONSTANT_VAR is_literal_type_v{detail::is_literal_type<LiteralType>::value};
} // namespace ra
#endif // !RA_TYPE_TRAITS_H
#endif // !RA_TYPE_TRAITS_HH
+22 -11
View File
@@ -89,19 +89,30 @@
#pragma warning(pop)
#if RA_UTEST
#include <CodeAnalysis\Warnings.h>
#pragma warning(push)
#pragma warning(disable : ALL_CPPCORECHECK_WARNINGS)
#include "CppUnitTest.h"
#pragma warning(pop)
#endif /* RA_UTEST */
/* rcheevos stuff */
#pragma warning(push)
#pragma warning(disable : 4201) // nameless struct
#include <rcheevos.h>
#pragma warning(pop)
#pragma warning(disable : 4201) // nameless struct
#include <rcheevos.h>
#pragma warning(pop)
#pragma warning(pop)
#if RA_UTEST
#include <CodeAnalysis\Warnings.h>
#pragma warning(push)
#pragma warning(disable : ALL_CPPCORECHECK_WARNINGS ALL_CODE_ANALYSIS_WARNINGS)
#include "CppUnitTest.h"
#pragma warning(pop)
/* This has to be globally disabled in the unit tests because it occurs in the
* macros provided by the framework (i.e. TEST_METHOD).
*/
#pragma warning(disable: 26477) /* Use 'nullptr' rather than 0 or NULL (es.47). */
/* TODO: update all the failures related to these messages in the unit tests */
#pragma warning(disable: 26429) /* Symbol is never tested for nullness, it can be marked as not_null (f.23). */
#pragma warning(disable: 26462) /* X is assigned only once, mark it as a pointer to const (con.4). */
#endif /* RA_UTEST */
#endif /* !PCH_H */
-118
View File
@@ -1,118 +0,0 @@
#ifndef RA_FWD_H
#define RA_FWD_H
#pragma once
#define _NORETURN \
[[noreturn]] /*only used on functions that 100% fail (like functions that solely throw or std::terminate) */
/* Maybe an extra check just in-case */
#if _HAS_CXX17
#define _DEPRECATED [[deprecated]]
#define _DEPRECATEDR(reason) [[deprecated(reason)]]
#define _FALLTHROUGH [[fallthrough]] //; you need ';' at the end
#define _UNUSED [[maybe_unused]]
#define _CONSTANT_VAR inline constexpr auto
#else
#define _NODISCARD _Check_return_
#define _DEPRECATED __declspec(deprecated)
#define _DEPRECATEDR(reason) _CRT_DEPRECATE_TEXT(reason)
#define _FALLTHROUGH __fallthrough //; you need ';' at the end
#define _UNUSED
#define _CONSTANT_VAR constexpr auto
#endif // _HAS_CXX17
#define _CONSTANT_LOC constexpr auto // local vars can't be inline
#define _CONSTANT_FN _CONSTANT_VAR
#ifndef __STDC_VERSION__
#define __STDC_VERSION__ 0
#endif /* !__STDC_VERSION__ */
#if __STDC_VERSION__ >= 199901L
/* "restrict" is a keyword */
#elif defined(__GNUC__) || defined(__clang__)
#define restrict __restrict__
#elif defined(_MSC_VER)
#define restrict __restrict
#else
#define restrict
#endif /* __STDC_VERSION__ >= 199901L */
/* Use these for code analysis suppressions if needed */
/* clang-format off */
#define GSL_SUPPRESS_BOUNDS4 GSL_SUPPRESS(bounds.4)
#define GSL_SUPPRESS_C128 GSL_SUPPRESS(c.128)
#define GSL_SUPPRESS_CON3 GSL_SUPPRESS(con.3)
#define GSL_SUPPRESS_CON4 GSL_SUPPRESS(con.4)
#define GSL_SUPPRESS_ENUM3 GSL_SUPPRESS(enum.3)
#define GSL_SUPPRESS_ES47 GSL_SUPPRESS(es.47)
#define GSL_SUPPRESS_F4 GSL_SUPPRESS(f.4)
#define GSL_SUPPRESS_F6 GSL_SUPPRESS(f.6)
#define GSL_SUPPRESS_F23 GSL_SUPPRESS(f.23)
#define GSL_SUPPRESS_IO5 GSL_SUPPRESS(io.5)
#define GSL_SUPPRESS_R3 GSL_SUPPRESS(r.3)
#define GSL_SUPPRESS_R30 GSL_SUPPRESS(r.30)
#define GSL_SUPPRESS_R32 GSL_SUPPRESS(r.32)
#define GSL_SUPPRESS_TYPE1 GSL_SUPPRESS(type.1)
#define GSL_SUPPRESS_TYPE3 GSL_SUPPRESS(type.3)
#define GSL_SUPPRESS_TYPE6 GSL_SUPPRESS(type.6)
/* clang-format on */
#ifndef _TCHAR_DEFINED
#if _MBCS
using TCHAR = char;
#elif _UNICODE
using TCHAR = wchar_t;
#else
#error Unknown character set detected, only MultiByte and Unicode are supported!
#endif /* _MBCS */
#define _TCHAR_DEFINED
#endif /* !_TCHAR_DEFINED */
#ifndef _WINDEF_
struct HBITMAP__;
struct HDC__;
struct HPEN__;
struct HBRUSH__;
struct HWND__;
struct HINSTANCE__;
using HBITMAP = HBITMAP__*;
using HDC = HDC__*;
using HPEN = HPEN__*;
using HBRUSH = HBRUSH__*;
using HWND = HWND__*;
using HINSTANCE = HINSTANCE__*;
using HMODULE = HINSTANCE__*;
struct tagRECT;
struct tagSIZE;
using RECT = tagRECT;
using SIZE = tagSIZE;
using BOOL = int;
using BYTE = unsigned char;
using DWORD = unsigned long;
using HGDIOBJ = void*;
using LPVOID = void*;
using WORD = unsigned short;
#endif // !_WINDEF_
#ifndef _WINNT_
using HANDLE = void*;
using LPCTSTR = const TCHAR*;
using LPTSTR = TCHAR*;
#endif // !_WINNT_
namespace ra {
#ifdef UNICODE
using tstring = std::wstring;
#else
using tstring = std::string;
#endif
} /* namespace ra */
#endif /* !RA_FWD_H */
-61
View File
@@ -1,61 +0,0 @@
#ifndef RA_MATH_H
#define RA_MATH_H
#pragma once
#include "ra_utility.h"
namespace ra {
/// <summary>Casts <paramref name="a" /> into a <typeparamref name="FloatingPoint" />.</summary>
/// <typeparam name="Arithmetic">A valid arithmetic type.</typeparam>
/// <param name="a">The number to be converted.</param>
/// <returns>
/// The return type depends on the size of <typeparamref name="Arithmetic" />. If it's 8 bytes, it will
/// <c>double</c>, if it's anything less it will be float. <c>long double</c> is not considered as it is currently
/// the same as <c>double</c> size-wise.
/// </returns>
template<typename Arithmetic, class = std::enable_if_t<std::is_arithmetic_v<Arithmetic>>>
_NODISCARD _CONSTANT_FN to_floating(_In_ Arithmetic a) noexcept
{
if constexpr (is_same_size_v<Arithmetic, double>) return static_cast<double>(a);
if constexpr (has_smaller_size_than_v<Arithmetic, double>) return static_cast<float>(a);
}
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline auto ftol(_In_ FloatingPoint fp) noexcept
{
return std::lround(fp);
}
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline int ftoi(_In_ FloatingPoint fp) noexcept
{
return std::lround(fp);
}
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline auto ftoll(_In_ FloatingPoint fp) noexcept
{
return std::llround(fp);
}
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline auto ftoul(_In_ FloatingPoint fp) noexcept
{
return to_unsigned(std::lround(fp));
}
template<typename FloatingPoint, class = std::enable_if_t<std::is_floating_point_v<FloatingPoint>>>
_NODISCARD inline auto ftoull(_In_ FloatingPoint fp) noexcept
{
return to_unsigned(std::llround(fp));
}
template<typename Arithmetic, class = std::enable_if_t<std::is_arithmetic_v<Arithmetic>>>
_NODISCARD _CONSTANT_FN sqr(_In_ Arithmetic a) noexcept
{
return (a*a);
}
} /* namespace ra */
#endif /* !RA_MATH_H */
+15 -116
View File
@@ -18,143 +18,46 @@
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<None Include="$(SolutionDir)\src\base.props">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>RAIntegrationRcheevos</RootNamespace>
<ProjectName>rcheevos</ProjectName>
<ProjectGuid>{9D55EBE7-1392-4FA1-A9B9-F022F764CE35}</ProjectGuid>
<TargetName>rcheevos</TargetName>
<RootNamespace>rcheevos</RootNamespace>
<ConfigurationType>StaticLibrary</ConfigurationType>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)'=='16.0'">
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)'=='15.0'">
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\src\base.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<TargetName>rcheevos</TargetName>
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(SolutionDir)obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ItemDefinitionGroup>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;RC_CLIENT_SUPPORTS_HASH;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>RC_CLIENT_SUPPORTS_HASH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)rcheevos\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ExceptionHandling>false</ExceptionHandling>
<ConformanceMode>true</ConformanceMode>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<!--<DisableSpecificWarnings>6001;6308</DisableSpecificWarnings>-->
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Lib />
<Lib>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;RC_CLIENT_SUPPORTS_HASH;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)rcheevos\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ExceptionHandling>false</ExceptionHandling>
<ConformanceMode>true</ConformanceMode>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DisableSpecificWarnings>6001;6308</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Lib />
<Lib>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;RC_CLIENT_SUPPORTS_HASH;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)rcheevos\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<ConformanceMode>true</ConformanceMode>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Lib />
<Lib />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;RC_CLIENT_SUPPORTS_HASH;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)rcheevos\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<ConformanceMode>true</ConformanceMode>
<WarningLevel>Level3</WarningLevel>
<DisableSpecificWarnings>6001;6308</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Lib />
<Lib />
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\rcheevos\include\rc_client.h" />
<ClInclude Include="..\rcheevos\include\rc_client_raintegration.h" />
<ClInclude Include="..\rcheevos\include\rc_runtime.h" />
<ClInclude Include="..\rcheevos\include\rc_runtime_types.h" />
<ClInclude Include="..\rcheevos\src\rcheevos\internal.h" />
<ClCompile Include="..\rcheevos\src\rapi\rc_api_common.c">
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\rcheevos\src\rapi\rc_api_common.c" />
<ClCompile Include="..\rcheevos\src\rapi\rc_api_editor.c" />
<ClCompile Include="..\rcheevos\src\rapi\rc_api_info.c" />
<ClCompile Include="..\rcheevos\src\rapi\rc_api_runtime.c" />
@@ -181,9 +84,7 @@
<ClCompile Include="..\rcheevos\src\rc_util.c" />
<ClCompile Include="..\rcheevos\src\rhash\aes.c" />
<ClCompile Include="..\rcheevos\src\rhash\cdreader.c" />
<ClCompile Include="..\rcheevos\src\rhash\hash.c">
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\rcheevos\src\rhash\hash.c" />
<ClCompile Include="..\rcheevos\src\rhash\hash_disc.c" />
<ClCompile Include="..\rcheevos\src\rhash\hash_encrypted.c" />
<ClCompile Include="..\rcheevos\src\rhash\hash_rom.c" />
@@ -195,6 +96,4 @@
<Natvis Include="..\rcheevos\src\rc_client_types.natvis" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+3
View File
@@ -123,4 +123,7 @@
</Natvis>
<Natvis Include="..\rcheevos\src\rc_client_types.natvis" />
</ItemGroup>
<ItemGroup>
<None Include="$(SolutionDir)\src\base.props" />
</ItemGroup>
</Project>
+1 -1
View File
@@ -1,7 +1,7 @@
#include "AchievementLogicSerializer.hh"
#include "RA_Defs.h"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "data\context\ConsoleContext.hh"
@@ -2,8 +2,6 @@
#define RA_ACHIEVEMENT_LOGIC_SERIALIZER_HH
#pragma once
#include "ra_fwd.h"
#include "data\Types.hh"
#include "data\models\CodeNoteModel.hh"
+4 -2
View File
@@ -3,9 +3,11 @@
#include "AchievementRuntimeExports.hh"
#include "Exports.hh"
#include "RA_Defs.h"
#include "RA_Log.h"
#include "RA_Json.h"
#include "RA_Resource.h"
#include "RA_StringUtils.h"
#include "util\EnumOps.hh"
#include "util\Log.hh"
#include "util\Strings.hh"
#include "RA_md5factory.h"
+3 -7
View File
@@ -2,8 +2,6 @@
#define RA_SERVICES_ACHIEVEMENT_RUNTIME_HH
#pragma once
#include "ra_fwd.h"
#include "data\Types.hh"
#include "data\context\EmulatorContext.hh"
#include "data\models\AchievementModel.hh"
@@ -68,11 +66,9 @@ public:
static std::string GetAchievementBadge(const rc_client_achievement_t& pAchievement);
void GetSubsets(std::vector<std::pair<uint32_t, std::wstring>>& vSubsets) const;
void RaiseClientEvent(rc_client_achievement_info_t& pAchievement, uint32_t nEventType) const noexcept;
void UpdateActiveAchievements();
void UpdateActiveAchievements() noexcept(false);
void UpdateActiveLeaderboards() noexcept;
/// <summary>
@@ -124,7 +120,7 @@ public:
/// </summary>
/// <param name="pBuffer">The buffer to read from.</param>
/// <returns><c>true</c> if the achievement HitCounts were modified, <c>false</c> if not.</returns>
bool LoadProgressFromBuffer(const uint8_t* pBuffer);
bool LoadProgressFromBuffer(const uint8_t* pBuffer) noexcept(false);
/// <summary>
/// Writes HitCount data for active achievements to a save state file.
@@ -142,7 +138,7 @@ public:
/// nBufferSize - in which case the caller should allocate the specified amount
/// and call again.
/// </returns>
int SaveProgressToBuffer(uint8_t* pBuffer, int nBufferSize) const;
int SaveProgressToBuffer(uint8_t* pBuffer, int nBufferSize) const noexcept(false);
/// <summary>
/// Gets whether achievement processing is temporarily suspended.
+1 -1
View File
@@ -1,7 +1,7 @@
#include "AchievementRuntime.hh"
#include "Exports.hh"
#include "RA_Log.h"
#include "util\Log.hh"
#include "RA_Resource.h"
#include "data\context\ConsoleContext.hh"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "FrameEventQueue.hh"
#include "RA_Defs.h"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "ui\viewmodels\MessageBoxViewModel.hh"
#include "ui\viewmodels\WindowManager.hh"
+2 -2
View File
@@ -2,10 +2,10 @@
#define RA_SERVICES_FRAME_EVENT_QUEUE_HH
#pragma once
#include "ra_fwd.h"
#include "data\Types.hh"
#include "util\GSL.hh"
namespace ra {
namespace services {
+2 -2
View File
@@ -1,7 +1,7 @@
#include "GameIdentifier.hh"
#include "RA_Log.h"
#include "RA_StringUtils.h"
#include "util\Log.hh"
#include "util\Strings.hh"
#include <rc_hash.h>
+4
View File
@@ -16,6 +16,7 @@
#include "services\impl\Clock.hh"
#include "services\impl\FileLocalStorage.hh"
#include "services\impl\JsonFileConfiguration.hh"
#include "services\impl\MessageDispatcher.hh"
#include "services\impl\ThreadPool.hh"
#include "services\impl\WindowsAudioSystem.hh"
#include "services\impl\WindowsClipboard.hh"
@@ -111,6 +112,9 @@ void Initialization::RegisterServices(EmulatorID nEmulatorId, const char* sClien
auto pDesktop = std::make_unique<ra::ui::win32::Desktop>();
ra::services::ServiceLocator::Provide<ra::ui::IDesktop>(std::move(pDesktop));
auto pMessageDispatcher = std::make_unique<ra::services::impl::MessageDispatcher>();
ra::services::ServiceLocator::Provide<ra::services::IMessageDispatcher>(std::move(pMessageDispatcher));
auto pEmulatorContext = std::make_unique<ra::data::context::EmulatorContext>();
pEmulatorContext->Initialize(nEmulatorId, sClientName);
sClientName = pEmulatorContext->GetClientName().c_str();
+1 -1
View File
@@ -2,7 +2,7 @@
#ifdef PERFORMANCE_COUNTERS
#include "RA_Log.h"
#include "util\Log.hh"
#include "IClock.hh"
+1 -1
View File
@@ -1,6 +1,6 @@
#include "SearchImpl.hh"
#include "ra_utility.h"
#include "util\TypeCasts.hh"
#include <algorithm>
+1 -1
View File
@@ -4,7 +4,7 @@
#include "SearchImpl.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
namespace ra {
namespace services {
+1 -1
View File
@@ -4,7 +4,7 @@
#include "SearchImpl.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
namespace ra {
namespace services {
+1 -1
View File
@@ -1,7 +1,7 @@
#include "SearchResults.h"
#include "RA_Defs.h"
#include "ra_utility.h"
#include "util\Log.hh"
#include "data\context\EmulatorContext.hh"
+2 -3
View File
@@ -1,9 +1,8 @@
#include "FileLocalStorage.hh"
#include "ra_fwd.h"
#include "RA_Json.h"
#include "RA_Log.h"
#include "RA_StringUtils.h"
#include "util\Log.hh"
#include "util\Strings.hh"
#include "services\IClock.hh"
#include "services\IFileSystem.hh"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "services\TextReader.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
namespace ra {
namespace services {
+1 -2
View File
@@ -4,8 +4,7 @@
#include "services\TextWriter.hh"
#include "RA_StringUtils.h"
#include "ra_utility.h"
#include "util\Strings.hh"
namespace ra {
namespace services {
+2 -3
View File
@@ -1,9 +1,8 @@
#include "JsonFileConfiguration.hh"
#include "RA_Json.h"
#include "RA_Log.h"
#include "RA_StringUtils.h"
#include "ra_utility.h"
#include "util\Log.hh"
#include "util\Strings.hh"
#include "services\IFileSystem.hh"
#include "services\ServiceLocator.hh"
+38
View File
@@ -0,0 +1,38 @@
#ifndef RA_SERVICES_MESSAGE_DISPATCHER_HH
#define RA_SERVICES_MESSAGE_DISPATCHER_HH
#pragma once
#include "services\IMessageDispatcher.hh"
#include "ui\viewmodels\MessageBoxViewModel.hh"
namespace ra {
namespace services {
namespace impl {
class MessageDispatcher : public IMessageDispatcher
{
public:
/// <summary>
/// Dispatches a message.
/// </summary>
void ReportMessage(const std::wstring& sSummary, const std::wstring& sDetail) const override
{
ra::ui::viewmodels::MessageBoxViewModel::ShowMessage(sSummary, sDetail);
}
/// <summary>
/// Dispatches an error message.
/// </summary>
void ReportErrorMessage(const std::wstring& sSummary, const std::wstring& sDetail) const override
{
ra::ui::viewmodels::MessageBoxViewModel::ShowErrorMessage(sSummary, sDetail);
}
};
} // namespace impl
} // namespace services
} // namespace ra
#endif // !RA_SERVICES_MESSAGE_DISPATCHER_HH
+1 -1
View File
@@ -4,7 +4,7 @@
#include "services\TextReader.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
namespace ra {
namespace services {
+1 -1
View File
@@ -4,7 +4,7 @@
#include "services\TextWriter.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
namespace ra {
namespace services {
+1 -1
View File
@@ -1,6 +1,6 @@
#include "ThreadPool.hh"
#include "RA_Log.h"
#include "util\Log.hh"
namespace ra {
namespace services {
+2 -2
View File
@@ -2,12 +2,12 @@
#define RA_SERVICES_THREADPOOL_HH
#pragma once
#include "ra_fwd.h"
#include "services\IClock.hh"
#include "services\IThreadPool.hh"
#include "services\ServiceLocator.hh"
#include "util\GSL.hh"
namespace ra {
namespace services {
namespace impl {
+2 -2
View File
@@ -1,7 +1,7 @@
#include "WindowsFileSystem.hh"
#include "RA_Log.h"
#include "RA_StringUtils.h"
#include "util\Log.hh"
#include "util\Strings.hh"
#include "services\impl\FileTextReader.hh"
#include "services\impl\FileTextWriter.hh"
+1 -1
View File
@@ -2,7 +2,7 @@
#define RA_SERVICES_WIN32_FILESYSTEM_HH
#pragma once
#include "ra_fwd.h"
#include "util\GSL.hh"
#include "services\IFileSystem.hh"
+2 -2
View File
@@ -2,8 +2,8 @@
#include "RA_Defs.h"
#include "RA_Log.h"
#include "RA_StringUtils.h"
#include "util\Log.hh"
#include "util\Strings.hh"
#include "services\impl\StringTextWriter.hh"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "services\IHttpRequester.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
namespace ra {
namespace services {
+2 -2
View File
@@ -2,9 +2,9 @@
#define RA_UI_EDITOR_THEME_H
#pragma once
#include "ra_fwd.h"
#include "util\GSL.hh"
#include "ui/Types.hh"
#include "ui\Types.hh"
namespace ra {
namespace ui {
-2
View File
@@ -2,8 +2,6 @@
#define RA_UI_IMAGEREPOSITORY_H
#pragma once
#include "ra_fwd.h"
#include "data\NotifyTargetSet.hh"
#include "services\ServiceLocator.hh"
+2 -2
View File
@@ -2,9 +2,9 @@
#define RA_UI_OVERLAY_THEME_H
#pragma once
#include "ra_fwd.h"
#include "util\GSL.hh"
#include "ui/Types.hh"
#include "ui\Types.hh"
namespace ra {
namespace ui {
+1 -1
View File
@@ -2,7 +2,7 @@
#include "OverlayTheme.hh"
#include "RA_Json.h"
#include "RA_Log.h"
#include "util\Log.hh"
#include "services\IFileSystem.hh"
#include "services\ServiceLocator.hh"
+1 -3
View File
@@ -2,8 +2,6 @@
#define RA_UI_VIEW_MODEL_BASE_H
#pragma once
#include "ra_fwd.h"
#include "data\ModelBase.hh"
#include "data\NotifyTargetSet.hh"
@@ -36,7 +34,7 @@ public:
void RemoveNotifyTarget(NotifyTarget& pTarget) noexcept
{
#ifdef RA_UTEST
#ifdef DEBUG
GSL_SUPPRESS_F6 Expects(!m_bDestructed);
#endif
m_vNotifyTargets.Remove(pTarget);
+2 -1
View File
@@ -4,7 +4,8 @@
#include "Types.hh"
#include "ViewModelBase.hh"
#include "ra_utility.h"
#include "util\TypeCasts.hh"
namespace ra {
namespace ui {
+1
View File
@@ -4,6 +4,7 @@
#include "RA_Defs.h"
#include "RA_md5factory.h"
#include "util\Log.hh"
#include "data\context\GameContext.hh"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "ui\Types.hh"
#include "ra_utility.h"
#include "util\EnumOps.hh"
namespace ra {
namespace ui {
@@ -13,6 +13,8 @@
#include "ui\viewmodels\FileDialogViewModel.hh"
#include "ui\viewmodels\MessageBoxViewModel.hh"
#include "util\EnumOps.hh"
#include <rcheevos\src\rcheevos\rc_internal.h>
namespace ra {
+1 -1
View File
@@ -21,7 +21,7 @@
#include "Exports.hh"
#include "RA_BuildVer.h"
#include "RA_Log.h"
#include "util\Log.hh"
namespace ra {
namespace ui {
+1 -1
View File
@@ -14,7 +14,7 @@
#include "ui\viewmodels\MessageBoxViewModel.hh"
#include "RA_Defs.h"
#include "RA_Log.h"
#include "util\Log.hh"
#include <rcheevos/include/rc_api_runtime.h>
@@ -1,6 +1,6 @@
#include "BrokenAchievementsViewModel.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "api\SubmitTicket.hh"
@@ -1,6 +1,6 @@
#include "ChallengeIndicatorViewModel.hh"
#include "ra_math.h"
#include "util\TypeCasts.hh"
#include "ui\OverlayTheme.hh"
#include "ui\viewmodels\OverlayManager.hh"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "CodeNotesViewModel.hh"
#include "RA_Defs.h"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "data\context\GameContext.hh"
+1 -1
View File
@@ -1,6 +1,6 @@
#include "GameChecksumViewModel.hh"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "data\context\GameContext.hh"
@@ -1,6 +1,6 @@
#include "IntegrationMenuViewModel.hh"
#include "RA_Log.h"
#include "util\Log.hh"
#include "RA_Resource.h"
#include "data/context/ConsoleContext.hh"
+2 -2
View File
@@ -1,8 +1,8 @@
#include "LoginViewModel.hh"
#include "Exports.hh"
#include "RA_Interface.h"
#include "RA_StringUtils.h"
#include "RAInterface\RA_Interface.h"
#include "util\Strings.hh"
#include "api\impl\ConnectedServer.hh"
@@ -2,7 +2,7 @@
#include "RA_Defs.h"
#include "RA_Json.h"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "data\Types.hh"
#include "data\context\EmulatorContext.hh"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "MemoryRegionsViewModel.hh"
#include "RA_Defs.h"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "data\context\ConsoleContext.hh"
@@ -2,7 +2,7 @@
#include "RA_Defs.h"
#include "RA_Json.h"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "data\Types.hh"
#include "data\context\EmulatorContext.hh"
+1 -1
View File
@@ -2,7 +2,7 @@
#include "RA_Defs.h"
#include "RA_Json.h"
#include "RA_StringUtils.h"
#include "util\Strings.hh"
#include "data\Types.hh"
#include "data\context\ConsoleContext.hh"

Some files were not shown because too many files have changed in this diff Show More