Shared geometry primitives can be defined outside of the post-process block. This means it's possible for shared geometry to be attached to the same model as the attachable indices. Models have been changed to include themselves in FixConnection checks (PSX attachables are excluded from this change, because I'm not sure how they work).
Additionally, shared geometry indices can be re-defined after a shared geometry primitive, meaning shared geometry primitives can only use indices that have been defined before them. To fix this, a SharedID is attached to ModelEntitys, and an attachable can only be used when attachable.SharedID <= attached.SharedID.
Other changes
Added FlushModels function, which is now called at the end of the primitive block, and before parsing shared indices after shared geometry appeared in the same primitive block.
Shared indices now uses dst as the lookup index, rather than src (which I assume is the vertex/normal data index).
Refactor changes
Changed polygonIndex to be read inside ProcessNonSharedGeometryData instead.
Renamed ProcessNonSharedGeometryData to ProcessGeometryData.
Renamed ProcessSharedGeometryData to ProcessSharedIndicesData.
Renamed ProcessGeometryPrimitiveHeader to ProcessNonSharedGeometryPrimitiveHeader.
Main changes
Shared geometry primitives can be defined outside of the post-process block. This means it's possible for shared geometry to be attached to the same model as the attachable indices. Models have been changed to include themselves in FixConnection checks (PSX attachables are excluded from this change, because I'm not sure how they work).
Additionally, shared geometry indices can be re-defined after a shared geometry primitive, meaning shared geometry primitives can only use indices that have been defined before them. To fix this, a
SharedID
is attached to ModelEntitys, and an attachable can only be used whenattachable.SharedID <= attached.SharedID
.Other changes
Refactor changes