Skip to content

Commit 3b9ffba

Browse files
committed
Merge remote-tracking branch 'upstream/xd_dev' into xd_dev
2 parents ad890be + 0165c40 commit 3b9ffba

File tree

10 files changed

+16
-25
lines changed

10 files changed

+16
-25
lines changed

src/Layers/xrRender/ParticleEffect.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ __forceinline void magnitude_sse(Fvector& vec, float& res)
428428
_mm_store_ss((float*)&res, tv);
429429
}
430430

431-
void ParticleRenderStream(void* lpvParams)
431+
void ParticleRenderStream(PRS_PARAMS* pParams)
432432
{
433433
#ifdef _GPA_ENABLED
434434
TAL_SCOPED_TASK_NAMED("ParticleRenderStream()");
@@ -442,8 +442,6 @@ void ParticleRenderStream(void* lpvParams)
442442
// But it must be 0xFFFFFFFF or otherwise some particles won't play
443443
float angle = 0xFFFFFFFF;
444444

445-
PRS_PARAMS* pParams = (PRS_PARAMS*)lpvParams;
446-
447445
FVF::LIT* pv = pParams->pv;
448446
u32 p_from = pParams->p_from;
449447
u32 p_to = pParams->p_to;
@@ -606,7 +604,7 @@ void CParticleEffect::Render(float)
606604
prsParams[i].p_to = (i == (nWorkers - 1)) ? p_cnt : (prsParams[i].p_from + nStep);
607605
prsParams[i].particles = particles;
608606
prsParams[i].pPE = this;
609-
ttapi.threads[i]->addJob([=] { ParticleRenderStream((void*)&prsParams[i]); });
607+
ttapi.threads[i]->addJob([=] { ParticleRenderStream(&prsParams[i]); });
610608
}
611609

612610
ttapi.wait();

src/plugins/Max/Export/Stdafx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <algorithm>
44

55
#include "Common/Common.hpp"
6+
#include "Common/FSMacros.hpp"
67

78
#pragma warning(push)
89
#pragma warning(disable : 4995)
@@ -80,6 +81,5 @@ using std::string;
8081
#endif
8182

8283
#define GAMEMTL_NONE u32(-1)
83-
#define _game_data_ "$game_data$"
8484

8585
#pragma warning(pop)

src/plugins/Max/Material/Stdafx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <algorithm>
44

55
#include "Common/Common.hpp"
6+
#include "Common/FSMacros.hpp"
67

78
#pragma warning(push)
89
#pragma warning(disable : 4995)
@@ -79,6 +80,5 @@ using std::string;
7980
#endif
8081

8182
#define GAMEMTL_NONE u32(-1)
82-
#define _game_data_ "$game_data$"
8383

8484
#pragma warning(pop)

src/plugins/Maya/Export/Stdafx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <algorithm>
44

55
#include "Common/Common.hpp"
6+
#include "Common/FSMacros.hpp"
67

78
#define ENGINE_API
89
#include "xrCore/xrCore.h"
@@ -129,6 +130,5 @@ using AStringVec = xr_vector<xr_string>;
129130
#endif
130131

131132
#define GAMEMTL_NONE u32(-1)
132-
#define _game_data_ "$game_data$"
133133

134134
#pragma comment(lib, "d3dx9.lib")

src/plugins/Maya/Material/Stdafx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#include "Common/Common.hpp"
4+
#include "Common/FSMacros.hpp"
45

56
#include "xrCore/xrCore.h"
67

@@ -106,4 +107,3 @@ using AStringVec = xr_vector<std::string>;
106107
#endif
107108

108109
#define GAMEMTL_NONE u32(-1)
109-
#define _game_data_ "$game_data$"

src/plugins/lw/Export/stdafx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#include "Common/Common.hpp"
4+
#include "Common/FSMacros.hpp"
45

56
#include "xrCore/xrCore.h"
67

@@ -63,4 +64,3 @@ using AStringVec = xr_vector<std::string>;
6364
#endif
6465

