Font Asset: Difference between revisions

From COD Engine Research
 
Line 38: Line 38:
== Black Ops 2 ==
== Black Ops 2 ==
Black Ops 2 is proving to be the only game that changes the font structure so far.
Black Ops 2 is proving to be the only game that changes the font structure so far.
struct glyphs_s
{
  unsigned short character;
  unsigned char padLeft;
  unsigned char padTop;
  unsigned char padRight;
  unsigned char width;
  unsigned char height;
  unsigned char const0;
  float uvLeft;
  float uvTop;
  float uvRight;
  float uvBottom;
};
  struct Font_s
  struct Font_s
  {
  {

Revision as of 05:17, 30 December 2013


Font assets control what else; the fonts! Every CoD game so far has had a font asset type, and it has changed very little.

Infinity Ward Games & World at War & Black Ops 1

struct glyphs_s
{
  unsigned short character;
  unsigned char padLeft;
  unsigned char padTop;
  unsigned char padRight;
  unsigned char width;
  unsigned char height;
  unsigned char const0;
  float uvLeft;
  float uvTop;
  float uvRight;
  float uvBottom;
};

struct Font_s
{
  char * name;
  int pixelHeight;
  int glyphCount;
  Material * material;
  Material * glowMaterial;
  glyphs_s * glyphs;
};

Black Ops 2

Black Ops 2 is proving to be the only game that changes the font structure so far.

struct glyphs_s
{
  unsigned short character;
  unsigned char padLeft;
  unsigned char padTop;
  unsigned char padRight;
  unsigned char width;
  unsigned char height;
  unsigned char const0;
  float uvLeft;
  float uvTop;
  float uvRight;
  float uvBottom;
};

struct Font_s
{
  char * name;
  int pixelHeight;
  int unknown2;
  int glyphCount;
  int unknownCount1;
  Material * material;
  Material * glowMaterial;
  glyphs_s * glyphs;
  char * unknownData;		//Size = unknownCount1 << 3
};