Digital Paint Discussion Board
Paintball 2: The Game => Paintball 2 Discussion => Topic started by: sk89q on December 07, 2007, 01:34:47 PM
-
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.)
-
forewarning: this is not a solution to your problem
But, surely Jitspoe can help you since he was able to parse maps before to calculate texture usage: http://dplogin.com/forums/index.php?topic=5386.0
-
I just did a simple find in files for "pball/", but that's not a real solution.
-
Mine is *slightly* better. :P