COM Map Asset: Difference between revisions
Created page with "__NOTOC__ Category:Assets Category:CoD4 Category:WaW Category:MW2 Category:BO1 Category:MW3 Category:BO2 Category:Ghosts The com_map (believed ..." |
|||
| Line 9: | Line 9: | ||
[[Category:Ghosts]] | [[Category:Ghosts]] | ||
The com_map (believed to be "common map") appears to be dedicated to holding light data for the primary lights around the map. This asset is part of the D3DBSP system produced by Radiant so it has existed on every Call of Duty game so far. | The com_map (believed to be "common map") appears to be dedicated to holding light data for the primary lights around the map. This asset is part of the D3DBSP system produced by Radiant so it has existed on every Call of Duty game so far. | ||
== Call of Duty 4 & Modern Warfare 2 & 3 | == Call of Duty 4 & Modern Warfare 2 & 3 & Ghosts == | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
struct ComPrimaryLight | struct ComPrimaryLight | ||
| Line 15: | Line 15: | ||
#ifdef MW3 || Ghosts | #ifdef MW3 || Ghosts | ||
char unknown[0x4C]; | char unknown[0x4C]; | ||
#else | #else | ||
char type; | char type; | ||
| Line 22: | Line 20: | ||
char exponent; | char exponent; | ||
char unused; | char unused; | ||
vec3_t color; | |||
vec3_t dir; | |||
vec3_t origin; | |||
float radius; | float radius; | ||
float cosHalfFovOuter; | float cosHalfFovOuter; | ||
| Line 43: | Line 41: | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Black Ops 2 == | |||
<syntaxhighlight lang="cpp"> | |||
struct ComPrimaryLight | |||
{ | |||
char type; | |||
char canUseShadowMap; | |||
char exponent; | |||
char priority; | |||
__int16 cullDist; | |||
char useCookie; | |||
char shadowmapVolume; | |||
vec3_t color; | |||
vec3_t dir; | |||
vec3_t origin; | |||
float radius; | |||
float cosHalfFovOuter; | |||
float cosHalfFovInner; | |||
float cosHalfFovExpanded; | |||
float rotationLimit; | |||
float translationLimit; | |||
float mipDistance; | |||
float dAttenuation; | |||
float roundness; | |||
vec4_t diffuseColor; | |||
vec4_t falloff; | |||
vec4_t angle; | |||
vec4_t aAbB; | |||
vec4_t cookieControl[3]; | |||
const char *defName; | |||
}; | |||
struct ComWorld | |||
{ | |||
const char *name; | |||
int isInUse; | |||
unsigned int primaryLightCount; | |||
ComPrimaryLight *primaryLights; | |||
}; | |||
</syntaxhighlight> | |||
== World at War & Black Ops 1 == | == World at War & Black Ops 1 == | ||
Note that "waterCells" and "burnableCells" were added in World at War and most likely left over in Black Ops 1, as they were subsequently removed in Black Ops 2. Also there is 0x10 unknown bytes before each cell entry, believed to be cell information. | Note that "waterCells" and "burnableCells" were added in World at War and most likely left over in Black Ops 1, as they were subsequently removed in Black Ops 2. Also there is 0x10 unknown bytes before each cell entry, believed to be cell information. | ||
Revision as of 06:25, 21 December 2014
The com_map (believed to be "common map") appears to be dedicated to holding light data for the primary lights around the map. This asset is part of the D3DBSP system produced by Radiant so it has existed on every Call of Duty game so far.
Call of Duty 4 & Modern Warfare 2 & 3 & Ghosts
struct ComPrimaryLight
{
#ifdef MW3 || Ghosts
char unknown[0x4C];
#else
char type;
char canUseShadowMap;
char exponent;
char unused;
vec3_t color;
vec3_t dir;
vec3_t origin;
float radius;
float cosHalfFovOuter;
float cosHalfFovInner;
float cosHalfFovExpanded;
float rotationLimit;
float translationLimit;
#endif
const char *defName;
};
struct ComWorld
{
const char *name;
int isInUse;
unsigned int primaryLightCount;
ComPrimaryLight *primaryLights;
};Black Ops 2
struct ComPrimaryLight
{
char type;
char canUseShadowMap;
char exponent;
char priority;
__int16 cullDist;
char useCookie;
char shadowmapVolume;
vec3_t color;
vec3_t dir;
vec3_t origin;
float radius;
float cosHalfFovOuter;
float cosHalfFovInner;
float cosHalfFovExpanded;
float rotationLimit;
float translationLimit;
float mipDistance;
float dAttenuation;
float roundness;
vec4_t diffuseColor;
vec4_t falloff;
vec4_t angle;
vec4_t aAbB;
vec4_t cookieControl[3];
const char *defName;
};
struct ComWorld
{
const char *name;
int isInUse;
unsigned int primaryLightCount;
ComPrimaryLight *primaryLights;
};World at War & Black Ops 1
Note that "waterCells" and "burnableCells" were added in World at War and most likely left over in Black Ops 1, as they were subsequently removed in Black Ops 2. Also there is 0x10 unknown bytes before each cell entry, believed to be cell information.
struct ComPrimaryLight
{
#ifdef BO1
char unknown[0xD8];
#else
char unknown[0x44]; //WaW contains one more int/float from above
#endif
const char *defName;
};
struct ComBurnableCell
{
char unknown[8];
char (*data[0x20]);
};
struct ComWorld
{
const char *name;
int isInUse;
unsigned int primaryLightCount;
ComPrimaryLight *primaryLights;
char unknown1[0x10];
unsigned int waterCellCount;
char * waterCells; //Size = waterCellCount << 3
char unknown3[0x10];
unsigned int burnableCellCount;
ComBurnableCell * burnableCells;
};