Alternative to wad archive format.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Alternative to wad archive format.

by Cyb » Mon Apr 11, 2005 4:20 pm

Graf Zahl wrote:
Chris wrote: That said, it might not be that hard to use zip files. There's libs around that do the handling for you (zzlib, I think) that run off zlib.

It's definitely not that hard. So far I just had problems to find some library that is usable for this. Most are either far too complex or just a big pain to use.
physfs: http://icculus.org/physfs/

I had a pain in the butt time getting it to compile for MinGW, but it should be a lot easier with MSVS (which I haven't attempted to compile it with).

At any rate, it actually already supports reading from wads, as well as zip files and a couple other archive types. Pretty easy to use too.

by skadoomer » Thu Mar 31, 2005 6:30 pm

I think i remember randy saying how he wanted to add this feature in about a year or so ago to help those who are developing projects.

by Bio Hazard » Thu Mar 31, 2005 6:29 pm

I was thinking of writing a wad manager that used a DIRINFO lump to keep track of that kind of thing. but since I can't find a really good reference on the WAD file format, I can't do it

by NecromANGEL » Thu Mar 31, 2005 9:19 am

I believe there were an MultiArc plugin for Total Commander allowing to browse wad files like archives and extract/add files, it was making group of lumps enclosed by *_start and *_end look like a folder, and so was it for MAP?? and E?M? records... I don't know where to get it though, I lost it long ago and wrote my own, buggy version of that addon )

by Graf Zahl » Sat Mar 26, 2005 3:19 am

MasterOFDeath wrote:Hmm, maybe some coding from Doomsday could be used (with permission and credit of couse). It supports .PK3 and WAD files. I personally would love to see pk3 support myself.

That would be an option. I just took a look at that code and it doesn't seem too bad. It could be a nice project for the future.

by Bio Hazard » Fri Mar 25, 2005 10:20 pm

um, just FYI: PK3 == ZIP

by MasterOFDeath » Fri Mar 25, 2005 3:26 pm

Hmm, maybe some coding from Doomsday could be used (with permission and credit of couse). It supports .PK3 and WAD files. I personally would love to see pk3 support myself.

by Graf Zahl » Wed Mar 23, 2005 2:07 pm

ZLib can't handle zip files. It's only the compression algorithm, not the format library.

by Bio Hazard » Wed Mar 23, 2005 2:03 pm

doesnt ZDoom use zlib already? for PNG support? why not extend it to zip files?

by Graf Zahl » Sun Mar 20, 2005 3:24 am

Chris wrote: That said, it might not be that hard to use zip files. There's libs around that do the handling for you (zzlib, I think) that run off zlib.

It's definitely not that hard. So far I just had problems to find some library that is usable for this. Most are either far too complex or just a big pain to use.

by QBasicer » Sat Mar 19, 2005 9:56 pm

We all know zips support comments...use that feature!

by Chris » Sat Mar 19, 2005 7:43 pm

Sprite offsets are stored in the image. A WAD file is nothing more than:

Code: Select all

4: IWAD/PWAD header
4: Entry count
4: Directory offset
Directory offset-12: lump data
for Entry count
   4: Data offset (points somewhere in lump data)
   4: Data length
   8: Lump name (Null terminated if less than eight)
end
possible junk data....
Not too bad of a format, but the 8-byte restriction on the lump name is very limiting. Otherwise, one could just use / in filenames and have the editor treat them as a seperator (ie, name a lump "sound/d_thunder.ogg" and the editor would treat it as a file "d_thunder.ogg" in the "sound" directory).

That said, it might not be that hard to use zip files. There's libs around that do the handling for you (zzlib, I think) that run off zlib.

by Macil » Sat Mar 19, 2005 12:58 pm

A sprite offset file maybe? I dunno.

by Xaser » Sat Mar 19, 2005 12:46 pm

Heh, that's not a bad idea, but how would things such as sprite offsets be stored?

by ducon » Sat Mar 19, 2005 5:21 am

You can instead propose an integrated wad viewer, for example a wad/unwad couple of programs, like zip/unzip, rar/unrar, ace/unace, tar and gzip/gunzip…

Edit: This couple may be used to navigate in the wad as you can navigate inside a zip file with mc or any good file manager.

Top