Are there specs for Q2 BSPs that I can read? I can find Q1 specs... maybe they're the same.
I read the Q1 specs and parsed this out of the BSP header:
(long = little endian)
string(4) magic = IBSP
long bspver = 38
long entities_offset
long entities_length
long planes_offset
long planes_length
...etc...
Using this list:
var $fields = array('entities', 'planes', 'miptex', 'vertices',
'visilist', 'nodes', 'texinfo', 'faces', 'lightmaps',
'clipnodes', 'leaves', 'lface', 'edges', 'ledges',
'models');
Now, (a) is this still valid for Q2, and (b) how do I parse out the textures (it's in miptext, correct?)?
(Actually, in the mean time, I pull out miptex and use regular expressions to find strings of minimum 5 characters and with a / in them. Not very clean or accurate.)