Why not declare 3 BMAPS and only set the data?
Code:
typedef struct BMAP {
	C_LINK	link;
	long 	width,height; // original size of the bitmap
	long	bytespp;	// original bytes per pixel (1..4)
	void	*ptr;		// internal use
	byte	*pixels;	// ptr to palettized, 565, 4444, 888 or 8888 coded original image
	long	flags;      // see BMPF_... above
	void	*d3dtex;	// 	LPDIRECT3DTEXTURE9 (usually a different format than the original image)
	float	u1,v1,u2,v2; // texture pixel bounds
	long	u,v;		// cutout start size
	long	refcount;	// for implicitely created bmaps
	long	finalwidth,finalheight,finalbytespp;
	long	pitch,finalpitch;
	long	miplevels;
	long	finalformat;
	void	*finalbits;	// bitmap content when locked, otherwise NULL
} BMAP;



If you dont know what I mean, Im talking about
Code:
void	*d3dtex;



You could also simply change ALL classmembers with memcpy. Would be the easiest one without changing the pointer:
Code:
memcpy((void*)oldBmapPtr, (void*)newBmapContent, sizeof(BMAP));


Last edited by Ch40zzC0d3r; 01/17/14 18:05.