Changes

Jump to navigation Jump to search
1,130 bytes added ,  15:45, 4 November 2022
→‎Reading the body: Added Encapsulation
Line 172: Line 172:     
''Note'': In case of a text format .gbx file (marked by a 'T' in the header) all numbers and strings are stored as one line of ASCII text in each case. Every line ends with a carriage return-linefeed ({{c|<CR><LF>}}) combination (0x0D and 0x0A). A single {{c|<LF>}} is part of a string.
 
''Note'': In case of a text format .gbx file (marked by a 'T' in the header) all numbers and strings are stored as one line of ASCII text in each case. Every line ends with a carriage return-linefeed ({{c|<CR><LF>}}) combination (0x0D and 0x0A). A single {{c|<LF>}} is part of a string.
 +
 +
===Encapsulation===
 +
Encapsulation is a special kind of chunk behavior added in ManiaPlanet that handles lookbackstrings and noderefs differently.
 +
 +
* A new temporary lookbackstring list is created just for this chunk - the counting of strings starts from 1 again. However, the previous state of lookback strings is not reset.
 +
* An index of the noderef is not included and the node is not added to the node list. That list is not reset either.
 +
 +
It looks like this:
 +
 +
CSystemArchiveEncapsuledChunk::CSystemArchiveEncapsuledChunk();
 +
// ...
 +
CSystemArchiveEncapsuledChunk::~CSystemArchiveEncapsuledChunk();
 +
 +
In this range of code, you need to set up your binary reader to handle the two rules above.
 +
 +
Here is the list of chunks that use encapsulation:
 +
 +
* CGameCtnChallenge '''03043040''', '''03043041''', '''03043043''', '''03043044''', '''0304304E''', '''0304304F''' (version < 2), '''03043054''', '''03043058''' (version >= 1)
 +
* CGameCtnMacroBlockInfo '''0310D00B''', '''0310D011'''
 +
* CGamePlayerProfileChunk_GameScores '''03146000''', '''03146002''', '''03146004'''
 +
* CGamePlayerProfileChunk_ScriptPersistentTraits '''03170000'''
    
== Class descriptions ==
 
== Class descriptions ==
33

edits

Navigation menu