Glasses Asset: Difference between revisions

From COD Engine Research
Created page with "__NOTOC__ Category:Assets Category:BO1 Category:BO2 The glasses asset defines how different types of glasses around the map break, and the effects associated with ..."
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
[[Category:BO1]]
[[Category:BO1]]
[[Category:BO2]]
[[Category:BO2]]
The glasses asset defines how different types of glasses around the map break, and the effects associated with that. It only exists on Black Ops 1 and 2 and changed very little. Modern Warfare 3 and Ghosts have an equivalent glass_map asset.
The glasses asset defines how different types of glasses around the map break, and the effects associated with that. It only exists on Black Ops 1 and 2 and changed very little. Modern Warfare 3 and Ghosts have a similar glass_map asset.
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
struct GlassDef
struct GlassDef
{
{
      char * unknownString1;
  const char *name;
      char unknown1[0x18];
  int maxHealth;
      Material * unknownMaterial1;
  float thickness;
      Material * unknownMaterial2;
  float minShardSize;
      Material * unknownMaterial3;
  float maxShardSize;
      char * unknownString2;
  float shardLifeProbablility;
      char * unknownString3;
  int maxShards;
      char * unknownString4;
  Material *pristineMaterial;
      FxEffectDef * unknownFx1;
  Material *crackedMaterial;
      FxEffectDef * unknownFx2;
  Material *shardMaterial;
  const char *crackSound;
  const char *shatterShound;
  const char *autoShatterShound;
  FxEffectDef *crackEffect;
  FxEffectDef *shatterEffect;
};
};


struct Glass
struct Glass
{
{
  GlassDef * definition;
#ifdef BO2
#ifdef BO1
  unsigned int numCellIndices;
      char unknown1[0x39];
  unsigned __int16 cellIndices[6];
#elif BO2
      char unknown1[0x49];
#endif
#endif
  GlassDef * glassDef;
  unsigned int index;
  unsigned int brushModel;
  vec3_t origin;
  vec3_t angles;
  vec3_t absmin;
  vec3_t absmax;
  bool isPlanar;
   byte outlineVecCount;
   byte outlineVecCount;
  char binormalSign;
   vec2_t * outline;  
   vec2_t * outline;  
      char unknown2[0x38];
  vec3_t outlineAxis[3];
  vec3_t outlineOrigin;
  float uvScale;
  float thickness;
};
};


Line 35: Line 50:
{
{
   const char * name;
   const char * name;
   unsigned int glassCount;
   unsigned int numGlasses;
   GlassDef * glasses;
   Glass *glasses;
      char * unknown1; //Size = unknownCount1;
  char *workMemory;
      unsigned int unknownCount1;
  unsigned int workMemorySize;
      char unknown2[0x24];
  unsigned int smallAllocatorBlocks;
  unsigned int maxGroups;
  unsigned int maxShards;
  unsigned int maxPhysics;
  unsigned int shardMemorySize;
  unsigned int maxFreeCmd;
  unsigned int numSlots;
  unsigned int numVerts;
  unsigned int numIndices; // is set to (numVerts * 2) & 0xFFFFFFF0
};
};
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 01:19, 21 December 2014

The glasses asset defines how different types of glasses around the map break, and the effects associated with that. It only exists on Black Ops 1 and 2 and changed very little. Modern Warfare 3 and Ghosts have a similar glass_map asset.

struct GlassDef
{
  const char *name;
  int maxHealth;
  float thickness;
  float minShardSize;
  float maxShardSize;
  float shardLifeProbablility;
  int maxShards;
  Material *pristineMaterial;
  Material *crackedMaterial;
  Material *shardMaterial;
  const char *crackSound;
  const char *shatterShound;
  const char *autoShatterShound;
  FxEffectDef *crackEffect;
  FxEffectDef *shatterEffect;
};

struct Glass
{
#ifdef BO2
  unsigned int numCellIndices;
  unsigned __int16 cellIndices[6];
#endif
  GlassDef * glassDef;
  unsigned int index;
  unsigned int brushModel;
  vec3_t origin;
  vec3_t angles;
  vec3_t absmin;
  vec3_t absmax;
  bool isPlanar;
  byte outlineVecCount;
  char binormalSign;
  vec2_t * outline; 
  vec3_t outlineAxis[3];
  vec3_t outlineOrigin;
  float uvScale;
  float thickness;
};

struct Glasses
{
  const char * name;
  unsigned int numGlasses;
  Glass *glasses;
  char *workMemory;
  unsigned int workMemorySize;
  unsigned int smallAllocatorBlocks;
  unsigned int maxGroups;
  unsigned int maxShards;
  unsigned int maxPhysics;
  unsigned int shardMemorySize;
  unsigned int maxFreeCmd;
  unsigned int numSlots;
  unsigned int numVerts;
  unsigned int numIndices; // is set to (numVerts * 2) & 0xFFFFFFF0
};