MAP2WAD.EXE - a duke3d to doom map converter

Copyright (c) 2002 Nicholai Main

uzi666@juno.com

version 0.85 dated August 06, 2002

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

=========

MAP2WAD converts duke3d or other build format .maps into doom format .wads.  It has only
been tested with duke3d internally, but others have reported it working in blood.  If it
works/doesnt work in your favorite build game not mentioned here, drop me a line.  If it
aborts with a bad version, and the version number is either 5 or 6, you can use the freely
released BUILD source by Ken Silverman, in which is a 5->6 and 6->7 converter.  As far as
I know version 7 was the only one ever used in games.

Usage on the command line is "map2wad foobar.map foobar.wad ExMx" where foobar.map is a
suitable duke3d map, foobar.wad is the destination .wad file that you want written (ANY
FILE ALREADY EXISTING WITH THAT NAME WILL BE OVERWRITTEN), and ExMx is the level # label
that you want in the wad file (can also use MAPxx, or if you are using a source port that
supports odd map names, whatever it uses).  Default textures can also be specified;
run map2wad with no arguments to view the optional syntax.

As of the current release, map2wad translates all two dimensional geometry, including a
set of linedefs, sidedefs, vertexes, and sectors.  Sector heights are also translated.
No attempt is made to translate sprites, textures, or anything else I didn't mention,
including neato build features like slopes, independant wall shading, blah blah blah.

All sidedefs are given valid sector refrences that should create a .wad file with all
closed sectors.

A warning about 2D geometry: build allows vertexes and lines to be placed much closer
together than doom does.  This can be seen in things such as sliding doors.  When these
things are converted into doom, vertexes are rounded off to the smallest doom unit, which
often glops stuff like this together.  If you run an error checker on your brand new .wad
and it's coming up with sector not closed, 0 length lines, lines share 2 vertexes, lines
cross, and other funderful errors they will most surely be originating from these or other
tightly packed structures which just cannot be successfully translated into doom.  You can
either correct the error in the wad or move things a bit farther apart in the map and
convert again.

If you feed map2wad anything other than a duke3d map, it will most likely barf a horrible
death.  If you feed it a map which crashes in build for whatever reason, it will most
likely crash worse.  (build fans know that once in a while build mysteriously fubars your
map, they save often and with alternate filenames).

map2wad is quite stable.  It is not finished in the respect that it does not convert
sprites or textures or lighting or slopes or <insert favorite build feature here>, but
everything it does it does quite well.  As long as you feed it a valid build map, there
should be no problems.  Report any bugs to me at my email address.

Update on operating systems: these apply to the included executable.  If you are a
competent programmer, you can compile the included source for your target machine, see
down a paragraph or two for what it should compile under.  I'm sorry but I don't have
time to answer "why can't I compile this?", if you are a competent programmer or competent
*nix user you should be able to compile it.

Operating systems: map2wad is designed to run on a vanilla DOS 3.0+ system.  To this end
CWSDPMI is included, which provides dpmi services to map2wad, a fully 32bit program.  You
do not need to worry about running CWSDPMI, it will be run by map2wad.  However most of
you, and even me the developer, are running under WIN32.  In this case, map2wad should run
fine in win95/98/me and win2k/xp, but of course not under win 3.1.  The windows
enviornments provide dpmi services and thus cwsdpmi is not used under them.  Even though
2k and xp only emulate dos services, map2wad is a decently conformant dos program which
uses no special tricks nor nearptrs nor any other tomfoolery to get its job done.  If you
have problems running under one of these OSes, first try running the included TEST.MAP
through map2wad.  It is a map that is known never to crash map2wad.  If TEST.MAP also
crashes, then you have an OS conflict, e-mail me.  I have also included TESTOUT.WAD, which
should be byte-identical to the command

"map2wad test.map test.wad MAP01 MFLR8_2 FLAT22 GSTONE1"

using the supplied test.map and this release of map2wad.

map2wad is free software under the GNU-GPL lisence.  No warranty, blah blah blah.  Read
the comments at the top of map2wad.c, the disclamer when the program is run, and the file
COPYING for more info.  It should compile and run under just about any little endian
POSIX system, and ms-dawz and windoze 95/98/me too.  Big endian?  nope.

One last word: do read the program output.  If you run map2wad from the run dialog, it may
run and exit too quickly for you to read.  Run it from the command line.  Make sure you
have writing permissions on whatever .wad you are trying to write or overwrite and reading
permissions on whatever .wad you try to read (kind of a "DOH" but you never know).  Also
pay close attention to the last line of the output (if succesful); I expect beer by the
caseload.  =)


