├── .gitignore
├── AnvilAusar
├── AnvilAusar.vcxproj
├── AnvilAusar.vcxproj.filters
└── Source
│ ├── EngineImpl.cpp
│ ├── EngineImpl.hpp
│ ├── Globals.cpp
│ └── Hooks
│ ├── Windows.cpp
│ └── Windows.hpp
├── AnvilClient.sln
├── AnvilClient
├── AnvilClient.vcxproj
├── AnvilClient.vcxproj.filters
├── PreBuild.bat
└── Source
│ ├── Client
│ ├── ClientImpl.cpp
│ └── ClientImpl.hpp
│ └── Source.cpp
├── AnvilCommon
├── AnvilCommon.vcxproj
├── AnvilCommon.vcxproj.filters
├── Depends
│ ├── Include
│ │ └── MinHook.h
│ └── Library
│ │ ├── x64
│ │ ├── Debug
│ │ │ └── libMinHook.lib
│ │ └── Release
│ │ │ └── libMinHook.lib
│ │ └── x86
│ │ ├── Debug
│ │ └── libMinHook.lib
│ │ └── Release
│ │ └── libMinHook.lib
└── Source
│ ├── BuildInfo.hpp
│ ├── Globals.hpp
│ ├── Interfaces
│ ├── Client.hpp
│ ├── Engine.hpp
│ └── Initializable.hpp
│ └── Utils
│ ├── Hook.cpp
│ ├── Hook.hpp
│ ├── Logger.cpp
│ ├── Logger.hpp
│ ├── Patch.cpp
│ ├── Patch.hpp
│ ├── Util.cpp
│ └── Util.hpp
├── AnvilEldorado
├── AnvilEldorado.vcxproj
├── AnvilEldorado.vcxproj.filters
├── Depends
│ ├── Include
│ │ └── MinHook.h
│ └── Library
│ │ ├── libMinHook-x86-v140-mt.lib
│ │ └── libMinHook-x86-v140-mtd.lib
└── Source
│ ├── Blam
│ ├── Cache
│ │ └── StringIDCacheHeader.hpp
│ ├── Data
│ │ ├── BitStream.cpp
│ │ ├── BitStream.hpp
│ │ ├── DataArray.cpp
│ │ ├── DataArray.hpp
│ │ ├── DataPoolBase.cpp
│ │ ├── DataPoolBase.hpp
│ │ ├── DatumBase.cpp
│ │ ├── DatumBase.hpp
│ │ ├── DatumIndex.cpp
│ │ ├── DatumIndex.hpp
│ │ ├── LruvCacheBase.cpp
│ │ └── LruvCacheBase.hpp
│ ├── Game
│ │ ├── Damage.hpp
│ │ ├── Events.hpp
│ │ ├── Medals.hpp
│ │ ├── Players
│ │ │ ├── ClientPlayerProperties.hpp
│ │ │ ├── PlayerArmor.hpp
│ │ │ ├── PlayerColor.hpp
│ │ │ ├── PlayerCustomization.hpp
│ │ │ ├── PlayerDatum.hpp
│ │ │ └── PlayerProperties.hpp
│ │ ├── Stats.cpp
│ │ ├── Stats.hpp
│ │ ├── Stats
│ │ │ ├── PlayerKilledPlayerStats.hpp
│ │ │ ├── PlayerStats.hpp
│ │ │ ├── PlayerVsStats.hpp
│ │ │ └── WeaponStats.hpp
│ │ └── Variants.hpp
│ ├── Input
│ │ ├── ActionState.hpp
│ │ ├── ActionStateFlags.hpp
│ │ ├── BindingsPreferences.hpp
│ │ ├── BindingsTable.hpp
│ │ ├── ConfigurableAction.hpp
│ │ ├── ControllerButton.hpp
│ │ ├── GameAction.hpp
│ │ ├── InputType.hpp
│ │ ├── KeyCode.hpp
│ │ ├── KeyEvent.hpp
│ │ ├── KeyEventModifiers.hpp
│ │ ├── KeyEventType.hpp
│ │ ├── MouseButton.hpp
│ │ └── UIButtonCode.hpp
│ ├── Math
│ │ ├── Angle.cpp
│ │ ├── Angle.hpp
│ │ ├── BasePoint2D.hpp
│ │ ├── Bounds.hpp
│ │ ├── ColorARGB.cpp
│ │ ├── ColorARGB.hpp
│ │ ├── ColorRGB.cpp
│ │ ├── ColorRGB.hpp
│ │ ├── Point2D.cpp
│ │ ├── Point2D.hpp
│ │ ├── RealColorARGB.cpp
│ │ ├── RealColorARGB.hpp
│ │ ├── RealColorRGB.cpp
│ │ ├── RealColorRGB.hpp
│ │ ├── RealEulerAngles2D.cpp
│ │ ├── RealEulerAngles2D.hpp
│ │ ├── RealEulerAngles3D.cpp
│ │ ├── RealEulerAngles3D.hpp
│ │ ├── RealMatrix3x3.cpp
│ │ ├── RealMatrix3x3.hpp
│ │ ├── RealMatrix4x3.cpp
│ │ ├── RealMatrix4x3.hpp
│ │ ├── RealOrientation3D.cpp
│ │ ├── RealOrientation3D.hpp
│ │ ├── RealPlane2D.cpp
│ │ ├── RealPlane2D.hpp
│ │ ├── RealPlane3D.cpp
│ │ ├── RealPlane3D.hpp
│ │ ├── RealPoint2D.cpp
│ │ ├── RealPoint2D.hpp
│ │ ├── RealPoint3D.cpp
│ │ ├── RealPoint3D.hpp
│ │ ├── RealQuaternion.cpp
│ │ ├── RealQuaternion.hpp
│ │ ├── RealRectangle2D.cpp
│ │ ├── RealRectangle2D.hpp
│ │ ├── RealRectangle3D.cpp
│ │ ├── RealRectangle3D.hpp
│ │ ├── RealVector2D.cpp
│ │ ├── RealVector2D.hpp
│ │ ├── RealVector3D.cpp
│ │ ├── RealVector3D.hpp
│ │ ├── Rectangle2D.cpp
│ │ └── Rectangle2D.hpp
│ ├── Memory
│ │ ├── GlobalMemoryMap.cpp
│ │ └── GlobalMemoryMap.hpp
│ ├── Network
│ │ ├── Session.cpp
│ │ └── Session.hpp
│ ├── Objects
│ │ ├── ObjectData.hpp
│ │ └── ObjectType.hpp
│ ├── Sounds
│ │ └── Noise.hpp
│ ├── Tags
│ │ ├── Game
│ │ │ ├── CacheFileGlobalTags.hpp
│ │ │ ├── Globals.hpp
│ │ │ ├── MultiplayerGlobals.hpp
│ │ │ └── VFilesList.hpp
│ │ ├── Items
│ │ │ ├── Item.hpp
│ │ │ └── Weapon.hpp
│ │ ├── Objects
│ │ │ └── Object.hpp
│ │ ├── Scenario
│ │ │ └── Scenario.hpp
│ │ ├── Tag.cpp
│ │ ├── Tag.hpp
│ │ ├── TagBlock.hpp
│ │ ├── TagData.hpp
│ │ ├── TagInstance.hpp
│ │ ├── TagReference.hpp
│ │ └── UserInterface
│ │ │ ├── ChudDefinition.hpp
│ │ │ └── ChudGlobalsDefinition.hpp
│ └── Text
│ │ ├── StringID.cpp
│ │ └── StringID.hpp
│ ├── Camera.cpp
│ ├── Camera.hpp
│ ├── Engine.cpp
│ ├── Engine.hpp
│ ├── EngineImpl.cpp
│ ├── EngineImpl.hpp
│ ├── Forge.cpp
│ ├── Forge.hpp
│ ├── Game
│ ├── Audio
│ │ ├── AudioImpl.cpp
│ │ ├── AudioImpl.hpp
│ │ ├── Hooks.cpp
│ │ └── Hooks.hpp
│ ├── Cache
│ │ ├── StringIdCache.cpp
│ │ └── StringIdCache.hpp
│ ├── Input
│ │ ├── InputImpl.cpp
│ │ └── InputImpl.hpp
│ ├── Networking
│ │ ├── Hooks.cpp
│ │ ├── Hooks.hpp
│ │ ├── NetworkingImpl.cpp
│ │ ├── NetworkingImpl.hpp
│ │ ├── XnAddr.hpp
│ │ ├── XnKey.hpp
│ │ └── XnKid.hpp
│ ├── Players
│ │ ├── Hooks.cpp
│ │ ├── Hooks.hpp
│ │ ├── PlayerArmorExtension.cpp
│ │ ├── PlayerArmorExtension.hpp
│ │ ├── PlayerImpl.cpp
│ │ ├── PlayerImpl.hpp
│ │ ├── PlayerPropertiesExtender.cpp
│ │ ├── PlayerPropertiesExtender.hpp
│ │ ├── PlayerPropertiesExtension.hpp
│ │ └── PlayerPropertiesExtensionBase.hpp
│ └── UI
│ │ ├── Hooks.cpp
│ │ ├── Hooks.hpp
│ │ ├── UIImpl.cpp
│ │ └── UIImpl.hpp
│ ├── GameImpl.cpp
│ ├── GameImpl.hpp
│ ├── Globals.cpp
│ ├── Graphics.cpp
│ ├── Graphics.hpp
│ ├── Hooking
│ └── Hooking.hpp
│ ├── Input.cpp
│ ├── Input.hpp
│ ├── Network.cpp
│ ├── Network.hpp
│ ├── Player.cpp
│ ├── Player.hpp
│ ├── UserInterface.cpp
│ └── UserInterface.hpp
├── LICENSE
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | build/
21 | bld/
22 | [Bb]in/
23 | [Oo]bj/
24 |
25 | # Visual Studo 2015 cache/options directory
26 | .vs/
27 |
28 | # MSTest test Results
29 | [Tt]est[Rr]esult*/
30 | [Bb]uild[Ll]og.*
31 |
32 | # NUNIT
33 | *.VisualState.xml
34 | TestResult.xml
35 |
36 | # Build Results of an ATL Project
37 | [Dd]ebugPS/
38 | [Rr]eleasePS/
39 | dlldata.c
40 |
41 | *_i.c
42 | *_p.c
43 | *_i.h
44 | *.ilk
45 | *.meta
46 | *.obj
47 | *.pch
48 | *.pdb
49 | *.pgc
50 | *.pgd
51 | *.rsp
52 | *.sbr
53 | *.tlb
54 | *.tli
55 | *.tlh
56 | *.tmp
57 | *.tmp_proj
58 | *.log
59 | *.vspscc
60 | *.vssscc
61 | .builds
62 | *.pidb
63 | *.svclog
64 | *.scc
65 |
66 | # Chutzpah Test files
67 | _Chutzpah*
68 |
69 | # Visual C++ cache files
70 | ipch/
71 | *.aps
72 | *.ncb
73 | *.opensdf
74 | *.sdf
75 | *.cachefile
76 | *.db
77 | *.opendb
78 |
79 | # Visual Studio profiler
80 | *.psess
81 | *.vsp
82 | *.vspx
83 |
84 | # TFS 2012 Local Workspace
85 | $tf/
86 |
87 | # Guidance Automation Toolkit
88 | *.gpState
89 |
90 | # ReSharper is a .NET coding add-in
91 | _ReSharper*/
92 | *.[Rr]e[Ss]harper
93 | *.DotSettings.user
94 |
95 | # JustCode is a .NET coding addin-in
96 | .JustCode
97 |
98 | # TeamCity is a build add-in
99 | _TeamCity*
100 |
101 | # DotCover is a Code Coverage Tool
102 | *.dotCover
103 |
104 | # NCrunch
105 | _NCrunch_*
106 | .*crunch*.local.xml
107 |
108 | # MightyMoose
109 | *.mm.*
110 | AutoTest.Net/
111 |
112 | # Web workbench (sass)
113 | .sass-cache/
114 |
115 | # Installshield output folder
116 | [Ee]xpress/
117 |
118 | # DocProject is a documentation generator add-in
119 | DocProject/buildhelp/
120 | DocProject/Help/*.HxT
121 | DocProject/Help/*.HxC
122 | DocProject/Help/*.hhc
123 | DocProject/Help/*.hhk
124 | DocProject/Help/*.hhp
125 | DocProject/Help/Html2
126 | DocProject/Help/html
127 |
128 | # Click-Once directory
129 | publish/
130 |
131 | # Publish Web Output
132 | *.[Pp]ublish.xml
133 | *.azurePubxml
134 | # TODO: Comment the next line if you want to checkin your web deploy settings
135 | # but database connection strings (with potential passwords) will be unencrypted
136 | *.pubxml
137 | *.publishproj
138 |
139 | # NuGet Packages
140 | *.nupkg
141 | # The packages folder can be ignored because of Package Restore
142 | **/packages/*
143 | # except build/, which is used as an MSBuild target.
144 | !**/packages/build/
145 | # Uncomment if necessary however generally it will be regenerated when needed
146 | #!**/packages/repositories.config
147 |
148 | # Windows Azure Build Output
149 | csx/
150 | *.build.csdef
151 |
152 | # Windows Store app package directory
153 | AppPackages/
154 |
155 | # Others
156 | *.[Cc]ache
157 | ClientBin/
158 | [Ss]tyle[Cc]op.*
159 | ~$*
160 | *~
161 | *.dbmdl
162 | *.dbproj.schemaview
163 | *.pfx
164 | *.publishsettings
165 | node_modules/
166 | bower_components/
167 |
168 | # RIA/Silverlight projects
169 | Generated_Code/
170 |
171 | # Backup & report files from converting an old project file
172 | # to a newer Visual Studio version. Backup files are not needed,
173 | # because we have git ;-)
174 | _UpgradeReport_Files/
175 | Backup*/
176 | UpgradeLog*.XML
177 | UpgradeLog*.htm
178 |
179 | # SQL Server files
180 | *.mdf
181 | *.ldf
182 |
183 | # Business Intelligence projects
184 | *.rdl.data
185 | *.bim.layout
186 | *.bim_*.settings
187 |
188 | # Microsoft Fakes
189 | FakesAssemblies/
190 |
191 | # Node.js Tools for Visual Studio
192 | .ntvs_analysis.dat
193 |
194 | # Visual Studio 6 build log
195 | *.plg
196 |
197 | # Visual Studio 6 workspace options file
198 | *.opt
199 |
200 | # Except our library directory
201 | !/AnvilCommon/Depends/Library/**
202 |
--------------------------------------------------------------------------------
/AnvilAusar/AnvilAusar.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/AnvilAusar/Source/EngineImpl.cpp:
--------------------------------------------------------------------------------
1 | #include "EngineImpl.hpp"
2 | #include
3 | #include
4 | #include
5 |
6 | #include
7 |
8 | using namespace AnvilAusar;
9 |
10 | bool EngineImpl::Init()
11 | {
12 | if (!InitializeDirectories())
13 | return false;
14 |
15 | return true;
16 | }
17 |
18 | bool EngineImpl::InitializeDirectories()
19 | {
20 | PWSTR s_LocalAppDataPath = nullptr;
21 |
22 | if (SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, nullptr, &s_LocalAppDataPath) != S_OK)
23 | {
24 | WriteLog("There was an error retrieving the local app data path.");
25 | return false;
26 | }
27 |
28 | std::wstring s_Path(s_LocalAppDataPath);
29 |
30 | m_LocalAppDataPath = std::string(s_Path.begin(), s_Path.end());
31 | m_LocalCachePath = m_LocalAppDataPath.substr(0, m_LocalAppDataPath.length() - 3) + "\\LocalCache";
32 |
33 | WriteLog("Local Application Data Path: %s.", m_LocalAppDataPath.c_str());
34 |
35 | return true;
36 | }
37 |
38 | uint8_t* EngineImpl::ExecutableBase()
39 | {
40 | return nullptr;
41 | }
42 |
43 | size_t EngineImpl::ExecutableSize()
44 | {
45 | return 0;
46 | }
47 |
48 | std::shared_ptr EngineImpl::GetStringCache()
49 | {
50 | return nullptr;
51 | }
--------------------------------------------------------------------------------
/AnvilAusar/Source/EngineImpl.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 | namespace AnvilAusar
6 | {
7 | class EngineImpl :
8 | public AnvilCommon::Engine
9 | {
10 | private:
11 | std::string m_LocalAppDataPath;
12 | std::string m_LocalCachePath;
13 |
14 | protected:
15 | bool InitializeDirectories();
16 |
17 | public:
18 | virtual bool Init();
19 |
20 | virtual uint8_t* ExecutableBase();
21 | virtual size_t ExecutableSize();
22 | virtual std::shared_ptr GetStringCache();
23 | };
24 | }
--------------------------------------------------------------------------------
/AnvilAusar/Source/Globals.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | std::string AnvilCommon::g_BuildInfo = "AnvilAusar Client - " + std::string(__DATE__) + " - Build: " + std::to_string(ANVIL_BUILD);
5 |
6 | void* AnvilCommon::Internal_GetThreadStorage(const size_t p_Offset)
7 | {
8 | // TODO: Implement
9 | return nullptr;
10 | }
--------------------------------------------------------------------------------
/AnvilAusar/Source/Hooks/Windows.cpp:
--------------------------------------------------------------------------------
1 | #include "Windows.hpp"
2 | #include
3 | #include
4 | #include
5 |
6 | using namespace AnvilAusar::Hooks;
7 |
8 | bool WindowsHooks::Init()
9 | {
10 | auto s_KernelBaseHandle = GetModuleHandle("KernelBase.dll");
11 | if (!s_KernelBaseHandle)
12 | {
13 | WriteLog("Could not get the handle of kernelbase.");
14 | return false;
15 | }
16 |
17 | auto s_CreateFileW = GetProcAddress(s_KernelBaseHandle, "CreateFileW");
18 |
19 | return false;
20 | }
21 |
22 | /*
23 | ==============================================================================
24 | Hooked Functions
25 | ==============================================================================
26 | */
27 |
28 | void* WindowsHooks::c_CreateFileW(const wchar_t * p_FileName, uint32_t p_Access, void * p_SecurityAttributes, uint32_t p_Creation, uint32_t p_Attributes, void * p_Template)
29 | {
30 | auto s_Ret = o_CreateFileW(p_FileName, p_Access, p_SecurityAttributes, p_Creation, p_Attributes, p_Template);
31 |
32 | WriteLog("[File Access] %S %x.", p_FileName, s_Ret);
33 |
34 | return s_Ret;
35 | }
--------------------------------------------------------------------------------
/AnvilAusar/Source/Hooks/Windows.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 | namespace AnvilAusar::Hooks
6 | {
7 | class WindowsHooks :
8 | public AnvilCommon::Initializable
9 | {
10 | private:
11 | typedef void* (*CreateFileW_t)(const wchar_t* p_FileName, uint32_t p_Access, void* p_SecurityAttributes, uint32_t p_Creation, uint32_t p_Attributes, void* p_Template);
12 | static CreateFileW_t o_CreateFileW;
13 | static void* c_CreateFileW(const wchar_t* p_FileName, uint32_t p_Access, void* p_SecurityAttributes, uint32_t p_Creation, uint32_t p_Attributes, void* p_Template);
14 |
15 | public:
16 | virtual bool Init();
17 | };
18 | }
--------------------------------------------------------------------------------
/AnvilClient.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26228.9
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AnvilClient", "AnvilClient\AnvilClient.vcxproj", "{15EC28EA-8932-40C4-94A9-2C6CA9957F22}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | {F7267A5F-7009-40A3-B523-424279DEF2C7} = {F7267A5F-7009-40A3-B523-424279DEF2C7}
9 | {349E5495-8A3F-4057-B86B-E192663DA85E} = {349E5495-8A3F-4057-B86B-E192663DA85E}
10 | {89774CFE-D1EA-435F-B484-DC092221BE23} = {89774CFE-D1EA-435F-B484-DC092221BE23}
11 | EndProjectSection
12 | EndProject
13 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AnvilCommon", "AnvilCommon\AnvilCommon.vcxproj", "{89774CFE-D1EA-435F-B484-DC092221BE23}"
14 | EndProject
15 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AnvilEldorado", "AnvilEldorado\AnvilEldorado.vcxproj", "{F7267A5F-7009-40A3-B523-424279DEF2C7}"
16 | ProjectSection(ProjectDependencies) = postProject
17 | {89774CFE-D1EA-435F-B484-DC092221BE23} = {89774CFE-D1EA-435F-B484-DC092221BE23}
18 | EndProjectSection
19 | EndProject
20 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AnvilAusar", "AnvilAusar\AnvilAusar.vcxproj", "{349E5495-8A3F-4057-B86B-E192663DA85E}"
21 | EndProject
22 | Global
23 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
24 | Debug|Ausar = Debug|Ausar
25 | Debug|Eldorado = Debug|Eldorado
26 | Release|Ausar = Release|Ausar
27 | Release|Eldorado = Release|Eldorado
28 | EndGlobalSection
29 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
30 | {15EC28EA-8932-40C4-94A9-2C6CA9957F22}.Debug|Ausar.ActiveCfg = Debug|x64
31 | {15EC28EA-8932-40C4-94A9-2C6CA9957F22}.Debug|Ausar.Build.0 = Debug|x64
32 | {15EC28EA-8932-40C4-94A9-2C6CA9957F22}.Debug|Eldorado.ActiveCfg = Debug|Win32
33 | {15EC28EA-8932-40C4-94A9-2C6CA9957F22}.Debug|Eldorado.Build.0 = Debug|Win32
34 | {15EC28EA-8932-40C4-94A9-2C6CA9957F22}.Release|Ausar.ActiveCfg = Release|x64
35 | {15EC28EA-8932-40C4-94A9-2C6CA9957F22}.Release|Ausar.Build.0 = Release|x64
36 | {15EC28EA-8932-40C4-94A9-2C6CA9957F22}.Release|Eldorado.ActiveCfg = Release|Win32
37 | {15EC28EA-8932-40C4-94A9-2C6CA9957F22}.Release|Eldorado.Build.0 = Release|Win32
38 | {89774CFE-D1EA-435F-B484-DC092221BE23}.Debug|Ausar.ActiveCfg = Debug|x64
39 | {89774CFE-D1EA-435F-B484-DC092221BE23}.Debug|Ausar.Build.0 = Debug|x64
40 | {89774CFE-D1EA-435F-B484-DC092221BE23}.Debug|Eldorado.ActiveCfg = Debug|Win32
41 | {89774CFE-D1EA-435F-B484-DC092221BE23}.Debug|Eldorado.Build.0 = Debug|Win32
42 | {89774CFE-D1EA-435F-B484-DC092221BE23}.Release|Ausar.ActiveCfg = Release|x64
43 | {89774CFE-D1EA-435F-B484-DC092221BE23}.Release|Ausar.Build.0 = Release|x64
44 | {89774CFE-D1EA-435F-B484-DC092221BE23}.Release|Eldorado.ActiveCfg = Release|Win32
45 | {89774CFE-D1EA-435F-B484-DC092221BE23}.Release|Eldorado.Build.0 = Release|Win32
46 | {F7267A5F-7009-40A3-B523-424279DEF2C7}.Debug|Ausar.ActiveCfg = Debug|x64
47 | {F7267A5F-7009-40A3-B523-424279DEF2C7}.Debug|Eldorado.ActiveCfg = Debug|Win32
48 | {F7267A5F-7009-40A3-B523-424279DEF2C7}.Debug|Eldorado.Build.0 = Debug|Win32
49 | {F7267A5F-7009-40A3-B523-424279DEF2C7}.Release|Ausar.ActiveCfg = Release|x64
50 | {F7267A5F-7009-40A3-B523-424279DEF2C7}.Release|Eldorado.ActiveCfg = Release|Win32
51 | {F7267A5F-7009-40A3-B523-424279DEF2C7}.Release|Eldorado.Build.0 = Release|Win32
52 | {349E5495-8A3F-4057-B86B-E192663DA85E}.Debug|Ausar.ActiveCfg = Debug|x64
53 | {349E5495-8A3F-4057-B86B-E192663DA85E}.Debug|Ausar.Build.0 = Debug|x64
54 | {349E5495-8A3F-4057-B86B-E192663DA85E}.Debug|Eldorado.ActiveCfg = Debug|Win32
55 | {349E5495-8A3F-4057-B86B-E192663DA85E}.Release|Ausar.ActiveCfg = Release|x64
56 | {349E5495-8A3F-4057-B86B-E192663DA85E}.Release|Ausar.Build.0 = Release|x64
57 | {349E5495-8A3F-4057-B86B-E192663DA85E}.Release|Eldorado.ActiveCfg = Release|Win32
58 | EndGlobalSection
59 | GlobalSection(SolutionProperties) = preSolution
60 | HideSolutionNode = FALSE
61 | EndGlobalSection
62 | EndGlobal
63 |
--------------------------------------------------------------------------------
/AnvilClient/AnvilClient.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/AnvilClient/PreBuild.bat:
--------------------------------------------------------------------------------
1 | FOR /f "usebackq tokens=1,2,3 delims= " %%a IN ("..\AnvilCommon\Source\BuildInfo.hpp") DO (
2 | set /a buildnum = %%c
3 | set /a newbuild = %%c + 1
4 | )
5 |
6 | @echo. > "..\AnvilCommon\Source\BuildInfo.hpp"
7 | @echo #define ANVIL_BUILD %newbuild% > "..\AnvilCommon\Source\BuildInfo.hpp"
--------------------------------------------------------------------------------
/AnvilClient/Source/Client/ClientImpl.cpp:
--------------------------------------------------------------------------------
1 | #include "ClientImpl.hpp"
2 |
3 | #include
4 |
5 | #include
6 | #include
7 | #include
8 |
9 | #include
10 |
11 | using namespace AnvilCommon;
12 | using namespace Anvil::Client;
13 |
14 | #ifdef ANVIL_DEW
15 | #pragma comment(lib, "AnvilEldorado")
16 | #endif
17 |
18 | #ifdef ANVIL_AUSAR
19 | #pragma comment(lib, "AnvilAusar")
20 | #endif
21 |
22 | extern std::shared_ptr GetClientInterface()
23 | {
24 | return ClientImpl::GetInstance();
25 | }
26 |
27 | std::shared_ptr ClientImpl::GetInstance()
28 | {
29 | static auto s_Instance = std::make_shared();
30 | return s_Instance;
31 | }
32 |
33 | bool ClientImpl::Init()
34 | {
35 | // Initialize MinHook
36 | if (MH_Initialize() != MH_OK)
37 | {
38 | WriteLog("Failed to initialize libMinHook.");
39 | return false;
40 | }
41 |
42 | #ifdef ANVIL_DEW
43 | // Initialize Eldorado
44 | m_Engine = std::shared_ptr(new AnvilEldorado::EngineImpl);
45 | #endif
46 |
47 | #ifdef ANVIL_AUSAR
48 | // Initialize Ausar
49 | m_Engine = std::shared_ptr(new AnvilAusar::EngineImpl);
50 | #endif
51 |
52 | if (!m_Engine->Init())
53 | {
54 | WriteLog("Failed to initialize engine.");
55 | return false;
56 | }
57 |
58 | #if defined(_DEBUG) && defined(ANVIL_DEW)
59 | WriteLog("Sleeping for 5s.");
60 | Sleep(15000);
61 | #endif
62 |
63 | Utils::Util::ResumeAllThreads();
64 |
65 | return true;
66 | }
67 |
68 | std::shared_ptr ClientImpl::GetEngine()
69 | {
70 | return m_Engine;
71 | }
--------------------------------------------------------------------------------
/AnvilClient/Source/Client/ClientImpl.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 | namespace Anvil::Client
6 | {
7 | class ClientImpl :
8 | public AnvilCommon::Client
9 | {
10 | private:
11 | std::shared_ptr m_Engine;
12 |
13 | public:
14 | static std::shared_ptr GetInstance();
15 |
16 | virtual bool Init();
17 | virtual std::shared_ptr GetEngine();
18 | };
19 | }
--------------------------------------------------------------------------------
/AnvilClient/Source/Source.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include
5 |
6 | DWORD WINAPI Initialize(LPVOID)
7 | {
8 | // Initialize the logger before anything else
9 | AnvilCommon::Utils::Logger::GetInstance()->Init();
10 |
11 | // Initialize the client, which will in turn initialize Eldorado or Ausar engine's
12 | Anvil::Client::ClientImpl::GetInstance()->Init();
13 |
14 | return 0;
15 | }
16 |
17 | BOOL WINAPI DllMain(HINSTANCE p_Instance, DWORD p_Reason, LPVOID p_Reserved)
18 | {
19 | if (p_Reason == DLL_PROCESS_ATTACH)
20 | CreateThread(nullptr, 0, Initialize, nullptr, 0, nullptr);
21 |
22 | return TRUE;
23 | }
--------------------------------------------------------------------------------
/AnvilCommon/AnvilCommon.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/AnvilCommon/Depends/Library/x64/Debug/libMinHook.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnvilOnline/AnvilClient/9b7751d9583d7221fd9c9f1b864f27e7ff9fcf79/AnvilCommon/Depends/Library/x64/Debug/libMinHook.lib
--------------------------------------------------------------------------------
/AnvilCommon/Depends/Library/x64/Release/libMinHook.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnvilOnline/AnvilClient/9b7751d9583d7221fd9c9f1b864f27e7ff9fcf79/AnvilCommon/Depends/Library/x64/Release/libMinHook.lib
--------------------------------------------------------------------------------
/AnvilCommon/Depends/Library/x86/Debug/libMinHook.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnvilOnline/AnvilClient/9b7751d9583d7221fd9c9f1b864f27e7ff9fcf79/AnvilCommon/Depends/Library/x86/Debug/libMinHook.lib
--------------------------------------------------------------------------------
/AnvilCommon/Depends/Library/x86/Release/libMinHook.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnvilOnline/AnvilClient/9b7751d9583d7221fd9c9f1b864f27e7ff9fcf79/AnvilCommon/Depends/Library/x86/Release/libMinHook.lib
--------------------------------------------------------------------------------
/AnvilCommon/Source/BuildInfo.hpp:
--------------------------------------------------------------------------------
1 | #define ANVIL_BUILD 588
2 |
--------------------------------------------------------------------------------
/AnvilCommon/Source/Globals.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | namespace AnvilCommon
5 | {
6 | extern std::string g_BuildInfo;
7 |
8 | extern void *Internal_GetThreadStorage(const size_t p_Offset = 0);
9 | extern void *Internal_GetModuleStorage(const size_t p_Offset = 0);
10 |
11 | template
12 | T *GetThreadStorage(const size_t p_Offset = 0)
13 | {
14 | return *reinterpret_cast(Internal_GetThreadStorage(p_Offset));
15 | }
16 |
17 | template
18 | T *GetModuleStorage(const size_t p_Offset = 0)
19 | {
20 | return *reinterpret_cast(Internal_GetModuleStorage(p_Offset));
21 | }
22 | }
--------------------------------------------------------------------------------
/AnvilCommon/Source/Interfaces/Client.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Initializable.hpp"
3 | #include
4 |
5 | namespace AnvilCommon
6 | {
7 | class Engine;
8 |
9 | class Client :
10 | public AnvilCommon::Initializable
11 | {
12 | public:
13 | virtual std::shared_ptr GetEngine() = 0;
14 | };
15 | }
16 |
17 | extern __declspec(dllexport) std::shared_ptr GetClientInterface();
--------------------------------------------------------------------------------
/AnvilCommon/Source/Interfaces/Engine.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include