XAnim Asset

From COD Engine Research
Revision as of 19:03, 12 February 2014 by CraigChrist8239 (talk | contribs) (Created page with "__NOTOC__ Category:Assets Category:CoD4 Category:MW2 Category:MW3 Category:Ghosts Category:WaW Category:BO1 Category:BO2 The xanim asset serves...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

</syntaxhighlight> 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;
  1. ifdef BO2
 unknownXAnimDeltaPartStructData * unknownStruct1;
  1. endif

};

  1. 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;
 bool bDelta;
 char boneCount[18];
 char notifyCount;
 char assetType;
 bool pad;
 unsigned int randomDataShortCount;
 unsigned int indexCount;
 float framerate;
 float frequency;
      int unknown[2];
 ScriptString *names;
 char *dataByte;
 __int16 *dataShort;
 int *dataInt;
 __int16 *randomDataShort;
 char *randomDataByte;
 int *randomDataInt;
 XAnimIndices indices;
 XAnimNotifyInfo *notify;
 XAnimDeltaPart *deltaPart;

};

  1. pragma pack(pop)

<syntaxhighlight lang="cpp">