FF8/FileFormat magfiles
By MaKiPL
There is no unified format for MAG files. Every file has their own naming, even extension. You can't really distinguish them.
Files starting with 10 00 00 00 09 00 00 00 are obviously TIM texture. What we know so far is how to extract GF sequence and GF environment geometry (ifrit ball, Leviathan's rock, Cerberus gate...)
G.F. Sequence
Environment objects
First, recognize file: 1.Header must be 8 bytes null!! 2.Jump to pointer at 0xC [Global] 3.This int indicates pointer count. Example: 10 00 00 00 is 16 pointers
3a. If pointer is 00 00 00 00, just ignore it and move forward
4.After noting all pointers that are not 00 00 00 00 (therefore inspecting Count*4 bytes) just jump to selected one [Relative jump from count int] 5.See third int (8th byte) for UNKNOWN [Relative jump from 03 00 00 00] 6.Read int at 20th byte for VERTICES offset [Relative jump from 03 00 00 00] 7.Read int at 24th byte for VERTICES COUNT [Vertex is 8 bytes! X Z Y W, where W is probably weight byte [as in OBJ specification] and is normally unused (as usual, even in casual OBJ files)]
I'm aware it's chaotic, like no tables and etc. but it's up-to-date information and I'll update it after I crack the face indices (triangles/quads)