Skip to content

Commit faeca71

Browse files
committed
Refactor xrParticles
Reformatting and code cleanup
1 parent b266917 commit faeca71

18 files changed

+312
-425
lines changed

src/editors/ActorEditor/stdafx.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ __inline float expf(float val) { return ::exp(val); }
7676
#define clMsg Msg
7777

7878
// core
79-
#include <xrCore.h>
79+
#include <xrCore/xrCore.h>
8080

8181
#ifdef _EDITOR
8282
class PropValue;
@@ -87,32 +87,32 @@ class ListItem;
8787
DEFINE_VECTOR(ListItem*, ListItemsVec, ListItemsIt);
8888
#endif
8989

90-
#include "../../xrCDB/xrCDB.h"
91-
#include "../../xrSound/Sound.h"
92-
#include "../../xrEngine/PSystem.h"
90+
#include "xrCDB/xrCDB.h"
91+
#include "xrSound/Sound.h"
92+
#include "xrParticles/PSystem.h"
9393

9494
// DirectX headers
9595
#include <d3d9.h>
9696
#include <d3dx9.h>
97-
#include "..\..\Layers\xrRender\xrD3dDefs.h"
97+
#include "Layers/xrRender/xrD3dDefs.h"
9898
#include <dinput.h>
9999
#include <dsound.h>
100100

101101
// some user components
102-
#include "../../xrEngine/fmesh.h"
103-
#include "../../xrEngine/_d3d_extensions.h"
102+
#include "xrCore/FMesh.hpp"
103+
#include "Common/_d3d_extensions.h"
104104

105-
#include "../ECore/editor/D3DX_Wrapper.h"
105+
#include "editors/ECore/editor/D3DX_Wrapper.h"
106106

107107
DEFINE_VECTOR(AnsiString, AStringVec, AStringIt);
108108
DEFINE_VECTOR(AnsiString*, LPAStringVec, LPAStringIt);
109109

110-
#include "../../xrServerEntities/xrEProps.h"
111-
#include "../../xrCore/Log.h"
112-
#include "../ECore/editor/engine.h"
113-
#include "../../xrEngine/defines.h"
110+
#include "xrServerEntities/xrEProps.h"
111+
#include "xrCore/log.h"
112+
#include "editors/ECore/editor/engine.h"
113+
#include "xrEngine/defines.h"
114114

115-
#include "../../xrphysics/xrphysics.h"
115+
#include "xrPhysics/xrPhysics.h"
116116

117117
struct str_pred : public std::binary_function<char*, char*, bool>
118118
{
@@ -137,15 +137,15 @@ struct astr_pred : public std::binary_function<const AnsiString&, const AnsiStri
137137
};
138138

139139
#ifdef _EDITOR
140-
#include "../ECore/editor/device.h"
141-
#include "../../xrEngine/properties.h"
142-
#include "../ECore/editor/render.h"
140+
#include "editors/ECore/editor/device.h"
141+
#include "xrEngine/properties.h"
142+
#include "editors/ECore/editor/render.h"
143143
DEFINE_VECTOR(FVF::L, FLvertexVec, FLvertexIt);
144144
DEFINE_VECTOR(FVF::TL, FTLvertexVec, FTLvertexIt);
145145
DEFINE_VECTOR(FVF::LIT, FLITvertexVec, FLITvertexIt);
146146
DEFINE_VECTOR(shared_str, RStrVec, RStrVecIt);
147147

148-
#include "../ECore/editor/EditorPreferences.h"
148+
#include "editors/ECore/editor/EditorPreferences.h"
149149
#endif
150150

151151
#ifdef _LEVEL_EDITOR

src/editors/LevelEditor/stdafx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ DEFINE_VECTOR(ListItem*, ListItemsVec, ListItemsIt);
9191

9292
#include "xrCDB/xrCDB.h"
9393
#include "xrSound/Sound.h"
94-
#include <xrEngine/PSystem.h>
94+
#include <xrParticles/psystem.h>
9595

9696
// DirectX headers
9797
#include <d3d9.h>

src/xrEngine/psystem.h

Lines changed: 0 additions & 208 deletions
This file was deleted.

src/xrEngine/xrEngine.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,6 @@
805805
<ClInclude Include="property_collection.hpp" />
806806
<ClInclude Include="property_collection_forward.hpp" />
807807
<ClInclude Include="property_collection_inline.hpp" />
808-
<ClInclude Include="psystem.h" />
809808
<ClInclude Include="PS_instance.h" />
810809
<ClInclude Include="pure.h" />
811810
<ClInclude Include="pure_relcase.h" />

src/xrEngine/xrEngine.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,6 @@
255255
<ClInclude Include="resource.h">
256256
<Filter>General\Resources</Filter>
257257
</ClInclude>
258-
<ClInclude Include="psystem.h">
259-
<Filter>Interfaces</Filter>
260-
</ClInclude>
261258
<ClInclude Include="IInputReceiver.h">
262259
<Filter>Interfaces\Input</Filter>
263260
</ClInclude>

src/xrParticles/noise.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#include "stdafx.h"
2-
#pragma hdrstop
32

43
#include "noise.h"
54

65
#ifndef _EDITOR
76
#include <xmmintrin.h>
87

9-
__forceinline int iFloor_SSE(float const x) { return _mm_cvtt_ss2si(_mm_set_ss(x)); }
8+
ICF int iFloor_SSE(float const x) { return _mm_cvtt_ss2si(_mm_set_ss(x)); }
109
#endif
1110

1211
//==============================================================================
@@ -59,7 +58,8 @@ void noise3Init()
5958
v[j] = float((rnd % (B + B)) - B) / B;
6059
}
6160
s = DOT(v, v);
62-
} while (s > 1.0);
61+
}
62+
while (s > 1.0);
6363
s = _sqrt(s);
6464
for (j = 0; j < 3; j++)
6565
g[i][j] = v[j] / s;

src/xrParticles/noise.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#pragma once
12
#ifndef noiseH
23
#define noiseH
34

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//---------------------------------------------------------------------------
21
#include "stdafx.h"
3-
#pragma hdrstop
42

53
#include "particle_actions.h"

0 commit comments

Comments
 (0)