Font Asset: Difference between revisions

From COD Engine Research
No edit summary
No edit summary
Line 13: Line 13:
== Infinity Ward Games & World at War & Black Ops 1 ==
== Infinity Ward Games & World at War & Black Ops 1 ==
[[File:Gamefonts_ps3.png|90px|thumb|Modern Warfare 2 font image for PS3]]
[[File:Gamefonts_ps3.png|90px|thumb|Modern Warfare 2 font image for PS3]]
  struct glyphs_s
#pragma pack(push, 2)
  struct Glyph
  {
  {
   unsigned short character;
   unsigned __int16 letter;
   unsigned char padLeft;
   char x0;
   unsigned char padTop;
   char y0;
   unsigned char padRight;
   char dx;
   unsigned char width;
   char pixelWidth;
   unsigned char height;
   char pixelHeight;
  unsigned char const0;
   float s0;
   float uvLeft;
   float t0;
   float uvTop;
   float s1;
   float uvRight;
   float t1;
   float uvBottom;
  };
  };
#pragma pack(pop)
   
   
  struct Font_s
  struct Font_s
  {
  {
   char * name;
   const char * name;
   int pixelHeight;
   int pixelHeight;
   int glyphCount;
   int glyphCount;
   Material * material;
   Material * material;
   Material * glowMaterial;
   Material * glowMaterial;
   glyphs_s * glyphs;
   Glyph * glyphs;
  };
  };
== 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
#pragma pack(push, 2)
  struct Glyph
  {
  {
   unsigned short character;
   unsigned __int16 letter;
   unsigned char padLeft;
   char x0;
   unsigned char padTop;
   char y0;
   unsigned char padRight;
   char dx;
   unsigned char width;
   char pixelWidth;
   unsigned char height;
   char pixelHeight;
  unsigned char const0;
   float s0;
   float uvLeft;
   float t0;
   float uvTop;
   float s1;
   float uvRight;
   float t1;
   float uvBottom;
  };
  };
#pragma pack(pop)
   
   
  struct Font_s
  struct Font_s
  {
  {
   char * name;
   const char * name;
   int pixelHeight;
   int pixelHeight;
   int unknown2;
   int unknown2;
Line 63: Line 65:
   Material * material;
   Material * material;
   Material * glowMaterial;
   Material * glowMaterial;
   glyphs_s * glyphs;
   Glyph * glyphs;
   char * unknownData; //Size = unknownCount1 << 3
   char * unknownData; //Size = unknownCount1 << 3
  };
  };

Revision as of 18:07, 2 January 2014


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

Modern Warfare 2 font image for PS3
#pragma pack(push, 2)
struct Glyph
{
  unsigned __int16 letter;
  char x0;
  char y0;
  char dx;
  char pixelWidth;
  char pixelHeight;
  float s0;
  float t0;
  float s1;
  float t1;
};
#pragma pack(pop)

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

Black Ops 2

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

#pragma pack(push, 2)
struct Glyph
{
  unsigned __int16 letter;
  char x0;
  char y0;
  char dx;
  char pixelWidth;
  char pixelHeight;
  float s0;
  float t0;
  float s1;
  float t1;
};
#pragma pack(pop)

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