Open Zekfad opened 6 months ago
Has there been an update to the package/data structure? There's a few entries missing between gpu_offset and size, which would make the new structure smaller than before. Edit: Nevermind, I did not see the "buffer" part of the variable.
It seems to be a better match than the original structure. While I don't know what the two other offsets would be used for - too far from the actual data to be of use to anything - everything aligns well and it does remove the unknowns. Plus if the game ever decides to go above 4GB for a single file, it'll be supported now.
The type header seems to also have the alignment
and gpu_alignment
fields at the end, since they always have the same set of values.
EDIT: Although I don't really understand how a type having an alignment would make sense if the file itself already has an alignment.
buffer offsets seems to be related to how game read files. If my understanding is correct internal structure have a known size, some array is allocated and then files are read (mapped?) to array elements. e.g. buffer_offset seems to be aligned to 0x200 bytes per element
Seems that bitsquid (stingray) partially moved to 64bit offsets and header includes some clues for read buffers E.g. aligned offsets seems to suggest that during load they allocate full buffer size or smth like that. Here's file header as I see it: