Difference between revisions of "Texture Dictionary (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
'''Texture Dictionary''' is usually the root section of [[texture archive|TXD files]], thus it only contains child sections, no data. It is normally accompanied by a [[Struct (RW Section)#Texture_Dictionary|Struct]] section.
 
'''Texture Dictionary''' is usually the root section of [[texture archive|TXD files]], thus it only contains child sections, no data. It is normally accompanied by a [[Struct (RW Section)#Texture_Dictionary|Struct]] section.
  
<source lang="c">typedef struct txd_file_s {
+
==Structure==
uint32_t id;              // 0x16 (22)
 
uint32_t chunk_size        // file_size - 12
 
uint32_t marker;
 
uint8_t  data[chunk_size];
 
} txd_file_t;</source>
 
  
== Structure ==
+
The struct section that comes right after the Texture Dictionary section contains 4 bytes of data. This struct tells how many textures are presented in dictionary.
  
The struct section that comes right after the Texture Dictionary section contains 4 bytes of data:
+
===RW 3.6.0.0 (or lower) - 3.7.X.X===
 +
struct rwTexDictionary
 +
{
 +
    unsigned short textureCount; // determines count of NativeTexture sections
 +
    unsigned short deviceId; // 1 for D3D8, 2 for D3D9
 +
};
  
  2b - WORD - Number of textures
+
===RW 3.X.X.X - 3.5.0.0 (or higher)===
2b - WORD  - Unknown
+
  struct rwTexDictionary
 +
{
 +
    unsigned int textureCount; // determines count of NativeTexture sections
 +
  };
 +
 
 +
The struct section is followed with child sections (Native Texture).
 +
 
 +
==Child Sections==
 +
* [[Texture Native (RW Section)|Texture Native]] - count of textures is defined with '''textureCount''' value.
 +
 
 +
==Extension==
 +
GTA games don't use any extension for this section.

Revision as of 18:37, 18 January 2015

{{{NAME}}}
RenderWare Stream Section
Vendor {{{VENDORNAME}}}
Module {{{MODULENAME}}}
Module ID 0x{{{MODULEID}}}
Identifier 0x{{{IDENTIFIER}}}
Chunk ID 0x{{{MODULEID}}}{{{IDENTIFIER}}}
Versions All
Hierarchy
Parents:
None
Children:
None
Extensions:
None
File Format

Texture Dictionary is usually the root section of TXD files, thus it only contains child sections, no data. It is normally accompanied by a Struct section.

Structure

The struct section that comes right after the Texture Dictionary section contains 4 bytes of data. This struct tells how many textures are presented in dictionary.

RW 3.6.0.0 (or lower) - 3.7.X.X

struct rwTexDictionary
{
    unsigned short textureCount; // determines count of NativeTexture sections
    unsigned short deviceId; // 1 for D3D8, 2 for D3D9
};

RW 3.X.X.X - 3.5.0.0 (or higher)

struct rwTexDictionary
{
    unsigned int textureCount; // determines count of NativeTexture sections
};

The struct section is followed with child sections (Native Texture).

Child Sections

  • Texture Native - count of textures is defined with textureCount value.

Extension

GTA games don't use any extension for this section.