Cyb

Posts: 2726
Registered: 07-02 |
okay this goes out to anyone who knows programming and/or a lot about the doom map format.
so I'm making a lump manager util type thing in my spare time, and as a sort of distraction I decided to make a map loader that would output some basic stats on the maps (and also because I hadn't made a class in a while and I wanted to make sure I still remembered). Anyways, it all went smoothly except for loading the VERTEXES lump (which btw should really be called VERTICES but I digress). Here's a snip from the doom specs:
These are the beginning and end points for LINEDEFS and SEGS. Each
vertice's record is 4 bytes in 2 fields:
(1) X coordinate
(2) Y coordinate
now to me that implies that every vertex is stored in 4 bytes so thus to get the # of verts a map has you take the byte size of the VETEXES lump and divide it by four. makes sense right? so I've been using various other editors to compare and such while I've been doing this. so I load up zort09 for testing and here's my program's input/output:
code:
$> ld /doom/levels/zort09.wad
Loading...
PWAD with 54 lumps...
Done.
$> loadmap MAP01
Verts : 5417
Linedefs: 4628
Sidedefs: 7973
Sectors : 663
Things : 488
now when I load up the same zort09.wad in wadauthor here's the stats it shows me:
http://cyb.vect.org:8080/pics/wauth_zort09.png
and then in deepsea:
http://cyb.vect.org:8080/pics/deep_zort09.png
and finally in XWE:
http://cyb.vect.org:8080/pics/xwe_zort09.png
now the lump size of the VERTEXES lump in zort09 is 21668 bytes (says my util and wintex and xwe) and 21668 / 4 == 5417 which would lead me to believe that deepsea and wadauthor have somehow both counted the verts wrong and come up with the exact same number somehow (I don't believe that to be the case tho), or is there some sort of undocumented feature of the VERTEXES lump that I should know about, or perhaps some sort of error with the zort09 vertexes lump, any info at all would be helpful because it's driving me a bit nutty
also on an interesting note, if I load map01 of massm2 the vert count for wadauthor and my own util are exactly the same, but doom2.wad's map01 is off in the vert count between the two (I didn't contrast it with deepsea or xwe though).
edit: btw you should know that my prog actually reads in the verts and sticks all their coords into an object, it doesn't just divide the lump size by 4 to get the number of verts :P
|