6566
#define GAMEMTL_NONE u32(-1)
66-
#define _game_data_ "$game_data$"

src/plugins/lw/Shader/stdafx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#include "Common/Common.hpp"
4+
#include "Common/FSMacros.hpp"
45

56
#include "xrCore/xrCore.h"
67
#include "xrCore/_std_extensions.h"
@@ -57,4 +58,3 @@ using AStringVec = xr_vector<std::string>;
5758
#endif
5859

5960
#define GAMEMTL_NONE u32(-1)
60-
#define _game_data_ "$game_data$"

src/xrCDB/ISpatial.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,13 @@ class ISpatial_NODE
157157
bool _empty()
158158
{
159159
return items.empty() &&
160-
0 == (intptr_t(children[0]) | intptr_t(children[1]) | intptr_t(children[2]) | intptr_t(children[3]) | intptr_t(children[4]) |
161-
intptr_t(children[5]) | intptr_t(children[6]) | intptr_t(children[7]));
160+
0 == (uintptr_t(children[0]) | uintptr_t(children[1]) |
161+
uintptr_t(children[2]) | uintptr_t(children[3]) |
162+
uintptr_t(children[4]) | uintptr_t(children[5]) |
163+
uintptr_t(children[6]) | uintptr_t(children[7]));
162164
}
163165
};
164-
////////////
165166

166-
// template <class T, int granularity>
167-
// class poolSS;
168-
#ifndef DLL_API
169-
#define DLL_API XR_IMPORT
170-
#endif // #ifndef DLL_API
171-
172-
//////////////////////////////////////////////////////////////////////////
173167
class XRCDB_API ISpatial_DB : private Noncopyable
174168
{
175169
public:

src/xrParticles/particle_actions_collection.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ struct TES_PARAMS
16571657
float magnitude;
16581658
};
16591659

1660-
void PATurbulenceExecuteStream(LPVOID lpvParams)
1660+
void PATurbulenceExecuteStream(TES_PARAMS* pParams)
16611661
{
16621662
#ifdef _GPA_ENABLED
16631663
TAL_SCOPED_TASK_NAMED("PATurbulenceExecuteStream()");
@@ -1671,8 +1671,6 @@ void PATurbulenceExecuteStream(LPVOID lpvParams)
16711671
pVector vY;
16721672
pVector vZ;
16731673

1674-
TES_PARAMS* pParams = (TES_PARAMS*)lpvParams;
1675-
16761674
u32 p_from = pParams->p_from;
16771675
u32 p_to = pParams->p_to;
16781676
ParticleEffect* effect = pParams->effect;
@@ -1781,7 +1779,7 @@ void PATurbulence::Execute(ParticleEffect* effect, const float dt, float& tm_max
17811779
tesParams[i].frequency = frequency;
17821780
tesParams[i].octaves = octaves;
17831781
tesParams[i].magnitude = magnitude;
1784-
ttapi.threads[i]->addJob([=] { PATurbulenceExecuteStream((void*)&tesParams[i]); });
1782+
ttapi.threads[i]->addJob([=] { PATurbulenceExecuteStream(&tesParams[i]); });
17851783
}
17861784

17871785
ttapi.wait();

src/xrServerEntities/xrServer_Object_Base.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ CInifile& CSE_Abstract::spawn_ini()
160160
if (!m_ini_file)
161161
#pragma warning(push)
162162
#pragma warning(disable : 4238)
163+
// XXX: what a casting mess.. Do we need to use shared_str for m_ini_string?
163164
m_ini_file =
164-
new CInifile(&IReader((void*)(*(m_ini_string)), m_ini_string.size()), FS.get_path("$game_config$")->m_Path);
165+
new CInifile(&IReader((void*)(*(m_ini_string)), m_ini_string.size()), FS.get_path(_game_config_)->m_Path);
165166
#pragma warning(pop)
166167
return (*m_ini_file);
167168
}

0 commit comments

Comments
 (0)