texHeaders.bin File Format: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
  struct TexHeader.bin
  struct TexHeader.bin
  {
  {
   MimeType "0DHT" ;    // NOT ascizz. '0' = 0x30. This is mimetype "TexHeaDer0"
   MimeType "0DHT" ;    // NOT asciiz. '0' = 0x30. This is mimetype "TexHeaDer0"
   ulong    version;    // 1
   ulong    version;    // 1
   ulong    SomeOffset; //ce 01 00 00  
   ulong    nTextures; //ce 01 00 00  
   TexBody  TexBodies[until end of file];
   TexBody  TexBodies[nTextures];
  };
  };


Line 38: Line 38:
  {
  {
   ulong      Flag;
   ulong      Flag;
   ulong      nStructs; // see note
   ulong      nMipmaps; // see note
   SomeStruct SomeStruct[nStructs];
   MipMap    MipMaps[nMipmaps];
   ushort    SomeShort
   ushort    SomeShort
   ushort    AnotherShort;
   ushort    AnotherShort;
Line 46: Line 46:
* SameCount always == nStructs
* SameCount always == nStructs


  SomeStruct
  MipMap
  {
  {
   ushort value1;//typical 0040,0200
   ushort width;//typical 0040,0200
   ushort value2;//typical 0020,0100
   ushort height;//typical 0020,0100
   ushort Always0;
   ushort Always0;
   ushort value3;//generally 0x030a
   ushort value3;//generally 0x030a

Revision as of 00:56, 30 June 2010

struct TexHeader.bin
{
 MimeType "0DHT" ;    // NOT asciiz. '0' = 0x30. This is mimetype "TexHeaDer0"
 ulong    version;    // 1
 ulong    nTextures; //ce 01 00 00 
 TexBody  TexBodies[nTextures];
};


TexBody
{
 TexBegin TexBegin;
 Asciiz   *PaaFile;//"data\icons\m4a3_cco_ca.paa"
                   //"fnfal\data\fnfal_smdi.paa"
 TexEnd   TexEnd;
};
  • Either BIS have finally learned to use relative file addressing (unlikely), or, more inconsistency for us

where the root is presumed to be \CA\ (or anything else they arbitrarily decide to use).

  • It looks like yet-another rule break with lack of ofpec_tags in front of pbo model names, but, it's their game, they can destroy it any way they want to.
TexBegin
{
 ulong Always1;
 ulong Always0;
 float Floats[5];
 ulong AlwaysDefault;//0xFFFFFFFF // probably RGBA color specs
 ulong Always0;
 ulong AlwaysDefault;//0xFFFFFFFF
 ulong FlagBytes;    // 01 01 00 10 typical
 ulong SameCount;    // see note
 ulong AnotherCount; // typical 0x0A
 byte  Always1;
 byte  Always1;
};
TexEnd
{
 ulong      Flag;
 ulong      nMipmaps; // see note
 MipMap     MipMaps[nMipmaps];
 ushort     SomeShort
 ushort     AnotherShort;
};
  • SameCount always == nStructs
MipMap
{
 ushort width;//typical 0040,0200
 ushort height;//typical 0020,0100
 ushort Always0;
 ushort value3;//generally 0x030a
 ushort value4;//typical 0x80,4413
 ushort value5;//generally zero
};