Difference between revisions of "Texture Dictionary (RW Section)"
Jump to navigation
Jump to search
(adding deviceId for PS3) |
|||
(One intermediate revision by one other user not shown) | |||
Line 14: | Line 14: | ||
The struct section that comes right after the 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 dictionary section contains 4 bytes of data. This struct tells how many textures are presented in dictionary. | ||
− | === | + | === RenderWare 3.0 - 3.5 === |
<source lang="c"> | <source lang="c"> | ||
struct rwTexDictionary { | struct rwTexDictionary { | ||
− | unsigned | + | unsigned int textureCount; // determines count of Raster sections |
− | |||
}; | }; | ||
</source> | </source> | ||
− | + | === RenderWare 3.6 and newer === | |
− | |||
− | === | ||
<source lang="c"> | <source lang="c"> | ||
struct rwTexDictionary { | struct rwTexDictionary { | ||
− | unsigned | + | unsigned short textureCount; // determines count of Rastersections |
+ | unsigned short deviceId; // 1 for D3D8, 2 for D3D9, 6 for PlayStation 2, 8 for XBOX, 10 for PlayStation 3 | ||
}; | }; | ||
</source> | </source> | ||
− | + | If <code>deviceId</code> 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. | |
{{N|SA|VC|3}} | {{N|SA|VC|3}} |
Latest revision as of 20:52, 21 October 2024
Texture Dictionary | |
---|---|
RenderWare Stream Section | |
Vendor | Criterion Games |
Module | Core |
Module ID | 0x000000
|
Identifier | 0x16
|
Chunk ID | 0x00000016
|
Versions | All |
Hierarchy | |
Parents: None | |
Children: Struct, Raster | |
Extensions: None | |
File Format |
Texture Dictionary is usually the root section of TXD files, thus it only contains child sections, no data. It is a container for Raster sections, that store the actual image data. It is accompanied by a Struct section that stores information about the dictionary contents.
Structure
The struct section that comes right after the dictionary section contains 4 bytes of data. This struct tells how many textures are presented in dictionary.
RenderWare 3.0 - 3.5
struct rwTexDictionary {
unsigned int textureCount; // determines count of Raster sections
};
RenderWare 3.6 and newer
struct rwTexDictionary {
unsigned short textureCount; // determines count of Rastersections
unsigned short deviceId; // 1 for D3D8, 2 for D3D9, 6 for PlayStation 2, 8 for XBOX, 10 for PlayStation 3
};
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.