sorry I broke the ID into two SHORTs or WORDS, instead of just labeling it as a DWORD
in the image the ID as a DWORD is 00 00 00 08
I described it as
mainID = 0
subID = 8
something stupid like that... hm thats pretty cryptic lol
anyway when you get to ID 00 00 00 08, the next DWORD is a size. thats the size of the user binary.
just log the address of your cursor and the size, then jump past the binary using the size as the offset.
then you continue your loop
and it'll begin with a new ID
here's an example for what you'll likely see
01 00 80 00 00 00 00 00 00 00 00 00
01 00 80 00 00 6B 00 00 00 00 00 00
01 00 80 00 00 C4 01 00 00 00 00 00
01 00 80 00 40 E2 01 00 00 00 00 00
01 00 80 00 80 00 02 00 00 00 00 00
01 00 80 00 C0 4B 02 00 00 00 00 00
where 01 00 80 00 is the ID, and the next two DWORDs are apart of that ID's structure
my document is messed up there, I divided them into WORDS(2bytes) because I was going to expand this to ninja gaiden aswell.. and I wanted to make the read fucntions flexible and expandable.
but to make things easier, read your IDs as DWORDs
heres an example of a texture entry
01 00 04 00 00 07 09 00 00 00 00 00 29 0F 81 08 00 00 00 00
01 00 04 00 00 07 0A 00 00 00 00 00 29 0F 81 08 00 00 00 00
01 00 04 00 00 07 0B 00 00 00 00 00 29 0F 81 07 00 00 00 00
01 00 04 00 00 87 0B 00 00 00 00 00 29 0F 81 07 00 00 00 00
01 00 04 00 00 07 0C 00 00 00 00 00 29 0F 81 08 00 00 00 00
I haven't extracted textures yet, but I read in the dimension sizes
you see that 81 08 ... thats the dimension
you'll need to shift bits of byte 81 so it becomes 08 then make it an exponent of 2.
example: 0x02^0x08 = 256pixels
EDIT
I donno if you've exported geometry before?
but unless you want an unoptimized output, then you have to compare every vertex, vertex normal, texture channel, vertex colour, tangent, weights... its really annoying
I'm going to use this document to write my own stripper
http://www.codercorner.com/Strips.htm
in summary this is all you need to know
1) choose a starting face for a strip
2) choose a direction (i.e. an edge) in which you’ll walk along the strip
3) actually extend the strip in the chosen direction until you reach a triangle with no forwards connections
4) go to 1) until all faces have been visited
I was lucky before, in most games they use a mix of triangle list and triangle strip. so you can usually use triangle list. however DOA is different, I haven't seen a draw type flag.. so I'll be forced to writeup my own stripper this time around.
EDIT2
I'm going to try and write a XPR expander, which will split the components of the XPR into seperate files.
then try to rebuild it, and see if it still works. if so then i'll try increasing the size of some model parts.
if its still good then I plan to write out new geometry, and start exploring new mesh importing