Skip to content

Commit 49fd484

Browse files
eagleivgq4a
authored andcommitted
xrRender: portion of fixes linux compile errors, and small refactor
1 parent e108808 commit 49fd484

File tree

6 files changed

+31
-25
lines changed

6 files changed

+31
-25
lines changed

src/Common/PlatformLinux.inl

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,17 @@ typedef enum _D3DTRANSFORMSTATETYPE {
881881
D3DTS_FORCE_DWORD = 0x7fffffff
882882
} D3DTRANSFORMSTATETYPE;
883883

884+
typedef enum _D3DTEXTURETRANSFORMFLAGS {
885+
D3DTTFF_DISABLE = 0,
886+
D3DTTFF_COUNT1 = 1,
887+
D3DTTFF_COUNT2 = 2,
888+
D3DTTFF_COUNT3 = 3,
889+
D3DTTFF_COUNT4 = 4,
890+
D3DTTFF_PROJECTED = 256,
891+
892+
D3DTTFF_FORCE_DWORD = 0x7fffffff
893+
} D3DTEXTURETRANSFORMFLAGS;
894+
884895
#define D3DTS_WORLD D3DTS_WORLDMATRIX(0)
885896
#define D3DTS_WORLD1 D3DTS_WORLDMATRIX(1)
886897
#define D3DTS_WORLD2 D3DTS_WORLDMATRIX(2)
@@ -908,17 +919,6 @@ typedef enum _D3DTRANSFORMSTATETYPE {
908919

909920
#define D3DDECL_END() {0xFF,0,D3DDECLTYPE_UNUSED,0,0,0}
910921

911-
typedef enum _D3DTEXTURETRANSFORMFLAGS {
912-
D3DTTFF_DISABLE = 0,
913-
D3DTTFF_COUNT1 = 1,
914-
D3DTTFF_COUNT2 = 2,
915-
D3DTTFF_COUNT3 = 3,
916-
D3DTTFF_COUNT4 = 4,
917-
D3DTTFF_PROJECTED = 256,
918-
919-
D3DTTFF_FORCE_DWORD = 0x7fffffff
920-
} D3DTEXTURETRANSFORMFLAGS;
921-
922922
#ifndef D3DRECT_DEFINED
923923
typedef struct _D3DRECT {
924924
LONG x1;
@@ -929,5 +929,7 @@ typedef struct _D3DRECT {
929929
#define D3DRECT_DEFINED
930930
#endif
931931

932+
typedef DWORD FOURCC;
933+
932934
inline BOOL SwitchToThread() { return (0 == pthread_yield()); }
933935

src/Layers/xrRender/r__occlusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "stdafx.h"
2-
#include "./r__occlusion.h"
2+
#include "r__occlusion.h"
33

44
#include "QueryHelper.h"
55

src/Layers/xrRenderGL/glHW.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void CHW::ClearDepthStencilView(GLuint pDepthStencilView, UINT ClearFlags, FLOAT
168168
glDepthMask(GL_TRUE);
169169
glClearDepthf(Depth);
170170
}
171-
if (ClearFlags & D3DCLEAR_STENCIL)
171+
if (ClearFlags & D3D_CLEAR_STENCIL)
172172
{
173173
glStencilMask(~0);
174174
glClearStencil(Stencil);

src/Layers/xrRenderGL/glSH_Texture.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "../xrRender/ResourceManager.h"
55

66
#ifndef _EDITOR
7-
#include "../../xrEngine/render.h"
7+
#include "../../xrEngine/Render.h"
88
#endif
99

1010
#include "../../xrEngine/tntQAVI.h"
@@ -301,8 +301,8 @@ void CTexture::Load()
301301
void CTexture::Unload()
302302
{
303303
#ifdef DEBUG
304-
string_path msg_buff;
305-
sprintf_s(msg_buff, sizeof(msg_buff), "* Unloading texture [%s] pSurface ID=%d", cName.c_str(), pSurface);
304+
string_path msg_buff;
305+
sprintf_s(msg_buff, sizeof(msg_buff), "* Unloading texture [%s] pSurface ID=%d", cName.c_str(), pSurface);
306306
#endif // DEBUG
307307

308308
//. if (flags.bLoaded) Msg ("* Unloaded: %s",cName.c_str());

src/Layers/xrRenderPC_GL/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRend
2828
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRender/Texture.cpp")
2929
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRender/SH_Texture.cpp")
3030
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRender/ResourceManager_Resources.cpp")
31+
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRender/xr_effgamma.cpp")
32+
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRender/r__pixel_calculator.cpp")
3133

3234
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRender/stats_manager.h")
35+
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRender/xr_effgamma.h")
36+
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRender/r__pixel_calculator.h")
3337

3438
add_definitions(-DXRLCUTIL_EXPORTS -D_USRDLL -DXRRENDER_GL_EXPORTS -DUSE_OGL -DNO_XR_VDECLARATOR)
3539
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})

src/xrEngine/xr_ioc_cmd.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ENGINE_API CCC_ToggleMask : public IConsole_Command
127127
u32 mask;
128128

129129
public:
130-
CCC_ToggleMask(LPCSTR N, Flags32* V, u32 M) : IConsole_Command(N), value(V), mask(M) { bEmptyArgsHandled = TRUE; };
130+
CCC_ToggleMask(LPCSTR N, Flags32* V, u32 M) : IConsole_Command(N), value(V), mask(M) { bEmptyArgsHandled = TRUE; }
131131
const BOOL GetValue() const { return value->test(mask); }
132132
virtual void Execute(LPCSTR /*args*/)
133133
{
@@ -153,7 +153,7 @@ class ENGINE_API CCC_Token : public IConsole_Command
153153
const xr_token* tokens;
154154

155155
public:
156-
CCC_Token(LPCSTR N, u32* V, const xr_token* T) : IConsole_Command(N), value(V), tokens(T){};
156+
CCC_Token(LPCSTR N, u32* V, const xr_token* T) : IConsole_Command(N), value(V), tokens(T){}
157157

158158
virtual void Execute(LPCSTR args)
159159
{
@@ -239,8 +239,8 @@ class ENGINE_API CCC_Float : public IConsole_Command
239239

240240
public:
241241
CCC_Float(LPCSTR N, float* V, float _min = 0, float _max = 1)
242-
: IConsole_Command(N), value(V), min(_min), max(_max){};
243-
const float GetValue() const { return *value; };
242+
: IConsole_Command(N), value(V), min(_min), max(_max){}
243+
const float GetValue() const { return *value; }
244244
void GetBounds(float& fmin, float& fmax) const
245245
{
246246
fmin = min;
@@ -283,8 +283,8 @@ class ENGINE_API CCC_Vector3 : public IConsole_Command
283283
min.set(_min);
284284
max.set(_max);
285285
};
286-
const Fvector GetValue() const { return *value; };
287-
Fvector* GetValuePtr() const { return value; };
286+
const Fvector GetValue() const { return *value; }
287+
Fvector* GetValuePtr() const { return value; }
288288
virtual void Execute(LPCSTR args)
289289
{
290290
Fvector v;
@@ -327,14 +327,14 @@ class ENGINE_API CCC_Integer : public IConsole_Command
327327
int min, max;
328328

329329
public:
330-
const int GetValue() const { return *value; };
330+
const int GetValue() const { return *value; }
331331
void GetBounds(int& imin, int& imax) const
332332
{
333333
imin = min;
334334
imax = max;
335335
}
336336

337-
CCC_Integer(LPCSTR N, int* V, int _min = 0, int _max = 999) : IConsole_Command(N), value(V), min(_min), max(_max){};
337+
CCC_Integer(LPCSTR N, int* V, int _min = 0, int _max = 999) : IConsole_Command(N), value(V), min(_min), max(_max){}
338338

339339
virtual void Execute(LPCSTR args)
340340
{
@@ -382,7 +382,7 @@ class ENGINE_API CCC_String : public IConsole_Command
382382
class ENGINE_API CCC_LoadCFG : public IConsole_Command
383383
{
384384
public:
385-
virtual bool allow(LPCSTR /*cmd*/) { return true; };
385+
virtual bool allow(LPCSTR /*cmd*/) { return true; }
386386
CCC_LoadCFG(LPCSTR N);
387387
virtual void Execute(LPCSTR args);
388388
};

0 commit comments

Comments
 (0)