NB: This was a learning project. The code is an absolute mess in places. DirectX initialisation is hard-coded with no fallback code if some feature is missing. Needless to say, this does NOT reflect the quality of my work, as this is an expiriment. It is NOT robust!

Usage: DOOM <wad> <level>
eg:
DOOM DOOM2.WAD MAP31
DOOM DOOM.WAD E1M3
DOOM TNT.WAD MAP03

Keys: use the cursor keys to move around, A and Z to move up and down.

Broken:
<ul><li>Floor splitting is abysmal. It is highly inefficient and occasionally wrong. The floor splitting code breaks sectors into horizontal spans which it then splits into triangles - uneven vertex placement results in largish cracks between sectors or "hairline" dancing-pixel cracks inside sectors. Large holes are usually the case of a sector that "overflows" another one. Ideally; decode floors via ssector/seg information or just use glBSP.</li><li>Timing (level animation) is done via the primitive Timer class. If something starts to hog CPU time, the timers all slow down leading to inconsistent animation speeds.</li><li>Scrolling walls and light effects are controlled differently; sector light effects (which affect a large amount of geometry) save the vertex array written to the vertex buffer away; this array is changed then sent to a vertex buffer, overwriting the existing data. The scrolling walls (affect a small amount of geometry) read the vertex buffer, alter the texture coordinates, then write it back. This results in a confict; if a linedef has both scrolling AND lighting effects, every time the light level changes the scroll offset is reset to the original linedef's value.</li><li>Skies that occlude geometry that is visible normally aren't handled correctly.</li><li>Player start angle is occasionally backwards.</li><li>Some of the more bizarre walls still don't load properly.</li></ul>

Working:
<ul><li>WAD loading code seems pretty decent. Once levels have been loaded, disposing the Bitmaps used to load textures would probably free up some memory.</li><li>MUS->MIDI commands conversion seems fine. This plays back music via WinMM's lower-level MIDI functions. Works fine on my PC (Creative Audigy).</li></ul>

This code is also riddled with bad practises. For example, reliance on z-buffer for z-sorting (hence any geometry using an alpha-blended texture is drawn twice, once with z-writes disabled).