Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POF version 2118 Support #16

Open
Shivansps opened this issue Dec 17, 2019 · 0 comments
Open

POF version 2118 Support #16

Shivansps opened this issue Dec 17, 2019 · 0 comments

Comments

@Shivansps
Copy link

Due to everything that has been discussed here https://www.hard-light.net/forums/index.php?topic=96055.0 and on issue#15 #15 bumping the POF version to 2118 and create the "SLC2" chunk type in replacement of SLDC was the solution to pof alignment problems.

POF version 2118 must have all POF Chunk types aligned, this means, all chunks with a string on them (FUEL, GLOW, SPCL, TXTR, DOCK, PATH, SLDC, OBJ2) must have the proper space padding, and if the string is empty it must have 4 null terminators.

POF version 2118 also has a new chunk type, "SLC2", SLC2 is a revised version of the SLDC chunk, that changes the type of node char for a type of node int.

SLC2

uint tree_size
for each node, n {
int type // 0 = SPLIT, 1 = LEAF/polylist
uint size
if !type { // SPLIT
vector bound_min
vector bound_max
uint front_offset
uint back_offset
}
else { // LEAF
vector bound_min
vector bound_max
uint num_polygons
for each polygon, p {
uint polygon_addr // indexed into shield mesh face list?
}
}
}

It is just a clone of the SLDC chunk but with ints.

For compatibility, Pof 2118 must have both the SLDC and SLC2 chunks. No data has to be stripped away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant