XAnim Asset

From COD Engine Research
Revision as of 10:38, 21 December 2014 by CraigChrist8239 (Talk | contribs)

Jump to: navigation, search

The xanim asset serves what should be a fairly obvious purpose, to store the data for model animations. It has existed on every Call of Duty so far and surprisingly has changed very little along the way.

Call of Duty 4 & World at War

union XAnimIndices
{
  char *_1;
  unsigned __int16 *_2;
  void *data;
};
 
union XAnimDynamicFrames
{
  char (*_1)[3];
  unsigned __int16 (*_2)[3];
};
 
union XAnimDynamicIndices
{
  char _1[1];
  unsigned __int16 _2[1];
};
 
union XAnimPartTransData
{
  XAnimPartTransFrames frames;
  float frame0[3];
};
 
struct XAnimPartTrans
{
  unsigned __int16 size;
  char smallTrans;
  __declspec(align(2)) XAnimPartTransData u;
};
 
union XAnimDeltaPartQuatData
{
  XAnimDeltaPartQuatDataFrames frames;
  __int16 frame0[2];
};
 
struct XAnimDeltaPartQuat
{
  unsigned __int16 size;
  __declspec(align(4)) XAnimDeltaPartQuatData u;
};
 
struct XAnimDeltaPart
{
  XAnimPartTrans *trans;
  XAnimDeltaPartQuat *quat;
};
 
#pragma pack(push, 4)
struct XAnimPartTransFrames
{
  float mins[3];
  float size[3];
  XAnimDynamicFrames frames;
  XAnimDynamicIndices indices;
};
 
struct XAnimNotifyInfo
{
  ScriptString name;
  float time;
};
 
struct XAnimDeltaPartQuatDataFrames
{
  __int16 (*frames)[2];
  XAnimDynamicIndices indices;
};
 
struct XAnimParts
{
  const char *name;
  unsigned __int16 dataByteCount;
  unsigned __int16 dataShortCount;
  unsigned __int16 dataIntCount;
  unsigned __int16 randomDataByteCount;
  unsigned __int16 randomDataIntCount;
  unsigned __int16 numframes;
  bool bLoop;
  bool bDelta;
  char boneCount[12];
  char notifyCount;
  char assetType;
  bool pad;
  unsigned int randomDataShortCount;
  unsigned int indexCount;
  float framerate;
  float frequency;
  ScriptString *names;
  char *dataByte;
  __int16 *dataShort;
  int *dataInt;
  __int16 *randomDataShort;
  char *randomDataByte;
  int *randomDataInt;
  XAnimIndices indices;
  XAnimNotifyInfo *notify;
  XAnimDeltaPart *deltaPart;
};
#pragma pack(pop)

Modern Warfare 2 & 3 & Ghosts

union XAnimIndices
{
  char *_1;
  unsigned __int16 *_2;
  void *data;
};
 
union XAnimDynamicFrames
{
  char (*_1)[3];
  unsigned __int16 (*_2)[3];
};
 
union XAnimDynamicIndices
{
  char _1[1];
  unsigned __int16 _2[1];
};
 
union XAnimPartTransData
{
  XAnimPartTransFrames frames;
  float frame0[3];
};
 
struct XAnimPartTrans
{
  unsigned __int16 size;
  char smallTrans;
  __declspec(align(2)) XAnimPartTransData u;
};
 
union XAnimDeltaPartQuatData
{
  XAnimDeltaPartQuatDataFrames frames;
  __int16 frame0[2];
};
 
struct XAnimDeltaPartQuat
{
  unsigned __int16 size;
  __declspec(align(4)) XAnimDeltaPartQuatData u;
};
 
union unknownXAnimDeltaPartStructData
{
  unknownXAnimDeltaPartStructDataFrames frames;
  __int16 frame0[2];
};
 
struct unknownXAnimDeltaPartStruct
{
  unsigned __int16 size;
  __declspec(align(4)) unknownXAnimDeltaPartStructData u;
};
 
struct XAnimDeltaPart
{
  XAnimPartTrans *trans;
  XAnimDeltaPartQuat *quat;
  unknownXAnimDeltaPartStruct * unknownStruct1;
};
 
#pragma pack(push, 4)
struct XAnimPartTransFrames
{
  float mins[3];
  float size[3];
  XAnimDynamicFrames frames;
  XAnimDynamicIndices indices;
};
 
