Texture Dictionary (RW Section)

From GTAModding
Jump to: navigation, search
RW Stream Section
Texture Dictionary
0x0016

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, 6 for PlayStation 2, 8 for XBOX
};

If deviceId is not zero, then the RenderWare engine can reject this texture dictionary if it is told to do so. In practice, all GTA games do not care.

RW 3.0.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.