summaryrefslogtreecommitdiffhomepage
path: root/Stars45/VideoDX9.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-27 17:42:26 +0200
committerAki <please@ignore.pl>2022-03-27 17:42:26 +0200
commita12e588079700d55a0b788fea2df7727c2e41f52 (patch)
tree690072569624c73af5043b3619acaab4d298b1fa /Stars45/VideoDX9.cpp
parent72bb517271dad40a440533ad0796a88247011199 (diff)
downloadstarshatter-a12e588079700d55a0b788fea2df7727c2e41f52.zip
starshatter-a12e588079700d55a0b788fea2df7727c2e41f52.tar.gz
starshatter-a12e588079700d55a0b788fea2df7727c2e41f52.tar.bz2
Removed MemDebug from FoundationEx
Diffstat (limited to 'Stars45/VideoDX9.cpp')
-rw-r--r--Stars45/VideoDX9.cpp41
1 files changed, 20 insertions, 21 deletions
diff --git a/Stars45/VideoDX9.cpp b/Stars45/VideoDX9.cpp
index ecc0332..cf7ed68 100644
--- a/Stars45/VideoDX9.cpp
+++ b/Stars45/VideoDX9.cpp
@@ -11,7 +11,6 @@
Direct3D Video class for DirectX 9
*/
-#include "MemDebug.h"
#include "VideoDX9.h"
#include "VideoDX9Enum.h"
#include "VideoDX9VertexBuffer.h"
@@ -262,7 +261,7 @@ magic_fx(0), magic_fx_code(0), magic_fx_code_len(0)
HRESULT err = E_OUTOFMEMORY;
d3d = Direct3DCreate9(D3D_SDK_VERSION);
- dx9enum = new(__FILE__,__LINE__) VideoDX9Enum(d3d);
+ dx9enum = new VideoDX9Enum(d3d);
if (d3d && dx9enum) {
if (vs) {
@@ -391,7 +390,7 @@ magic_fx(0), magic_fx_code(0), magic_fx_code_len(0)
ZeroMemory(&rect, sizeof(rect));
if (!texcache)
- texcache = new(__FILE__,__LINE__) TexCacheDX9(this);
+ texcache = new TexCacheDX9(this);
if (texcache)
texcache->count++;
@@ -622,7 +621,7 @@ VideoDX9::CreateBuffers()
UINT index_size = sizeof(WORD);
if (!screen_vbuf) {
- screen_vbuf = new(__FILE__,__LINE__) VideoDX9VertexBuffer(
+ screen_vbuf = new VideoDX9VertexBuffer(
this,
NUM_SCREEN_VERTS,
vertex_size,
@@ -631,14 +630,14 @@ VideoDX9::CreateBuffers()
}
if (!screen_ibuf) {
- screen_ibuf = new(__FILE__,__LINE__) VideoDX9IndexBuffer(
+ screen_ibuf = new VideoDX9IndexBuffer(
this,
NUM_SCREEN_INDICES,
D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY);
}
- screen_line_verts = new(__FILE__,__LINE__) VideoDX9ScreenVertex[256];
- line_verts = new(__FILE__,__LINE__) VideoDX9LineVertex[512];
+ screen_line_verts = new VideoDX9ScreenVertex[256];
+ line_verts = new VideoDX9LineVertex[512];
// create effects:
LPD3DXBUFFER code_buffer = 0;
@@ -658,7 +657,7 @@ VideoDX9::CreateBuffers()
magic_fx_code_len = ftell(f);
::fseek(f, 0, SEEK_SET);
- magic_fx_code = new(__FILE__,__LINE__) BYTE[magic_fx_code_len+1];
+ magic_fx_code = new BYTE[magic_fx_code_len+1];
if (magic_fx_code) {
::fread(magic_fx_code, magic_fx_code_len, 1, f);
magic_fx_code[magic_fx_code_len] = 0;
@@ -1497,7 +1496,7 @@ VideoDX9::SetEnvironment(Bitmap** faces)
}
if (!environment_cube) {
- environment_cube = new(__FILE__,__LINE__) TexCubeDX9(this);
+ environment_cube = new TexCubeDX9(this);
}
if (environment_cube) {
@@ -1762,14 +1761,14 @@ VideoDX9::DrawPolys(int npolys, Poly* polys)
DWORD fvf = 0;
void* verts = 0;
int vsize = 0;
- WORD* indices = new(__FILE__,__LINE__) WORD[npolys*6];
+ WORD* indices = new WORD[npolys*6];
if (polys->material) {
luminous = polys->material->luminous;
}
if (vset->tu1 != 0) {
- VideoDX9DetailVertex* v = new(__FILE__,__LINE__) VideoDX9DetailVertex[nverts];
+ VideoDX9DetailVertex* v = new VideoDX9DetailVertex[nverts];
verts = v;
vsize = sizeof(VideoDX9DetailVertex);
fvf = VideoDX9DetailVertex::FVF;
@@ -1792,7 +1791,7 @@ VideoDX9::DrawPolys(int npolys, Poly* polys)
}
else if (luminous) {
- VideoDX9LuminousVertex* v = new(__FILE__,__LINE__) VideoDX9LuminousVertex[nverts];
+ VideoDX9LuminousVertex* v = new VideoDX9LuminousVertex[nverts];
verts = v;
vsize = sizeof(VideoDX9LuminousVertex);
fvf = VideoDX9LuminousVertex::FVF;
@@ -1812,7 +1811,7 @@ VideoDX9::DrawPolys(int npolys, Poly* polys)
}
else {
- VideoDX9SolidVertex* v = new(__FILE__,__LINE__) VideoDX9SolidVertex[nverts];
+ VideoDX9SolidVertex* v = new VideoDX9SolidVertex[nverts];
verts = v;
vsize = sizeof(VideoDX9SolidVertex);
fvf = VideoDX9SolidVertex::FVF;
@@ -2828,7 +2827,7 @@ VideoDX9::DrawPoints(VertexSet* vset)
HRESULT hr = E_FAIL;
int nverts = vset->nverts;
- VideoDX9LineVertex* verts = new(__FILE__,__LINE__) VideoDX9LineVertex[nverts];
+ VideoDX9LineVertex* verts = new VideoDX9LineVertex[nverts];
if (verts) {
for (int i = 0; i < nverts; i++) {
@@ -2951,13 +2950,13 @@ VideoDX9::PrepareSurface(Surface* surf)
VideoDX9SurfaceData* surf_data = (VideoDX9SurfaceData*) surf->GetVideoPrivateData();
if (!surf_data) {
- surf_data = new(__FILE__,__LINE__) VideoDX9SurfaceData(surf->GetModel());
+ surf_data = new VideoDX9SurfaceData(surf->GetModel());
surface_has_tangent_data = false;
if (surf->GetVertexSet()->tangent && surf->GetVertexSet()->binormal) {
surface_has_tangent_data = true;
- surf_data->vertex_buffer = new(__FILE__,__LINE__) VideoDX9VertexBuffer(
+ surf_data->vertex_buffer = new VideoDX9VertexBuffer(
this,
nverts,
sizeof(VideoDX9NormalVertex),
@@ -2966,7 +2965,7 @@ VideoDX9::PrepareSurface(Surface* surf)
}
else if (detail) {
- surf_data->vertex_buffer = new(__FILE__,__LINE__) VideoDX9VertexBuffer(
+ surf_data->vertex_buffer = new VideoDX9VertexBuffer(
this,
nverts,
sizeof(VideoDX9DetailVertex),
@@ -2975,7 +2974,7 @@ VideoDX9::PrepareSurface(Surface* surf)
}
else if (luminous) {
- surf_data->vertex_buffer = new(__FILE__,__LINE__) VideoDX9VertexBuffer(
+ surf_data->vertex_buffer = new VideoDX9VertexBuffer(
this,
nverts,
sizeof(VideoDX9LuminousVertex),
@@ -2984,7 +2983,7 @@ VideoDX9::PrepareSurface(Surface* surf)
}
else {
- surf_data->vertex_buffer = new(__FILE__,__LINE__) VideoDX9VertexBuffer(
+ surf_data->vertex_buffer = new VideoDX9VertexBuffer(
this,
nverts,
sizeof(VideoDX9SolidVertex),
@@ -2992,7 +2991,7 @@ VideoDX9::PrepareSurface(Surface* surf)
dynamic | D3DUSAGE_WRITEONLY);
}
- surf_data->index_buffer = new(__FILE__,__LINE__) VideoDX9IndexBuffer(
+ surf_data->index_buffer = new VideoDX9IndexBuffer(
this,
nindices,
dynamic | D3DUSAGE_WRITEONLY);
@@ -3151,7 +3150,7 @@ VideoDX9::PrepareSurface(Surface* surf)
Segment* segment = seg_iter.value();
if (!segment->video_data) {
- VideoDX9SegmentData* seg_data = new(__FILE__,__LINE__) VideoDX9SegmentData;
+ VideoDX9SegmentData* seg_data = new VideoDX9SegmentData;
int num_tris = 0;
for (int i = 0; i < segment->npolys; i++)