Difference between revisions of "TXD"

From GTAMods Wiki
Jump to navigation Jump to search
(redirected; content included in Texture Native Struct)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
Copyed from Spooky, just to make a start..:
+
#REDIRECT [[Texture archive]]
Please note that this is the Vice City format, although it doesnt differ that much..
 
[http://www.gtaforums.com/index.php?showtopic=112115&st=20 Copied from here]
 
 
 
 
 
== The (Vice City) TXD Format ==
 
 
 
The (usual) txd format looks like this:
 
 
 
  (22) Texture Dictionary
 
  |
 
  +-+ (1) Data
 
  | |--> Number of Textures (dword)
 
  |
 
  +-+ (21) Texture No. 1
 
  | |-+ (1) Data
 
  | | |--> (all the texture information and the image itself)
 
  | |
 
  | +-- (3) Extension (always empty - size=0) --> MISSING
 
  |
 
  +-+ (21) Texture No. 2
 
  | |-- ... (same as above)
 
  |
 
  +-+ (21) Texture No. 3
 
  |-- ...
 
 
 
(The number in brackets stands for the section type - dword)
 
 
 
These are just the alpha flags and (hopefully) depend on the image type:
 
 
 
8bit without alpha: 9728
 
8bit with alpha: 9472
 
 
 
32bit without alpha: 1536
 
32bit with alpha: 1280
 
 
 
DXT1 without alpha: 512
 
DXT1 with alpha: 256
 
DXT3 with alpha: 768
 
 
 
The first dword is section type, second section size and third the version id of the renderware file.
 
TXD files have the same basic format as DFF files and consist of sections with different purpose.
 
See [http://www.chronetal.co.uk/gta/index.php?page=dff KCows dff documentation] for more infos.
 
Every section has a 12 byte section header, containing type, size and ver id.
 
The version id's are:
 
  0x0800FFFF for GTA3,
 
  0x0C02FFFF for VC PS2 and
 
  0x1003FFFF for VC PC
 
(in the most cases).
 
 
 
(Just the second byte of the dword changes, that's why all values are divisible by 256)
 

Latest revision as of 22:34, 10 December 2006

Redirect to: