Skip to content

Commit

Permalink
Refactor xrParticles
Browse files Browse the repository at this point in the history
Reformatting and code cleanup
  • Loading branch information
Xottab-DUTY committed Oct 21, 2017
1 parent b266917 commit faeca71
Show file tree
Hide file tree
Showing 18 changed files with 312 additions and 425 deletions.
34 changes: 17 additions & 17 deletions src/editors/ActorEditor/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ __inline float expf(float val) { return ::exp(val); }
#define clMsg Msg

// core
#include <xrCore.h>
#include <xrCore/xrCore.h>

#ifdef _EDITOR
class PropValue;
Expand All @@ -87,32 +87,32 @@ class ListItem;
DEFINE_VECTOR(ListItem*, ListItemsVec, ListItemsIt);
#endif

#include "../../xrCDB/xrCDB.h"
#include "../../xrSound/Sound.h"
#include "../../xrEngine/PSystem.h"
#include "xrCDB/xrCDB.h"
#include "xrSound/Sound.h"
#include "xrParticles/PSystem.h"

// DirectX headers
#include <d3d9.h>
#include <d3dx9.h>
#include "..\..\Layers\xrRender\xrD3dDefs.h"
#include "Layers/xrRender/xrD3dDefs.h"
#include <dinput.h>
#include <dsound.h>

// some user components
#include "../../xrEngine/fmesh.h"
#include "../../xrEngine/_d3d_extensions.h"
#include "xrCore/FMesh.hpp"
#include "Common/_d3d_extensions.h"

#include "../ECore/editor/D3DX_Wrapper.h"
#include "editors/ECore/editor/D3DX_Wrapper.h"

DEFINE_VECTOR(AnsiString, AStringVec, AStringIt);
DEFINE_VECTOR(AnsiString*, LPAStringVec, LPAStringIt);

#include "../../xrServerEntities/xrEProps.h"
#include "../../xrCore/Log.h"
#include "../ECore/editor/engine.h"
#include "../../xrEngine/defines.h"
#include "xrServerEntities/xrEProps.h"
#include "xrCore/log.h"
#include "editors/ECore/editor/engine.h"
#include "xrEngine/defines.h"

#include "../../xrphysics/xrphysics.h"
#include "xrPhysics/xrPhysics.h"

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

#ifdef _EDITOR
#include "../ECore/editor/device.h"
#include "../../xrEngine/properties.h"
#include "../ECore/editor/render.h"
#include "editors/ECore/editor/device.h"
#include "xrEngine/properties.h"
#include "editors/ECore/editor/render.h"
DEFINE_VECTOR(FVF::L, FLvertexVec, FLvertexIt);
DEFINE_VECTOR(FVF::TL, FTLvertexVec, FTLvertexIt);
DEFINE_VECTOR(FVF::LIT, FLITvertexVec, FLITvertexIt);
DEFINE_VECTOR(shared_str, RStrVec, RStrVecIt);

#include "../ECore/editor/EditorPreferences.h"
#include "editors/ECore/editor/EditorPreferences.h"
#endif

#ifdef _LEVEL_EDITOR
Expand Down
2 changes: 1 addition & 1 deletion src/editors/LevelEditor/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ DEFINE_VECTOR(ListItem*, ListItemsVec, ListItemsIt);

#include "xrCDB/xrCDB.h"
#include "xrSound/Sound.h"
#include <xrEngine/PSystem.h>
#include <xrParticles/psystem.h>

// DirectX headers
#include <d3d9.h>
Expand Down
208 changes: 0 additions & 208 deletions src/xrEngine/psystem.h

This file was deleted.

1 change: 0 additions & 1 deletion src/xrEngine/xrEngine.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,6 @@
<ClInclude Include="property_collection.hpp" />
<ClInclude Include="property_collection_forward.hpp" />
<ClInclude Include="property_collection_inline.hpp" />
<ClInclude Include="psystem.h" />
<ClInclude Include="PS_instance.h" />
<ClInclude Include="pure.h" />
<ClInclude Include="pure_relcase.h" />
Expand Down
3 changes: 0 additions & 3 deletions src/xrEngine/xrEngine.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,6 @@
<ClInclude Include="resource.h">
<Filter>General\Resources</Filter>
</ClInclude>
<ClInclude Include="psystem.h">
<Filter>Interfaces</Filter>
</ClInclude>
<ClInclude Include="IInputReceiver.h">
<Filter>Interfaces\Input</Filter>
</ClInclude>
Expand Down
6 changes: 3 additions & 3 deletions src/xrParticles/noise.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#include "stdafx.h"
#pragma hdrstop

#include "noise.h"

#ifndef _EDITOR
#include <xmmintrin.h>

__forceinline int iFloor_SSE(float const x) { return _mm_cvtt_ss2si(_mm_set_ss(x)); }
ICF int iFloor_SSE(float const x) { return _mm_cvtt_ss2si(_mm_set_ss(x)); }
#endif

//==============================================================================
Expand Down Expand Up @@ -59,7 +58,8 @@ void noise3Init()
v[j] = float((rnd % (B + B)) - B) / B;
}
s = DOT(v, v);
} while (s > 1.0);
}
while (s > 1.0);
s = _sqrt(s);
for (j = 0; j < 3; j++)
g[i][j] = v[j] / s;
Expand Down
1 change: 1 addition & 0 deletions src/xrParticles/noise.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
#ifndef noiseH
#define noiseH

Expand Down
2 changes: 0 additions & 2 deletions src/xrParticles/particle_actions.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//---------------------------------------------------------------------------
#include "stdafx.h"
#pragma hdrstop

#include "particle_actions.h"
Loading

0 comments on commit faeca71

Please sign in to comment.