Skip to content

Commit 23d96af

Browse files
committed
xrRender: replace \\ to DELIMITER macro
xrCore: fir wrong replacement to DELIMITER
1 parent 76d8518 commit 23d96af

25 files changed

+146
-146
lines changed

src/Layers/xrRenderPC_R1/Blender_Vertex_aref.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void CBlender_Vertex_aref::Compile(CBlender_Compile& C)
145145
{
146146
C.r_Pass(tsv_spot, tsp_spot, FALSE, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE, TRUE, oAREF.value);
147147
C.r_Sampler("s_base", C.L_textures[0]);
148-
C.r_Sampler_clf("s_lmap", "internal\\internal_light_att", true);
148+
C.r_Sampler_clf("s_lmap", "internal" DELIMITER "internal_light_att", true);
149149
C.r_Sampler_clf("s_att", TEX_SPOT_ATT);
150150
if (C.bDetail_Diffuse)
151151
C.r_Sampler("s_detail", C.detail_texture);

src/Layers/xrRenderPC_R1/Blender_default_aref.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void CBlender_default_aref::Compile(CBlender_Compile& C)
146146
{
147147
C.r_Pass(tsv_spot, tsp_spot, FALSE, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE, TRUE, oAREF.value);
148148
C.r_Sampler("s_base", C.L_textures[0]);
149-
C.r_Sampler_clf("s_lmap", "internal\\internal_light_att", true);
149+
C.r_Sampler_clf("s_lmap", "internal" DELIMITER "internal_light_att", true);
150150
C.r_Sampler_clf("s_att", TEX_SPOT_ATT);
151151
if (C.bDetail_Diffuse)
152152
C.r_Sampler("s_detail", C.detail_texture);

src/Layers/xrRenderPC_R1/FStaticRender.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
783783
ID3DXBuffer* disasm = nullptr;
784784
D3DXDisassembleShader(LPDWORD(buffer), FALSE, nullptr, &disasm);
785785
string_path dname;
786-
strconcat(sizeof(dname), dname, "disasm\\", file_name, ('v' == pTarget[0]) ? ".vs" : ".ps");
786+
strconcat(sizeof(dname), dname, "disasm" DELIMITER "", file_name, ('v' == pTarget[0]) ? ".vs" : ".ps");
787787
IWriter* W = FS.w_open("$logs$", dname);
788788
W->w(disasm->GetBufferPointer(), disasm->GetBufferSize());
789789
FS.w_close(W);
@@ -797,10 +797,10 @@ inline HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
797797
{
798798
if (pTarget[0] == 'p')
799799
return create_shader(pTarget, buffer, buffer_size, file_name, (SPS*&)result, disasm);
800-
800+
801801
if (pTarget[0] == 'v')
802802
return create_shader(pTarget, buffer, buffer_size, file_name, (SVS*&)result, disasm);
803-
803+
804804
NODEFAULT;
805805
return E_FAIL;
806806
}
@@ -932,7 +932,7 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData
932932
HRESULT _result = E_FAIL;
933933

934934
string_path folder_name, folder;
935-
xr_strcpy(folder, "r1\\objects\\r1\\");
935+
xr_strcpy(folder, "r1" DELIMITER "objects" DELIMITER "r1" DELIMITER "");
936936
xr_strcat(folder, name);
937937
xr_strcat(folder, ".");
938938

@@ -941,7 +941,7 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData
941941
xr_strcat(folder, extension);
942942

943943
FS.update_path(folder_name, "$game_shaders$", folder);
944-
xr_strcat(folder_name, "\\");
944+
xr_strcat(folder_name, "" DELIMITER "");
945945

946946
m_file_set.clear();
947947
FS.file_list(m_file_set, folder_name, FS_ListFiles | FS_RootOnly, "*");
@@ -950,11 +950,11 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData
950950
if (!match_shader_id(name, sh_name, m_file_set, temp_file_name))
951951
{
952952
string_path file;
953-
xr_strcpy(file, "shaders_cache\\r1\\");
953+
xr_strcpy(file, "shaders_cache" DELIMITER "r1" DELIMITER "");
954954
xr_strcat(file, name);
955955
xr_strcat(file, ".");
956956
xr_strcat(file, extension);
957-
xr_strcat(file, "\\");
957+
xr_strcat(file, "" DELIMITER "");
958958
xr_strcat(file, sh_name);
959959
FS.update_path(file_name, "$app_data_root$", file);
960960
}
@@ -1038,8 +1038,8 @@ static inline bool match_shader_id(
10381038
LPCSTR const debug_shader_id, LPCSTR const full_shader_id, FS_FileSet const& file_set, string_path& result)
10391039
{
10401040
#if 1
1041-
strcpy_s ( result, "" );
1042-
return false;
1041+
strcpy_s ( result, "" );
1042+
return false;
10431043
#else // #if 1
10441044
#ifdef DEBUG
10451045
LPCSTR temp = "";

src/Layers/xrRenderPC_R1/FStaticRender.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class CRender : public D3DXRenderBase
121121

122122
// Information
123123
virtual void DumpStatistics(class IGameFont& font, class IPerformanceAlert* alert) override;
124-
virtual LPCSTR getShaderPath() override { return "r1\\"; }
124+
virtual LPCSTR getShaderPath() override { return "r1" DELIMITER ""; }
125125
virtual ref_shader getShader(int id);
126126
virtual IRender_Sector* getSector(int id) override;
127127
virtual IRenderVisual* getVisual(int id) override;

src/Layers/xrRenderPC_R1/GlowManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void CGlow::set_radius(float R)
6868
radius = R;
6969
spatial_move();
7070
};
71-
void CGlow::set_texture(LPCSTR name) { shader.create("effects\\glow", name); }
71+
void CGlow::set_texture(LPCSTR name) { shader.create("effects" DELIMITER "glow", name); }
7272
void CGlow::set_color(const Fcolor& C) { color = C; }
7373
void CGlow::set_color(float r, float g, float b) { color.set(r, g, b, 1); }
7474
void CGlow::spatial_move()

src/Layers/xrRenderPC_R1/LightShadows.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ CLightShadows::CLightShadows() : xrc("LightShadows")
4444
//
4545
RT.create(RTname, S_rt_size, S_rt_size, S_rtf);
4646
RT_temp.create(RTtemp, S_rt_size, S_rt_size, S_rtf);
47-
sh_World.create("effects\\shadow_world", RTname);
47+
sh_World.create("effects" DELIMITER "shadow_world", RTname);
4848
geom_World.create(FVF::F_LIT, RCache.Vertex.Buffer(), nullptr);
4949
sh_BlurTR.create("blur4", RTtemp2);
5050
sh_BlurRT.create("blur4", RTname2);
5151
geom_Blur.create(FVF::F_TL4uv, RCache.Vertex.Buffer(), RCache.QuadIB);
5252

5353
// Debug
54-
sh_Screen.create("effects\\screen_set", RTname);
54+
sh_Screen.create("effects" DELIMITER "screen_set", RTname);
5555
geom_Screen.create(FVF::F_TL, RCache.Vertex.Buffer(), RCache.QuadIB);
5656
}
5757

src/Layers/xrRenderPC_R1/stdafx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@
3939
#include "FStaticRender.h"
4040
#endif
4141

42-
#define TEX_POINT_ATT "internal\\internal_light_attpoint"
43-
#define TEX_SPOT_ATT "internal\\internal_light_attclip"
42+
#define TEX_POINT_ATT "internal" DELIMITER "internal_light_attpoint"
43+
#define TEX_SPOT_ATT "internal" DELIMITER "internal_light_attclip"

src/Layers/xrRenderPC_R2/r2.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
653653
ID3DXBuffer* disasm = nullptr;
654654
D3DXDisassembleShader(LPDWORD(buffer), FALSE, nullptr, &disasm);
655655
string_path dname;
656-
strconcat(sizeof(dname), dname, "disasm\\", file_name, ('v' == pTarget[0]) ? ".vs" : ".ps");
656+
strconcat(sizeof(dname), dname, "disasm" DELIMITER "", file_name, ('v' == pTarget[0]) ? ".vs" : ".ps");
657657
IWriter* W = FS.w_open("$logs$", dname);
658658
W->w(disasm->GetBufferPointer(), disasm->GetBufferSize());
659659
FS.w_close(W);
@@ -667,7 +667,7 @@ inline HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
667667
{
668668
if (pTarget[0] == 'p')
669669
return create_shader(pTarget, buffer, buffer_size, file_name, (SPS*&)result, disasm);
670-
670+
671671
if (pTarget[0] == 'v')
672672
return create_shader(pTarget, buffer, buffer_size, file_name, (SVS*&)result, disasm);
673673

@@ -1066,7 +1066,7 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData
10661066
HRESULT _result = E_FAIL;
10671067

10681068
string_path folder_name, folder;
1069-
xr_strcpy(folder, "r2\\objects\\r2\\");
1069+
xr_strcpy(folder, "r2" DELIMITER "objects" DELIMITER "r2" DELIMITER "");
10701070
xr_strcat(folder, name);
10711071
xr_strcat(folder, ".");
10721072

@@ -1075,7 +1075,7 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData
10751075
xr_strcat(folder, extension);
10761076

10771077
FS.update_path(folder_name, "$game_shaders$", folder);
1078-
xr_strcat(folder_name, "\\");
1078+
xr_strcat(folder_name, "" DELIMITER "");
10791079

10801080
m_file_set.clear();
10811081
FS.file_list(m_file_set, folder_name, FS_ListFiles | FS_RootOnly, "*");
@@ -1084,11 +1084,11 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData
10841084
if (!match_shader_id(name, sh_name, m_file_set, temp_file_name))
10851085
{
10861086
string_path file;
1087-
xr_strcpy(file, "shaders_cache\\r2\\");
1087+
xr_strcpy(file, "shaders_cache" DELIMITER "r2" DELIMITER "");
10881088
xr_strcat(file, name);
10891089
xr_strcat(file, ".");
10901090
xr_strcat(file, extension);
1091-
xr_strcat(file, "\\");
1091+
xr_strcat(file, "" DELIMITER "");
10921092
xr_strcat(file, sh_name);
10931093
FS.update_path(file_name, "$app_data_root$", file);
10941094
}
@@ -1180,8 +1180,8 @@ static inline bool match_shader_id(
11801180
LPCSTR const debug_shader_id, LPCSTR const full_shader_id, FS_FileSet const& file_set, string_path& result)
11811181
{
11821182
#if 1
1183-
strcpy_s ( result, "" );
1184-
return false;
1183+
strcpy_s ( result, "" );
1184+
return false;
11851185
#else // #if 1
11861186
#ifdef DEBUG
11871187
LPCSTR temp = "";

src/Layers/xrRenderPC_R2/r2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class CRender : public D3DXRenderBase
250250

251251
// Information
252252
virtual void DumpStatistics(class IGameFont& font, class IPerformanceAlert* alert) override;
253-
virtual LPCSTR getShaderPath() { return "r2\\"; }
253+
virtual LPCSTR getShaderPath() { return "r2" DELIMITER ""; }
254254
virtual ref_shader getShader(int id);
255255
virtual IRender_Sector* getSector(int id);
256256
virtual IRenderVisual* getVisual(int id);

src/Layers/xrRenderPC_R2/r2_rendertarget.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ CRenderTarget::CRenderTarget()
268268
}
269269

270270
// OCCLUSION
271-
s_occq.create(b_occq, "r2\\occq");
271+
s_occq.create(b_occq, "r2" DELIMITER "occq");
272272

273273
// DIRECT (spot)
274274
D3DFORMAT depth_format = (D3DFORMAT)RImplementation.o.HW_smap_FORMAT;
@@ -283,9 +283,9 @@ CRenderTarget::CRenderTarget()
283283
rt_smap_depth.create(r2_RT_smap_depth, size, size, depth_format);
284284
rt_smap_surf.create(r2_RT_smap_surf, size, size, nullrt);
285285
rt_smap_ZB = NULL;
286-
s_accum_mask.create(b_accum_mask, "r2\\accum_mask");
287-
s_accum_direct.create(b_accum_direct, "r2\\accum_direct");
288-
s_accum_direct_cascade.create(b_accum_direct_cascade, "r2\\accum_direct_cascade");
286+
s_accum_mask.create(b_accum_mask, "r2" DELIMITER "accum_mask");
287+
s_accum_direct.create(b_accum_direct, "r2" DELIMITER "accum_direct");
288+
s_accum_direct_cascade.create(b_accum_direct_cascade, "r2" DELIMITER "accum_direct_cascade");
289289
if (RImplementation.o.advancedpp)
290290
{
291291
s_accum_direct_volumetric.create("accum_volumetric_sun");
@@ -299,9 +299,9 @@ CRenderTarget::CRenderTarget()
299299
rt_smap_depth = NULL;
300300
R_CHK(HW.pDevice->CreateDepthStencilSurface(
301301
size, size, D3DFMT_D24X8, D3DMULTISAMPLE_NONE, 0, TRUE, &rt_smap_ZB, NULL));
302-
s_accum_mask.create(b_accum_mask, "r2\\accum_mask");
303-
s_accum_direct.create(b_accum_direct, "r2\\accum_direct");
304-
s_accum_direct_cascade.create(b_accum_direct_cascade, "r2\\accum_direct_cascade");
302+
s_accum_mask.create(b_accum_mask, "r2" DELIMITER "accum_mask");
303+
s_accum_direct.create(b_accum_direct, "r2" DELIMITER "accum_direct");
304+
s_accum_direct_cascade.create(b_accum_direct_cascade, "r2" DELIMITER "accum_direct_cascade");
305305
if (RImplementation.o.advancedpp)
306306
{
307307
s_accum_direct_volumetric.create("accum_volumetric_sun");
@@ -311,7 +311,7 @@ CRenderTarget::CRenderTarget()
311311

312312
// POINT
313313
{
314-
s_accum_point.create(b_accum_point, "r2\\accum_point_s");
314+
s_accum_point.create(b_accum_point, "r2" DELIMITER "accum_point_s");
315315
accum_point_geom_create();
316316
g_accum_point.create(D3DFVF_XYZ, g_accum_point_vb, g_accum_point_ib);
317317
accum_omnip_geom_create();
@@ -320,20 +320,20 @@ CRenderTarget::CRenderTarget()
320320

321321
// SPOT
322322
{
323-
s_accum_spot.create(b_accum_spot, "r2\\accum_spot_s", "lights\\lights_spot01");
323+
s_accum_spot.create(b_accum_spot, "r2" DELIMITER "accum_spot_s", "lights" DELIMITER "lights_spot01");
324324
accum_spot_geom_create();
325325
g_accum_spot.create(D3DFVF_XYZ, g_accum_spot_vb, g_accum_spot_ib);
326326
}
327327

328328
{
329-
s_accum_volume.create("accum_volumetric", "lights\\lights_spot01");
329+
s_accum_volume.create("accum_volumetric", "lights" DELIMITER "lights_spot01");
330330
accum_volumetric_geom_create();
331331
g_accum_volumetric.create(D3DFVF_XYZ, g_accum_volumetric_vb, g_accum_volumetric_ib);
332332
}
333333

334334
// REFLECTED
335335
{
336-
s_accum_reflected.create(b_accum_reflected, "r2\\accum_refl");
336+
s_accum_reflected.create(b_accum_reflected, "r2" DELIMITER "accum_refl");
337337
}
338338

339339
// BLOOM
@@ -349,14 +349,14 @@ CRenderTarget::CRenderTarget()
349349
rt_Bloom_2.create(r2_RT_bloom2, w, h, fmt);
350350
g_bloom_build.create(fvf_build, RCache.Vertex.Buffer(), RCache.QuadIB);
351351
g_bloom_filter.create(fvf_filter, RCache.Vertex.Buffer(), RCache.QuadIB);
352-
s_bloom_dbg_1.create("effects\\screen_set", r2_RT_bloom1);
353-
s_bloom_dbg_2.create("effects\\screen_set", r2_RT_bloom2);
354-
s_bloom.create(b_bloom, "r2\\bloom");
352+
s_bloom_dbg_1.create("effects" DELIMITER "screen_set", r2_RT_bloom1);
353+
s_bloom_dbg_2.create("effects" DELIMITER "screen_set", r2_RT_bloom2);
354+
s_bloom.create(b_bloom, "r2" DELIMITER "bloom");
355355
f_bloom_factor = 0.5f;
356356
}
357357

358358
//FXAA
359-
s_fxaa.create(b_fxaa, "r3\\fxaa");
359+
s_fxaa.create(b_fxaa, "r3" DELIMITER "fxaa");
360360
g_fxaa.create(FVF::F_V, RCache.Vertex.Buffer(), RCache.QuadIB);
361361

362362

@@ -378,22 +378,22 @@ CRenderTarget::CRenderTarget()
378378
D3DFORMAT fmt = HW.Caps.id_vendor == 0x10DE ? D3DFMT_R32F : D3DFMT_R16F;
379379

380380
rt_half_depth.create(r2_RT_half_depth, w, h, fmt);
381-
s_ssao.create(b_ssao, "r2\\ssao");
381+
s_ssao.create(b_ssao, "r2" DELIMITER "ssao");
382382
}
383383

384384
// SSAO
385385
if (RImplementation.o.ssao_blur_on)
386386
{
387387
u32 w = Device.dwWidth, h = Device.dwHeight;
388388
rt_ssao_temp.create(r2_RT_ssao_temp, w, h, D3DFMT_G16R16F);
389-
s_ssao.create(b_ssao, "r2\\ssao");
389+
s_ssao.create(b_ssao, "r2" DELIMITER "ssao");
390390
}
391391

392392
// TONEMAP
393393
{
394394
rt_LUM_64.create(r2_RT_luminance_t64, 64, 64, D3DFMT_A16B16G16R16F);
395395
rt_LUM_8.create(r2_RT_luminance_t8, 8, 8, D3DFMT_A16B16G16R16F);
396-
s_luminance.create(b_luminance, "r2\\luminance");
396+
s_luminance.create(b_luminance, "r2" DELIMITER "luminance");
397397
f_luminance_adapt = 0.5f;
398398

399399
t_LUM_src.create(r2_RT_luminance_src);
@@ -417,11 +417,11 @@ CRenderTarget::CRenderTarget()
417417
{0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos+uv
418418
{0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0},
419419
{0, 20, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, D3DDECL_END()};
420-
s_combine.create(b_combine, "r2\\combine");
420+
s_combine.create(b_combine, "r2" DELIMITER "combine");
421421
s_combine_volumetric.create("combine_volumetric");
422-
s_combine_dbg_0.create("effects\\screen_set", r2_RT_smap_surf);
423-
s_combine_dbg_1.create("effects\\screen_set", r2_RT_luminance_t8);
424-
s_combine_dbg_Accumulator.create("effects\\screen_set", r2_RT_accum);
422+
s_combine_dbg_0.create("effects" DELIMITER "screen_set", r2_RT_smap_surf);
423+
s_combine_dbg_1.create("effects" DELIMITER "screen_set", r2_RT_luminance_t8);
424+
s_combine_dbg_Accumulator.create("effects" DELIMITER "screen_set", r2_RT_accum);
425425
g_combine_VP.create(dwDecl, RCache.Vertex.Buffer(), RCache.QuadIB);
426426
g_combine.create(FVF::F_TL, RCache.Vertex.Buffer(), RCache.QuadIB);
427427
g_combine_2UV.create(FVF::F_TL2uv, RCache.Vertex.Buffer(), RCache.QuadIB);
@@ -510,7 +510,7 @@ CRenderTarget::CRenderTarget()
510510
}
511511
R_CHK(t_material_surf->UnlockBox(0));
512512
// #ifdef DEBUG
513-
// R_CHK (D3DXSaveTextureToFile ("x:\\r2_material.dds",D3DXIFF_DDS,t_material_surf,0));
513+
// R_CHK (D3DXSaveTextureToFile ("x:" DELIMITER "r2_material.dds",D3DXIFF_DDS,t_material_surf,0));
514514
// #endif
515515
}
516516

0 commit comments

Comments
 (0)