DeePTeam
Member
Posts: 127
Registered: 05-00 |
You do open the file as binary, but internally there's a "directory". So the 1st 4 bytes is IWAD or PWAD, then #dir entries[4], and offset pointer (4) to the start of the directory.
So what you do is seek to "offset" then read "number" times for the size of each dir entry (which is 16 each). Each dir entry is offset[4](to start of lump), size[4](of lump), Name[8](of lump).
That should be easy to do. Each type of lump has different internal formats. For that, get the source code to DOOMED or DEU or WINTEX or DMAPEDIT or NWT or ...
|