Extracting graphics from Doom alpha

Doom alpha 0.4 and 0.5, in addition of having special formats for pictures, have also two special formats for graphics, different from the ones used in regular Doom. This is why, when you use DeuTex 4.0.3 to extract the contents of the Doom 0.4 and 0.5 iwads, so many graphics end up in the lumps/ directory.

I've just found out how to decode them. Enjoy the result :-)


On the left, TITLEPIC as it comes out when you extract it "normally". Note how the image is squashed horizontally and repeated four times vertically. On the right, TITLEPIC extracted with the appropriate interleaving algorithm. On the top, in the white background xterm, the raw2ppm command lines that were used to produce the two above images. In the big green window, the part of raw2ppm that does the interleaving.

I plan to update DeuTex to give it the capability to extract those lumps. I've also sent this hacked raw2ppm to Udo Munk for inclusion in the next release of Xwadtools. In the meantime, you can get it from this page (raw2ppm.c, raw2ppm.6, palettes.c), as well as a script to extract the graphics from the Doom 0.4 lumps. Recipe :

  1. unpack Xwadtools 990926,
  2. copy raw2ppm.c and raw2ppm.6 in the raw2ppm/ directory,
  3. copy palettes.c in the lib/ directory,
  4. compile and install Xwadtools,
  5. with DeuTex, extract the contents of the Doom 0.4 iwad,
  6. cd to the lumps/ directory created by DeuTex,
  7. run the script.
#	convert Doom alpha 0.4 graphic lumps
#	AYM 1999-10-09

# HUFONT is in fact more than just an image. There is apparently
# an index at the beginning of the lump, that raw2ppm does of
# course not extract. The offset of 794 is an approximation.

mkwad -v -p titlepal.wad PLAYPAL titlepal.lmp
pal2c titlepal.wad 0 doom04t >doom04t.c
raw2ppm -v -cdoom04        -w10     gnum*.lmp
raw2ppm -v -cdoom04  -s794 -w12     hufont.lmp
raw2ppm -v -cdoom04  -s2   -w320 -I infobar*.lmp
raw2ppm -v -cdoom04  -s2   -w24  -I perfbox.lmp
raw2ppm -v -cdoom04t -s2   -w320 -I titlepic.lmp
raw2ppm -v -cdoom04  -s2   -w64  -I weapbox.lmp
raw2ppm -v -cdoom04  -s2   -w16  -I wnumber*.lmp
raw2ppm -v -cdoom04  -s2   -w68  -I wpic*.lmp

# Show that the first two bytes of those lumps contain respectively
# (width / 4) and height.
#files="infobar*.lmp perfbox.lmp titlepic.lmp weapbox.lmp wnumber*.lmp wpic*.lmp"
#for f in $files
#do	printf '%-13s' $f
#	atdump $f | tee /dev/null 2>/dev/null | head -c 17
#	identify ${f%.lmp}.ppm
Doing the same thing for Doom 0.5 is left as an exercise to the reader.

All trademarks are the property of their owners. This page contains material copyright id Software. This document is copyright © André Majorel 1999. Verbatim copies are allowed. Use this document and software at your own risk.

This is http://www.teaser.fr/~amajorel/doom/historic2/index.html, last modified on 1999-10-16.