Skip to content

Commit cb29816

Browse files
intorrXottab-DUTY
authored andcommitted
Small code and dependency cleaning for xrAI.
1 parent 810d0ee commit cb29816

File tree

4 files changed

+11
-51
lines changed

4 files changed

+11
-51
lines changed

src/utils/xrAI/StdAfx.h

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
11
#pragma once
22

3+
#define ENGINE_API
4+
#define ECORE_API
5+
#define XR_EPROPS_API
6+
37
#include "Common/Common.hpp"
48
#include "xrCore/xrCore.h"
59

6-
#pragma warning(push)
7-
#pragma warning(disable : 4995)
810
#include <d3dx9.h>
9-
#include <commctrl.h>
10-
#pragma warning(pop)
11-
12-
#define ENGINE_API
13-
#define ECORE_API
14-
#define XR_EPROPS_API
15-
#include "xrCore/clsid.h"
16-
#include "xrCDB/xrCDB.h"
1711
#include "Common/_d3d_extensions.h"
1812

19-
#include <fcntl.h>
20-
#include <sys/types.h>
21-
#include <sys/stat.h>
22-
#include <io.h>
23-
#include <stdio.h>
2413
#include "utils/xrLCUtil/LevelCompilerLoggerWindow.hpp"
2514
#include "utils/xrLCUtil/xrThread.hpp"
2615

@@ -36,8 +25,6 @@ extern CThreadManager::ReportProgressFunc ProxyProgress;
3625
#define READ_IF_EXISTS(ltx, method, section, name, default_value)\
3726
(ltx->line_exist(section, name)) ? ltx->method(section, name) : default_value
3827

39-
#undef THROW
40-
4128
#if XRAY_EXCEPTIONS
4229
IC xr_string string2xr_string(LPCSTR s) { return s ? s : ""; }
4330
#define THROW(xpr)\
@@ -67,6 +54,3 @@ IC xr_string string2xr_string(LPCSTR s) { return s ? s : ""; }
6754
#define THROW2 VERIFY2
6855
#define THROW3 VERIFY3
6956
#endif
70-
71-
//{{AFX_INSERT_LOCATION}}
72-
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

src/utils/xrAI/xrAI.cpp

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
// xrAI.cpp : Defines the entry point for the application.
2-
//
3-
41
#include "stdafx.h"
52
#include "xrCore/xr_ini.h"
6-
#include "process.h"
3+
#include <process.h>
74
#include "xrAI.h"
85

96
#include "xr_graph_merge.h"
@@ -16,17 +13,8 @@
1613

1714
#pragma comment(linker, "/STACK:0x800000,0x400000")
1815

19-
#pragma comment(lib, "comctl32.lib")
20-
#pragma comment(lib, "d3dx9.lib")
21-
#pragma comment(lib, "IMAGEHLP.LIB")
2216
#pragma comment(lib, "winmm.LIB")
23-
#pragma comment(lib, "xrcdb.LIB")
24-
#pragma comment(lib, "MagicFM.LIB")
25-
#pragma comment(lib, "xrCore.LIB")
26-
#pragma comment(lib, "xrLCUtil.lib")
27-
#pragma comment(lib, "xrAICore.lib")
2817

29-
#include "utils/xrLCUtil/LevelCompilerLoggerWindow.hpp"
3018
#include "xrCore/cdecl_cast.hpp"
3119
#include "xrCore/ModuleLookup.hpp"
3220

@@ -49,14 +37,7 @@ CThreadManager::ReportStatusFunc ProxyStatus = cdecl_cast([](const char* format,
4937
CThreadManager::ReportProgressFunc ProxyProgress = cdecl_cast([](float progress) { Logger.Progress(progress); });
5038

5139
extern void xrCompiler(LPCSTR name, bool draft_mode, bool pure_covers, LPCSTR out_name);
52-
extern void test_smooth_path(LPCSTR name);
53-
extern void test_hierarchy(LPCSTR name);
54-
extern void xrConvertMaps();
55-
extern void test_goap();
56-
extern void smart_cover(LPCSTR name);
5740
extern void verify_level_graph(LPCSTR name, bool verbose);
58-
extern void compare_graphs(LPCSTR level_name);
59-
extern void test_levels();
6041

6142
static const char* h_str =
6243
"The following keys are supported / required:\n"
@@ -190,8 +171,6 @@ void Startup(LPSTR lpCmdLine)
190171

191172
#include "factory_api.h"
192173

193-
#include "xrGame/quadtree.h"
194-
195174
Factory_Create* create_entity = 0;
196175
Factory_Destroy* destroy_entity = 0;
197176

@@ -200,10 +179,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
200179
xrDebug::Initialize(false);
201180
Core.Initialize("xrai", 0);
202181

203-
204-
constexpr pcstr g_name = "xrSE_Factory";
205-
Log("Loading DLL:", g_name);
206-
const auto hFactory = std::make_unique<XRay::Module>(g_name);
182+
const auto hFactory = std::make_unique<XRay::Module>("xrSE_Factory");
207183

208184
if (!hFactory->exist())
209185
R_CHK(GetLastError());

src/utils/xrAI/xrAI.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,13 @@
266266
<ProjectReference Include="$(SolutionDir)xrCore\xrCore.vcxproj">
267267
<Project>{a0f7d1fb-59a7-4717-a7e4-96f37e91998e}</Project>
268268
</ProjectReference>
269-
<ProjectReference Include="..\..\..\Externals\MagicFM.vcxproj">
270-
<Project>{848e8ab3-9962-4c04-b813-5690399c8a3e}</Project>
269+
<ProjectReference Include="$(SolutionDir)xrCDB\xrCDB.vcxproj">
270+
<Project>{a19b1df2-82ec-4364-8bdf-85d13a1c89b5}</Project>
271271
</ProjectReference>
272-
<ProjectReference Include="..\xrLCUtil\xrLCUtil.vcxproj">
272+
<ProjectReference Include="$(SolutionDir)Utils\xrLCUtil\xrLCUtil.vcxproj">
273273
<Project>{b90bdc22-a891-4b33-b562-29d701f65dbd}</Project>
274274
</ProjectReference>
275-
<ProjectReference Include="..\xrMiscMath\xrMiscMath.vcxproj">
275+
<ProjectReference Include="$(SolutionDir)Utils\xrMiscMath\xrMiscMath.vcxproj">
276276
<Project>{7885cf3c-ee04-4c67-9467-1fbf9a36b037}</Project>
277277
</ProjectReference>
278278
</ItemGroup>

src/xrServerEntities/xrServer_Objects_ALife.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "restriction_space.h"
1515

1616
#ifdef _MSC_VER
17-
#pragma warning(disable 4100) // unreferenced formal parameter
17+
#pragma warning(disable: 4100) // unreferenced formal parameter
1818
#endif
1919
#ifndef AI_COMPILER
2020
#include "character_info.h"

0 commit comments

Comments
 (0)