mirror of
https://github.com/aap/librw.git
synced 2026-04-19 13:03:09 +01:00
fixes to d3d; implemented some allocation counters
This commit is contained in:
@@ -55,6 +55,8 @@ struct Frame
|
||||
Frame *next;
|
||||
Frame *root;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Frame *create(void);
|
||||
Frame *cloneHierarchy(void);
|
||||
void destroy(void);
|
||||
@@ -130,6 +132,8 @@ struct Image
|
||||
uint8 *pixels;
|
||||
uint8 *palette;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Image *create(int32 width, int32 height, int32 depth);
|
||||
void destroy(void);
|
||||
void allocate(void);
|
||||
@@ -186,6 +190,8 @@ struct Raster
|
||||
Raster *parent;
|
||||
int32 offsetX, offsetY;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Raster *create(int32 width, int32 height, int32 depth,
|
||||
int32 format, int32 platform = 0);
|
||||
void subRaster(Raster *parent, Rect *r);
|
||||
@@ -273,6 +279,8 @@ struct Texture
|
||||
uint32 filterAddressing; // VVVVUUUU FFFFFFFF
|
||||
int32 refCount;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Texture *create(Raster *raster);
|
||||
void destroy(void);
|
||||
static Texture *fromDict(LLLink *lnk){
|
||||
@@ -318,6 +326,8 @@ struct Material
|
||||
Pipeline *pipeline;
|
||||
int32 refCount;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Material *create(void);
|
||||
Material *clone(void);
|
||||
void destroy(void);
|
||||
@@ -415,6 +425,8 @@ struct Geometry
|
||||
|
||||
int32 refCount;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Geometry *create(int32 numVerts, int32 numTris, uint32 flags);
|
||||
void destroy(void);
|
||||
void lock(int32 lockFlags);
|
||||
@@ -510,6 +522,8 @@ struct Atomic
|
||||
World *world;
|
||||
ObjectWithFrame::Sync originalSync;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Atomic *create(void);
|
||||
Atomic *clone(void);
|
||||
void destroy(void);
|
||||
@@ -562,6 +576,8 @@ struct Light
|
||||
World *world;
|
||||
ObjectWithFrame::Sync originalSync;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Light *create(int32 type);
|
||||
void destroy(void);
|
||||
void setFrame(Frame *f) { this->object.setFrame(f); }
|
||||
@@ -648,6 +664,8 @@ struct Camera
|
||||
void (*originalBeginUpdate)(Camera*);
|
||||
void (*originalEndUpdate)(Camera*);
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Camera *create(void);
|
||||
Camera *clone(void);
|
||||
void destroy(void);
|
||||
@@ -684,6 +702,8 @@ struct Clump
|
||||
|
||||
World *world;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static Clump *create(void);
|
||||
Clump *clone(void);
|
||||
void destroy(void);
|
||||
@@ -721,6 +741,8 @@ struct World
|
||||
LinkList lights; // these have positions (type >= 0x80)
|
||||
LinkList directionalLights; // these do not (type < 0x80)
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static World *create(void);
|
||||
void destroy(void);
|
||||
void addLight(Light *light);
|
||||
@@ -736,6 +758,8 @@ struct TexDictionary
|
||||
Object object;
|
||||
LinkList textures;
|
||||
|
||||
static int32 numAllocated;
|
||||
|
||||
static TexDictionary *create(void);
|
||||
void destroy(void);
|
||||
int32 count(void) { return this->textures.count(); }
|
||||
|
||||
Reference in New Issue
Block a user