Changes

Jump to navigation Jump to search
No change in size ,  25 February
m
Line 75: Line 75:  
For the header, the ivXor setup only happens if there are three or more folders, and the name of the third folder is 4 or more characters in length. The folder's name is converted to UTF16 and CalcIVXor(&wszName[2], 4) is called (i.e. it runs on the third and fourth character of the name, both characters being two bytes). If the one of the folder conditions is not met, ivXor stays zero.
 
For the header, the ivXor setup only happens if there are three or more folders, and the name of the third folder is 4 or more characters in length. The folder's name is converted to UTF16 and CalcIVXor(&wszName[2], 4) is called (i.e. it runs on the third and fourth character of the name, both characters being two bytes). If the one of the folder conditions is not met, ivXor stays zero.
   −
For .gbx files, CalcIVXor(&specificParentClassID, 4) is called every time [[GBX#Reading_the_body|ReadNode]] is called. First, the parent class of the current node's class is determined. Then, the specific class ID corresponding to this is determined (which is the exact opposite process of finding the generalized class ID as described in [[Class IDs#Class ID mappings|Class IDs]]). This ID, stored as little endian bytes, is then used as input for CalcIVXor. A few chunks also do ivXor additionally - Plug::CPlugSurfaceGeom 0900F004 and Scene::CSceneVehicleTuning 0A02E000 / Plug::CPlugVehiclePhyTuning 090EB000.
+
For .gbx files, CalcIVXor(&specificParentClassID, 4) is called every time [[GBX#Reading_the_body|ReadNode]] is called. First, the parent class of the current node's class is determined. Then, the specific class ID corresponding to this is determined (which is the exact opposite process of finding the generalized class ID as described in [[Class IDs#Class ID mappings|Class IDs]]). This ID, stored as little endian bytes, is then used as input for CalcIVXor.
    
There is one special exception with .gbx files. If the specific class ID is 0x07031000 (Control::CControlText), 0x07001000 (Control::CControlBase) is used as input instead.
 
There is one special exception with .gbx files. If the specific class ID is 0x07031000 (Control::CControlText), 0x07001000 (Control::CControlBase) is used as input instead.
   −
In the code, the ivXor execution is referred to as m_DummyWrite.
+
A few chunks also do ivXor additionally - Plug::CPlugSurfaceGeom 0900F004 and Scene::CSceneVehicleTuning 0A02E000 / Plug::CPlugVehiclePhyTuning 090EB000. In the code, the ivXor execution is referred to as m_DummyWrite.
    
===Header versions 6+===
 
===Header versions 6+===
44

edits

Navigation menu