Expand description
§TXD Parser
A parser for RenderWare TXD (Texture Dictionary) files, used for storing textures in Grand Theft Auto 3, Vice City, and San Andreas.
§Features
- Parses texture metadata, including name, dimensions, and format.
- Supports decompression of DXT1, DXT3, and DXT5 (BC1, BC2, BC3) textures.
- Extracts mipmap levels for supported formats.
- Deserializes texture data into a structured
RwTxdformat.
§Example
use rw_parser_rs::renderware::txd::txd_parser::TxdParser;
use std::fs;
let file_data = fs::read("path/to/your/textures.txd").unwrap();
let mut parser = TxdParser::new(&file_data);
let txd_data = parser.parse().unwrap();
println!("Texture count: {}", txd_data.texture_dictionary.texture_count);Structs§
- RwTexture
Dictionary - RwTexture
Native - RwTxd
- Represents the top-level structure of a parsed TXD file.
- TxdParser
- The main parser for TXD files.