Changes

Jump to navigation Jump to search
1,035 bytes added ,  18:02, 10 August 2019
m
:head_bang:
Line 335: Line 335:     
''Note:'' blocks with flags 0xFFFFFFFF should be skipped, they aren't counted in the numBlocks.
 
''Note:'' blocks with flags 0xFFFFFFFF should be skipped, they aren't counted in the numBlocks.
 +
 
''Note:'' It is possible that additional blocks with flags 0xFFFFFFFF (Unassigned) follow after all other blocks.
 
''Note:'' It is possible that additional blocks with flags 0xFFFFFFFF (Unassigned) follow after all other blocks.
 
 
Line 380: Line 381:  
  uint32 version
 
  uint32 version
 
  if version >= 5:
 
  if version >= 5:
     uint32 frames
+
     uint32 frames   // If version < 5 then frames = 1
 
  if version >= 2:
 
  if version >= 2:
     if version < 5:
+
     for each frame:
      if version >= 4:
  −
          uint32 size
  −
          byte riff[size] // Avg lightmap webp file
   
       uint32 size
 
       uint32 size
       byte jfif[size]   // Intens/Avg lightmap jpeg file
+
       byte image[size]   // Image is JPEG/JFIF or WEBP/RIFF file format
       if version == 3:
+
       if version >= 3:
 
           uint32 size
 
           uint32 size
           byte jfif[size] // Intens lightmap jpeg file
+
           byte image[size]
    if version >= 5:
+
      if version >= 6:
      for each frame:
   
           uint32 size
 
           uint32 size
           byte riff[size] // Avg lightmap webp file
+
           byte image[size]
          uint32 size
  −
          byte jfif[size] // Intens lightmap jpeg file
   
     if size != 0:
 
     if size != 0:
 
       uint32 uncompressedSize
 
       uint32 uncompressedSize
Line 492: Line 487:  
   EType_Iso4,
 
   EType_Iso4,
 
   EType_Ident,
 
   EType_Ident,
   EType_Int2
+
   EType_Int2,
 +
  EType_Struct
 
  };
 
  };
 +
Maniaplanet 4.1 has changed the way script types and values are written. The code now does the following:
 +
 +
* First write the list of all types (all types appear only once).
 +
* For each value, write the index of the type in the list, and then write the value.
 +
 +
Writing the types and values has not changed except for the addition of structures which are a plain list of members.
 +
 +
Also note that the indices are written in the following form:
 +
 +
* If the index is < 128, it is written directly into one byte (because this covers 99% of the cases).
 +
* Otherwise, it is written in the first 7 bits of the first byte and in the following 2 bytes, a total of 23 bits (7+8+8). The 8th bit of the first byte is set to 1.
 +
 +
Note that this scheme is also used to write string lengths.
    
'''03043054''' (skippable)
 
'''03043054''' (skippable)
Line 677: Line 686:     
===CGameWaypointSpecialProperty (03 13B 000) ===
 
===CGameWaypointSpecialProperty (03 13B 000) ===
 +
Mapped to the new GameData engine (2E) as class CGameWaypointSpecialProperty (2E009000).
 +
 
'''0313B000'''
 
'''0313B000'''
 
  uint32 version
 
  uint32 version
Line 865: Line 876:  
     lookbackstring
 
     lookbackstring
 
  if version >= 3:
 
  if version >= 3:
     uint32 flags
+
     struct SCollectorDescFlags
 +
    {
 +
        uint32 __unused2__ : 1;
 +
        uint32 IsInternal  : 1;
 +
        uint32 IsAdvanced  : 1;
 +
        uint32 IconDesc    : 5;  // 0 = Unknown, 1 = NoIcon, 2 = BGRA_64x64, 3 = BGRA_128x128
 +
        uint32 __unused__  : 24;
 +
    };
 
     uint16 catalogPosition (order of the blocks within pageName)
 
     uint16 catalogPosition (order of the blocks within pageName)
 
  if version >= 7:
 
  if version >= 7:
Line 915: Line 933:     
'''0301C000''' (header)
 
'''0301C000''' (header)
  uint32 itemType (0: Undefined, 1: Ornament (formerly: StaticObject), 2: PickUp (formerly: DynaObject), 3: Character, 4: Vehicle, 5: Spot, 6: Cannon, 7: Group (Dev build), 8: Decal (Dev build), 9: Turret (Dev build), 10: Wagon (Dev build), 11: Block (Dev build))
+
  uint32 itemType (0: Undefined, 1: Ornament (formerly: StaticObject), 2: PickUp (formerly: DynaObject), 3: Character, 4: Vehicle, 5: Spot, 6: Cannon, 7: Group, 8: Decal, 9: Turret, 10: Wagon, 11: Block, 12: EntitySpawner
    
'''0301C001''' (header)
 
'''0301C001''' (header)
Line 1,061: Line 1,079:  
     string dirNameAlt
 
     string dirNameAlt
 
  if version >= 5:
 
  if version >= 5:
     bool unknown
+
     bool useDefaultSkin
    
===CGamePlayerProfile (03 08C 000)===
 
===CGamePlayerProfile (03 08C 000)===
Line 1,095: Line 1,113:  
* [http://www.wolfgang-rolke.de/gbxdump/gbxlightmap.zip GbxLightMap download] - a Windows tool to extract the lightmaps from a given .Map.Gbx file (includes source code).
 
* [http://www.wolfgang-rolke.de/gbxdump/gbxlightmap.zip GbxLightMap download] - a Windows tool to extract the lightmaps from a given .Map.Gbx file (includes source code).
 
* [http://www.wolfgang-rolke.de/gbxdump/gbxmetadata.zip GbxMetadata download] - a Windows tool that indicates the persistent attributes of a given .Map.Gbx file (includes source code).
 
* [http://www.wolfgang-rolke.de/gbxdump/gbxmetadata.zip GbxMetadata download] - a Windows tool that indicates the persistent attributes of a given .Map.Gbx file (includes source code).
 +
* [[File:Krzychor-campaign-maker.zip]] - a Windows tool that allows to create custom campaigns for TMNF/TMUF. Sources not included.
    
[[Category:File formats]]
 
[[Category:File formats]]
90

edits

Navigation menu