Tags: tracktwo/xcomsave
Tags
Fix writing of object properties in EU The object property structure has a different size in EU and EW. When converting from json to binary we need to know the target version in order to produce the right format. This adds the version to all the functions that build xcom objects from json, although several don't need the version yet. Fixes #20
Handle ambiguity in array kind determination Turns out that reading a "None" as the first element of an array doesn't necessarily mean it's a struct array where the first element has all default values -- "None" can also appear in enum arrays, presumably where "None" means the 0 value of the enum (unconfirmed). This has been observed in the XGExaltSimulation.m_arrCellLastVisibilityData checkpoint element, where the first element is "None" and the second is an enumerator value. Since this is ambiguous, we need to keep scanning ahead at subsequent array elements to figure out what kind of array this really is. It's in theory possible that all the elements will be "None", although I haven't seen this yet. If that can happen we have no recourse except to hard-code particular known arrays with the correct type as per the UPK file or actually read the UPKs to determine what shape the array has.
Add support for Android saves Android save support now working. Android saves use version 0x13 for the save file (vs 0x10 for the PC version of EW). The Android saves differ from PC in several key ways: - Android saves have no header checksum, just the compressed data checksum. It occurs in the same place as for PC, and is the same CRC32B algorithm. - The compressed data section of Android saves are compressed using zlib instead of lzo. - There is also a small bit of data after the checksum in the header but before the compressed data. This may be Android profile related?
PreviousNext