Skip to content

Commit 2d234ac

Browse files
committed
xrRender_RX: replaced BOOL with bool
Replaced IDirect3DIndexBuffer9 and IDirect3DVertexBuffer9 with ID3DVertexBuffer and ID3DIndexBuffer.
1 parent 71b5db5 commit 2d234ac

File tree

16 files changed

+74
-74
lines changed

16 files changed

+74
-74
lines changed

src/Layers/xrRender/ResourceManager_Resources.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ void CResourceManager::DBG_VerifyGeoms()
284284
*/
285285
}
286286

287-
SGeometry* CResourceManager::CreateGeom(D3DVERTEXELEMENT9* decl, IDirect3DVertexBuffer9* vb, IDirect3DIndexBuffer9* ib)
287+
SGeometry* CResourceManager::CreateGeom(D3DVERTEXELEMENT9* decl, ID3DVertexBuffer* vb, ID3DIndexBuffer* ib)
288288
{
289289
R_ASSERT(decl && vb);
290290

@@ -308,7 +308,7 @@ SGeometry* CResourceManager::CreateGeom(D3DVERTEXELEMENT9* decl, IDirect3DVertex
308308
v_geoms.push_back(Geom);
309309
return Geom;
310310
}
311-
SGeometry* CResourceManager::CreateGeom(u32 FVF, IDirect3DVertexBuffer9* vb, IDirect3DIndexBuffer9* ib)
311+
SGeometry* CResourceManager::CreateGeom(u32 FVF, ID3DVertexBuffer* vb, ID3DIndexBuffer* ib)
312312
{
313313
D3DVERTEXELEMENT9 dcl[MAX_FVF_DECL_SIZE];
314314
CHK_DX(D3DXDeclaratorFromFVF(FVF, dcl));

src/Layers/xrRenderDX10/dx10R_Backend_Runtime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ ICF void CBackend::set_Vertices(ID3DVertexBuffer* _vb, u32 _vb_stride)
180180
vb_stride = _vb_stride;
181181
// CHK_DX (HW.pDevice->SetStreamSource(0,vb,0,vb_stride));
182182
// UINT StreamNumber,
183-
// IDirect3DVertexBuffer9 * pStreamData,
183+
// ID3DVertexBuffer * pStreamData,
184184
// UINT OffsetInBytes,
185185
// UINT Stride
186186

src/Layers/xrRenderPC_GL/gl_loader.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void CRender::level_Load(IReader* fs)
6060
{
6161
CStreamReader* geom = FS.rs_open("$level$", "level.geom");
6262
R_ASSERT2 (geom, "level.geom");
63-
LoadBuffers(geom,FALSE);
63+
LoadBuffers(geom, false);
6464
LoadSWIs(geom);
6565
FS.r_close(geom);
6666
}
@@ -69,7 +69,7 @@ void CRender::level_Load(IReader* fs)
6969
{
7070
CStreamReader* geom = FS.rs_open("$level$", "level.geomx");
7171
R_ASSERT2 (geom, "level.geomX");
72-
LoadBuffers(geom,TRUE);
72+
LoadBuffers(geom, true);
7373
FS.r_close(geom);
7474
}
7575

@@ -172,15 +172,15 @@ void CRender::level_Unload()
172172
b_loaded = FALSE;
173173
}
174174

175-
void CRender::LoadBuffers(CStreamReader* base_fs, BOOL _alternative)
175+
void CRender::LoadBuffers(CStreamReader* base_fs, bool alternative)
176176
{
177177
R_ASSERT2 (base_fs,"Could not load geometry. File not found.");
178178
Resources->Evict();
179179
// u32 dwUsage = D3DUSAGE_WRITEONLY;
180180

181-
xr_vector<VertexDeclarator>& _DC = _alternative ? xDC : nDC;
182-
xr_vector<GLuint>& _VB = _alternative ? xVB : nVB;
183-
xr_vector<GLuint>& _IB = _alternative ? xIB : nIB;
181+
xr_vector<VertexDeclarator>& _DC = alternative ? xDC : nDC;
182+
xr_vector<GLuint>& _VB = alternative ? xVB : nVB;
183+
xr_vector<GLuint>& _IB = alternative ? xIB : nIB;
184184

185185
// Vertex buffers
186186
{

src/Layers/xrRenderPC_GL/rgl.h

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

189189
private:
190190
// Loading / Unloading
191-
void LoadBuffers(CStreamReader* fs, BOOL _alternative);
191+
void LoadBuffers(CStreamReader* fs, bool alternative);
192192
void LoadVisuals(IReader* fs);
193193
void LoadLights(IReader* fs);
194194
void LoadPortals(IReader* fs);

src/Layers/xrRenderPC_R1/FStaticRender.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,12 @@ D3DVERTEXELEMENT9* CRender::getVB_Format(int id)
255255
VERIFY(id < int(DCL.size()));
256256
return DCL[id].begin();
257257
}
258-
IDirect3DVertexBuffer9* CRender::getVB(int id)
258+
ID3DVertexBuffer* CRender::getVB(int id)
259259
{
260260
VERIFY(id < int(VB.size()));
261261
return VB[id];
262262
}
263-
IDirect3DIndexBuffer9* CRender::getIB(int id)
263+
ID3DIndexBuffer* CRender::getIB(int id)
264264
{
265265
VERIFY(id < int(IB.size()));
266266
return IB[id];

src/Layers/xrRenderPC_R1/FStaticRender.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class CRender : public D3DXRenderBase
5151
xr_vector<ref_shader> Shaders;
5252
typedef svector<D3DVERTEXELEMENT9, MAXD3DDECLLENGTH + 1> VertexDeclarator;
5353
xr_vector<VertexDeclarator> DCL;
54-
xr_vector<IDirect3DVertexBuffer9*> VB;
55-
xr_vector<IDirect3DIndexBuffer9*> IB;
54+
xr_vector<ID3DVertexBuffer*> VB;
55+
xr_vector<ID3DIndexBuffer*> IB;
5656
xr_vector<dxRender_Visual*> Visuals;
5757
CPSLibrary PSLibrary;
5858
CLight_DB Lights;
@@ -92,8 +92,8 @@ class CRender : public D3DXRenderBase
9292
ShaderElement* rimp_select_sh_static(dxRender_Visual* pVisual, float cdist_sq);
9393
ShaderElement* rimp_select_sh_dynamic(dxRender_Visual* pVisual, float cdist_sq);
9494
D3DVERTEXELEMENT9* getVB_Format(int id);
95-
IDirect3DVertexBuffer9* getVB(int id);
96-
IDirect3DIndexBuffer9* getIB(int id);
95+
ID3DVertexBuffer* getVB(int id);
96+
ID3DIndexBuffer* getIB(int id);
9797
FSlideWindowItem* getSWI(int id);
9898
IRender_Portal* getPortal(int id);
9999
IRender_Sector* getSectorActive();

src/Layers/xrRenderPC_R2/r2.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,9 @@ IRenderVisual* CRender::getVisual(int id)
491491
VERIFY(id < int(Visuals.size()));
492492
return Visuals[id];
493493
}
494-
D3DVERTEXELEMENT9* CRender::getVB_Format(int id, BOOL _alt)
494+
D3DVERTEXELEMENT9* CRender::getVB_Format(int id, bool alternative)
495495
{
496-
if (_alt)
496+
if (alternative)
497497
{
498498
VERIFY(id < int(xDC.size()));
499499
return xDC[id].begin();
@@ -504,9 +504,9 @@ D3DVERTEXELEMENT9* CRender::getVB_Format(int id, BOOL _alt)
504504
return nDC[id].begin();
505505
}
506506
}
507-
IDirect3DVertexBuffer9* CRender::getVB(int id, BOOL _alt)
507+
ID3DVertexBuffer* CRender::getVB(int id, bool alternative)
508508
{
509-
if (_alt)
509+
if (alternative)
510510
{
511511
VERIFY(id < int(xVB.size()));
512512
return xVB[id];
@@ -517,9 +517,9 @@ IDirect3DVertexBuffer9* CRender::getVB(int id, BOOL _alt)
517517
return nVB[id];
518518
}
519519
}
520-
IDirect3DIndexBuffer9* CRender::getIB(int id, BOOL _alt)
520+
ID3DIndexBuffer* CRender::getIB(int id, bool alternative)
521521
{
522-
if (_alt)
522+
if (alternative)
523523
{
524524
VERIFY(id < int(xIB.size()));
525525
return xIB[id];

src/Layers/xrRenderPC_R2/r2.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ class CRender : public D3DXRenderBase
118118
xr_vector<ref_shader> Shaders;
119119
typedef svector<D3DVERTEXELEMENT9, MAXD3DDECLLENGTH + 1> VertexDeclarator;
120120
xr_vector<VertexDeclarator> nDC, xDC;
121-
xr_vector<IDirect3DVertexBuffer9 *> nVB, xVB;
122-
xr_vector<IDirect3DIndexBuffer9 *> nIB, xIB;
121+
xr_vector<ID3DVertexBuffer*> nVB, xVB;
122+
xr_vector<ID3DIndexBuffer*> nIB, xIB;
123123
xr_vector<dxRender_Visual*> Visuals;
124124
CPSLibrary PSLibrary;
125125

@@ -153,7 +153,7 @@ class CRender : public D3DXRenderBase
153153

154154
private:
155155
// Loading / Unloading
156-
void LoadBuffers(CStreamReader* fs, BOOL _alternative);
156+
void LoadBuffers(CStreamReader* fs, bool alternative);
157157
void LoadVisuals(IReader* fs);
158158
void LoadLights(IReader* fs);
159159
void LoadPortals(IReader* fs);
@@ -183,9 +183,9 @@ class CRender : public D3DXRenderBase
183183
public:
184184
ShaderElement* rimp_select_sh_static(dxRender_Visual* pVisual, float cdist_sq);
185185
ShaderElement* rimp_select_sh_dynamic(dxRender_Visual* pVisual, float cdist_sq);
186-
D3DVERTEXELEMENT9* getVB_Format(int id, BOOL _alt = FALSE);
187-
IDirect3DVertexBuffer9* getVB(int id, BOOL _alt = FALSE);
188-
IDirect3DIndexBuffer9* getIB(int id, BOOL _alt = FALSE);
186+
D3DVERTEXELEMENT9* getVB_Format(int id, bool alternative = false);
187+
ID3DVertexBuffer* getVB(int id, bool alternative = false);
188+
ID3DIndexBuffer* getIB(int id, bool alternative = false);
189189
FSlideWindowItem* getSWI(int id);
190190
IRender_Portal* getPortal(int id);
191191
IRender_Sector* getSectorActive();

src/Layers/xrRenderPC_R2/r2_loader.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void CRender::level_Load(IReader* fs)
5959
{
6060
CStreamReader* geom = FS.rs_open("$level$", "level.geom");
6161
R_ASSERT2(geom, "level.geom");
62-
LoadBuffers(geom, FALSE);
62+
LoadBuffers(geom, false);
6363
LoadSWIs(geom);
6464
FS.r_close(geom);
6565
}
@@ -68,7 +68,7 @@ void CRender::level_Load(IReader* fs)
6868
{
6969
CStreamReader* geom = FS.rs_open("$level$", "level.geomx");
7070
R_ASSERT2(geom, "level.geomX");
71-
LoadBuffers(geom, TRUE);
71+
LoadBuffers(geom, true);
7272
FS.r_close(geom);
7373
}
7474

@@ -203,15 +203,15 @@ void CRender::level_Unload()
203203
*/
204204
}
205205

206-
void CRender::LoadBuffers(CStreamReader* base_fs, BOOL _alternative)
206+
void CRender::LoadBuffers(CStreamReader* base_fs, bool alternative)
207207
{
208208
R_ASSERT2(base_fs, "Could not load geometry. File not found.");
209209
Resources->Evict();
210210
u32 dwUsage = D3DUSAGE_WRITEONLY;
211211

212-
xr_vector<VertexDeclarator>& _DC = _alternative ? xDC : nDC;
213-
xr_vector<IDirect3DVertexBuffer9*>& _VB = _alternative ? xVB : nVB;
214-
xr_vector<IDirect3DIndexBuffer9*>& _IB = _alternative ? xIB : nIB;
212+
xr_vector<VertexDeclarator>& _DC = alternative ? xDC : nDC;
213+
xr_vector<ID3DVertexBuffer*>& _VB = alternative ? xVB : nVB;
214+
xr_vector<ID3DIndexBuffer*>& _IB = alternative ? xIB : nIB;
215215

216216
// Vertex buffers
217217
{

src/Layers/xrRenderPC_R2/r2_rendertarget.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ class CRenderTarget : public IRender_Target
108108
ref_geom g_accum_omnipart;
109109
ref_geom g_accum_volumetric;
110110

111-
IDirect3DVertexBuffer9* g_accum_point_vb;
112-
IDirect3DIndexBuffer9* g_accum_point_ib;
111+
ID3DVertexBuffer* g_accum_point_vb;
112+
ID3DIndexBuffer* g_accum_point_ib;
113113

114-
IDirect3DVertexBuffer9* g_accum_omnip_vb;
115-
IDirect3DIndexBuffer9* g_accum_omnip_ib;
114+
ID3DVertexBuffer* g_accum_omnip_vb;
115+
ID3DIndexBuffer* g_accum_omnip_ib;
116116

117-
IDirect3DVertexBuffer9* g_accum_spot_vb;
118-
IDirect3DIndexBuffer9* g_accum_spot_ib;
117+
ID3DVertexBuffer* g_accum_spot_vb;
118+
ID3DIndexBuffer* g_accum_spot_ib;
119119

120-
IDirect3DVertexBuffer9* g_accum_volumetric_vb;
121-
IDirect3DIndexBuffer9* g_accum_volumetric_ib;
120+
ID3DVertexBuffer* g_accum_volumetric_vb;
121+
ID3DIndexBuffer* g_accum_volumetric_ib;
122122

123123
// SSAO
124124
ref_shader s_ssao;

0 commit comments

Comments
 (0)