Difference between revisions of "Image Asset"

From COD Engine Research
Jump to: navigation, search
(Black Ops 2)
(Modern Warfare 2 & 3 & Ghosts & Advanced Warfare)
 
Line 88: Line 88:
 
== Modern Warfare 2 & 3 & Ghosts & Advanced Warfare ==
 
== Modern Warfare 2 & 3 & Ghosts & Advanced Warfare ==
 
<source lang="cpp">
 
<source lang="cpp">
 +
struct CardMemory
 +
{
 +
  int platform[1];
 +
};
 +
 
union GfxTexture
 
union GfxTexture
 
{
 
{
char *data;
+
#ifdef _XBOX //size = 0x34
struct
+
  D3DBaseTexture basemap;
{
+
  D3DTexture map;
char unknownData[0x24];
+
  D3DVolumeTexture volmap;
};
+
  D3DCubeTexture cubemap;
 +
#elif defined(PS3) //size = 0x18
 +
CellGcmTexture texture; // size = 0x18
 +
#endif
 
};
 
};
  
 
struct GfxImage
 
struct GfxImage
 
{
 
{
#ifdef PS3
+
  GfxTexture texture;
CellGcmTexture texture; // size = 0x18
+
#ifdef _XBOX
#elif defined XBOX
+
  char unknown[4];
D3DTexture texture;
+
_D3DFormat format;
+
 
#endif
 
#endif
char unknown3;
+
  char mapType;
char unknown4;
+
  char semantic;
char unknown5;
+
  char category;
char unknown6;
+
  char flags;
int size;
+
  CardMemory cardMemory;
unsigned short width;
+
  unsigned __int16 width;
unsigned short height;
+
  unsigned __int16 height;
unsigned short depth;
+
  unsigned __int16 depth;
 
char mipmap;
 
char mipmap;
bool streaming;
+
  bool streaming;
GfxTexture textureDef;
+
  char *pixels;
const char *name;
+
char unknownData[0x20];
 +
  const char *name;
 
};
 
};
 
</source>
 
</source>

Latest revision as of 23:19, 20 January 2015

Call of Duty 4 & World at War

union GfxTexture
{
	D3DBaseTexture *basemap;
	D3DTexture *map;
	D3DVolumeTexture *volmap;	// if GfxImageLoadDef::flags & 8
	D3DCubeTexture *cubemap;	// if GfxImageLoadDef::flags & 4
};
 
struct GfxImageLoadDef
{
	char levelCount;
	char flags;
	short dimensions[3];
	_D3DFormat format;
	GfxTexture texture;
};
 
struct GfxTextureLoad
{
	GfxImageLoadDef *loadDef;
};
 
struct GfxImage
{
	MapType mapType;
#ifdef PS3
	CellGcmTexture texture;	// size = 0x18
#elif defined XBOX
	GfxTextureLoad texture;
#endif
	CardMemory cardMemory;
	int size;
	unsigned short width;
	unsigned short height;
	unsigned short depth;
	char category;
	bool streaming;
	char *data;
#ifdef XBOX360
	char unknown[8];
#endif
	const char *name;
};

NOTE: In the zone file, if the streaming is set as true, then data is loaded at the end of the zone file.

Black Ops

union GfxTexture
{
	char *data;
	struct
	{
		char unknown[0x3C];
	};
};
 
struct GfxImage
{
#ifdef PS3
	CellGcmTexture texture; // size = 0x18
#endif
	char unknown1;
	char unknown2;
	char unknown3;
	char unknown4;
	int size;
	unsigned short height;
	unsigned short width;
	unsigned short depth;
	char unknown[6];
	GfxTexture textureDef;
	const char *name;
	int hash;
};

Modern Warfare 2 & 3 & Ghosts & Advanced Warfare

struct CardMemory
{
  int platform[1];
};
 
union GfxTexture
{
#ifdef _XBOX //size = 0x34
  D3DBaseTexture basemap;
  D3DTexture map;
  D3DVolumeTexture volmap;
  D3DCubeTexture cubemap;
#elif defined(PS3) //size = 0x18
	CellGcmTexture texture;	// size = 0x18
#endif
};
 
struct GfxImage
{
  GfxTexture texture;
#ifdef _XBOX
  	char unknown[4];
#endif
  char mapType;
  char semantic;
  char category;
  char flags;
  CardMemory cardMemory;
  unsigned __int16 width;
  unsigned __int16 height;
  unsigned __int16 depth;
	char mipmap;
  bool streaming;
  char *pixels;
	char unknownData[0x20];
  const char *name;
};

NOTE: In the zone file, if streaming is set as true, then data will be found in PAK files.

Black Ops 2

struct GfxImage
{
#ifdef PS3
	char unknown1[6];
	CellGcmTexture texture;	// modified, missing 10 bytes, size = 0xE
#elif defined (_XBOX)
	D3DBaseTexture basemap;
#endif
	char unknown2;
	char unknown3;
	char unknown4;
	char unknown5;
	int size;
  unsigned __int16 width;
  unsigned __int16 height;
  unsigned __int16 depth;
  char levelCount;
  char streaming;
  unsigned int baseSize;
  char *pixels;
	char unknownData2[0x80];
  const char *name;
  unsigned int hash;
};