summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Polygon.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/Polygon.cpp
parent72bb517271dad40a440533ad0796a88247011199 (diff)
downloadstarshatter-a12e588079700d55a0b788fea2df7727c2e41f52.zip
starshatter-a12e588079700d55a0b788fea2df7727c2e41f52.tar.gz
starshatter-a12e588079700d55a0b788fea2df7727c2e41f52.tar.bz2
Removed MemDebug from FoundationEx
Diffstat (limited to 'Stars45/Polygon.cpp')
-rw-r--r--Stars45/Polygon.cpp59
1 files changed, 29 insertions, 30 deletions
diff --git a/Stars45/Polygon.cpp b/Stars45/Polygon.cpp
index 8ff154a..d3e3b27 100644
--- a/Stars45/Polygon.cpp
+++ b/Stars45/Polygon.cpp
@@ -11,7 +11,6 @@
Polygon and VertexSet structures for 3D rendering
*/
-#include "MemDebug.h"
#include "Polygon.h"
#include "Bitmap.h"
@@ -48,14 +47,14 @@ VertexSet::Resize(int m, bool preserve)
}
else {
- loc = new(__FILE__,__LINE__) Vec3[nverts];
- nrm = new(__FILE__,__LINE__) Vec3[nverts];
- s_loc = new(__FILE__,__LINE__) Vec3[nverts];
- tu = new(__FILE__,__LINE__) float[nverts];
- tv = new(__FILE__,__LINE__) float[nverts];
- rw = new(__FILE__,__LINE__) float[nverts];
- diffuse = new(__FILE__,__LINE__) DWORD[nverts];
- specular = new(__FILE__,__LINE__) DWORD[nverts];
+ loc = new Vec3[nverts];
+ nrm = new Vec3[nverts];
+ s_loc = new Vec3[nverts];
+ tu = new float[nverts];
+ tv = new float[nverts];
+ rw = new float[nverts];
+ diffuse = new DWORD[nverts];
+ specular = new DWORD[nverts];
if (additional_tex_coords)
CreateAdditionalTexCoords();
@@ -88,22 +87,22 @@ VertexSet::Resize(int m, bool preserve)
if (nverts < np)
np = nverts;
- Vec3* new_loc = new(__FILE__,__LINE__) Vec3[nverts];
- Vec3* new_nrm = new(__FILE__,__LINE__) Vec3[nverts];
- Vec3* new_s_loc = new(__FILE__,__LINE__) Vec3[nverts];
- float* new_rw = new(__FILE__,__LINE__) float[nverts];
- float* new_tu = new(__FILE__,__LINE__) float[nverts];
- float* new_tv = new(__FILE__,__LINE__) float[nverts];
+ Vec3* new_loc = new Vec3[nverts];
+ Vec3* new_nrm = new Vec3[nverts];
+ Vec3* new_s_loc = new Vec3[nverts];
+ float* new_rw = new float[nverts];
+ float* new_tu = new float[nverts];
+ float* new_tv = new float[nverts];
float* new_tu1 = 0;
float* new_tv1 = 0;
- DWORD* new_diffuse = new(__FILE__,__LINE__) DWORD[nverts];
- DWORD* new_specular = new(__FILE__,__LINE__) DWORD[nverts];
+ DWORD* new_diffuse = new DWORD[nverts];
+ DWORD* new_specular = new DWORD[nverts];
if (tu1)
- new_tu1 = new(__FILE__,__LINE__) float[nverts];
+ new_tu1 = new float[nverts];
if (tv1)
- new_tv1 = new(__FILE__,__LINE__) float[nverts];
+ new_tv1 = new float[nverts];
if (new_loc) {
CopyMemory(new_loc, loc, np * sizeof(Vec3));
@@ -231,8 +230,8 @@ VertexSet::CreateTangents()
binormal = 0;
if (nverts) {
- tangent = new(__FILE__,__LINE__) Vec3[nverts];
- binormal = new(__FILE__,__LINE__) Vec3[nverts];
+ tangent = new Vec3[nverts];
+ binormal = new Vec3[nverts];
}
}
@@ -248,8 +247,8 @@ VertexSet::CreateAdditionalTexCoords()
tv1 = 0;
if (nverts) {
- tu1 = new(__FILE__,__LINE__) float[nverts];
- tv1 = new(__FILE__,__LINE__) float[nverts];
+ tu1 = new float[nverts];
+ tv1 = new float[nverts];
}
}
@@ -288,7 +287,7 @@ VertexSet::CopyVertex(int dst, int src)
VertexSet*
VertexSet::Clone() const
{
- VertexSet* result = new(__FILE__,__LINE__) VertexSet(nverts);
+ VertexSet* result = new VertexSet(nverts);
CopyMemory(result->loc, loc, nverts * sizeof(Vec3));
CopyMemory(result->nrm, nrm, nverts * sizeof(Vec3));
@@ -301,28 +300,28 @@ VertexSet::Clone() const
if (tu1) {
if (!result->tu1)
- result->tu1 = new(__FILE__,__LINE__) float[nverts];
+ result->tu1 = new float[nverts];
CopyMemory(result->tu1, tu1, nverts * sizeof(float));
}
if (tv1) {
if (!result->tv1)
- result->tv1 = new(__FILE__,__LINE__) float[nverts];
+ result->tv1 = new float[nverts];
CopyMemory(result->tv1, tv1, nverts * sizeof(float));
}
if (tangent) {
if (!result->tangent)
- result->tangent = new(__FILE__,__LINE__) Vec3[nverts];
+ result->tangent = new Vec3[nverts];
CopyMemory(result->tangent, tangent, nverts * sizeof(Vec3));
}
if (binormal) {
if (!result->binormal)
- result->binormal = new(__FILE__,__LINE__) Vec3[nverts];
+ result->binormal = new Vec3[nverts];
CopyMemory(result->binormal, binormal, nverts * sizeof(Vec3));
}
@@ -597,7 +596,7 @@ void
Material::CreateThumbnail(int size)
{
if (!thumbnail) {
- thumbnail = new(__FILE__,__LINE__) Bitmap(size, size);
+ thumbnail = new Bitmap(size, size);
}
if (!thumbnail || thumbnail->Width() != thumbnail->Height())
@@ -605,7 +604,7 @@ Material::CreateThumbnail(int size)
size = thumbnail->Width();
- DWORD* image = new(__FILE__,__LINE__) DWORD[size*size];
+ DWORD* image = new DWORD[size*size];
DWORD* dst = image;
for (int j = 0; j < size; j++) {