Skip to content

Commit 2a200df

Browse files
Merge pull request #313 from MiranDMC/precompiled_header_updates
Enable precompiled header for all platforms.
2 parents 817755e + cb9a6e3 commit 2a200df

8 files changed

Lines changed: 23 additions & 16 deletions

File tree

plugin_II/game_II/cSampleManager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
#pragma once
88
#include "PluginBase.h"
99

10-
typedef void* HSTREAM;
10+
typedef DWORD HSTREAM;
1111
typedef unsigned int HPROVIDER;
12-
typedef void* H3DPOBJECT;
12+
typedef DWORD H3DPOBJECT;
1313
typedef H3DPOBJECT H3DSAMPLE;
14-
typedef void* HSAMPLE;
15-
typedef void* HDIGDRIVER;
14+
typedef DWORD HSAMPLE;
15+
typedef DWORD HDIGDRIVER;
1616

1717
struct tSample {
1818
int offset;

shared/Audio.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#include "Rage.h"
1717
#endif
1818

19-
#include "CVector.h"
20-
2119
#include "CCamera.h"
2220
#pragma comment(lib, "bass.lib")
2321
// #pragma comment(lib, "bass_fx.lib")

shared/Audio.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
#pragma once
88
#if defined(GTA2) || defined(GTA3) || defined(GTAVC) || defined(GTASA) || defined(GTAIV)
99
#include "PluginBase.h"
10+
#include <CVector.h>
1011
#include "bass/bass.h"
1112
#include <string>
1213

13-
#ifndef GTA2
14-
#include "CMatrix.h"
15-
#endif
16-
1714
namespace plugin {
1815
class BassSampleManager {
1916
public:

shared/RefListUtils.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ struct RefListUtils<RefList<Values...>> {
6161
#elif GTAIV
6262
if (gameid == GAME_CE)
6363
result += "GAME_CE";
64+
#elif GAME_UNREAL
65+
if (true)
66+
result += std::to_string(gameid);
6467
#else
6568
if (gameid == GAME_10EN)
6669
result += "GAME_10EN";

shared/game/CVector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#pragma once
88
#include "PluginBase.h"
99

10-
#ifdef RW
10+
#if defined(RW) || defined(UNREAL)
1111
#include "RenderWare.h"
1212
#else
1313
struct RwV3d

shared/game/CVector2D.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#pragma once
88
#include "PluginBase.h"
99

10-
#ifdef RW
10+
#if defined(RW) || defined(UNREAL)
1111
#include "RenderWare.h"
1212
#else
1313
struct RwV2d

tools/premake/premake5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ function pluginSdkStaticLibProject(projectName, sdkdir, outName, isPluginProject
368368
end
369369

370370
-- precompiled header
371-
if msbuild and (projNameLower == "plugin_iii" or projNameLower == "plugin_vc" or projNameLower == "plugin_sa" or projNameLower == "plugin_iv") then
371+
if msbuild then
372372
pchheader "stdafx.h"
373373
forceincludes "stdafx.h"
374374
pchsource (path.getrelative(path.getabsolute("."), sdkdir .. "/shared/stdafx.cpp"))

tools/premake/stdafx_template.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22

33
#ifdef USE_PCH
4+
#define NO_STRICT // fix minwindef.h
5+
46
#include <algorithm>
57
#include <array>
68
#include <assert.h>
@@ -29,9 +31,16 @@
2931
#include <vector>
3032
#include <windows.h>
3133

32-
#ifdef RW
33-
#include <rwcore.h>
34-
#endif
34+
#ifdef GTA2
35+
// #include "GBH.h" TODO: fix d3dutil.h problems
36+
#elif defined(RW) || defined(UNREAL)
37+
#include "RenderWare.h"
38+
#elif defined(RAGE)
39+
#include "Rage.h"
40+
#endif
3541

42+
#ifndef GTA2 // TODO: fix d3dutil.h problems
3643
GENERATED_LIST
44+
#endif
45+
3746
#endif

0 commit comments

Comments
 (0)