Material List (RW Section)

From GTAMods Wiki
Revision as of 21:14, 24 December 2014 by DK22Pac (talk | contribs)
Jump to navigation Jump to search
{{{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

Material List is a container section used in DFF files as child of a geometry section. The section itself does not store any data at all. All additional information get stored inside a struct section which directly follows this one as a child. Material List stores the different materials used by the geometry section it is appendet to.



Structure

The structure simply stores the number of materials and some reserved values for each material

4b - DWORD   - Number of materials
Xb - DWORD[] - Array of material indices (references). "-1" means this material is not referenced to any other material.

An example:

  000 7   --materials count
  004 -1  --first material (it will be "-1" always, since the first material in list can't be referenced to any other material)
  008 -1  --second material
  00C  0  --third material is referenced to first material
  010  1  --fourth material is referenced to second material
--014  2  --an error! 3rd material is not exist. This material list contain only 2 unique materials above
  014  0  --that one is fine. Another reference to first material.
  018 -1  --third unique material
  01C  2  --now we can make a reference to third material

Child sections

The number of child sections is defined inside the structure of this section.

See also