Difference between revisions of "Native Data PLG (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
Line 30: Line 30:
 
     ('''Padding''')
 
     ('''Padding''')
 
     {ARRAY OF SIZE: 16 - (12+MaterialCount*24 bytes) mod 16}
 
     {ARRAY OF SIZE: 16 - (12+MaterialCount*24 bytes) mod 16}
         4 bytes - hex - 0xCD
+
         1 byte - hex - 0xCD
 
         {END ARRAY}
 
         {END ARRAY}
  
Line 40: Line 40:
 
     ('''Padding''')
 
     ('''Padding''')
 
     {ARRAY OF SIZE: unknow}
 
     {ARRAY OF SIZE: unknow}
         4 bytes - hex - 0xCD
+
         1 byte - hex - 0xCD
 
         {END ARRAY}
 
         {END ARRAY}
  
Line 62: Line 62:
 
     ('''Padding''')
 
     ('''Padding''')
 
     {ARRAY OF SIZE: unknow}
 
     {ARRAY OF SIZE: unknow}
         4 bytes - hex - 0xCD
+
         1 byte - hex - 0xCD
 
         {END ARRAY}
 
         {END ARRAY}
  
Line 76: Line 76:
 
     ('''Padding''')
 
     ('''Padding''')
 
     {ARRAY OF SIZE: unknow}
 
     {ARRAY OF SIZE: unknow}
         4 bytes - hex - 0xCD
+
         1 byte - hex - 0xCD
 
         {END ARRAY}
 
         {END ARRAY}
  

Revision as of 20:42, 4 August 2012

{{{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

Structure

   (Section Header)
       4 bytes - int - 5
       4 bytes - hex - VertexOffset
       2 bytes - int - VertexUnknow
       2 bytes - int - MaterialCount
       4 bytes - int - 6
       4 bytes - int - VertexCount
       4 bytes - int - 32
       4 bytes - hex - 0x164314
   (Material Header)
       4 bytes - int - 0
       4 bytes - int - unknow1
       4 bytes - int - unknow2
   (Material tristrips info)
   {ARRAY OF SIZE: MaterialCount*24 bytes}
       4 bytes - int - MaterialCount.VertexCountStart
       4 bytes - int - MaterialCount.VertexCountEnd
       4 bytes - int - MaterialCount.TristripsCount
       4 bytes - int - MaterialCount.UnknowCount
       4 bytes - hex - Unknow3 (in fist = 0x17AB78)
       4 bytes - hex - 0x19ED91
       {END ARRAY}
   (Padding)
   {ARRAY OF SIZE: 16 - (12+MaterialCount*24 bytes) mod 16}
       1 byte - hex - 0xCD
       {END ARRAY}
   (Tristrips)
   {ARRAY OF SIZE: MaterialCount.TristripsCount*2 bytes}
       2 bytes - int - Vertex
       {END ARRAY}
   (Padding)
   {ARRAY OF SIZE: unknow}
       1 byte - hex - 0xCD
       {END ARRAY}
   (Verticles)
   {ARRAY OF SIZE: Vertex Count*(24 or 32) bytes}
       4 bytes - float - Coordinate X
       4 bytes - float - Coordinate Y
       4 bytes - float - Coordinate Z
       1 byte - int - Color R
       1 byte - int - Color G
       1 byte - int - Color B
       1 byte - int - Color Alpha
       4 bytes - float - U
       4 bytes - float - V
       {IF Textured_2=1 in flags THEN}
           4 bytes - float - U
           4 bytes - float - V
       {END IF}
    {END ARRAY}
   (Padding)
   {ARRAY OF SIZE: unknow}
       1 byte - hex - 0xCD
       {END ARRAY}
   (Normals)
   {IF Normals=1 in Flags THEN}
       {ARRAY OF SIZE: Vertex Count*12 bytes}
           4 bytes - float - Coordinate X
           4 bytes - float - Coordinate Y
           4 bytes - float - Coordinate Z
       {END ARRAY}
   {END IF}
   (Padding)
   {ARRAY OF SIZE: unknow}
       1 byte - hex - 0xCD
       {END ARRAY}

See also