struct XAnimNotifyInfo
{
  ScriptString name;
  float time;
};
 
struct unknownXAnimDeltaPartStructDataFrames
{
  __int16 (*frames)[2];
  XAnimDynamicIndices indices;
};
 
struct XAnimDeltaPartQuatDataFrames
{
  __int16 (*frames)[2];
  XAnimDynamicIndices indices;
};
 
struct XAnimParts
{
  const char *name;
  unsigned __int16 dataByteCount;
  unsigned __int16 dataShortCount;
  unsigned __int16 dataIntCount;
  unsigned __int16 randomDataByteCount;
  unsigned __int16 randomDataIntCount;
  unsigned __int16 numframes;
  bool bLoop;
  char boneCount[12];
  char notifyCount;
  char assetType;
  bool pad;
  unsigned int randomDataShortCount;
  unsigned int indexCount;
  float framerate;
  float frequency;
  ScriptString *names;
  char *dataByte;
  __int16 *dataShort;
  int *dataInt;
  __int16 *randomDataShort;
  char *randomDataByte;
  int *randomDataInt;
  XAnimIndices indices;
  XAnimNotifyInfo *notify;
  XAnimDeltaPart *deltaPart;
};
#pragma pack(pop)

Black Ops 1 & 2

union XAnimIndices
{
  char *_1;
  unsigned __int16 *_2;
  void *data;
};
 
union XAnimDynamicFrames
{
  char (*_1)[3];
  unsigned __int16 (*_2)[3];
};
 
union XAnimDynamicIndices
{
  char _1[1];
  unsigned __int16 _2[1];
};
 
union XAnimPartTransData
{
  XAnimPartTransFrames frames;
  float frame0[3];
};
 
struct XAnimPartTrans
{
  unsigned __int16 size;
  char smallTrans;
  __declspec(align(2)) XAnimPartTransData u;
};
 
union XAnimDeltaPartQuatData
{
  XAnimDeltaPartQuatDataFrames frames;
  __int16 frame0[2];
};
 
struct XAnimDeltaPartQuat
{
  unsigned __int16 size;
  __declspec(align(4)) XAnimDeltaPartQuatData u;
};
 
struct XAnimDeltaPartQuatDataFrames
{
  __int16 (*frames)[4];
  XAnimDynamicIndices indices;
};
 
union XAnimDeltaPartQuatData
{
  XAnimDeltaPartQuatDataFrames frames;
  __int16 frame0[4];
};
 
struct XAnimDeltaPartQuat
{
  unsigned __int16 size;
  XAnimDeltaPartQuatData u;
};
 
struct XAnimDeltaPartQuatDataFrames2
{
  __int16 (*frames)[2];
  XAnimDynamicIndices indices;
};
 
union XAnimDeltaPartQuatData2
{
  XAnimDeltaPartQuatDataFrames2 frames;
  __int16 frame0[2];
};
 
struct XAnimDeltaPartQuat2
{
  unsigned __int16 size;
  XAnimDeltaPartQuatData2 u;
};
struct XAnimDeltaPart
{
  XAnimPartTrans *trans;
  XAnimDeltaPartQuat2 *quat2;
  XAnimDeltaPartQuat *quat;
};
 
#pragma pack(push, 4)
struct XAnimPartTransFrames
{
  float mins[3];
  float size[3];
  XAnimDynamicFrames frames;
  XAnimDynamicIndices indices;
};
 
struct XAnimNotifyInfo
{
  ScriptString name;
  float time;
};
 
struct XAnimParts
{
  const char *name;
  unsigned __int16 dataByteCount;
  unsigned __int16 dataShortCount;
  unsigned __int16 dataIntCount;
  unsigned __int16 randomDataByteCount;
  unsigned __int16 randomDataIntCount;
  unsigned __int16 numframes;
  bool bLoop;
  bool bDelta;
  char boneCount[18];
  char notifyCount;
  char assetType;
  bool pad;
  unsigned int randomDataShortCount;
  unsigned int indexCount;
  float framerate;
  float frequency;
  float primedLength;
  float loopEntryTime;
  ScriptString *names;
  char *dataByte;
  __int16 *dataShort;
  int *dataInt;
  __int16 *randomDataShort;
  char *randomDataByte;
  int *randomDataInt;
  XAnimIndices indices;
  XAnimNotifyInfo *notify;
  XAnimDeltaPart *deltaPart;
};
#pragma pack(pop)