Closed lmichaelis closed 1 year ago
I believe I understand now how they are supposed to work since I had to use them in the new save-game parser here:
It looks like these are actually references to other VObs in the same archive. Their index
field contains the index of the object being referenced. Basically, any object within the archive can be referenced this way.
Implementing this fully, as originally intended, in phoenix would require additional memory overhead since we'd have to (at least) store the start position of each object in the VOb. We probably wouldn't be able to fully implement them anyways since the original archive implementation was tightly integrated in the game engine so this kind of reference would actually be able to grab a fully initialized VOb pointer and put it right there.
This means, the only real way to handle these is to save the object indices only where required and then use the references on a case-by-case basis. This means we need to find where §
-VObs are actually used and make sure we're parsing them correctly (looking at you cs_camera
).
Hm it looks like this feature is not generally used within most archives. For now, it looks like we don't need to worry about supporting this in general.
These VObs are empty though they seem to be related to
zCCSCamera
keyframes. ZenLib calles themzReference
but does not use them anywhere. Reverse-engineering of the original game binary might be required.Leads:
zCArchiverBinSafe::ReadObject@0x51fb50
contains a check against0xA7
at0x51fbde
0x51fc63
contains string"D: zArchiver(::ReadObject): objRef, illegal object index: "