                       WAD Auxiliary Resource Manipulator
       Version 1.3 of April 1995 by Robert Fenske, Jr (rfenske@swri.edu)
       Ported to OS/2 2.1 by Mark K. Mathews (mark.mathews@channel1.com)

			Summary of features
			-------------------

		One of the fastest NODES/SSECTORS/SEGS builder on the planet
		Fastest BLOCKMAP builder on the planet
		Fully automatic REJECT resource builder
		Has various utility function options, including
			merging WADS and levels
			extracting resources
			substituting resources
			randoming things
			rename resources
		Works with DOOM I, DOOM II, and HERETIC WAD files
		Full source code
		Compiles and runs under these operating systems:
			MS-DOS, OS/2, SunOS 4.1.x, Solaris 2.x,
			Linux, FreeBSD, HP-UX, VMS, Windows/NT

			General description
			-------------------

	This is release 1.3 of my WAD Auxiliary Resource Manipulator, or
WARM and is an update of my previous 1.1 release of January 1995.  This
package consists of the following fifteen files:
	WARM13.TXT		This text file
	DMGLOBAL.I		The include file
	WARM.C			\
	WADIO.C			  \
	NODES.C			    WARM C sources
	BLOCKMAP.C		  /
	REJECT.C		/
	WARMDOS.EXE		MS-DOS executable
	WARMOS2.EXE		OS/2 2.1 executable
	MAKEFILE.DOS		MS-DOS GCC makefile
	MAKEFILE.OS2		OS/2 2.1 C/Set++ makefile
	MAKEFILE.UNX		various Unix flavors makefile
	MAKEFILE.COM		VMS build script
	WARMOS2.DEF		OS/2 2.1 auxiliary file
	EMU387			ix86 floating point emulation library

	WARM's main purpose is to build the NODES, SSECTORS, SEGS, BLOCKMAP,
and REJECT resources from the basic resources that compose a level.
	Executing the program with no command line arguments will display help
regarding the command line.  Note that there are several optional functions
available that are unrelated to the reject, nodes, or blockmap creation.
Hopefully most have an obvious function, but I'm not going to bother to
exlain any of them.  They are in this program because I did not want to mess
with more than one program to get all the functionality I wanted.
	To use this program under MS-DOS on a computer without a math
coprocessor requires using the EMU387 floating point math emulation library.
The environment variable GO32 must be set as "SET GO32=emu <dir>\EMU387"
where <dir> is the directory in which you have the EMU387 file located.
	Porting this code to any system I haven't already tried should be
straightforward.  If the target system is big-endian, the BIG_ENDIAN define
will have to be modified appropriately in WADIO.C.
	Any comments, etc about WARM can be directed to rfenske@swri.edu.  If
you do find any WAD file that WARM does not process correctly, please let
me know about it.

			Acknowledgements
			----------------

Mark Mathews (mark.mathews@channel1.com)
	Ported the code to OS/2 and performed extensive testing for the
	1.1 release and prodded me enough to make me finish it.

Jason Hoffoss (hoffo002@gold.tc.unm.edu)
	The author of DMAPEDIT came up with the packed blockmap idea.

				Packed BLOCKMAP
				---------------
	Each block in the BLOCKMAP represents a 128x128 region of the map
area.  Many of these regions will be empty, i.e. no LINEDEFS exist in these
regions.  A normal BLOCKMAP will have a separate entry for each of these empty
regions.  However, doing so is unnecessary.  A single entry in the BLOCKMAP
can represent all of the empty blocks.  Having such a single entry can
typically reduce the size of the BLOCKMAP by 1/3.

			REJECT generation algorithm
			---------------------------

	Since I have not seen any other program that does fully automatic
REJECT generation, I give an explanation of what the builder does in the
following paragraphs.
	The algorithm for generating the REJECT resource is given in the source
code.  Basically, it is built from strictly line of sight determinations
between all sector pairs.  For each sector pair, a check is made as to whether
any one-sided lines block the view of a chosen two-sided line from each sector.
I.e., if one-sided lines block the views of all two-sided lines of one sector
from all the two-sided lines of the other sector, then the sector pair is
deemed not in sight of each other.  Otherwise, the sector pair can see each
other (obviously).  However, the method used is not perfect and will not catch
all instances of line-of-sight.
	For each pair of test points, all potentially blocking one-sided lines
must be checked.  To avoid having to check all the one-sided lines of each
level, the BLOCKMAP is used to greatly limit the search.  Since the BLOCKMAP
is a record of which lines are in each 128x128 block of the map, and since it
is fairly easy to compute which blocks are between a pair of test points, the
BLOCKMAP provides a ready list of only those one-sided lines that are
potentially in the way of line of sight.  Even with this method, the process
is still computationally expensive; for large levels the REJECT computation
takes far longer than the nodes generation.  The program does have an option
to produce just a zeroed REJECT resource, so the possibly lengthy computation
time can be avoided.

			Version History
			---------------

1.0	August 1994	Never released, update of original VNB program
			Compiled for MS-DOS and SunOS
			Includes automatic reject builder

1.1	January 1995	First released version, compiled for MS-DOS, OS/2,
			SunOS, Solaris, Linux
			Fixed obscure bugs in the nodes, blockmap, and reject
			generation routines
			Added Deathmatch v2.0 option to dmit() routine

1.2	February 1995	Never released
			Experimental optimizations that didn't really speed
			anything up

1.3	April 1995	Second released version
			Implemented packed blockmap
			Added unique sector method to node generator
			Reject generator is faster
			Improvements to the dmit() routine
			Improvements to the emstat() routine
			Added rename function
			Fixed memory usage bug in node generator (only
			affected Linux executable)
			Tested under FreeBSD, HP-UX, VMS, and Windows/NT
