summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs.htm40
-rw-r--r--doc/building.htm88
-rw-r--r--doc/changelog.htm64
-rw-r--r--doc/djgpp.htm58
-rwxr-xr-xdoc/ed_ex1.gifbin0 -> 530 bytes
-rwxr-xr-xdoc/ed_ex2.gifbin0 -> 596 bytes
-rwxr-xr-xdoc/ed_ex3.gifbin0 -> 702 bytes
-rwxr-xr-xdoc/ed_l_hex.gifbin0 -> 2499 bytes
-rwxr-xr-xdoc/ed_line.gifbin0 -> 15339 bytes
-rwxr-xr-xdoc/ed_lninf.gifbin0 -> 2275 bytes
-rwxr-xr-xdoc/ed_merge.gifbin0 -> 19280 bytes
-rwxr-xr-xdoc/ed_multi.gifbin0 -> 19790 bytes
-rwxr-xr-xdoc/ed_sect.gifbin0 -> 17537 bytes
-rwxr-xr-xdoc/ed_step.gifbin0 -> 15527 bytes
-rwxr-xr-xdoc/ed_t_hx1.gifbin0 -> 2383 bytes
-rwxr-xr-xdoc/ed_t_hx2.gifbin0 -> 2177 bytes
-rwxr-xr-xdoc/ed_thing.gifbin0 -> 17621 bytes
-rwxr-xr-xdoc/ed_vert.gifbin0 -> 13192 bytes
-rwxr-xr-xdoc/editing.htm1603
-rw-r--r--doc/glossary.htm152
-rw-r--r--doc/index.htm45
-rw-r--r--doc/license.htm360
-rw-r--r--doc/mainmenu.htm177
-rw-r--r--doc/overview.htm1164
-rw-r--r--doc/porting.htm1452
-rw-r--r--doc/sys.htm24
-rw-r--r--doc/thanks.htm91
27 files changed, 5318 insertions, 0 deletions
diff --git a/doc/bugs.htm b/doc/bugs.htm
new file mode 100644
index 0000000..92e5262
--- /dev/null
+++ b/doc/bugs.htm
@@ -0,0 +1,40 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">Bugs</h1>
+
+<p>If you find any additional bugs please try and send as much
+information (including a surefire way of repeating the problem if
+possible) <a href="mailto:ianc@noddybox.demon.co.uk">here</a>.
+Include the VERSION file from the distribution with your message.
+If the problem is more likely to be platform specific (e.g. a bug
+in the screen or file handling) please contact the following
+people:<a name="CONTACTS"></a></p>
+
+<table border="1" cellpadding="10">
+ <tr>
+ <td valign="top" nowrap><strong>DJGPP/DOS</strong></td>
+ <td valign="top"><a
+ href="mailto:ianc@noddybox.demon.co.uk">ianc@noddybox.demon.co.uk</a><br>
+ <strong>Note</strong>: messages with <strong>any sort</strong>
+ of attachment will not be accepted.</td>
+ </tr>
+</table>
+
+<p>Also check the <a href="sys.htm">system dependent
+documentation</a> to see if there is any bugs specific to your
+system.</p>
+
+<hr>
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id$</tt></p>
+</body>
+</html>
diff --git a/doc/building.htm b/doc/building.htm
new file mode 100644
index 0000000..69814a6
--- /dev/null
+++ b/doc/building.htm
@@ -0,0 +1,88 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">Building</h1>
+
+<p>This part of the documentation simply expands <u>slightly</u>
+on the contents of the README in the source distribution.</p>
+
+<hr>
+
+<h2>Notes</h2>
+
+<p>Note that the viDOOM makefile expects the <strong>include</strong>
+command to be honoured.</p>
+
+<hr>
+
+<h2>Instructions</h2>
+
+<h3>Step 1</h3>
+
+<p>Edit the makefile.</p>
+
+<h3>Step 2</h3>
+
+<p>Change the following line to the name of your platform:</p>
+
+<blockquote>
+ <p><tt>MAKEPLAT=djgpp</tt></p>
+</blockquote>
+
+<p>The following platforms are currently supported:</p>
+
+<blockquote>
+ <p><strong>DJGPP - </strong>Protected-mode 32-bit MSDOS
+ (Windows 9x / MSDOS + DPMI)</p>
+</blockquote>
+
+<h3>Step 3</h3>
+
+<p>If you are going to use the install script, then update the
+following line:</p>
+
+<blockquote>
+ <p><tt>INSTALLDIR=C:/viDOOM</tt></p>
+</blockquote>
+
+<p>so it points to the directory where you wish it to be
+installed.</p>
+
+<h3>Step 4</h3>
+
+<p>Set the MKDS to the directory separator for this platform.
+This is used so that the makefile can safely access
+sub directories:</p>
+
+<blockquote>
+ <p><tt>MKDS=/</tt></p>
+</blockquote>
+
+<h3>Step 5</h3>
+
+<p>If you wish to build the debug version remove the comment
+(hash character - #) from the start of the following line:</p>
+
+<blockquote>
+ <p><tt>DEBUG=-DDEBUG</tt></p>
+</blockquote>
+
+<h3>Step 6</h3>
+
+<p>To make viDOOM simply invoke the make program for your system.
+To install viDOOM invoke the make program for your system,
+telling it to build the rule <strong>install</strong>.</p>
+
+<hr width="99%">
+
+<p><a href="index.htm">Back to the index</a></p>
+
+<p><tt>$Id: building.htm,v 1.5 2000/08/13 00:35:59 dosuser Exp dosuser $ </tt></p>
+</body>
+</html>
diff --git a/doc/changelog.htm b/doc/changelog.htm
new file mode 100644
index 0000000..8fd333c
--- /dev/null
+++ b/doc/changelog.htm
@@ -0,0 +1,64 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">Changelog</h1>
+
+<p>Below is a list of the major features added or bugs fixed in
+each release:</p>
+
+<table border="1" cellpadding="3" width="100%">
+ <tr>
+ <td valign="top"><b>Version</b> </td>
+ <td valign="top"><b>Date</b> </td>
+ <td valign="top"><b>Changes</b> </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>0.01</td>
+ <td valign="top" nowrap>05/08/2000</td>
+ <td valign="top">Initial release</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>0.02</td>
+ <td valign="top" nowrap>13/08/2000</td>
+ <td valign="top"><ol>
+ <li>Fixed bug in step creation</li>
+ <li>Added functionality to allow the selection of
+ overlapping objects</li>
+ </ol>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>0.03</td>
+ <td valign="top" nowrap>Not yet completed</td>
+ <td valign="top"><ol>
+ <li>Fixed embarrassingly bad file pointer leaks.</li>
+ <li>Added conditional directives to config file.</li>
+ <li>Altered some configuration so that thing flags,
+ etc, can be different in HEXEN and DOOM mode.</li>
+ <li>Added support for generalised linedefs and sector
+ types.</li>
+ <li>Added support for ZDOOM HEXEN maps.</li>
+ <li>Added support for editting the MAPINFO lump for
+ ZDOOM levels.</li>
+ <li>Support for editting a SCRIPTS lump and
+ generating the HEXEN BEAHVIOR.</li>
+ <li>Fixed a small memory leak when closing a WAD
+ file.</li>
+ </ol>
+ </td>
+ </tr>
+</table>
+
+<hr>
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id$</tt></p>
+</body>
+</html>
diff --git a/doc/djgpp.htm b/doc/djgpp.htm
new file mode 100644
index 0000000..1d53547
--- /dev/null
+++ b/doc/djgpp.htm
@@ -0,0 +1,58 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">DJGPP</h1>
+
+<ul>
+ <li><a href="#GUI">GUI</a></li>
+ <li><a href="#BUGS">Known bugs and problems</a></li>
+</ul>
+
+<hr>
+
+<h2><a name="GUI"></a>GUI</h2>
+
+<p>Hopefully the GUI employed is fairly self explanatory. All the
+dialogs (apart from the file viewing one used to view the license
+and node builder outputs - and that's read only anyway) have an <strong>OK</strong>
+and <strong>Cancel</strong> button which behave as you would
+expect.</p>
+
+<p>All the dialogs, apart from the text editor (used for editing
+the MAPINFO lump in ZDoom mode) can be cancelled by pressing the
+ESCAPE key. On all dialogs the TAB key will give the focus to
+different objects on the dialog for keyboard control. Note that
+the file viewer does not currently honour keyboard controls (ie.
+you cannot use cursor keys, page up, etc to navigate the file).</p>
+
+<p>Note that if the yes/no question box is cancelled with the ESCAPE key, it
+is taken as <b>No</b>.</p>
+
+<hr>
+
+<h2><a name="BUGS"></a>Known bugs and problems</h2>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>External Commands</strong></td>
+ <td valign="top">On some PCs there has been occasions
+ where running external commands (e.g. the node builder)
+ fails for no apparent reason. If this does happen on your
+ system, then you must disable the command via the
+ VIDOOM.INI file and run it seperately outside of viDOOM.</td>
+ </tr>
+</table>
+
+<hr>
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id$</tt></p>
+</body>
+</html>
diff --git a/doc/ed_ex1.gif b/doc/ed_ex1.gif
new file mode 100755
index 0000000..49f03f7
--- /dev/null
+++ b/doc/ed_ex1.gif
Binary files differ
diff --git a/doc/ed_ex2.gif b/doc/ed_ex2.gif
new file mode 100755
index 0000000..e50d72f
--- /dev/null
+++ b/doc/ed_ex2.gif
Binary files differ
diff --git a/doc/ed_ex3.gif b/doc/ed_ex3.gif
new file mode 100755
index 0000000..c68be6a
--- /dev/null
+++ b/doc/ed_ex3.gif
Binary files differ
diff --git a/doc/ed_l_hex.gif b/doc/ed_l_hex.gif
new file mode 100755
index 0000000..044078d
--- /dev/null
+++ b/doc/ed_l_hex.gif
Binary files differ
diff --git a/doc/ed_line.gif b/doc/ed_line.gif
new file mode 100755
index 0000000..094e0d4
--- /dev/null
+++ b/doc/ed_line.gif
Binary files differ
diff --git a/doc/ed_lninf.gif b/doc/ed_lninf.gif
new file mode 100755
index 0000000..f663393
--- /dev/null
+++ b/doc/ed_lninf.gif
Binary files differ
diff --git a/doc/ed_merge.gif b/doc/ed_merge.gif
new file mode 100755
index 0000000..806d808
--- /dev/null
+++ b/doc/ed_merge.gif
Binary files differ
diff --git a/doc/ed_multi.gif b/doc/ed_multi.gif
new file mode 100755
index 0000000..207a96e
--- /dev/null
+++ b/doc/ed_multi.gif
Binary files differ
diff --git a/doc/ed_sect.gif b/doc/ed_sect.gif
new file mode 100755
index 0000000..5d8f9b4
--- /dev/null
+++ b/doc/ed_sect.gif
Binary files differ
diff --git a/doc/ed_step.gif b/doc/ed_step.gif
new file mode 100755
index 0000000..58285e3
--- /dev/null
+++ b/doc/ed_step.gif
Binary files differ
diff --git a/doc/ed_t_hx1.gif b/doc/ed_t_hx1.gif
new file mode 100755
index 0000000..d6d0dee
--- /dev/null
+++ b/doc/ed_t_hx1.gif
Binary files differ
diff --git a/doc/ed_t_hx2.gif b/doc/ed_t_hx2.gif
new file mode 100755
index 0000000..61ed203
--- /dev/null
+++ b/doc/ed_t_hx2.gif
Binary files differ
diff --git a/doc/ed_thing.gif b/doc/ed_thing.gif
new file mode 100755
index 0000000..af4785a
--- /dev/null
+++ b/doc/ed_thing.gif
Binary files differ
diff --git a/doc/ed_vert.gif b/doc/ed_vert.gif
new file mode 100755
index 0000000..eaf5a0f
--- /dev/null
+++ b/doc/ed_vert.gif
Binary files differ
diff --git a/doc/editing.htm b/doc/editing.htm
new file mode 100755
index 0000000..a276a86
--- /dev/null
+++ b/doc/editing.htm
@@ -0,0 +1,1603 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">Editing</h1>
+
+<h2 align="left">Index</h2>
+
+<p align="left">This page is split up into the following
+sections:</p>
+
+<ul>
+ <li><a href="#THE_BASICS">The Basics</a> </li>
+ <li><a href="#BASIC_MOUSE">Basic Mouse Operation</a> </li>
+ <li><a href="#GENERAL_KEY">General Key Commands</a> </li>
+ <li><a href="#SECTOR_MODE">Sector Edit Mode</a><ul>
+ <li><a href="#SECTOR_DISPLAY">Display</a></li>
+ <li><a href="#SECTOR_KEYS">Extra Keys</a></li>
+ <li><a href="#SECTOR_INSERT">Insertion</a></li>
+ <li><a href="#SECTOR_DELETE">Deletion</a></li>
+ <li><a href="#SECTOR_POPUP">Popup Menu</a></li>
+ </ul>
+ </li>
+ <li><a href="#LINEDEF_MODE">Linedef Edit Mode</a><ul>
+ <li><a href="#LINEDEF_DISPLAY">Display</a></li>
+ <li><a href="#LINEDEF_KEYS">Extra Keys</a></li>
+ <li><a href="#LINEDEF_INSERT">Insertion</a></li>
+ <li><a href="#LINEDEF_DELETE">Deletion</a></li>
+ <li><a href="#LINEDEF_POPUP">Popup Menu</a></li>
+ <li><a href="#SIDEDEF_MENU">Sidedef Menu</a></li>
+ <li><a href="#STAIR_CREATION">Stair creation</a></li>
+ </ul>
+ </li>
+ <li><a href="#THING_MODE">Thing Edit Mode</a><ul>
+ <li><a href="#THING_DISPLAY">Display</a></li>
+ <li><a href="#THING_KEYS">Extra Keys</a></li>
+ <li><a href="#THING_INSERT">Insertion</a></li>
+ <li><a href="#THING_DELETE">Deletion</a></li>
+ <li><a href="#THING_POPUP">Popup Menu</a></li>
+ </ul>
+ </li>
+ <li><a href="#VERTEX_MODE">Vertex Edit Mode</a><ul>
+ <li><a href="#VERTEX_DISPLAY">Display</a></li>
+ <li><a href="#VERTEX_KEYS">Extra Keys</a></li>
+ <li><a href="#VERTEX_INSERT">Insertion</a></li>
+ <li><a href="#VERTEX_DELETE">Deletion</a></li>
+ <li><a href="#VERTEX_POPUP">Popup Menu</a></li>
+ </ul>
+ </li>
+ <li><a href="#MULTI_MODE">Multiple Edit Mode</a><ul>
+ <li><a href="#MULTI_DISPLAY">Display</a></li>
+ <li><a href="#MULTI_OPERATION">Operation</a></li>
+ <li><a href="#MULTI_POPUP">Popup menu</a></li>
+ </ul>
+ </li>
+ <li><a href="#MERGE_MAP">Merging Maps</a></li>
+ <li><a href="#LUMP_EDIT">Lump Editing</a></li>
+</ul>
+
+<hr>
+
+<h2 align="left">The Basics<a name="THE_BASICS"></a></h2>
+
+<p align="left">Once you start editing in viDOOM you should be
+greeted by a screen similar to the following (no prizes for
+guessing the map number):</p>
+
+<p align="left"><img src="ed_sect.gif" width="640" height="480"></p>
+
+<p>At the top of the screen is a title bar which shows the
+following information, going from left to right:</p>
+
+<ul>
+ <li>The edit mode. This is either 'Sector', 'Linedef',
+ 'Thing' or 'Vertex'.</li>
+ <li>The position of the mouse pointer in the map.</li>
+ <li>The current scale</li>
+ <li>Whether movements are locked to the current grid scale.</li>
+ <li>The grid scale. The first number indicate the grid scale
+ that objects are snapped to. The second number indicates
+ how big the graphical grid displayed is (the blue lines
+ in the picture above). This second number changes
+ automatically as the display is zoomed in and out.</li>
+ <li>Below this is a line where specific edit modes can show
+ extra information.</li>
+</ul>
+
+<p>Note that the information bar at the top of the screen will
+also indicate what format the level you're editing is in. If the
+background to the title bar is blue, this map is in the original
+DOOM format. If the background is red then the map is in the
+extended HEXEN format.</p>
+
+<p>The main central part of the screen is made up the map being
+edited.</p>
+
+<p>Spread around the bottom of the screen are information boxes
+that display details of the object the mouse pointer is currently
+over. The size and information in these boxes changes with the
+edit mode.</p>
+
+<hr>
+
+<h2>Basic Mouse Operation<a name="BASIC_MOUSE"></a></h2>
+
+<p>The mouse acts in exactly the same way, independent of the
+mode. </p>
+
+<p>Moving the mouse over an object will change it's colour,
+indicating it can be selected. Simply left click over an object
+to select it. If the control key is pressed while selecting the
+object the object is selected in addition to any others currently
+selected.</p>
+
+<p>If the shift key is pressed then while the left button is held
+down a selection rectangle can be dragged out. Any objects within
+this box once the button is released will be selected (DOOM map
+designers note - in this instance objects are selected in order
+from the lowest numbered object up). If the control key is
+pressed along with the shift key then the objects in the box are
+selected in addition to any others currently selected.</p>
+
+<p>On pressing the right button a pop-up menu is displayed. If no
+objects are currently selected then the menu just has the insert
+option. If objects are selected when pressing the right mouse
+button (please see the <a href="overview.htm#HOVER_SELECT">overview</a>
+to see how the right button can also be made to select objects
+the pointer is currently over) then a menu is shown with options
+specific to each edit mode.</p>
+
+<p>If the left mouse button is pressed without the control key
+and the pointer is not over any object then the current selection
+is cleared.</p>
+
+<p>If the mouse has a middle button then this can be used to move
+objects once they have been selected. This basically a short cut
+for pressing the right button then selecting the 'Move' option.</p>
+
+<hr>
+
+<h2>General Key Commands<a name="GENERAL_KEY"></a></h2>
+
+<p>There are a number of key commands that are common to all edit
+modes in viDOOM. These are as follows:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap>F1</td>
+ <td valign="top">General Help (key commands and mouse
+ usage).</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F2</td>
+ <td valign="top">Help specific to the current edit mode</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Escape</td>
+ <td valign="top">Finish Editing</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Cursor Keys</td>
+ <td valign="top">Move the map display</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Shift + Cursor Keys</td>
+ <td valign="top">Move the map display quickly</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Ctrl + Cursor Keys</td>
+ <td valign="top">Move the map by one pixel (i.e. by
+ whatever value the scale is currently set to).</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Page Up/Down</td>
+ <td valign="top">Zoom in/out</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Q/W</td>
+ <td valign="top">Alert the grid lock scale</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>G</td>
+ <td valign="top">Switch grid lines on/off</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>X</td>
+ <td valign="top">Switch grid snapping on/off</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Tab/Shift Tab</td>
+ <td valign="top">Go to next/previous edit mode</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>V</td>
+ <td valign="top"><a href="#VERTEX_MODE">VERTEX edit mode</a></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>L</td>
+ <td valign="top"><a href="#LINEDEF_MODE">LINEDEF edit
+ mode</a></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>S</td>
+ <td valign="top"><a href="#SECTOR_MODE">SECTOR edit mode</a></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>T</td>
+ <td valign="top"><a href="#THING_MODE">THING edit mode</a></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>C</td>
+ <td valign="top"><a href="#MULTI_MODE">MULTI edit mode</a></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>HOME</td>
+ <td valign="top"><a href="#LUMP_EDIT">Lump edit menu</a>.
+ Note that this only applies when the game type is ZDoom.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F9</td>
+ <td valign="top">Deselect all objects</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Shift + F9</td>
+ <td valign="top">Invert current selection</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F10</td>
+ <td valign="top">Select all objects</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Shift + F10</td>
+ <td valign="top">Select all objects with a specific type
+ (not applicable to VERTEX objects).<p>Note that if the
+ map is in HEXEN format, then this will select special
+ actions, rather than types for LINEDEFS. Likewise, when
+ in THING edit mode you will be asked whether to search
+ for a THING's type or it's special action.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Ctrl + F10</td>
+ <td valign="top">Select one object at the current
+ position. This is mainly useful for THING and VERTEX
+ where it may not be possible to select objects that are
+ overlaid one another.<p>When pressed if there are more
+ than one object at the current position a list will be
+ displayed with object numbers (and perhaps some extra
+ identifying information). Selecting one of the objects
+ from this list will select that object, whereas
+ cancelling the list leaves the current selection as is.</p>
+ <p>Note that it may not be possible to see the selected
+ object in it's selected colours if it is not on top of
+ the stack of overlapping objects. </p>
+ <p>Also bear in mind, that though sectors can be moved so
+ they overlap, and these can be picked using this method,
+ a DOOM level should never have overlapping sectors.
+ Unless you want the Cyberdemon to come and take you away
+ in the night. </p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Alt + F10</td>
+ <td valign="top">As above, but any selected object is
+ selected in addition to the objects currently selected.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F11/Shift + F11</td>
+ <td valign="top">Locate the next or previous selected
+ object and display it in the centre of the screen.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Delete</td>
+ <td valign="top">Delete the selected objects <sup><sup>Note
+ 1</sup></sup></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Insert</td>
+ <td valign="top">Insert a new object</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F3</td>
+ <td valign="top">Merge a map. See the <a
+ href="#MERGE_MAP">merge map</a> section for details.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F4</td>
+ <td valign="top">Move selected objects</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F5</td>
+ <td valign="top">Rotate selected objects <sup><sup>Note 2</sup></sup></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>[</td>
+ <td valign="top">Rotate selected objects 5° to the left <sup><sup>Note
+ 2</sup></sup></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>]</td>
+ <td valign="top">Rotate selected objects 5° to the right
+ <sup><sup>Note 2</sup></sup></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F6</td>
+ <td valign="top">Scale selected objects <sup><sup>Note 2</sup></sup></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>{</td>
+ <td valign="top">Scale selected objects by 90% <sup><sup>Note
+ 2</sup></sup></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>}</td>
+ <td valign="top">Scale selected objects by 110% <sup><sup>Note
+ 2</sup></sup></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F7</td>
+ <td valign="top">Set tag number for this object (only
+ applicable to SECTOR and LINEDEF objects).</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Shift + F7</td>
+ <td valign="top">Select objects with a specific tag
+ number (only applicable to SECTOR and LINEDEF objects).</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F8</td>
+ <td valign="top">Locate a certain object and display in
+ the centre of the screen</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>Shift + F8</td>
+ <td valign="top">Locate a certain object, display in the
+ centre of the screen and select it.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>R</td>
+ <td valign="top">Redraw the map display. Handy for
+ refreshing selected objects in SECTOR mode.</td>
+ </tr>
+</table>
+
+<p><strong>Note 1:</strong> In viDOOM it is not permissible to
+delete objects that are still in use by other objects, i.e. it is
+impossible to delete a vertex that is still used as one of the
+anchor points for a linedef - the linedef must be deleted first.</p>
+
+<p><strong>Note 2:</strong> When scaling or rotating multiple
+objects the objects are rotated/scaled around the centre of the
+imaginary box enclosing all the selected objects. Also grid
+locking is not honoured in this mode.</p>
+
+<hr>
+
+<h2><a name="SECTOR_MODE"></a>Sector Edit Mode</h2>
+
+<p>For a basic description of a SECTOR see the <a
+href="glossary.htm#SECTOR">glossary</a>.</p>
+
+<h3><a name="SECTOR_DISPLAY"></a>Display in Sector Mode</h3>
+
+<p>When in sector mode the display will look like this:</p>
+
+<p><img src="ed_sect.gif" width="640" height="480"></p>
+
+<p>When in this mode sectors are drawn in red, vertexes are not
+shown and things are drawn as a cross just to indicate their
+position.</p>
+
+<p>At the bottom of the screen is a box which shows the details
+of the sector the pointer is currently over.</p>
+
+<p>Also note that if the tag highlighting mode is enabled any
+linedefs that have a tag number matching the one for the sector
+the pointer is over will be drawn in white. Note that the
+highlighted linedef will not appear if is in a sector that's
+selected and highlighted.</p>
+
+<h3><a name="SECTOR_KEYS"></a>Extra Keys in Sector Mode</h3>
+
+<p>The following extra keys can be used while in sector mode.
+Keys that work on selected sectors will temporarily select the
+sector the pointer is over if no sectors are selected.</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td>H</td>
+ <td>Toggle the tag highlighting mode on an off. See the <a
+ href="#SECTOR_DISPLAY">display</a> section for an example
+ of what this does.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>M</td>
+ <td valign="top">Change sector move mode. See <a
+ href="overview.htm#SECTOR_MOVE">overview</a> for details.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>, (comma)</td>
+ <td valign="top">Decrease selected sectors floor height
+ by 8</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>. (period)</td>
+ <td valign="top">Increase selected sectors floor height
+ by 8</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>&lt;</td>
+ <td valign="top">Decrease selected sectors ceiling height
+ by 8</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>&gt;</td>
+ <td valign="top">Increase selected sectors ceiling height
+ by 8</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">Decrease selected sectors lighting level
+ by 16</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>+</td>
+ <td valign="top">Increase selected sectors lighting level
+ by 16</td>
+ </tr>
+</table>
+
+<h3><a name="SECTOR_INSERT"></a>Sector Insertion</h3>
+
+<p>When you insert a sector a popup menu is displayed where you
+can select a type of sector to create.</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>Create unbound sector</strong></td>
+ <td valign="top">This will create a sector that is
+ unbound to any linedefs/sidedefs. It will have a normal
+ type as defined in the <a
+ href="overview.htm#NORMAL_TYPES">config file</a>, a tag
+ of zero and a floor height, ceiling height and light
+ level as defined in the <a
+ href="overview.htm#DEFAULT_SECTOR_LIGHT_ETC">config file</a>.
+ The floor and ceiling flats will be set to the <a
+ href="overview.htm#EMPTY_TEXTURE_NAME">empty texture name</a>.
+ After it's creation the sector number will be displayed
+ onscreen.<p>Note that no further editing of the sector
+ can take place until some sidedefs/linedefs have been
+ manually bound to the sector, as the sector cannot be
+ visibly selected until they have.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Create polygon</strong></td>
+ <td valign="top">On selecting this you will be asked for
+ the number of sides to the polygon (3-64). After entering
+ this a cross hair will be displayed. Press the left mouse
+ button when the cross hair is over the point where you
+ want the centre of the sector. Then the sector will be
+ drawn and you can drag it into shape (defining it's size
+ and rotation) using the mouse. Note that when defining
+ the centre and size/rotation that grid snapping can be
+ toggled on/off and the usual zoom in/out and map
+ positioning cursor keys are active.<p>You will be asked
+ then for the following information:</p>
+ <ul>
+ <li>A <a href="overview.htm#LINEDEF_CLASSES">class</a>
+ and <a href="overview.htm#LINEDEF_TYPES">type</a>
+ of linedef (e.g. scrolling walls, normal,
+ switches) out of those defined in the config
+ file. Note that for an HEXEN format map a special
+ action will be asked for instead.</li>
+ <li>The new sectors floor height, ceiling height and
+ light level. If the sector is being defined
+ inside another sector that sectors floor, ceiling
+ and light level will already be in the dialog
+ when it appears. Otherwise the <a
+ href="overview.htm#DEFAULT_SECTOR_LIGHT_ETC">default</a>
+ values will be used.</li>
+ <li>A further linedef type that defines the linedef's
+ flags, as defined in the <a
+ href="overview.htm#LINEDEF_DEFAULTS">config file</a>.</li>
+ <li>The style in which the sector should be painted
+ as defined in the <a
+ href="overview.htm#SECTOR_STYLES">config file</a>.</li>
+ <li>If the sector is being defined within another
+ sector you will be asked if you wish make the
+ right sidedef point outwards from the new sector.</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+<h3><a name="SECTOR_DELETE"></a>Sector Deletion</h3>
+
+<p>It is not possible to directly delete a sector in viDOOM as it
+religiously enforces the fact that objects cannot be deleted if
+other objects are still bound to them. And once all the linedefs
+bound to a sector have been deleted, the sector is no longer
+selectable! However, when saving, any sectors that have no
+bounding linedefs will be automatically deleted.</p>
+
+<h3><a name="SECTOR_POPUP"></a>Sector Popup Menu</h3>
+
+<p>On selecting sectors and pressing the right mouse button to
+get the sector popup menu the following options will be
+presented:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>Change type</strong></td>
+ <td valign="top">Changes the sector type. The <a
+ href="overview.htm#SECTOR_CLASSES">classes</a> and their <a
+ href="overview.htm#SECTOR_TYPES">sector types</a> are
+ defined in the config file.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change generalised type</strong></td>
+ <td valign="top">If any generalised sector types have
+ been defined in the config file, this option allows you
+ to set them.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set type to value</strong></td>
+ <td valign="top">Simply allows you to enter any number to
+ set the sector type too.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change floor height</strong></td>
+ <td valign="top">Change the height of the floor of the
+ selected sectors.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change ceiling height</strong></td>
+ <td valign="top">Change the height of the ceiling of the
+ selected sectors.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change light level</strong></td>
+ <td valign="top">Alter the light level of the sectors.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change tag</strong></td>
+ <td valign="top">Alter the tag value of the sectors.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change floor</strong></td>
+ <td valign="top">Shows a picklist of the flats from which
+ the floor texture can be selected.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change ceiling</strong></td>
+ <td valign="top">Shows a picklist of the flats from which
+ the ceiling texture can be selected.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Paint sector in style</strong></td>
+ <td valign="top">Paints the sector using the textures
+ described as being a style in the <a
+ href="overview.htm#SECTOR_STYLES">config file</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Move</strong></td>
+ <td valign="top">Move the selected sectors.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Delete</strong></td>
+ <td valign="top">Delete the selected sectors. This just
+ always shows a reminder that empty sectors will be
+ deleted when the map is saved.</td>
+ </tr>
+</table>
+
+<hr>
+
+<h2><a name="LINEDEF_MODE"></a>Linedef Edit Mode</h2>
+
+<p>For a basic description of a LINEDEF see the <a
+href="glossary.htm#LINEDEF">glossary</a>.</p>
+
+<h3><a name="LINEDEF_DISPLAY"></a>Display in Linedef Mode</h3>
+
+<p>When in linedef mode the display will look like this:</p>
+
+<p><img src="ed_line.gif" width="640" height="480"></p>
+
+<p>When in this mode linedefs are just drawn as grey lines with a
+normal indicating which side is the 'right' side of the linedef.
+Vertexes are not shown and things are drawn as a cross just to
+indicate their position..</p>
+
+<p>At the bottom of the screen are three boxes which shows the
+details of the linedef the pointer is currently over, and any
+associated right and left sidedef. Note that in the screenshot
+above the type of linedef is show as the hex number and the <a
+href="overview.htm#LINEDEF_CLASSES">class</a> of linedef. This
+can be altered in the <a
+href="overview.htm#SHOW_FULL_LINEDEF_INFO">config</a> file so
+that the linedef type is show as as it's hex number and the name
+defined for the linedef <a href="overview.htm#LINEDEF_TYPES">type</a>
+in the config file if you are using a display with an higher
+resolution. An example of the alterative info for the same
+linedef is shown below.</p>
+
+<p><img src="ed_lninf.gif" width="396" height="72"></p>
+
+<p>Also note this if the tag highlight mode is on then if the
+linedef the pointer is over has a non-zero tag number any sectors
+with the same tag number are highlighted in white. E.g. in the
+display above the pointer is over a linedef set to teleport, the
+tag indicating which sector the teleported object will arrive in.
+The sector above and to the right of the line has this tag and is
+highlighted. Note that only linedefs not already selected in the
+highlighted sector will be highlighted.</p>
+
+<p>Note that in HEXEN maps the showing of full linedef info
+switch is ignored, and the full action special name shown. In
+addition to this the special arguments are displayed:</p>
+
+<p><img src="ed_l_hex.gif" width="274" height="110"></p>
+
+<p>Note that in this mode the tag highlighting will be based on
+any special action arguments called &quot;tag&quot;.</p>
+
+<h3><a name="LINEDEF_KEYS"></a>Extra Keys in Linedef Mode</h3>
+
+<p>The following extra keys can be used while in linedef mode.</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap>H</td>
+ <td valign="top">Toggle the tag highlighting mode on an
+ off. See the <a href="#LINEDEF_DISPLAY">display</a>
+ section for an example of what this does.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>F12</td>
+ <td valign="top">Check the currently selected linedefs.
+ It checks and prompts for the following things:<ul>
+ <li>Removal of lower textures on 1-sided linedefs.<br>
+ This check can be disabled in the <a
+ href="overview.htm#CHECK_LINE_1SIDE_LOWER">config
+ file</a>.</li>
+ <li>Removal of upper textures on 1-sided linedefs.<br>
+ This check can be disabled in the <a
+ href="overview.htm#CHECK_LINE_1SIDE_UPPER">config
+ file</a>.</li>
+ <li>Addition of missing middle textures on 1-sided
+ linedefs.<br>
+ This check can be disabled in the <a
+ href="overview.htm#CHECK_LINE_1SIDE_MIDDLE">config
+ file</a>.</li>
+ <li>Removal of all textures on 2-sided linedefs where
+ both sides of the linedef are in the same sector.<br>
+ This check can be disabled in the <a
+ href="overview.htm#CHECK_LINE_2SIDE_SAME_SECTOR">config
+ file</a>.</li>
+ <li>Removal of middle textures on 2-sided linedefs.<br>
+ This check can be disabled in the <a
+ href="overview.htm#CHECK_LINE_2SIDE_MIDDLE">config
+ file</a>.</li>
+ <li>Addition of lower textures on 2-sided linedefs
+ where the floor heights are different on either
+ side. In this test the lower texture will be
+ removed if the floor heights are not different.<br>
+ This check can be disabled in the <a
+ href="overview.htm#CHECK_LINE_2SIDE_LOWER">config
+ file</a>.</li>
+ <li>Addition of upper textures on 2-sided linedefs
+ where the ceiling heights are different on either
+ side. In this test the upper texture will be
+ removed if the ceiling heights are not different.<br>
+ This check can be disabled in the <a
+ href="overview.htm#CHECK_LINE_2SIDE_UPPER">config
+ file</a>.</li>
+ </ul>
+ <p><strong>Note:</strong> When prompted whether to fix a
+ problem, you can either elect to say <strong>Yes</strong>,
+ <strong>No</strong>, <strong>Yes to All </strong>or <strong>No
+ to All</strong>. If you select either <strong>No to All</strong>
+ or <strong>Yes to All</strong> then it applies to <em>all</em>
+ further answers in <em>all</em> of the different tests.</p>
+ <p>Whenever textures are to be added viDOOM will display
+ the picklist to request what texture to paint, unless the
+ LINEDEF_CHECK_DEFAULT section in the <a
+ href="overview.htm#LINEDEF_CHECK_DEFAULT">config</a> file
+ is set up.</p>
+ <p><strong>Important Note:</strong> That it may not be
+ advisable to use this on all linedefs if there are lots
+ of lifts in the level. viDOOM (due to wanting to remain
+ completely config file driven for types) is unable to
+ realise that some textures that look like they shouldn't
+ be there will come into play when the lift is activated.
+ This may be changed in the future so that sidedefs that
+ are pointing into a sector tagged to a linedef of a
+ specified class are not checked.</p>
+ </td>
+ </tr>
+</table>
+
+<h3><a name="LINEDEF_INSERT"></a>Linedef Insertion</h3>
+
+<p>When inserting a new linedef you will be asked for 2 vertices
+to link together. You will then be asked for the linedef type
+(from the list defined in the <a
+href="overview.htm#LINEDEF_DEFAULTS">config file</a>) and the
+middle texture for it. Note that the linedef is created bound to
+sector zero. This must be manually changed if it is wrong.</p>
+
+<h3><a name="LINEDEF_DELETE"></a>Linedef Deletion</h3>
+
+<p>Linedefs can be safely deleted from the map at any time.</p>
+
+<h3><a name="LINEDEF_POPUP"></a>Linedef Popup Menu</h3>
+
+<p>On selecting things and pressing the right mouse button to get
+the thing popup menu the following options will be presented:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>Change linedef type<br>
+ (Doom only)</strong></td>
+ <td valign="top">Change the type of the selected
+ linedefs. On selecting this a list will appear so a class
+ of linedef can be selected (classes are defined in the <a
+ href="overview.htm#LINEDEF_CLASSES">config file</a>).
+ Once the class has been selected the a picklist will
+ appear from which a type of linedef from that class can
+ be selected. The types are also defined in the <a
+ href="overview.htm#LINEDEF_TYPES">config file</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set Generalised linedef<br>
+ (Doom only)</strong></td>
+ <td valign="top">If any generalised linedef types have
+ been defined in the config file, this option allows you
+ to set them.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set type to value<br>
+ (Doom only)</strong></td>
+ <td valign="top">Allows the linedef type to be set to an
+ arbitrary value.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change special action<br>
+ (Hexen only)</strong></td>
+ <td valign="top">Change the special action of the
+ selected linedefs. On selecting this a list will appear
+ so a class of special can be selected (classes are
+ defined in the <a
+ href="overview.htm#HEXEN_ACTION_SPECIAL_CLASSES">config
+ file</a>). Once the class has been selected the a
+ picklist will appear from which a type of special action
+ from that class can be selected. The types are also
+ defined in the <a
+ href="overview.htm#HEXEN_ACTION_SPECIALS">config file</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set special action args<br>
+ (Hexen only)</strong></td>
+ <td valign="top">Change the arguments for the selected
+ linedefs. If all the linedefs are of the same special
+ action type then the arguments are entered once and set
+ for all the selected linedefs. If the special actions are
+ different you are asked if you want to set them all
+ individually.<p>If you select <strong>yes</strong> then
+ the argument setting dialog is displayed for each
+ selected linedef in turn. If <strong>no</strong> is
+ selected then the first selected linedef is used to work
+ out what args to ask for, and all selected linedefs have
+ their arguments set to those.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set special action to
+ value<br>
+ (Hexen only)</strong></td>
+ <td valign="top">Allows the linedef special action to be
+ set to an arbitrary value.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Clear special action args<br>
+ (Hexen only)</strong></td>
+ <td valign="top">Clears all the special action arguments
+ to zero in the selected linedefs.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set ranged special action
+ args<br>
+ (Hexen only)</strong></td>
+ <td valign="top">Change the arguments for the selected
+ linedefs, allowing the values to be modified for each
+ linedef. If all the linedefs are not of the same special
+ action type then you are asked if you want to continue.<p>If
+ you select <strong>yes</strong>, or all the linedefs are
+ of the same special action, then the arguments for the
+ first line are displayed and can be editted to the
+ initial values. After this the dialog is redisplayed for
+ you to enter how much the arguments should change by for
+ each subsequent line. Once this is entered the arguments
+ are applied.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change linedef flags</strong></td>
+ <td valign="top">Allows the flags of the selected
+ linedefs to be changed. On selecting this a dialog will
+ appear allowing any of flags (as defined by the <a
+ href="overview.htm#LINEDEF_FLAGS">config file</a>) to to
+ toggled on or off.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Swap sides</strong></td>
+ <td valign="top">Swaps the sides of the linedef, so that
+ the linedef points in the other direction. Note that on
+ two sided linedefs the sidedefs are re-arranged so that
+ the texturing and sector numbers on the sides of the
+ linedef are not switched.<p>viDOOM will not swap
+ one-sided by default. Once a one-sided linedef is
+ detected a question box is displayed to say whether you
+ want to swap one-sided linedefs (either all or just this
+ one) or skip them (again either all or this one).</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Split line</strong></td>
+ <td valign="top">Splits the selected linedefs in the
+ middle.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Select trail from this
+ linedef</strong></td>
+ <td valign="top">Selects a trail from the last selected
+ linedef, staying within the same sector as the one on the
+ linedefs right sidedef, until the starting point is found
+ again or there are no more linedefs in the same
+ direction.<p>Note that this behaves differently if the
+ starting point is a 2-sided line wholly within one sector
+ - only 2-sided linedefs wholly within the sector too
+ connected from this one are selected.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Join linedefs with steps</strong></td>
+ <td valign="top">Allows two selected linedefs to be
+ joined with steps. See the <a href="#STAIR_CREATION">Stair
+ creation</a> section for details.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Right Sidedef</strong></td>
+ <td valign="top">This will display a sub menu for
+ operation for the right sidedef. See the <a
+ href="#SIDEDEF_MENU">Sidedef menu</a> for details.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Left Sidedef</strong></td>
+ <td valign="top">This will display a sub menu for
+ operation for the left sidedef. See the <a
+ href="#SIDEDEF_MENU">Sidedef menu</a> for details.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change tag<br>
+ (Doom only)</strong></td>
+ <td valign="top">Change the tag number for the selected
+ linedefs.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Move</strong></td>
+ <td valign="top">Move the selected linedefs.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Delete</strong></td>
+ <td valign="top">Delete the selected linedefs.</td>
+ </tr>
+</table>
+
+<h3><a name="SIDEDEF_MENU"></a>Sidedef Menu</h3>
+
+<p>On selecting the <strong>Right sidedef</strong> or <strong>Left
+sidedef</strong> options above the following options can be
+chosen.</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>Change upper texture</strong></td>
+ <td valign="top">Alter the upper texture on the selected
+ sidedef.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change middle texture</strong></td>
+ <td valign="top">Alter the middle texture on the selected
+ sidedef.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change lower texture</strong></td>
+ <td valign="top">Alter the lower texture on the selected
+ sidedef.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change textures to any
+ value</strong></td>
+ <td valign="top">Displays a dialog where the texture
+ names can be entered manually. This is mainly of use to
+ set texture names to the special values ZDoom supports on
+ linedefs that describe fog colours and so on.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change texture offset</strong></td>
+ <td valign="top">Sets the texture offset for the selected
+ sidedef.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Adjust texture offset</strong></td>
+ <td valign="top">Adjusts the texture offset for the
+ selected sidedefs. ie. Entering '10' for X and '-10' for
+ Y will add 10 to all the X offsets and subtract 10 from
+ all the Y offsets.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change sector</strong></td>
+ <td valign="top">Alters the sector number the sidedef is
+ linked with.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Align textures</strong></td>
+ <td valign="top">Aligns the linedefs textures in the
+ selected sidedef. Note that when doing this the widest
+ texture out of the upper, middle and lower textures are
+ used to calculate the offsets. Also note that the
+ linedefs are aligned in the order they were selected, so
+ ensure you selected them in the order they appear.<p>Remember
+ that if doing the same set of linedefs then the order
+ should be reversed when doing the left sidedef over the
+ right sidedef.</p>
+ </td>
+ </tr>
+</table>
+
+<h3><a name="STAIR_CREATION"></a>Stair creation</h3>
+
+<p>This joins the two selected linedefs with steps. Before
+starting this option a couple of caveats should be noted:</p>
+
+<ul>
+ <li>Lines must be non-zero in length and not share any
+ vertices.</li>
+ <li>viDOOM assumes that the steps join up the left sidedef of
+ the linedefs together. This will generally be the case
+ anyway, and if it isn't remember to <strong>Swap sides</strong>
+ on the linedefs as required before starting (the sides
+ can be swapped back once the steps have been defined).</li>
+ <li>If the linedefs already have a left sidedef, this will be
+ deleted in preference for the new one facing onto the new
+ sectors.</li>
+ <li>Not too much error checking goes on. If you do define the
+ most bizarre looking steps you've never seen on an
+ automap before, there is a fair chance they won't work
+ when you play them.</li>
+ <li>If the steps pass through a sector, it must be the same
+ sector.</li>
+</ul>
+
+<p>i.e. the following two examples are OK, L1 and L2 can be
+joined with stairs:</p>
+
+<p><img src="ed_ex1.gif" width="204" height="97"></p>
+
+<p><img src="ed_ex2.gif" width="204" height="97"></p>
+
+<p>But the following example, where stairs would cross both
+sectors S3 and S4 is not allowed:</p>
+
+<p><img src="ed_ex3.gif" width="204" height="97"></p>
+
+<p>(Actually, it would be allowed, but wouldn't look too nice
+when you played the level...)</p>
+
+<p>Having got the excuses over with we can now go onto the
+process involved with creating the steps. On selecting this
+option you will be presented with a display like the following:</p>
+
+<p><img src="ed_step.gif" width="640" height="480"></p>
+
+<p>As can be seen the steps have been drawn and their are a
+couple of help boxes displayed. The box in the lower left of the
+screen shows the following information:</p>
+
+<ul>
+ <li>No of steps</li>
+ <li>The difference in floor height between each step</li>
+ <li>The difference in ceiling height between each step</li>
+ <li>The step drawing mode (<strong>Straight</strong> or <strong>Curve</strong>
+ mode).</li>
+ <li>Which side is being moved when in <strong>Curve</strong>
+ mode.</li>
+</ul>
+
+<p>On the left is a box giving a quick help on the following
+keys:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap>+</td>
+ <td valign="top">Increase the number of steps in the
+ staircase (maximum 128)</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>- </td>
+ <td valign="top">Decrease the number of steps in the
+ staircase (minimum 1)</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>C</td>
+ <td valign="top">Change between <strong>Straight</strong>
+ and <strong>Curve</strong> drawing mode. In straight mode
+ straight lines are drawn between the linked vertices on
+ the two linedefs. In curve mode a curve is defined
+ between the two points by moving the pointer.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>S</td>
+ <td valign="top">Swaps between the two walls when
+ defining the curve of the walls in <strong>curve</strong>
+ mode.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>R</td>
+ <td valign="top">Swap which vertices are paired up from
+ the two linedefs. For instance in the example above
+ switching the vertices would give the stairs a butterfly
+ shape rather than corridor seen above.<br>
+ Obviously, the butterfly effect is <b>not</b> what is
+ wanted...</td>
+ </tr>
+</table>
+
+<p>After moving the stairs to the position you want you can press
+ESC to cancel the process or press a mouse button to lock the
+stairs in position and carry on with the creation.</p>
+
+<p>At this point you will be asked if the ceiling should also be
+stepped. Selecting <strong>No</strong> means that the ceiling
+will stay at a constant height (the highest ceiling height out of
+the two linedef's sectors), otherwise the ceiling will be stepped
+accordingly.</p>
+
+<p>Now the steps are created. Note that in the created steps the
+pegging modes defined for the sector style the stairs will be
+painted in is ignored and pegging modes and Y texture offsets
+will be set appropriately to line up textures on the sides of the
+steps.</p>
+
+<hr>
+
+<h2><a name="THING_MODE"></a>Thing Edit Mode</h2>
+
+<p>For a basic description of a THING see the <a
+href="glossary.htm#THING">glossary</a>.</p>
+
+<h3><a name="THING_DISPLAY"></a>Display in Thing Mode</h3>
+
+<p>When in thing mode the display will look like this:</p>
+
+<p><img src="ed_thing.gif" width="640" height="480"></p>
+
+<p>When in this mode linedefs are just drawn as grey lines,
+vertexes are not shown and things are drawn as a circle
+(indicating their size within the game - like the Spider
+Mastermind above) with an arrow indicating their direction. Note
+different classes of things are drawn in different colours (these
+colour to class pairing are defined in the <a
+href="overview.htm#THING_CLASSES">config file</a>).</p>
+
+<p>At the bottom of the screen is a box which shows the details
+of the thing the pointer is currently over. When editing Hexen
+maps this will shows extra information for the thing ID, Z
+position and special actions:</p>
+
+<p><img src="ed_t_hx1.gif" width="338" height="90"></p>
+
+<p><img src="ed_t_hx2.gif" width="273" height="90"></p>
+
+<h3><a name="THING_KEYS"></a>Extra Keys in Thing Mode</h3>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap>, (comma)</td>
+ <td valign="top">Rotate the selected things angles
+ anticlockwise.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>. (period)</td>
+ <td valign="top">Rotate the selected things angles
+ clockwise.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>&lt;</td>
+ <td valign="top">Decrement the Z co-ord. This only
+ applies when the map is in Hexen format.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>&gt;</td>
+ <td valign="top">Increment the Z co-ord. This only
+ applies when the map is in Hexen format.</td>
+ </tr>
+</table>
+
+<h3><a name="THING_INSERT"></a>Thing Insertion</h3>
+
+<p>When inserting a new thing into the map, the thing will be
+inserted at the current pointer position using the values (type,
+angle and flags) used when a thing was last edited. e.g.</p>
+
+<ul>
+ <li>Insert a new thing.</li>
+ <li>Select the new thing and change it's type to be a
+ Cyberdemon (see the <a href="#THING_POPUP">Popup Menu</a>
+ for how to do this).</li>
+ <li>All newly inserted things will now be Cyberdemons, until
+ a further edit is made.</li>
+</ul>
+
+<h3><a name="THING_DELETE"></a>Thing Deletion</h3>
+
+<p>Things can be safely deleted from the map at any time.</p>
+
+<h3><a name="THING_POPUP"></a>Thing Popup Menu</h3>
+
+<p>On selecting things and pressing the right mouse button to get
+the thing popup menu the following options will be presented:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>Change type</strong></td>
+ <td valign="top">Change the type of the selected things.
+ On selecting this a list will appear so a class of thing
+ can be selected (classes are defined in the <a
+ href="overview.htm#THING_CLASSES">config file</a>). Once
+ the class has been selected the a picklist will appear
+ from which a type of thing from that class can be
+ selected. The types are also defined in the <a
+ href="overview.htm#THING_TYPES">config file</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set type to value</strong></td>
+ <td valign="top">Allows the type of the selected things
+ to be set to any arbitrary value.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change special action<br>
+ (Hexen only)</strong></td>
+ <td valign="top" rowspan="5">These options select and set
+ the special action details for the selected things. This
+ operates identically to the <a href="#LINEDEF_POPUP">linedef
+ special action selection</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set special action to
+ value<br>
+ (Hexen only)</strong></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change special action
+ args<br>
+ (Hexen only)</strong></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Clear special action args<br>
+ (Hexen only)</strong></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set ranged special action
+ args<br>
+ (Hexen only)</strong></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change flags</strong></td>
+ <td valign="top">Allows the flags of the selected things
+ to be changed. On selecting this a dialog will appear
+ allowing any of flags (as defined by the <a
+ href="overview.htm#THING_FLAGS">config file</a>) to to
+ toggled on or off.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change angle</strong></td>
+ <td valign="top">Allows the angle of the selected things
+ to be changed. On selecting this a dialog will appear
+ allowing any of 8 major compass points to be selected.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Change angle to value<br>
+ (Hexen only)</strong></td>
+ <td valign="top">Allows the angle of the selected things
+ to be changed to an arbitrary value. This is used to set
+ the angle field to a Polyobject number.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set Z Position<br>
+ (Hexen only)</strong></td>
+ <td valign="top">Sets the Z position of the selected
+ things.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Set thing ID<br>
+ (Hexen only)</strong></td>
+ <td valign="top">Sets the thing ID of the selected
+ things.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Snap</strong></td>
+ <td valign="top">Snaps the selected things to the current
+ grid.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Move</strong></td>
+ <td valign="top">Move the selected things. Follow the
+ on-screen prompts for details on how to move the things
+ or cancel the operation.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Delete</strong></td>
+ <td valign="top">Delete the selected things.</td>
+ </tr>
+</table>
+
+<hr>
+
+<h2><a name="VERTEX_MODE"></a>Vertex Edit Mode</h2>
+
+<p>For a basic description of a VERTEX see the <a
+href="glossary.htm#VERTEX">glossary</a>.</p>
+
+<h3><a name="VERTEX_DISPLAY"></a>Display in Vertex Mode</h3>
+
+<p>When in vertex mode the display will look like this:</p>
+
+<p><img src="ed_vert.gif" width="640" height="480"></p>
+
+<p>When in this mode linedefs are drawn as grey arrows, the arrow
+direction corresponding to direction of the linedef - i.e. the
+right side of the linedef is on the right side of the arrow.
+Vertices are displayed as white points with a grey selection box
+around them.</p>
+
+<p>At the bottom of the Cyber demons is a box which shows the
+details of the vertex the pointer is currently over.</p>
+
+<h3><a name="VERTEX_KEYS"></a>Extra Keys in Vertex Mode</h3>
+
+<p>The following extra keys can be used while in linedef mode.</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap>F12</td>
+ <td valign="top">Goes through all the vertices and delete
+ ones that are not bound to a linedef.</td>
+ </tr>
+</table>
+
+<h3><a name="VERTEX_INSERT"></a>Vertex Insertion</h3>
+
+<p>Inserting a vertex simply inserts a new vertex unbound to any
+linedefs at the pointer location.</p>
+
+<h3><a name="VERTEX_DELETE"></a>Vertex Deletion</h3>
+
+<p>Vertices can only be deleted if they are not bound to any
+linedefs. Linedefs must be <a href="#LINEDEF_DELETE">deleted</a>
+before you can delete the vertex.</p>
+
+<h3><a name="VERTEX_POPUP"></a>Vertex Popup Menu</h3>
+
+<p>On selecting vertices and pressing the right mouse button to
+get the vertex popup menu the following options will be
+presented:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>Chain selected vertices</strong></td>
+ <td valign="top">Selecting this object will create
+ linedefs linking the currently selected vertices. Note
+ that the linedefs will be created such the the first
+ selected vertex is connected to the vertex selected, the
+ vertex selected second to the vertex selected third and
+ so on.<p>On selecting this option you will be first
+ prompted to selected a <a
+ href="overview.htm#LINEDEF_CLASSES">class</a> and <a
+ href="overview.htm#LINEDEF_TYPES">type</a> of linedef
+ (e.g. scrolling walls, normal, switches) out of those
+ defined in the config file. Following this you will be
+ asked for a further linedef type that defines the
+ linedef's flags, as defined in the <a
+ href="overview.htm#LINEDEF_DEFAULTS">config file</a>.</p>
+ <p>If the selected linedef type is one sided and the <a
+ href="overview.htm#ASK_MIDDLE_ON_2SIDED">config file
+ options</a> are set accordingly a middle texture for the
+ linedefs will be requested. After this you will be asked
+ if you wish to connect the last vertex to the first one
+ and the linedefs will be created and any textures aligned
+ on them.</p>
+ <p><strong>Tip:</strong> One thing this option is very
+ useful for is creating pillars and the such like inside
+ sectors. Insert new vertexes (with the <a
+ href="overview.htm#INSERT_SELECT">insert select</a>
+ option in the config file enabled) in the shape you want
+ in an <strong><u>anti-clockwise</u></strong> direction.
+ Then select this option and a one-sided linedef type and
+ the result will be a column in the room.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Chain selected vertices
+ into a sector</strong></td>
+ <td valign="top">Selecting this object will create
+ linedefs linking the currently selected vertices and bind
+ the linedefs to a newly created sector. Note that the
+ linedefs will be created such the the first selected
+ vertex is connected to the vertex selected, the vertex
+ selected second to the vertex selected third and so on.
+ It is important for this option to operate as described
+ below that the vertices are selected in a <strong><u>clockwise</u></strong>
+ direction.<p>You will be asked then for the following
+ information:</p>
+ <ul>
+ <li>A <a href="overview.htm#LINEDEF_CLASSES">class</a>
+ and <a href="overview.htm#LINEDEF_TYPES">type</a>
+ of linedef (e.g. scrolling walls, normal,
+ switches) out of those defined in the config
+ file.</li>
+ <li>The new sectors floor height, ceiling height and
+ light level.</li>
+ <li>A further linedef type that defines the linedef's
+ flags, as defined in the <a
+ href="overview.htm#LINEDEF_DEFAULTS">config file</a>.</li>
+ <li>The style in which the sector should be painted
+ as defined in the <a
+ href="overview.htm#SECTOR_STYLES">config file</a>.</li>
+ <li>If the sector is being defined within another
+ sector you will be asked if you wish make the
+ right sidedef point outwards from the sector.
+ This is useful as things like teleport linedefs
+ only work if you cross from the right side to the
+ left side of the linedef. For this part to work
+ as described the vertices must have been selected
+ in a <strong><u>clockwise</u></strong>order.</li>
+ </ul>
+ <p><strong>Tip:</strong> If you select vertices that are
+ bound to linedefs in another sector, once the creation of
+ the sector has been completed viDOOM will ask you if you
+ want to merge the new linedef from the new sector with
+ the old one.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Merge selected vertices</strong></td>
+ <td valign="top">The vertices selected second, third and
+ so on are deleted and all references to those vertices in
+ linedefs changed to the be the first selected vertex.
+ After doing this viDOOM will see if any linedefs are now
+ using the same vertex pair to define their position and
+ you can elect to merge these.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Snap</strong></td>
+ <td valign="top">Snaps the selected vertices to the
+ current grid.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Move</strong></td>
+ <td valign="top">Move the selected vertices. Follow the
+ on-screen prompts for details on how to move the vertices
+ or cancel the operation.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Delete</strong></td>
+ <td valign="top">Delete the selected vertices.</td>
+ </tr>
+</table>
+
+<hr>
+
+<h2><a name="MULTI_MODE"></a>Multi Edit Mode</h2>
+
+<h2><a name="MULTI_DISPLAY"></a>Display</h2>
+
+<p>When in multi mode the display will look like this:</p>
+
+<p><img src="ed_multi.gif" width="640" height="480"></p>
+
+<p>When in this mode linedefs are drawn as grey arrows, the arrow
+direction corresponding to direction of the linedef - i.e. the
+right side of the linedef is on the right side of the arrow.
+Vertices are displayed as white points with a grey selection box
+around them.</p>
+
+<p>Things are drawn as a circle (indicating their size within the
+game) with an arrow indicating their direction. Note different
+classes of things are drawn in different colours (these colour to
+class pairing are defined in the <a
+href="overview.htm#THING_CLASSES">config file</a>)</p>
+
+<p>At the bottom of the vertexes is a box which shows what object
+type (vertex or thing) the pointer is currently over and it's
+number.</p>
+
+<h2><a name="MULTI_OPERATION"></a>Operation</h2>
+
+<p>Multi selection mode is given just as a way of manipulating
+things and vertexes, allowing them to be moved, rotated and
+scaled in unison. Note that linedefs and sectors are not
+selectable as these are inherently moved just by moving the
+vertices.</p>
+
+<p>All keys are honoured in multi selection mode, but keys for
+insertion and deletion are ignored. Also the locate object number
+keys (F8 and Shift + F8) are ignored.</p>
+
+<h3><a name="MULTI_POPUP"></a>Multi Edit Popup Menu</h3>
+
+<p>On selecting vertices and things and pressing the right mouse
+button to get the multi edit popup menu the following options
+will be presented:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>Snap</strong></td>
+ <td valign="top">Snap the selected things and vertices to
+ the current grid.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Rotate</strong></td>
+ <td valign="top">Rotate the selected things and vertices
+ around their common centre.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Scale</strong></td>
+ <td valign="top">Rotate the selected things and vertices
+ around their common centre.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Move</strong></td>
+ <td valign="top">Moves the selected things and vertices.</td>
+ </tr>
+</table>
+
+<hr>
+
+<h2><a name="MERGE_MAP"></a>Merging Maps</h2>
+
+<p>Pressing F3 in any edit mode will allow a different map to be
+merged in with the currently edited map.</p>
+
+<p>First you will be asked if you wish to temporarily load a PWAD
+and load the first map from it (note that the 'first' map means
+MAP01 if editing DOOM II maps, and E1M1 if editing DOOM maps). If
+you select <strong>Yes</strong> then you will be prompted for a
+PWAD file to read. If you select <strong>No</strong> you will be
+asked for a level to load from the currently loaded WADs.</p>
+
+<p><strong>Tip:</strong> The idea of this question is that you
+can save PWAD files with a structure you wish to re-use in
+multiple maps as the first map. Any linedefs in this map that
+have a left sidedef bound to sector number -1 will have the
+sector number reset to the sector in which the merged structure
+has been placed. Note that if you do insert structures this way
+and don't opt to have floors/ceilings automatically adjusted then
+it is generally a good idea to check the sidedefs to make sure
+they have all their necessary upper/lower textures.</p>
+
+<p>After choosing the map to merge in, a vector display
+representing the linedefs from the map that can be moved around
+the screen with the mouse is displayed as shown in the screen
+below.</p>
+
+<p><img src="ed_merge.gif" width="640" height="480"></p>
+
+<p>On the bottom left is a box giving a quick help on the
+following keys:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap>, (comma)</td>
+ <td valign="top">Rotate the map 1° to the left.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>. (period)</td>
+ <td valign="top">Rotate the map 1° to the right.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>&lt;</td>
+ <td valign="top">Rotate the map 10° to the left.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>&gt;</td>
+ <td valign="top">Rotate the map 10° to the right.</td>
+ </tr>
+</table>
+
+<p>Pressing ESC will cancel the operation while pressing a mouse
+button will place the map where it currently is.</p>
+
+<p>If the merged map is assumed to be a structure (i.e. it has
+left sidedefs whose sector fields are set to -1) you are then
+asked whether you wish to adjust the floor heights. If you do
+select to adjust them then the sector that is in the middle of
+the merged in WAD has it's floor height taken. The floors and
+ceilings are adjusted in the new sectors so that the lowest floor
+is at the same height as the surrounding floor, but the
+difference in heights between the new sectors themselves are
+maintained. After this you are asked whether to adjust the
+ceiling heights. If you do the ceiling height of the same sector
+is taken and the new sector's ceilings adjusted to match the
+surrounding ceiling (note that ceilings will not be moved if
+moving them places them lower than the floor).</p>
+
+<p>You will then be asked whether tags within the map should stay
+as they are or be adjusted so that they are different from tags
+used in the map being edited. After this the map will be inserted
+and then a notice displayed showing by how much the various
+objects in the merged map where adjusted.</p>
+
+<hr>
+
+<h2><a name="LUMP_EDIT"></a>Lump Editing</h2>
+
+<p>Pressing the HOME key provides you with the lump editing menu.
+This menu is different depending on whether the map you are
+editting is a DOOM format map or an HEXEN format map.</p>
+
+<h3>Doom</h3>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>Edit MAPINFO</strong></td>
+ <td valign="top">This option only appears if the ability
+ to edit the MAPINFO lump is enabled in the <a
+ href="overview.htm#MAPINFO_LUMP">config</a> file. On
+ selecting this option the loaded MAPINFO lump is
+ displayed in the text editor for editing.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Switch to HEXEN mode</strong></td>
+ <td valign="top">This switches a DOOM map to an HEXEN
+ map.<p><strong>NOTE:</strong> Take heed of the displayed
+ warning. viDOOM makes no pretence at doing a proper
+ conversion - special actions, arguments, thing IDs and so
+ on are simply zeroed.</p>
+ </td>
+ </tr>
+</table>
+
+<h3>Hexen</h3>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>Edit MAPINFO</strong></td>
+ <td valign="top">This option only appears if the ability
+ to edit the MAPINFO lump is enabled in the <a
+ href="overview.htm#MAPINFO_LUMP">config</a> file. On
+ selecting this option the loaded MAPINFO lump is
+ displayed in the text editor for editing.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Edit SCRIPTS</strong></td>
+ <td valign="top">This displays the SCRIPTS lump from the
+ current map in the text editor for changing.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Create BEHAVIOR</strong></td>
+ <td valign="top">Creates the BEHAVIOR lump from the
+ SCRIPTS. The ACS compiler must be <a
+ href="overview.htm#ACC">configured</a> for this to work.
+ Depending on other <a href="overview.htm#ACS_ALWAYS_VIEW">configuration</a>
+ the output from the compilation will always be shown, or
+ just when an error occurs. Note that the current BEHAVIOR
+ lump is not replaced if an error occurs.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>Switch to DOOM mode</strong></td>
+ <td valign="top">This switches an HEXEN map to a DOOM
+ map.<p><strong>NOTE:</strong> Take heed of the displayed
+ warning. viDOOM makes no pretence at doing a proper
+ conversion - linedef types will be wrong and any entered
+ SCRIPTS will be lost.</p>
+ </td>
+ </tr>
+</table>
+
+<hr>
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id$</tt></p>
+</body>
+</html>
diff --git a/doc/glossary.htm b/doc/glossary.htm
new file mode 100644
index 0000000..c0dc89f
--- /dev/null
+++ b/doc/glossary.htm
@@ -0,0 +1,152 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">Glossary</h1>
+
+<p>It is assumed that some knowledge of DOOM is known by the
+reader, but in case here are some general terms that are used in
+the documentation. </p>
+
+<h2>DOOM</h2>
+
+<p>If you're unsure what this is, you've probably come to the
+wrong place by accident.</p>
+
+<h2><a name="WAD">WAD</a></h2>
+
+<p>A WAD file is the name given to the files used to define the
+graphics, sound, music and maps that make up a game of DOOM. WAD
+files are split into two different types, <a href="#IWAD">IWAD</a>
+and <a href="#PWAD">PWAD</a> files. </p>
+
+<h2><a name="IWAD">IWAD</a></h2>
+
+<p>An IWAD file is is the 'Internal WAD' file. The IWAD file is
+the main <a href="#WAD">WAD</a> file as supplied by id Software.
+Note that only id Software are meant to produce IWAD files. </p>
+
+<h2><a name="PWAD">PWAD</a></h2>
+
+<p>An PWAD file is is the 'Patch WAD' file. This WAD file is read
+in by the game after the IWAD file, and an entries in it replace
+entries defined in the IWAD file. So for instance a PWAD file
+that has an entry for the first <a href="#MAP">MAP</a> will mean
+that DOOM will read the first map from the PWAD file, rather than
+it's own IWAD file. </p>
+
+<p>Hmmmm.... Sure I could have explained that better. </p>
+
+<h2><a name="LUMP"></a>LUMP</h2>
+
+<p>A lump is an entry in a <a href="#WAD">WAD</a> file. For
+instance a <a href="#MAP">MAP</a> is made up of a number of
+lumps, one defining the <a href="#SECTOR">sectors</a> for the
+map, another the <a href="#THING">things</a>, and so on.</p>
+
+<h2><a name="MAP">MAP</a></h2>
+
+<p>A map is taken to mean a DOOM level. Note there is two naming
+conventions for maps, <b>E</b><b><i>x</i></b><b>M</b><b><i>y</i></b>
+(where <i>x</i> is the episode number, and <i>y</i> the map
+number in that episode) used in DOOM and Ultimate DOOM, and <b>MAP</b><b><i>nn</i></b>
+(where <i>nn</i> is a number between 01 and 32) used in DOOM 2
+and Final Doom. </p>
+
+<p>A map is made up of a number of different elements, namely <a
+href="#SECTOR">sectors</a>, <a href="#LINEDEF">linedefs</a>, <a
+href="#SIDEDEF">sidedefs</a>, <a href="#THING">things</a> and <a
+href="#VERTEX">vertexes</a>. Following are some (very) basic
+definitions for these things, but you would be better reading the
+<a href="thanks.htm#DOOMSPEC">Unofficial DOOM specs</a> for more
+accurate definitions. </p>
+
+<p>MAPs generated in viDOOM must be built with a <a href="#BSP">Node
+Builder</a> before they can be used in DOOM. </p>
+
+<p>Also note that viDOOM supports two different map formats. The
+original one, as used in DOOM and DOOM 2, and the extended <a
+href="#HEXEN">HEXEN</a> format supported by ZDoom.</p>
+
+<h2><a name="VERTEX">VERTEX</a></h2>
+
+<p>A vertex is simply an X,Y co-ordinate in the DOOM world. </p>
+
+<h2><a name="THING">THING</a></h2>
+
+<p>Things are all the different objects on the DOOM map that are
+not the actual walls and doors. All the monsters, weapons, ammo,
+non-wall based scenery and even your starting point and teleport
+locations are all counted as THINGS in DOOM. </p>
+
+<h2><a name="LINEDEF">LINEDEF</a></h2>
+
+<p>A LINEDEF is a line that connects two <a href="#VERTEX">vertexes</a>.
+A LINEDEF at it's most basic is used to make up the walls that
+make up the DOOM levels. A LINEDEF must <i>always</i> have a
+right <a href="#SIDEDEF">SIDEDEF</a> associated with it. 2 sided
+LINEDEFS will also have a left SIDEDEF associated with it. </p>
+
+<p>In addition special types of LINEDEF can be used so that when
+the player crosses or activates them actions happen in the DOOM
+world - lighting changes, teleportation happens, doors open,
+levels are exited and so on. </p>
+
+<h2><a name="SIDEDEF">SIDEDEF</a></h2>
+
+<p>A SIDEDEF is basically used to describe the <a href="#TEXTURE">textures</a>
+that are painted upon a <a href="#LINEDEF">LINEDEF</a>. </p>
+
+<h2><a name="SECTOR">SECTOR</a></h2>
+
+<p>Though technically incorrect, it is simplest to picture a
+SECTOR as an object enclosed by <a href="#LINEDEF">LINEDEFS</a>.
+A sector is used to define the floor and ceiling heights and <a
+href="#FLAT">flats</a> used to draw the floor and ceiling, in
+addition to the lighting for that area. </p>
+
+<h2><a name="TEXTURE">TEXTURE</a></h2>
+
+<p>A texture is the graphics used to paint the walls in DOOM. </p>
+
+<h2><a name="FLAT">FLAT</a></h2>
+
+<p>A flat is the graphics used to paint the floors and ceiling in
+DOOM. </p>
+
+<h2><a name="BSP">Node Builder</a></h2>
+
+<p>Does some of the nastier work of level building by creating
+the extra information over and above the parts mentioned in <a
+href="#MAP">MAPS</a> so that DOOM can actually understand the
+level data enough to play it. Note that if you are to edit <a
+href="#HEXEN">HEXEN</a> levels you will need a node builder that
+understands the different data structures used.</p>
+
+<p><a href="thanks.htm#BSP">BSP</a> is perhaps the best known of
+these, and the one that was used all through viDOOM's initial
+development. When developing the HEXEN edit mode for ZDoom <a
+href="thanks.htm#WARM">WARM</a> was used.</p>
+
+<h2><a name="HEXEN"></a>HEXEN</h2>
+
+<p>HEXEN is a game by Raven software that uses the DOOM graphics
+engine. The WAD format for this is slightly different to DOOM,
+having a BEHAVIOR <a href="#LUMP">lump</a> for each MAP and
+different formats for <a href="#THING">THINGS</a> and <a
+href="#LINEDEF">LINEDEFS</a>.</p>
+
+<p>ZDoom supports this format.</p>
+
+<hr width="99%">
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id$ </tt></p>
+</body>
+</html>
diff --git a/doc/index.htm b/doc/index.htm
new file mode 100644
index 0000000..d701e9e
--- /dev/null
+++ b/doc/index.htm
@@ -0,0 +1,45 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">viDOOM 0.03</h1>
+
+<p align="center">&quot;... but what I talk about is DOOM,
+because in the end, DOOM is all that counts.&quot;<br>
+The Dark Half - <i>Stephen King</i> </p>
+
+<p align="center">viDOOM is released as free software under the
+GNU General License. See <a href="license.htm">licence</a> for
+details. </p>
+
+<hr>
+
+<h2>Index</h2>
+
+<ol>
+ <li><a href="thanks.htm">Acknowledgements and thanks</a> </li>
+ <li><a href="glossary.htm">Simple glossary</a> </li>
+ <li><a href="overview.htm">Overview (Configuration, etc)</a> </li>
+ <li><a href="mainmenu.htm">Main menu</a> </li>
+ <li><a href="editing.htm">Editing</a></li>
+ <li><a href="sys.htm">System dependent documentation</a></li>
+ <li><a href="porting.htm">Porting</a> </li>
+ <li><a href="bugs.htm">Bug Reports</a></li>
+ <li><a href="building.htm">Building</a> (only needs to be
+ read for the source distribution)</li>
+ <li><a href="changelog.htm">Changelog</a></li>
+</ol>
+
+<hr width="99%">
+
+<p><a href="http://www.noddybox.demon.co.uk/vidoom">viDOOM home
+page</a></p>
+
+<p><tt>$Id$</tt></p>
+</body>
+</html>
diff --git a/doc/license.htm b/doc/license.htm
new file mode 100644
index 0000000..e7ba3e2
--- /dev/null
+++ b/doc/license.htm
@@ -0,0 +1,360 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<pre>
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ 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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+</pre>
+
+
+<hr width="99%">
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id: license.htm,v 1.1 2000/07/13 15:05:48 dosuser Exp dosuser $</tt></p>
+</body>
+</html>
diff --git a/doc/mainmenu.htm b/doc/mainmenu.htm
new file mode 100644
index 0000000..fb8b498
--- /dev/null
+++ b/doc/mainmenu.htm
@@ -0,0 +1,177 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">Main Menu</h1>
+
+<p>Depending on the setting in <a href="overview.htm#GAME_ASK">configuration</a>
+starting viDOOM you may be asked to pick the game type to edit.
+Pick one of the games from the menu, or if the menu is cancelled
+the <a href="overview.htm#GAME_TYPE">default game type</a> will
+be used.</p>
+
+<p>After this you will be presented with the main menu containing
+the following options.</p>
+
+<h3>Edit The Current Level</h3>
+
+<blockquote>
+ <p>Edit the current level. See <a href="editing.htm">editing</a>
+ for details.</p>
+</blockquote>
+
+<h3>Load Level from open WADs</h3>
+
+<blockquote>
+ <p>Selects a level to load from the open IWAD and PWAD files.
+ Note that the level is loaded from the <strong>most recent</strong>
+ WAD file opened that holds a map for the selected level. If
+ you already have a level open for editing and the <strong>Edit
+ The Current Level</strong> option has been used then
+ confirmation will be asked before allowing you to proceed.
+ This warning can be disabled in the INI file (see <a
+ href="overview.htm#MAP_CLEAR">overview</a>).</p>
+</blockquote>
+
+<blockquote>
+ <p>If you are editing for ZDOOM and the <a
+ href="overview.htm#MAPINFO_LUMP">mapinfo_lump</a> option has
+ been switched on, if there is a MAPINFO.WAD file in the <a
+ href="overview.htm#PWAD_DIR">PWAD directory</a> it will be
+ loaded in as well for editing.</p>
+</blockquote>
+
+<h3>Save Current Level</h3>
+
+<blockquote>
+ <p>Saves the map you are currently editing into a <a
+ href="glossary.htm#PWAD">PWAD</a> file. This PWAD will <strong>only</strong>
+ contain the map, and nothing else. So if you have loaded the
+ map from a PWAD that contains any other information (e.g.
+ music, extra sounds, graphics patches) it is not a good idea
+ to save over the original PWAD file. If the saved PWAD
+ filename matches a PWAD that is already loaded, after saving
+ the open PWAD will be closed and then re-opened. This could
+ be important to note as the saved PWAD will now be at the top
+ of the open PWADs.</p>
+</blockquote>
+
+<blockquote>
+ <p>If you are editing for ZDOOM and the <a
+ href="overview.htm#MAPINFO_LUMP">mapinfo_lump</a> option has
+ been switched on, a MAPINFO.WAD file will be generated in the
+ <a href="overview.htm#PWAD_DIR">PWAD directory</a>.</p>
+</blockquote>
+
+<blockquote>
+ <p>Note that the saved map must be built with a <a
+ href="glossary.htm#BSP">node builder</a> before it can be
+ played in DOOM if the <a href="overview.htm#NODE_BUILDER">node
+ building section in the config file</a> has not been set up.</p>
+</blockquote>
+
+<blockquote>
+ <p><strong>Important note: </strong>While saving viDOOM will
+ remove any deleted objects from the map, delete any sectors
+ that do no have linedefs attached to them and vertices that
+ are not in use. This is worth remembering as objects <em>will</em>
+ be renumbered if any have been deleted so that they fit
+ together contiguously after saving.</p>
+</blockquote>
+
+<h3>Create New Empty Level</h3>
+
+<blockquote>
+ <p>Creates a completely empty level for editing. If you
+ already have a level open for editing and the <strong>Edit
+ The Current Level</strong> option has been used then
+ confirmation will be asked before allowing you to proceed.
+ This warning can be disabled in the INI file (see <a
+ href="overview.htm#MAP_CLEAR">overview</a>).</p>
+</blockquote>
+
+<blockquote>
+ <p>If you are editing for ZDOOM and the <a
+ href="overview.htm#MAPINFO_LUMP">mapinfo_lump</a> option has
+ been switched on, if there is a MAPINFO.WAD file in the <a
+ href="overview.htm#PWAD_DIR">PWAD directory</a> it will be
+ loaded in as well for editing.</p>
+</blockquote>
+
+<h3>Change Current Level Name</h3>
+
+<blockquote>
+ <p>Allows the map to be assigned to a different map number.
+ See the <a href="glossary.htm#MAP">glossary</a> for some
+ extra info on map/level numbers.</p>
+</blockquote>
+
+<h3>Open PWAD file</h3>
+
+<blockquote>
+ <p>Allows a PWAD file to be opened.</p>
+</blockquote>
+
+<h3>Close PWAD file</h3>
+
+<blockquote>
+ <p>Closes one of the currently open PWAD files. Note that
+ viDOOM will not let you unload the <a
+ href="glossary.htm#IWAD">IWAD</a> opened at startup.</p>
+</blockquote>
+
+<h3>Preview Level</h3>
+
+<blockquote>
+ <p>Allows a level to be previewed without disturbing the
+ level currently being edited. Note that the preview is <em>very</em>
+ basic with linedefs shown as grey lines, vertexes as white
+ pixels and things as red blobs. While in the preview press F1
+ for help on controlling the display.</p>
+</blockquote>
+
+<h3>List entries in WAD directory</h3>
+
+<blockquote>
+ <p>This will list all the lumps defined in the directory of
+ the loaded IWAD and any loaded PWAD files. The entires will
+ be displayed in a picklist window.</p>
+</blockquote>
+
+<h3>About viDOOM</h3>
+
+<blockquote>
+ <p>See who was responsible for this.</p>
+</blockquote>
+
+<h3>View License</h3>
+
+<blockquote>
+ <p>View the license you must accept if you are to run viDOOM.
+ The license is repeated <a href="license.htm">here</a> in the
+ documentation. Don't worry, it's only the GNU public license,
+ and not anything nasty.</p>
+</blockquote>
+
+<h3>Quit</h3>
+
+<blockquote>
+ <p>Exit viDOOM. If you have a level open for editing and the <strong>Edit
+ The Current Level</strong> option has been used then
+ confirmation will be asked before allowing you to proceed.
+ This warning can be disabled in the INI file (see <a
+ href="overview.htm#MAP_EXIT">overview</a>).</p>
+</blockquote>
+
+<hr>
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id$</tt></p>
+</body>
+</html>
diff --git a/doc/overview.htm b/doc/overview.htm
new file mode 100644
index 0000000..aeec434
--- /dev/null
+++ b/doc/overview.htm
@@ -0,0 +1,1164 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">viDOOM Overview</h1>
+
+<ul>
+ <li><a href="#INTRODUCTION">Introduction</a></li>
+ <li><a href="#WHY_BOTHER">Why bother?</a></li>
+ <li><a href="#SUPPORTED_SYSTEMS">Supported systems</a></li>
+ <li>Configuration<ul>
+ <li><a href="#ENVIRONMENT">Environment</a></li>
+ <li><a href="#VIDOOM_INI">VIDOOM.INI</a></li>
+ <li><a href="#CONFIG_FILE">Config file</a></li>
+ </ul>
+ </li>
+</ul>
+
+<hr>
+
+<h2><a name="INTRODUCTION"></a>Introduction</h2>
+
+<p>viDOOM is a Free Software DOOM editor. It supports the
+following <a href="http://www.idsoftware.com">id</a> produced
+games: </p>
+
+<ul>
+ <li>Doom</li>
+ <li>The Ultimate Doom</li>
+ <li>Doom 2 - Hell On Earth</li>
+ <li>Final Doom</li>
+</ul>
+
+<p>Note that in accordance with id software's wishes you are only
+allowed to generate edited levels for the game if you have a
+full, registered version of the game.</p>
+
+<p>viDOOM is fully configurable through config files, so it can
+be expanded to accommodate the BOOM and ZDOOM extensions. Well,
+once I've found out the slight difference in format of WAD file
+that seems to accompany them too.</p>
+
+<hr>
+
+<h2><a name="WHY_BOTHER"></a>Why bother?</h2>
+
+<p>Good question. Anyone who has ever used them will know there
+are a number of very good DOOM editors available (links to lots
+of them can be found at <a href="http://www.doomworld.com">Doomworld</a>
+and all good FTP servers). </p>
+
+<p>However, I always felt a bit clumsy using them, and in true
+hacker fashion I decided writing one I could use would be easier
+then reading the instructions for the others. Hence viDOOM.</p>
+
+<p>I reasonably like the way viDOOM works, so I release it on the
+off chance other people may too. </p>
+
+<hr>
+
+<h2><a name="SUPPORTED_SYSTEMS"></a>Supported systems</h2>
+
+<p>As with most Free Software viDOOM is primarily distributed as
+source code. The source is fairly ANSI C compliant, and therefore
+the core of viDOOM should compile on all operating systems. The
+current distribution includes the hardware dependent routines for
+the following platforms: </p>
+
+<ul>
+ <li>Protected-mode 32-bit MSDOS (Windows 9x / MSDOS + DPMI)</li>
+</ul>
+
+<hr>
+
+<h2><a name="ENVIRONMENT"></a>Environment</h2>
+
+<p>If defined in the environment, the value of <b><tt>VIDOOM_DIR</tt></b>
+will be made the current directory as soon as viDOOM starts. This
+is important as the following initialisation files are expected
+to be in the current directory when viDOOM starts.</p>
+
+<p><b>Note:</b><br>
+How this environment is set will differ from system. Basically
+viDOOM just calls the C library <tt>getenv()</tt> function. So,.
+for instance in a Unix type system this could be:</p>
+
+<blockquote>
+ <p><tt>% setenv VIDOOM_DIR $HOME/viDOOM</tt><br>
+ or<br>
+ <tt>% export VIDOOM_DIR=$HOME/viDOOM</tt></p>
+</blockquote>
+
+<p>Whereas in DOS/DJGPP version this could be:</p>
+
+<blockquote>
+ <p><tt>C:\&gt; set VIDOOM_DIR=C:\viDOOM</tt></p>
+</blockquote>
+
+<hr>
+
+<h2><a name="VIDOOM_INI"></a>Initialisation File - VIDOOM.INI</h2>
+
+<p>On starting viDOOM will look for a file in the current
+directory called <b>vidoom.ini</b>. This file tells viDOOM what
+version of DOOM it is expected to be editing, the configuration
+for that version of DOOM and the editor configuration. The
+general format of the INI file is: </p>
+
+<p><tt>[Section]<br>
+identifier=value<br>
+</tt></p>
+
+<p>Blank lines and lines starting with a comment character (#)
+are ignored. The following sections and identifiers are explained
+below.</p>
+
+<ul>
+ <li><a href="#GAME"><tt>[Game]</tt></a></li>
+ <li><a href="#EDITOR"><tt>[Editor]</tt></a></li>
+ <li><a href="#viDOOM"><tt>[viDOOM]</tt></a></li>
+ <li><a href="#CHECK_LINEDEF"><tt>[Check Linedef]</tt></a></li>
+ <li><a href="#NODE_BUILDER"><tt>[Node Builder]</tt></a></li>
+ <li><a href="#ACC"><tt>[ACS]</tt></a></li>
+ <li><a href="#GUI"><tt>[GUI]</tt></a></li>
+ <li><a href="#GAME_NAME"><tt>[</tt><em><tt>Game Name</tt></em><tt>]</tt></a></li>
+</ul>
+
+<p>After reading VIDOOM.INI, then a defined <a
+href="#CONFIG_FILE">config file</a> is also read.</p>
+
+<hr size="1">
+
+<h3><a name="GAME"></a>[Game]</h3>
+
+<p>Controls for the version of DOOM</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><a name="GAME_TYPE"></a><b><tt>game</tt></b></td>
+ <td valign="top">Use this to say which version of DOOM
+ you will be editing. The following values are allowed: <ul>
+ <li><b>Doom</b></li>
+ <li><b>Ultimate Doom</b></li>
+ <li><b>Doom 2</b></li>
+ <li><b>TNT: Evilution</b></li>
+ <li><b>Plutonia Experiment</b></li>
+ <li><b>ZDoom</b></li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td><a name="GAME_ASK"></a><b>ask</b></td>
+ <td>If set to <b>yes</b> then on starting viDOOM will ask
+ for the game type to edit.</td>
+ </tr>
+</table>
+
+<hr size="1">
+
+<h3><a name="EDITOR"></a>[Editor]</h3>
+
+<p>Global editor configuration</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><a name="ASK_MIDDLE_ON_2SIDED"></a><b><tt>ask_middle_on_2sided</tt></b></td>
+ <td valign="top">When creating a new sector and the
+ sector has a two-sided boundary asks whether a middle
+ texture should be asked for. Allowable values <b>yes</b>
+ and <b>no</b></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>auto_block_linedefs</tt></b></td>
+ <td valign="top">When linedef flags are altered and this
+ is set to <b>yes</b>, linedefs that were 2-sided and are
+ now 1-sided have the impassible flags automatically set.<br>
+ Likewise linedefs that were 1-sided and are now 2-sided
+ have the impassible flag automatically cleared.<br>
+ If set to <i>no</i> no action is taken when these events
+ happen. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>bright</tt></b></td>
+ <td valign="top">Describes a gamma value applied to any
+ textures, flats and sprites read in from the DOOM WAD
+ files. Allowable values are any floating point number.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>clear_on_menu</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then once the
+ pop-up menu has been used to modify the selected objects
+ they are automatically unselected. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>clear_on_move</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then once the
+ selected objects have been moved they are automatically
+ unselected. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a
+ name="DEFAULT_SECTOR_LIGHT_ETC"></a><b><tt>default_light_level</tt></b><tt><br>
+ </tt><b><tt>default_floor_height</tt></b><tt><br>
+ </tt><b><tt>default_ceiling_height</tt></b></td>
+ <td valign="top">Describes the default light, floor and
+ ceiling height for created sectors. Note that if a sector
+ is created within another sector, the values for that
+ sector, rather than these defaults, are used.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>default_edit_mode</tt></b></td>
+ <td valign="top">Defines the default edit mode when
+ loading a new map into the editor. Possible values are:<ul>
+ <li><a href="editing.htm#SECTOR_MODE"><b>sector</b></a></li>
+ <li><a href="editing.htm#LINEDEF_MODE"><b>linedef</b></a></li>
+ <li><a href="editing.htm#THING_MODE"><b>thing</b></a></li>
+ <li><a href="editing.htm#VERTEX_MODE"><b>vertex</b></a></li>
+ <li><a href="editing.htm#MULTI_MODE"><b>multi</b></a></li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>default_scale</tt></b></td>
+ <td valign="top">The starting scale used in the editor.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>grid</tt></b></td>
+ <td valign="top">Use this to say whether the grid will be
+ shown on screen while editing. Allowable values are <b>yes</b>
+ and <b>no</b>. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>grid_lock</tt></b></td>
+ <td valign="top">Use this to say whether inserted and
+ moved object in the editor will be snapped on a grid.
+ Allowable values are <b>yes</b> and <b>no</b>. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>grid_size</tt></b></td>
+ <td valign="top">Describes the size of the grid used by
+ the above items. Allowable values are integer values
+ greater than two.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="HOVER_SELECT"></a><b><tt>hover_select</tt></b></td>
+ <td valign="top">When editing object in a DOOM level this
+ alters the way that viDOOM works if the right mouse
+ button is used over an unselected object. The allowable
+ values, and their affects are: <ul>
+ <li><b>none</b> - nothing is done. The right mouse
+ button works as expected.</li>
+ <li><b>add</b> - the object the mouse is over is
+ added to the selected objects before displaying
+ the menu.</li>
+ <li><b>single</b> - the object the mouse is over is
+ made the sole selected object before displaying
+ the menu.</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="INSERT_SELECT"></a><b><tt>insert_select</tt></b></td>
+ <td valign="top">When inserting new objects in a DOOM
+ level this alters the way that viDOOM selects the objects
+ after creation. The allowable values, and their affects
+ are: <ul>
+ <li><b>none</b> - nothing is done. The new object is
+ left unselected.</li>
+ <li><b>add</b> - the new object is added to the
+ selected objects.</li>
+ <li><b>single</b> - the new object is made the sole
+ selected object.</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>linedef_select</tt></b></td>
+ <td valign="top">Defines who many pixels around a LINEDEF
+ the bounding box stretches when selecting a line.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>merge_linedef</tt></b></td>
+ <td valign="top">If you overlay vertexes on top of each
+ other you can merge vertexes. Once these vertexes are
+ merged checks are made to see whether linedefs share
+ these vertexes, and hence overlap. This option controls
+ what happens when these overlapping linedefs are found.
+ The possible values are: <ul>
+ <li><b>always</b> - always merge the overlapping
+ linedefs without any prompting.</li>
+ <li><b>ask</b> - confirms with the user before
+ merging linedefs or not as requested. </li>
+ <li><b>never</b> - never merge overlapping linedefs. </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>new_2sided_select</tt></b></td>
+ <td valign="top">When linedefs have there flags set so
+ that a new left sidedef is added to it controls how the
+ altered linedefs are selected. Possible values are: <ul>
+ <li><b>select</b> - clears the currently selected
+ linedefs (if any) and selects the linedefs that
+ have new double sides.</li>
+ <li><b>ask</b> - confirms with the user. If the user
+ opts to select the linedefs, the current
+ selection is cleared and the altered linedefs
+ selected.</li>
+ <li><b>never</b> - never select the altered linedefs.
+ Note that a notice is still displayed so that you
+ know new left sidedefs have been created.</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="SECTOR_MOVE"></a><b><tt>sector_move</tt></b></td>
+ <td valign="top">Defines which linedefs are actually
+ moved when moving a sector. Possible values are: <ul>
+ <li><b>all</b> - move all linedefs that border the
+ sector.</li>
+ <li><b>right</b> - move only linedefs that have this
+ sector to their right.</li>
+ <li><b>left</b> - move only linedefs that have this
+ sector to their left.</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="SHOW_FULL_LINEDEF_INFO"></a><b><tt>show_full_linedef_info</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then in the <a
+ href="editing.htm#LINEDEF_DISPLAY">linedef edit display</a>
+ the linedef type will be shown as the full linedef name
+ as defined in the <a href="#LINEDEF_TYPES">config file</a>.
+ If set to <b>no</b> then linedef type will be displayed
+ as a hex value and it's class.<p>This has no effect when
+ editting HEXEN format maps.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>tag_highlight</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then the tag
+ highlighting mode is enabled by default in sector and
+ linedef modes.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>vertex_radius</tt></b></td>
+ <td valign="top">Describes the size of the box around a
+ VERTEX which is used to select the VERTEX while editing.
+ Recommended values are any integer greater than four.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>width</tt></b><tt><br>
+ </tt><b><tt>height</tt></b></td>
+ <td valign="top">Describes the size of the display used
+ by viDOOM. viDOOM expects a resolution of at least
+ 640x480.</td>
+ </tr>
+</table>
+
+<hr size="1">
+
+<h3><a href="#CONFIG_FILE" name="viDOOM"></a>[viDOOM]</h3>
+
+<p>Main menu configuration</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><b><tt>auto_loadmap</tt></b></td>
+ <td valign="top">Set this to a list of levels to load on
+ startup. The format is to set it to a list of level names
+ seperated by commas. The first level that can be loaded
+ successfully is used. If this is set then <strong>initial_empty_map</strong>
+ is ignored.<p>If empty or not used then no map is auto
+ loaded, e.g.</p>
+ <p><tt># Load the first map, whether we're editing DOOM
+ or DOOM2<br>
+ auto_loadmap=MAP01,E1M1</tt></p>
+ <p><tt># Don't auto load any maps<br>
+ auto_loadmap=</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>initial_empty_map</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then on startup
+ viDOOM will have an empty map, either MAP01 or E1M1,
+ ready for editing. This is ignored if <strong>auto_loadmap</strong>
+ is set.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>load_flats</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then the graphics
+ for the flats will be loaded so they can be selected
+ graphically. If set to <b>no</b> then flats are selected
+ just using their name. <br>
+ This is provided as the graphics reading is not very
+ efficient and can be slow on certain machines. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>load_textures</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then the graphics
+ for the textures will be loaded so they can be selected
+ graphically. If set to <b>no</b> then textures are
+ selected just using their name. <br>
+ This is provided as the graphics reading is not very
+ efficient and can be slow on certain machines. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>load_sprites</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then the graphics
+ for the things will be loaded so they can be selected
+ graphically. If set to <b>no</b> then things are selected
+ just using their name. <br>
+ This is provided as the graphics reading is not very
+ efficient and can be slow on certain machines. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="MAP_CLEAR"></a><b><tt>map_clear_warning</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then a warning is
+ displayed whenever an option is chosen that will replace
+ the currently edited map with another, if the editor has
+ been used since the level's loading/creation. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="MAP_EXIT"></a><b><tt>map_exit_warning</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then a warning is
+ displayed if exit is chosen and the editor option has
+ been used. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="OVERWRITE_WARNING"></a><b><tt>overwrite_warning</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then a warning is
+ displayed if you save a map over a file that already
+ exists. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>show_titlepic</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then the title
+ picture for the version of DOOM you are editing will be
+ displayed on the main title screen. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>sort_flat_names</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then when selecting
+ ceiling or floor flats they will be sorted into
+ alphabetical order. If set to <b>no</b> they are simply
+ in the order they appear in the IWAD file. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>sort_texture_names</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then when selecting
+ wall textures they will be sorted into alphabetical
+ order. If set to <b>no</b> they are simply in the order
+ they appear in the IWAD file. </td>
+ </tr>
+</table>
+
+<hr size="1">
+
+<h3><a name="CHECK_LINEDEF"></a><b>[Check LINEDEF]</b></h3>
+
+<p>This defines how the <b>Check LINEDEF</b> function in the
+editor (see <a href="editing.htm#LINEDEF_KEYS">editing</a> for
+details) operates. Note that part of the configuration for this
+command also occurs in the <a href="#LINEDEF_CHECK_DEFAULT">config
+file</a>. This is required as texture names can be different in
+different versions of DOOM. The following options are definable
+within the INI file:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><b><tt>assume_yes</tt></b></td>
+ <td valign="top">If this is set to <b>yes</b> then any
+ time a question would be asked to see if it's OK to
+ remove a texture that viDOOM considers unnecessary then
+ it will be removed without asking. Likewise when asking
+ to add missing textures the texture picklist will appear
+ (with the linedef number and what is to be set in the
+ title) without any prompting.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="CHECK_LINE_1SIDE_LOWER"></a><b><tt>check_1side_lower</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then when a sidedef
+ is attached to a one-sided linedef and there is a lower
+ texture defined viDOOM will ask if it's OK to remove it.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="CHECK_LINE_1SIDE_MIDDLE"></a><b><tt>check_1side_middle</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then when a sidedef
+ is attached to a one-sided linedef and there is no middle
+ texture defined viDOOM will ask if it's OK to define it.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="CHECK_LINE_1SIDE_UPPER"></a><b><tt>check_1side_upper</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then when a sidedef
+ is attached to a one-sided linedef and there is an upper
+ texture defined viDOOM will ask if it's OK to remove it.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="CHECK_LINE_2SIDE_LOWER"></a><b><tt>check_2side_lower</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then when a sidedef
+ is attached to a two-sided linedef which is between two
+ sectors with different floor heights and there is no
+ lower texture defined viDOOM will ask if it's OK to
+ define it.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="CHECK_LINE_2SIDE_MIDDLE"></a><b><tt>check_2side_middle</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then when a sidedef
+ is attached to a two-sided linedef which is between two
+ sectors and there is a middle texture defined viDOOM will
+ ask if it's OK to remove it.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="CHECK_LINE_2SIDE_UPPER"></a><b><tt>check_2side_upper</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then when a sidedef
+ is attached to a two-sided linedef which is between two
+ sectors with different ceiling heights and there is no
+ upper texture defined viDOOM will ask if it's OK to
+ define it.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a
+ name="CHECK_LINE_2SIDE_SAME_SECTOR"></a><b><tt>check_2side_same_sector</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then when a sidedef
+ is attached to a two-sided linedef which is wholly within
+ one sector and there are any textures defined viDOOM will
+ ask if it's OK to remove them.</td>
+ </tr>
+</table>
+
+<hr size="1">
+
+<h3><a name="NODE_BUILDER"></a>[Node Builder]</h3>
+
+<p>Node Builder configuration - used to build nodes for maps
+automatically when saving.</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><b><tt>always_view_output</tt></b></td>
+ <td valign="top">Normally viDOOM will only show the
+ output from the build command if it fails for some
+ reason. Setting this to <b>yes</b> means any output from
+ the node builder will be displayed regardless.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>command</tt></b></td>
+ <td valign="top">Defines the command used to execute the
+ node builder. e.g.<p><tt>command=c:\bsp\bsp.exe</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>ignore</tt></b></td>
+ <td valign="top">If set, then any saved filename that
+ includes this string will not be passed through the node
+ builder. This is useful so that structures for merging
+ into other maps (see <a href="editing.htm#MERGE_MAP">editing</a>
+ for details) need not be put through the node building
+ process. e.g. if set to<p><tt>ignore=str</tt></p>
+ <p>Then saving a map named <b>MAP01.WAD</b> will be
+ passed through the node builder, whereas <b>WALL_STRUCT.WAD</b>
+ would not be.</p>
+ <p>Another important use for this is to leave a back door
+ where you can save a WAD without it being passed through
+ the node builder if anything goes wrong with trying to
+ build the map.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>infile</tt></b></td>
+ <td valign="top">Defines the format for the infile
+ parameter to the node builder. Any occurrence of the '%'
+ character will be replaced with the full path of the map
+ being saved. e.g.<p><tt>infile=%</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>outfile</tt></b></td>
+ <td valign="top">Defines the format for the outfile
+ parameter to the node builder. Any occurrence of the '%'
+ character will be replaced with the full path of the map
+ being saved. e.g.<p><tt>outfile=-o %</tt></p>
+ <p>Note that if your node builder does not allow the
+ input and output file to be the same then it is
+ permissible to put extra characters <b>after</b> the %
+ that will get tacked onto the end of the name, e.g.</p>
+ <p><tt>outfile=-o %_NEW</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>in_before_out</tt></b></td>
+ <td valign="top">Defines the order of the the arguments
+ to the node builder. If set to <b>yes</b> then the node
+ builder is invoked as:<p><tt>command infile outfile</tt></p>
+ <p>If set to <b>no</b> then the command is built as:</p>
+ <p><tt>command outfile infile</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>use</tt></b></td>
+ <td valign="top">If set to <b>yes</b> then the node
+ builder described above is used on any maps being saved.
+ If set to <b>no</b> then the map is saved and the nodes
+ must be built outside of viDOOM.</td>
+ </tr>
+</table>
+
+<hr size="1">
+
+<h3><a name="ACC"></a>[ACS]</h3>
+
+<p>ACS compiler configuration - used to build BEHAVIOR lumps for
+HEXEN format maps.</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><a name="ACS_ALWAYS_VIEW"></a><b><tt>always_view_output</tt></b></td>
+ <td valign="top">Normally viDOOM will only show the
+ output from the compiler if it fails for some reason.
+ Setting this to <b>yes</b> means any output from the
+ compiler will be displayed regardless.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>command</tt></b></td>
+ <td valign="top">Defines the command used to execute the
+ acs compiler. e.g.<p><tt>command=c:\doom\acc\acc.exe</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>dir</tt></b></td>
+ <td valign="top">Defines a working directory that will be
+ used for the compilation. This will generally be the same
+ place that the acs header files are stored and viDOOM
+ will change directory to this directory before
+ compilation. e.g.<p><tt>dir=c:\doom\acc\</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>script</tt></b></td>
+ <td valign="top">viDOOM will write an acs script with
+ this name, into the directory defined by <strong>dir</strong>
+ before compilation. e.g.<p><tt>script=vidoom.acs</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>object</tt></b></td>
+ <td valign="top">viDOOM will assume that the acs object
+ created by the compiler will have this name. e.g.<p><tt>script=vidoom.o</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>args</tt></b></td>
+ <td valign="top">Defines the argument list to the ACC
+ compiler. The string <strong>%S</strong> will be replaced
+ by <strong>script</strong>, defined above. The string <strong>%O</strong>
+ will be replaced by <strong>object</strong> defined
+ above. e.g.<p><tt>args=%S %O</tt></p>
+ </td>
+ </tr>
+</table>
+
+<p>&nbsp;</p>
+
+<hr size="1">
+
+<h3><a name="GUI"></a>[GUI]</h3>
+
+<p>GUI configuration. All the values in this section are an RGB
+triplet defined as an hex number, i.e. <tt>0xRRGGBB</tt>. The
+following values can be set from the INI file.</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><b><tt>gui_hi</tt></b></td>
+ <td valign="top">The brightest colour used to draw the 3D
+ looking interface.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>gui_mid</tt></b></td>
+ <td valign="top">The medium colour used to draw the 3D
+ looking interface.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>gui_lo</tt></b></td>
+ <td valign="top">The darkest colour used to draw the 3D
+ looking interface.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>gui_text</tt></b></td>
+ <td valign="top">The colour of text.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>gui_textshadow</tt></b></td>
+ <td valign="top">The colour of the shadow behind text.
+ This is only really used by viDOOM's own portable GUI
+ routines. If set to the same value as <b>text</b> then no
+ shadows are drawn.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>gui_bold</tt></b></td>
+ <td valign="top">The colour of bold text (used for
+ titles)</td>
+ </tr>
+</table>
+
+<hr size="1">
+
+<h3><a name="GAME_NAME"></a>[<i>Game name</i>]</h3>
+
+<p>One of these sections appears for each possible setting of the
+game variable in the [Game] section. These are:</p>
+
+<ul>
+ <li><tt>[Doom]</tt></li>
+ <li><tt>[Ultimate Doom]</tt></li>
+ <li><tt>[Doom 2]</tt></li>
+ <li><tt>[TNT:Evilution]</tt></li>
+ <li><tt>[Plutonia Experiment]</tt></li>
+ <li><tt>[ZDoom]</tt></li>
+</ul>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><b><tt>iwad</tt></b></td>
+ <td valign="top">Defines the path to the IWAD for this
+ game. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="PWAD_DIR"></a><b><tt>pwad_dir</tt></b></td>
+ <td valign="top">Defines the default load/save directory
+ for editing PWAD files. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="LEVEL_STYLE"></a><b><tt>level_style</tt></b></td>
+ <td valign="top">Defines the level naming convention for
+ the game. Allowable values are: <ul>
+ <li><b>Doom</b> - allows level names E1M1 to E3M9</li>
+ <li><b>Ultimate Doom</b> - allows level names E1M1 to
+ E4M9</li>
+ <li><b>Doom 2</b> - allows level names MAP01 to MAP32</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>preload</tt></b></td>
+ <td valign="top">Lists a number of PWAD files to preload
+ on startup. PWAD files are separated by ; and the full
+ path is expected. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>vidoom_config</tt></b></td>
+ <td valign="top">Defines the <a href="#CONFIG_FILE">config
+ file</a> for this version of DOOM. This defines the
+ values used for defining things, linedefs, sectors and so
+ on. <br>
+ viDOOM is currently supplied with <b>doom.cfg</b>, <b>doom2.cfg</b>
+ and <b>zdoom.cfg</b>. </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="MAPINFO_LUMP"></a><b><tt>mapinfo_lump</tt></b></td>
+ <td valign="top">This only applies to the section for <b>[ZDoom]
+ </b>.<p>If this is set to <i>yes</i> then on loading a
+ map from the loaded WAD files, the directory pointed to
+ by <a href="#PWAD_DIR">pwad_dir</a> is searched for <b>MAPINFO.WAD</b>.
+ If found then the MAPINFO lump from the MAPINFO.WAD is
+ read in and can be edited within the editor. If
+ WADINFO.WAD does not exist then an empty MAPINFO lump is
+ created.</p>
+ <p><b>NOTE:</b> On saving the level if there is anything
+ in the mapinfo entered in the editor the MAPINFO.WAD file
+ will be overwritten (or created if it does not exist).
+ This means that any infomation (apart from the edited
+ MAPINFO lump) that was in this WAD file will be lost. It
+ is suggested that nothing goes into MAPINFO.WAD except
+ for the MAPINFO lump.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="MAPINFO_LUMP"></a><b><tt>create_hexen</tt></b></td>
+ <td valign="top">This only applies to the section for <b>[ZDoom]
+ </b>.<p>If this is set to <i>yes</i> then on creating a
+ new map, it will be marked as being in the HEXEN format
+ (ie. having a BEHAVIOR lump and the HEXEN format of
+ THINGS and LINEDEFS). If set to <em>no</em> then the map
+ will be created as a DOOM map.</p>
+ <p>Setting to <em>ask</em> means that you will be asked
+ prior to creation which sort of map you want.</p>
+ </td>
+ </tr>
+</table>
+
+<hr>
+
+<h2><a name="CONFIG_FILE"></a>Config file</h2>
+
+<p>There is two config files supplied with viDOOM, <b>doom.cfg</b>
+and <b>doom2.cfg</b>. Each file is comprised of sections followed
+by the data expected in each section. Each section is defined by
+a line like:</p>
+
+<p><tt>%SECTION_NAME</tt></p>
+
+<p>While the data lines are on individual lines with the pipe (|)
+character used to separate fields, e.g.</p>
+
+<p><tt>Field 1|Field 2</tt></p>
+
+<p>Blank lines and lines starting with a comment character (#)
+are ignored. In addition to this blocks of lines can be forced to
+be ignored by enclosing them with directives introduced with the
+@ charcater. See the <a href="#CONFIG_DIRECTIVES">following
+section</a> for more details.</p>
+
+<p>Note that some sections allow an edit mode to be defined, to
+indicate whether this definition is for DOOM or HEXEN edit mode
+(or both). The currently allowed edit modes are:</p>
+
+<ul>
+ <li>Doom</li>
+ <li>Hexen</li>
+</ul>
+
+<p>If what is being defined applies to more than one mode, these
+can be seperated with commas.</p>
+
+<p>The following sections are defined:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><b><tt>%INCLUDE_FILES</tt></b></td>
+ <td valign="top">Defines any other config files to
+ include before processing this one. Simply type the
+ filenames to be included on individual lines.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="THING_CLASSES"></a><b><tt>%THING_CLASSES</tt></b></td>
+ <td valign="top">Defines the classes to group THINGs into
+ in the editor picklists. Each line is in the form
+ &quot;Class Name|Colour&quot;. Note that colour is
+ defined as an hexadecimal number with the most
+ significant byte for RED, the middle byte for BLUE and
+ the least significant byte for GREEN. e.g.<p><tt>Monster|0xff0000</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="LINEDEF_CLASSES"></a><b><tt>%LINEDEF_CLASSES</tt></b></td>
+ <td valign="top">Defines the classes to group LINEDEF
+ types into in the editor picklists. Each line is a class
+ name.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="SECTOR_CLASSES"></a><b><tt>%SECTOR_CLASSES</tt></b></td>
+ <td valign="top">Defines the classes to group SECTOR
+ types into in the editor picklists. Each line is in the
+ form &quot;Edit mode|Class Name&quot;. e.g.<p><tt>Doom,Hexen|Lighting</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="THING_TYPES"></a><b><tt>%THING_TYPES</tt></b></td>
+ <td valign="top">Defines the names and IDs of the THINGs
+ supported by DOOM. Each line is in the form
+ &quot;Class|Name|ID|Radius|Sprite Name&quot;. e.g.<p><tt>Monster|Former
+ Human|3004|20|POSSA1</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="THING_FLAGS"></a><b><tt>%THING_FLAGS</tt></b></td>
+ <td valign="top">Defines the flags used when setting a
+ THINGs flags. Each line is in the form &quot;Edit
+ Mode|Group|Mask1|Mask2|Name|Single flag character&quot;.
+ e.g.<p><tt>Doom,Hexen|0|0x01|0x01|Skill 1 and 2|E</tt></p>
+ <p>The group number indicates masks that should be
+ mutually exclusive. Group zero means that the flag can be
+ toggled independently of any other. Other group numbers
+ mean that only one of that group should be set at a time.</p>
+ <p>The ways the masks work is:</p>
+ <blockquote>
+ <p>To see if a flag is set the flags are ANDed with
+ mask1. If the result equals mask2 then the flag is
+ set.</p>
+ <p>When defining flags all the mask1 values are ORed
+ together and those bits cleared from the flags. Then
+ for any option that has been set mask2 is ORed onto
+ the flags.</p>
+ </blockquote>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="LINEDEF_TYPES"></a><b><tt>%LINEDEF_TYPES</tt></b></td>
+ <td valign="top">Defines the names and IDs of the LINEDEF
+ types supported by DOOM. Each line is in the form
+ &quot;Class|ID|Name&quot;, e.g.<p><tt>Special|48|Scrolling
+ wall </tt></p>
+ <p><b>Note:</b> Please note that the text for the LINEDEF
+ types in the supplied config files is taken directly from
+ the Unofficial Doom Specs (see the <a
+ href="thanks.htm#DOOMSPEC">thanks</a> page for details).
+ Please feel free to change them to something more useful
+ if you prefer.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="LINEDEF_FLAGS"></a><b><tt>%LINEDEF_FLAGS</tt></b></td>
+ <td valign="top">Defines the flags used when setting a
+ LINEDEFs flags. The format for this section is identical
+ to <a href="#THING_FLAGS">THING_FLAGS</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>%LINEDEF_FLAGS_EXTRA</tt></b></td>
+ <td valign="top">Configuration so that viDOOM knows which
+ bits control certain functions. If more that one line
+ appears in this section then the last one is used. The
+ form of the line is &quot;Bit number controlling
+ 2-sided|Bit controlling Impassible|Bit controlling lower
+ unpegged|Bit controlling upper unpegged&quot;. e.g.<p><tt>2|0|3|4</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="LINEDEF_DEFAULTS"></a><b><tt>%LINEDEF_DEFAULTS</tt></b></td>
+ <td valign="top">This section must not appear before
+ %LINEDEF_FLAGS_EXTRA and defines the bit patterns for
+ various linedef styles. These are used in the editor so
+ that defining a type of LINEDEF can be quickly done when
+ creating them. The format of each line is
+ &quot;Name|Flags value&quot;, e.g.<p><tt>2-sided
+ wall|0x47</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="SECTOR_TYPES"></a><b><tt>%SECTOR_TYPES</tt></b></td>
+ <td valign="top">Defines the names and IDs for the
+ different sector types. Each line is in the form
+ &quot;Edit Mode|Class|ID|Long name|Short name&quot;. e.g.<p><tt>Doom|Lights|1|Light
+ random off|Random off</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="SECTOR_STYLES"></a><b><tt>%SECTOR_STYLES</tt></b></td>
+ <td valign="top">Defines styles for painting sectors
+ quickly. The form of each line is
+ &quot;Mode|Name|Upper|Middle|Lower|Floor|Ceiling&quot;.
+ e.g.<p><tt>0x19|Quarry|SP_ROCK1|SP_ROCK1|SP_ROCK1|RROCK09|F_SKY1</tt></p>
+ <p>The mode is a bit significant number where the bits
+ have the following meaning:</p>
+ <ul>
+ <li>Bit 0 - Paint textures on the sidedefs facing
+ into this sector</li>
+ <li>Bit 1 - Paint textures on the sidedefs facing out
+ of this sector</li>
+ <li>Bit 2 - Leave current lower/upper settings</li>
+ <li>Bit 3 - Set upper unpegged if an upper texture is
+ painted</li>
+ <li>Bit 4 - Set lower unpegged if a lower texture is
+ painted</li>
+ </ul>
+ <p>If neither bits 2, 3 or 4 are set it is assumed that
+ lower/upper unpegged will be cleared on painting those
+ textures.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="EMPTY_TEXTURE_NAME"></a><b><tt>%EMPTY_TEXTURE_NAME</tt></b></td>
+ <td valign="top">Simply defines the empty texture name
+ used by DOOM. This will generally just be the -
+ character, e.g.<p><tt>%EMPTY_TEXTURE_NAME<br>
+ -</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="NORMAL_TYPES"></a><b><tt>%NORMAL_TYPES</tt></b></td>
+ <td valign="top">Defines the values that define the
+ normal linedefs and sectors. The form of the single line
+ of data is &quot;Id for normal linedef|Id for normal
+ sector&quot;. In all current versions of Doom this is
+ zero, e.g.<p><tt>%NORMAL_TYPES<br>
+ 0|0</tt></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="LINEDEF_CHECK_DEFAULT"></a><b><tt>%LINEDEF_CHECK_DEFAULT</tt></b></td>
+ <td valign="top">Provides an optional default texture to
+ use when a texture is requested when checking linedefs.
+ If this value is defined to be the same as
+ EMPTY_TEXTURE_NAME then the user is prompted for a
+ texture to use, otherwise this texture is used instead,
+ e.g.<p><tt>%LINEDEF_CHECK_DEFAULT<br>
+ ASHWALL</tt></p>
+ <p>See <a href="editing.htm#LINEDEF_KEYS">editing</a> for
+ details on the check linedef operation.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="LINEDEF_GEN_BITMASKS"></a><b><tt>%LINEDEF_GEN_BITMASKS</tt></b></td>
+ <td valign="top">This defines the bitmasks used to
+ represent generalised LINEDEF types (these were
+ introduced by <a href="thanks.htm#BOOM">BOOM</a>).<p>This
+ section is a bit more complex than most of the others as
+ the format of the data is not fixed from line to line.
+ Each set starts with the class name for the bitmask.
+ Format for this line is:</p>
+ <p><tt>class name|no of fields</tt></p>
+ <p>After this follows <em>no of fields</em> repetitions
+ of the following:</p>
+ <p><tt>field name|shorthand name|value</tt></p>
+ <p>e.g.</p>
+ <p><tt>%LINEDEF_GEN_BITMASKS<br>
+ Speed|4<br>
+ Slow|Slow|0<br>
+ Normal|Norm|1<br>
+ Fast|Fast|2<br>
+ Turbo|Turb|3</tt></p>
+ <p>Remember that value will be shifted left a specified
+ amount when used in the <a href="#LINEDEF_GEN_TYPES">LINEDEF_GEN_TYPES</a>
+ section and so they should be defined relative to bit 0.
+ Also note that inside the editor all the values
+ associated with a bitmask are ORed together to create a
+ mask that can extract that information from a generalised
+ linedef. Following all this can follow another class, and
+ so on. Also remember that blank lines and comments are
+ OK, so that sections can be readably split using white
+ space.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="LINEDEF_GEN_TYPES"></a><b><tt>%LINEDEF_GEN_TYPES</tt></b></td>
+ <td valign="top">This defines the groupings of
+ LINEDEF_GEN_BITMASKS to make up different generalised
+ LINEDEF types.<p>This section is a bit more complex than
+ most of the others as the format of<br>
+ the data is not fixed from line to line. Each set starts
+ with the class name describing the name of this type of
+ generalised linedef, the number of different bit patterns
+ defined in the class, the low and high values that the
+ type occupies and a mask used when generating the value.
+ Format for this line is:</p>
+ <p><tt>class name|low value|high value|mask|no of
+ bit-field classes</tt></p>
+ <p>After this follows <em>no of bit-fields </em>repetitions
+ of the following:</p>
+ <p><tt>bit-field name|shift</tt></p>
+ <p>e.g.</p>
+ <p><tt>Locked Door|0x3800|0x3bff|0x3800|5<br>
+ Trigger|0<br>
+ Speed|3<br>
+ Locked door kind|5<br>
+ Opens with|6<br>
+ Number of keys|9</tt></p>
+ <p>The shift defines how much the bitmask is shifted to
+ the left to generate the actual values stored in the
+ linedef type field. Note that along with these bitmask
+ values the mask field is also ORed onto the result to
+ create the entire linedef type value. Following all this
+ can follow another class, and so on. Also remember that
+ blank lines and comments are OK, so that sections can be
+ readably split using white space.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="SECTOR_GEN_BITMASKS"></a><b><tt>%SECTOR_GEN_BITMASKS</tt></b></td>
+ <td valign="top">This works in exactly the same way as <a
+ href="#LINEDEF_GEN_BITMASKS">LINEDEF_GEN_BITMASKS</a>,
+ but is used to define the generalised bitmasks used by a
+ SECTOR.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="SECTOR_GEN_BITMASKS"></a><b><tt>%SECTOR_GEN_TYPES</tt></b></td>
+ <td valign="top">This works in exactly the same way as <a
+ href="#LINEDEF_GEN_TYPES">SECTOR_GEN_BITMASKS</a>, but is
+ used to define the generalised types used by a SECTOR.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a
+ name="HEXEN_ACTION_SPECIAL_CLASSES"></a><b><tt>%HEXEN_ACTION_SPECIAL_CLASSES</tt></b></td>
+ <td valign="top">Defines the classes to group action
+ special types into in the editor picklists. Each line is
+ a class name.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="HEXEN_ACTION_SPECIALS"></a><b><tt>%HEXEN_ACTION_SPECIALS</tt></b></td>
+ <td valign="top">Defines the HEXEN action specials. Each
+ line is of the form &quot;Class
+ Name|Id|Name|arg0,arg1,arg2,arg3,arg4&quot;. Note that
+ not all the argument names need be filled in. e.g.<p><tt>Normal|0|No
+ action|<br>
+ Polyobject|1|Polyobj_StartLine|po,mirror,sound<br>
+ Lighting|116|Light_Strobe|tag,upper,lower,u-tics,l-tics</tt></p>
+ <p>Any arg name that is &quot;tag&quot; is used to work
+ out what sector the special is referring to. This is so
+ that tag highlighting (see <a href="editing.htm">editing</a>
+ for details) still works in HEXEN mode.</p>
+ <p>Note that unfortunately this does not apply to THINGs
+ yet.</p>
+ </td>
+ </tr>
+</table>
+
+<hr size="1">
+
+<h3><a name="CONFIG_DIRECTIVES"></a>Config file directives</h3>
+
+<p>In the config files blocks of lines can be included or
+excluded by surrounding them by enclosing them with directives
+introduced with the @ charcater, e.g.:</p>
+
+<p><tt>@DOOM_LEVEL_STYLE<br>
+%SECTOR_STYLES<br>
+&lt;data&gt;<br>
+@END DOOM_LEVEL_STYLE</tt></p>
+
+<p>As you can see a directive is terminated by putting the same
+directive, beginning with END.</p>
+
+<p>The main purporse of these is to stop SECTOR_STYLES and
+LINEDEF_CHECK_DEFAULT being defined inappropriately (Doom and
+Doom 2 have differing texture names, etc), and also to allow one
+single ZDOOM configuration file to be defined, regardless of
+whether you are using the Doom or Doom 2 IWAD files with it.</p>
+
+<p>The following directives are currently supported:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><b><tt>@DOOM_LEVEL_STYLE</tt></b></td>
+ <td valign="top">Includes the lines up to the next <strong><tt>@END
+ DOOM_LEVEL_STYLE</tt></strong> if the <a
+ href="#LEVEL_STYLE">level_style</a> for this game is
+ defined as either <strong>Doom</strong> or <strong>Ultimate
+ Doom</strong>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>@DOOM_1_LEVEL_STYLE</tt></b></td>
+ <td valign="top">Includes the lines up to the next <strong><tt>@END
+ DOOM_1_LEVEL_STYLE</tt></strong> if the <a
+ href="#LEVEL_STYLE">level_style</a> for this game is
+ defined as <strong>Doom</strong>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>@ULT_DOOM_LEVEL_STYLE</tt></b></td>
+ <td valign="top">Includes the lines up to the next <strong><tt>@END
+ ULT_DOOM_LEVEL_STYLE</tt></strong> if the <a
+ href="#LEVEL_STYLE">level_style</a> for this game is
+ defined as <strong>Ultimate Doom</strong>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><b><tt>@DOOM_2_LEVEL_STYLE</tt></b></td>
+ <td valign="top">Includes the lines up to the next <strong><tt>@END
+ DOOM_2_LEVEL_STYLE</tt></strong> if the <a
+ href="#LEVEL_STYLE">level_style</a> for this game is
+ defined as <strong>Doom 2</strong>.</td>
+ </tr>
+</table>
+
+<hr>
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id$</tt></p>
+</body>
+</html>
diff --git a/doc/porting.htm b/doc/porting.htm
new file mode 100644
index 0000000..fded757
--- /dev/null
+++ b/doc/porting.htm
@@ -0,0 +1,1452 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">Porting viDOOM</h1>
+
+<p>This document is provided in case anyone wishes to port viDOOM
+to a new platform. Below is an indication of what OS dependent
+routines must be provided and what configuration needs to be
+done. It is requested that any ports are also released as Free
+Software.</p>
+
+<ul>
+ <li><a href="#MAKEFILE">Makefile configuration</a></li>
+ <li><a href="#INI">INI File</a></li>
+ <li><a href="#FILES">Files</a></li>
+ <li><a href="#MAIN">Main entry point</a></li>
+ <li><a href="#GFX_H">Graphics and input</a></li>
+ <li><a href="#PLATGUI_H">Platform GUI</a></li>
+ <li><a href="#FILE_H">File interface</a></li>
+ <li><a href="#MEM_H">Memory allocation</a></li>
+ <li><a href="#RUNCMD_H">External command execution</a></li>
+ <li><a href="#VSTRING_H">String functions</a></li>
+ <li><a href="#INSTALLATION">Installation script</a></li>
+ <li><a href="#DOCUMENTATION">Documentation</a></li>
+</ul>
+
+<hr>
+
+<h2><a name="MAKEFILE"></a>Makefile configuration</h2>
+
+<p><strong><u>makefile</u></strong></p>
+
+<p><a name="MAKEPLAT"></a>Set the variable <strong>MAKEPLAT</strong>
+to the name of your platform, eg.</p>
+
+<p><tt>MAKEPLAT=</tt><em><tt>OS</tt></em></p>
+
+<p>You will then need to create a matching file the <strong>make</strong>
+sub directory called <em>OS</em>.cfg. Also all the OS dependent C
+source should go into a sub directory defined in the following
+make config file by the <strong>PLATFORM</strong> variable. See
+the <a href="#FILES">Files</a> section for an overview of these
+files.</p>
+
+<p><a name="MAKE_CONFIG"></a><strong><u>make config file</u></strong></p>
+
+<p>The following values need to be set in the file <strong>make</strong><em><strong>/OS</strong></em><strong>.cfg</strong>:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong><tt>CC</tt></strong></td>
+ <td valign="top">Set to the name of the C compiler.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>LD</tt></strong></td>
+ <td valign="top">The name of the linker.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><a name="PLATFORMVAR"></a><strong><tt>PLATFORM</tt></strong></td>
+ <td valign="top">The name of the D containing the OS
+ dependent C sources. The idea of defineing tdefining
+ here, rather than using the MAKEPLAT variable defined in
+ the top level makefile, is so that different
+ configurations can share sources. i.e. An X11 port may
+ use the same code for all the unix platforms, but each
+ machine may require slightly different configuration
+ (library search paths for example).</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>EXE_EXT</tt></strong></td>
+ <td valign="top">An extension to add to the executable
+ name, e.g.<br>
+ <tt>EXE_EXT=.EXE</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>OBJ_EXT</tt></strong></td>
+ <td valign="top">The extension used in this OS to denote
+ object files produced by the C compiler. Generally:<br>
+ <tt>OBJ_EXT=.o</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>LIBS</tt></strong></td>
+ <td valign="top">Any extra libraries to link in with
+ viDOOM for the OS dependent routines.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>EXRACF</tt></strong></td>
+ <td valign="top">Any extra C flags required when
+ compiling the sources. Use it to enable optimisation and
+ to include any extra include paths required by this OS.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>EXTRALF</tt></strong></td>
+ <td valign="top">Any extra flags required when linking
+ viDOOM. Use it to enable include any extra library paths
+ required by this OS.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>DIRSEP</tt></strong></td>
+ <td valign="top">The directory separator character for
+ this OS. The character must be included in quotes, e.g.<font
+ face="Courier New"><tt><br>
+ </tt></font><tt>DIRSEP=&quot;/&quot;</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>MATHLIB</tt></strong></td>
+ <td valign="top">The options required to include the
+ maths library when linking.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>TRACEFORM</tt></strong></td>
+ <td valign="top">This variable is a printf format string
+ and the arguments to the format. This string is used to
+ provide a tracing function used to track bugs in the
+ editor. A simple, portable example is:<br>
+ <tt>TRACEFORM=&quot;%s:%d&quot;,__FILE__,__LINE__</tt><p>It
+ can just be defined to an empty string if you are not
+ compiling the debug version.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>EXEFLAG</tt></strong></td>
+ <td valign="top">The flag to provide to the linker to
+ generate an executable. The flag is used in a rule
+ something like this:<br>
+ <tt>$(LD) $(EXTRALF) $(EXEFLAG) vidoom$(EXE_EXT)
+ $(ALL+VIDOOM_OBJECTS)</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>OBJFLAG</tt></strong></td>
+ <td valign="top">The flag to provide to the C compiler to
+ generate an object file from the supplied C source. The
+ flag is used in a rule something like this:<br>
+ <tt>$(CC) $(EXTRACF) $(OBJFLAG) file.c</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>DEFINEFLAG</tt></strong></td>
+ <td valign="top">The flag to provide to the C compiler
+ with pre-processor definition from the command line. The
+ flag is used in a rule something like this (note no space
+ after the DEFINEFLAG - if there is a space between the
+ switch and the argument put it in this variable
+ definition):<br>
+ <tt>$(CC) $(EXTRACF) $(OBJFLAG) $(DEFINEFLAG)MACRO=value
+ file.c</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>INCFLAG</tt></strong></td>
+ <td valign="top">The flag to provide to the C compiler
+ with extra directories in which the pre-processor
+ searches for include files. The flag is used in a rule
+ something like this (note no space after the INCFLAG - if
+ there is a space between the switch and the argument put
+ it in this variable definition):<br>
+ <tt>$(CC) $(EXTRACF) $(OBJFLAG) $(INCFLAG)include_dir
+ file.c</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong><tt>MAKEINSTALL</tt></strong></td>
+ <td valign="top">The command used to execute the <strong>install</strong>
+ makefile as described in the <a href="#INSTALLATION">installation
+ script </a>section. The command must define the
+ INSTALLDIR variable for the makefile and invoke the first
+ rule in the install makefile.<p>For instance, using a
+ normal unix/GCC type make command, this would be:<br>
+ <tt>make INSTALL_DIR='$(INSTALL_DIR)' -f install</tt></p>
+ </td>
+ </tr>
+</table>
+
+<hr>
+
+<h2><a name="INI"></a>INI File</h2>
+
+<p>If your port requires or wants configuration to be set at
+tun-time from the INI file, it is best to place it a
+system-dependent section called the same as the <em>OS</em> value
+you set <a href="#MAKEPLAT">MAKEPLAT</a> to for this platform,
+e.g.</p>
+
+<p><tt>[</tt><em><tt>OS</tt></em><tt>]<br>
+degreelessness mode=off</tt></p>
+
+<hr>
+
+<h2><a name="FILES"></a>Files</h2>
+
+<p>The following files are the minimum that must be provided by
+the platform:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>make/</strong><em><strong>OS</strong></em><strong>.cfg</strong></td>
+ <td valign="top">The make config file. Described in the <a
+ href="#MAKE_CONFIG">previous section</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>main.c</strong></td>
+ <td valign="top">This goes in the <a href="#PLATFORMVAR">platform
+ directory</a> and provides the <a href="#MAIN">startup
+ code</a> for the operating system.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>gfx.c</strong></td>
+ <td valign="top">This goes in the <a href="#PLATFORMVAR">platform
+ directory</a> and provides the <a href="#GFX_H">low level
+ graphics and input</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>platgui.c</strong></td>
+ <td valign="top">This goes in the <a href="#PLATFORMVAR">platform
+ directory</a> and provides the <a href="#PLATGUI_H">system
+ dependent GUI</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>file.c</strong></td>
+ <td valign="top">This goes in the <a href="#PLATFORMVAR">platform
+ directory</a> and provides the portable part of the <a
+ href="#FILE_H">file system interface</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>mem.c</strong></td>
+ <td valign="top">This goes in the <a href="#PLATFORMVAR">platform
+ directory</a> and provides the <a href="#MEM_H">memory
+ handling</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>runcmd.c</strong></td>
+ <td valign="top">This goes in the <a href="#PLATFORMVAR">platform
+ directory</a> and provides the method for <a
+ href="#RUNCMD_H">running external commands</a>.</td>
+ </tr>
+ <tr>
+ <td><strong>vstring.c</strong></td>
+ <td>This goes in the <a href="#PLATFORMVAR">platform
+ directory</a> and provides functions for <a
+ href="#VSTRING_H">string comparisons</a>.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>install</strong></td>
+ <td valign="top">This goes in the <a href="#PLATFORMVAR">platform
+ directory</a> and is the makefile invoked to <a
+ href="#INSTALLATION">install viDOOM</a>.</td>
+ </tr>
+</table>
+
+<hr>
+
+<h2><a name="MAIN"></a>Main entry point</h2>
+
+<p><strong><u>main.c</u></strong></p>
+
+<p>The OS dependent code must provide it's own main (this is to
+allow for various non-standard environments where main() is not
+the standard entry point). The entry point must do any OS
+dependent initialisations then invoke the following entry point
+to start up viDOOM:</p>
+
+<p><tt>int viDOOM(int argv, char *argv[])</tt></p>
+
+<p>If the OS uses main() as an entry point the following example
+could be enough:</p>
+
+<pre>int main(int argc,char *argv[])
+{
+ return (viDOOM(argc,argv));
+}</pre>
+
+<hr>
+
+<h2><a name="GFX_H"></a>Graphics and input</h2>
+
+<p><strong><u>gfx.c</u></strong></p>
+
+<p>This provides the low-level graphics access and interfaces to
+keyboard and mouse. The GFX object is expected to work on a weak,
+semi-event driven basis for keyboard/mouse access. The following
+are the basic assumptions about the GFX interface:</p>
+
+<ul>
+ <li>A true, or hicolor, display.</li>
+ <li>A Fixed font.</li>
+ <li>Default origin is in the top left of the display, with X
+ positive along and Y positive down.</li>
+ <li>A buffered display. The screen contents should not change
+ until GFX_redraw() is called. If not honoured viDOOM
+ should still work up to a point, but it's use of the XOR
+ mode may not be apparent to the user.</li>
+ <li>Colours are represented using an int, with 8 bits each
+ for the red, green and blue component. The int used to
+ define the colour, when viewed in hex, would look like <tt>0xRRGGBB</tt>.
+ e.g.<ul type="disc">
+ <li><tt>0xFF0000</tt> - Red</li>
+ <li><tt>0x00FF00</tt> - Green</li>
+ <li type="disc"><tt>0x0000FF</tt> - Blue</li>
+ <li><tt>0xFFFFFF</tt> - White</li>
+ <li><tt>0x808080</tt> - 50% grey</li>
+ <li><tt>0x000000</tt> - Black</li>
+ </ul>
+ </li>
+</ul>
+
+<p>The following types are defined and used by the GFX object :</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><pre>typedef void *GFX_IMAGE; </pre>
+ </td>
+ <td valign="top">This is an opaque type provided to allow
+ the GFX object to provide whatever is required to
+ reference a bitmap on the machine.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><pre>typedef struct
+ {
+ int w;
+ int h;
+ int pal[256];
+ unsigned char *data;
+ } GFX_BITMAP; </pre>
+ </td>
+ <td valign="top">This type represents the bitmap objects
+ that viDOOM defines. These bitmaps are converted into
+ GFX_IMAGE prior to use. The fields are: <table border="0"
+ cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>w</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">width of bitmap</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>h</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">height of bitmap</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>pal[256]</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The palette used to define the
+ bitmap. Each bitmap pixel is an index into this
+ array of RGB values. Each entry is an integer,
+ that when represented in hex would define the RGB
+ triplet as 0xRRGGBB.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>*data</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">A pointer to the data of the
+ bitmap. This should be accessed using pointer
+ arithmetic as *(data+(x)+(y*w))</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><pre>typedef struct
+ {
+ int type;
+ int shift;
+ int ctrl;
+ int alt;
+ char ascii;
+ int code;
+ } GFXKey;</pre>
+ </td>
+ <td valign="top">This defines an object for reporting key
+ presses. The fields are:<table border="0" cellpadding="3"
+ cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>type</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The type of event. This field is
+ just used to line up with the event union defined
+ later on. Should just hold GFX_KEY_EVENT.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>shift</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">TRUE if the Shift key is being
+ pressed.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>ctrl</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">TRUE if the Control key is being
+ pressed.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>alt</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">TRUE if the Alt key is being
+ pressed.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>ascii</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The ASCII code of the character
+ read. If the key is not an ASCII key (e.g. a
+ function key) this field should be zero.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>code</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">Holds the code for non-ASCII
+ keys, e.g. GFX_F1. This field should be set to
+ GFX_ASCII for key presses reported through the
+ ascii field.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><pre>typedef struct GFXMouse
+ {
+ int type;
+ int shift;
+ int ctrl;
+ int alt;
+ int x;
+ int y;
+ int b;
+ } GFXMouse;</pre>
+ </td>
+ <td valign="top">This defines the type for reporting
+ mouse movements and button presses. The fields are:<table
+ border="0" cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>type</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The type of event. This field is
+ just used to line up with the event union defined
+ later on. Should just hold GFX_MOUSE_EVENT.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>shift</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">TRUE if the Shift key is being
+ pressed.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>ctrl</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">TRUE if the Control key is being
+ pressed.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>alt</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">TRUE if the Alt key is being
+ pressed.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>x</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The X co-ordinate of the mouse,
+ relative to the top left of the display.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>y</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The Y co-ordinate of the mouse,
+ relative to the top left of the display.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>b</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The currently pressed buttons.
+ This should be made up of a bit mask composed
+ from GFX_BUTLEFT, GFX_BUTMIDDLE and GFX_BUTRIGHT.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><pre>typedef union GFXEvent
+ {
+ int type;
+ GFXKey key;
+ GFXMouse mouse;
+ } GFXEvent;</pre>
+ </td>
+ <td valign="top">This defines the type for reporting
+ events (a combination of both mouse movements or key
+ presses). The fields are:<table border="0"
+ cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>type</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The type of event. This field is
+ just used to decide which of the other two fields
+ should be accessed to get the event information.
+ This field must be GFX_MOUSE_EVENT or
+ GFX_KEY_EVENT.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>key</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The GFXKey structure defining
+ the event if this is a GFX_KEY_EVENT.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>mouse</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The GFXMouse structure defining
+ the event if this is a GFX_MOUSE_EVENT.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+<p>The following interfaces must be supplied by the GFX object:</p>
+
+<p><strong><tt>void GFX_init(void)</tt></strong></p>
+
+<blockquote>
+ <p>Initialises the GFX object. No other GFX interfaces are
+ called prior to this, with the possible (though current not
+ used) exception of <strong><tt>GFX_exit()</tt></strong>.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_close(void)</tt></strong></p>
+
+<blockquote>
+ <p>Called when viDOOM is terminating. Note that other (none
+ system dependent) processing may go on between calling this
+ and then invoking <strong><tt>exit()</tt></strong> or <strong><tt>return()</tt></strong>.</p>
+</blockquote>
+
+<p><strong><tt>GFX_IMAGE GFX_create_image(GFX_BITMAP *bm)</tt></strong></p>
+
+<blockquote>
+ <p>Should create a GFX_IMAGE from the passed bitmap <em>bm</em>.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_destroy_image(GFX_IMAGE img)</tt></strong></p>
+
+<blockquote>
+ <p>Release the bitmap object pointed to by <em>img</em>.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_draw_image(GFX_IMAGE img, int x, int y)</tt></strong></p>
+
+<blockquote>
+ <p>Draws <em>img</em> with it's top-left co-ordinate
+ represented by <em>x,y</em>. This function should implement
+ any necessary clipping when drawing the bitmap.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_fill_screen(GFX_IMAGE img)</tt></strong></p>
+
+<blockquote>
+ <p>Should fill the screen with the image, scaled if
+ necessary. Note that this call is just used for the main menu
+ backdrop, so if it cannot be honoured no harm will be done.</p>
+</blockquote>
+
+<p><a name="GFX_OPEN"></a><strong><tt>void GFX_open(int width,
+int height)</tt></strong></p>
+
+<blockquote>
+ <p>Opens the display (or window or whatever) with the
+ specified <em>width</em> and <em>height</em>. Note that
+ failures in here should terminate the program.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_clear(int col)</tt></strong></p>
+
+<blockquote>
+ <p>This clears the display to the passed colour <em>col</em>.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_redraw(void)</tt></strong></p>
+
+<blockquote>
+ <p>This redraws the contents of the screen. All drawing
+ operations should not update the actual screen till this is
+ called (i.e. the display should be buffered).</p>
+</blockquote>
+
+<p><strong><tt>void GFX_line(int x1, int y1, int x2, int y2, int
+col)</tt></strong></p>
+
+<blockquote>
+ <p>Draw a line from <em>x1,y1</em> to <em>x2,y2</em> in
+ colour <em>col</em>.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_plot(int x, int y, int col)</tt></strong></p>
+
+<blockquote>
+ <p>Plot the point <em>x,y</em> in colour <em>col</em>.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_circle(int x, int y, int r, int col)<br>
+void GFX_fcircle(int x, int y, int r, int col)</tt></strong></p>
+
+<blockquote>
+ <p>Draw a circle centred on <em>x,y</em> with a radius <em>r</em>
+ and in colour <em>col</em>. The <strong>fcircle</strong>
+ version should draw a filled circle.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_rect(int x, int y, int w, int h, int col)<br>
+void GFX_frect(int x, int y, int w, int h, int col)</tt></strong></p>
+
+<blockquote>
+ <p>Draw a rectangle with one corner at <em>x,y</em> and the
+ other corner at <em>(x+w),(y+h)</em> in colour <em>col</em>.
+ Note that zero length and negative width and heights must be
+ allowed. The <strong>frect </strong>version should draw a
+ filled rectangle.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_set_XOR_mode(void)<br>
+void GFX_clear_XOR_mode(void)</tt></strong></p>
+
+<blockquote>
+ <p>This should set and clear XOR mode. Normally all GFX
+ operations should set the pixels to the colour specified, but
+ when XOR mode is enabled the pixel values should be XORed
+ into place.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_print(int x, int y, int col, char *fmt,
+...)</tt></strong></p>
+
+<blockquote>
+ <p>Print the printf style arguments (<em>fmt</em> and <em>...</em>)
+ with their top left corner at <em>x,y</em> in colour <em>col</em>.
+ Note that text should rendered transparently.</p>
+</blockquote>
+
+<p><strong><tt>int GFX_fh(void)<br>
+int GFX_fw(void)</tt></strong></p>
+
+<blockquote>
+ <p>Return the height (GFX_fh) and width (GFX_fw) of the fixed
+ width font used for display purposes.</p>
+</blockquote>
+
+<p><strong><tt>int GFX_mouse_buttons(void)</tt></strong></p>
+
+<blockquote>
+ <p>Returns the number of mouse buttons. This is just used as
+ check on initialisation as viDOOM expects at least 2 mouse
+ buttons.</p>
+</blockquote>
+
+<p><strong><tt>int GFX_mouse(int *x, int *y)</tt></strong></p>
+
+<blockquote>
+ <p>Return the current point position in <em>x</em> and <em>y</em>.
+ If any of the passed pointers are NULL that variable should
+ be ignored.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_waitkey(GFXKEy *key)</tt></strong></p>
+
+<blockquote>
+ <p>Waits for a <em>key</em> to be pressed and returns the key
+ press in <em>key</em>. If <em>key</em> is NULL simply wait
+ for a key press.</p>
+</blockquote>
+
+<p><strong><tt>int GFX_key(GFXKey *key)</tt></strong></p>
+
+<blockquote>
+ <p>Returns TRUE if a key has been pressed and returns the
+ keypress in <em>key</em>. Returns FALSE if there is no
+ outstanding keypresses, in which case the contents of <em>key</em>
+ are undefined.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_bounce(void)</tt></strong></p>
+
+<blockquote>
+ <p>Waits for all keys and mouse buttons to be released. On a
+ real event-driven system could be ignored, or flush any
+ outstanding events.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_await_input(GFXEvent *ev)</tt></strong></p>
+
+<blockquote>
+ <p>Waits for either a keypress or a mouse button to be
+ pressed and fills in <em>ev</em> accordingly.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_await_input_full(GFXEvent *ev)</tt></strong></p>
+
+<blockquote>
+ <p>Waits for either a keypress, a mouse button to be pressed
+ or the mouse to be moved and fills in <em>ev</em>
+ accordingly.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_exit(int code, char *fmt, ...)</tt></strong></p>
+
+<blockquote>
+ <p>This call should do any necessary tidying of the display
+ (switching from graphics mode, closing windows, whatever)
+ then display the printf style arguments (<em>fmt</em> and <em>...</em>)
+ and the exit with the passed return <em>code</em>.</p>
+</blockquote>
+
+<p><strong><tt>void GFX_save_screen(char *path)</tt></strong></p>
+
+<blockquote>
+ <p>This call need not be supported. It just allows screen
+ grabs to be captured when viDOOM is compiled with debug
+ information. If supported it should just save a bitmap in the
+ file pointed to by <em>path</em>.</p>
+</blockquote>
+
+<hr>
+
+<h2><a name="PLATGUI_H"></a>Platform GUI</h2>
+
+<p><strong><u>platgui.c</u></strong></p>
+
+<p>This provides access to the platform's GUI routines.</p>
+
+<p>The following types are defined and used by the PLATGUI object
+:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><pre>typedef struct
+ {
+ char *text;
+ GFX_IMAGE img;
+ int client_index;
+ } PLAT_IMG_PICKLIST;</pre>
+ </td>
+ <td valign="top">This structure is used to define a
+ picklist that has graphical images and client defined
+ values attached to them. This is used for selection of
+ textures, flats and sprites (things) in viDOOM.<p>The
+ fields in the structure are:</p>
+ <table border="0" cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>text</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This defines the text for a
+ picklist entry. NULL marks the end of the list of
+ picklist entries.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>img</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The GFX_IMAGE to associate with
+ this entry. Can be NULL to indicate show no
+ image.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>client_index</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The value returned if this item
+ is selected.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><pre>typedef struct
+ {
+ char *text;
+ int client_index;
+ } PLAT_PICKLIST;</pre>
+ </td>
+ <td valign="top">This structure is used to define a
+ picklist that has client defined values attached to the
+ entries.<p>The fields in the structure are:</p>
+ <table border="0" cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>text</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This defines the text for a
+ picklist entry. NULL marks the end of the list of
+ picklist entries.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>client_index</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The value returned if this item
+ is selected.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><pre>typedef struct PLATMENU
+ {
+ char *text;
+ int client_index;
+ struct PLATMENU *child;
+ } PLAT_MENU;</pre>
+ </td>
+ <td valign="top">This structure is used to define menu
+ entries that have client defined values attached to them.<p>The
+ fields in the structure are:</p>
+ <table border="0" cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>text</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This defines the text for the
+ menu entry. NULL marks the end of the list of
+ menu entries.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>client_index</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The value returned if this item
+ is selected. If the child field is not NULL, this
+ field is ignored.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>child</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">If not NULL points to a further
+ array of PLAT_MENU objects defining a child menu.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><pre>typedef struct
+ {
+ char *text;
+ int group;
+ int val;
+ } PLAT_MULTI;
+</pre>
+ </td>
+ <td valign="top">This structure is used to entries for
+ the multi box call. A multi box is a dialog that holds a
+ mixture of radio buttons and check boxes.<p>The fields in
+ the structure are:</p>
+ <table border="0" cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>text</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This defines the text for the
+ multio box entry. NULL marks the end of the list
+ of entries.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>group</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The group this entry belongs to.
+ Group zero means that it is a check box and can
+ be checked/unchecked independently of other
+ entries. Entries in the same group should act as
+ radio buttons in that group.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>val</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The state of the check box/radio
+ button. TRUE means that it's set, FALSE means
+ it's clear. These fields are updated on exit once
+ the multo box is completed.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><pre>typedef struct
+ {
+ char *text;
+ int client_index;
+ } PLAT_RADIO;</pre>
+ </td>
+ <td valign="top">This structure is used to define entries
+ for a radio style picklist (i.e. where only one option
+ can be chosen) that have client defined values attached
+ to them.<p>The fields in the structure are:</p>
+ <table border="0" cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>text</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This defines the text for the
+ radio button. NULL marks the end of the list of
+ radio button entries.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>client_index</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The value returned if this item
+ is selected.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><pre>typedef struct
+ {
+ int no;
+ int current;
+ char **text;
+ } PLAT_DIAL_PL;</pre>
+ <pre>typedef struct
+ {
+ char *text;
+ int type;
+ union /* Data */
+ {
+ int i;
+ char s[PLAT_DIAL_MAXSTRLEN+1];
+ double d;
+ PLAT_DIAL_PL pl;
+ } data;
+ } PLAT_DIALOG;
+</pre>
+ </td>
+ <td valign="top">These structures are used to define
+ entries for a simple dialog.<p>The fields in the
+ PLAT_DIAL_PL structure are:</p>
+ <table border="0" cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>no</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The number of elements pointed
+ to by text.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>current</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The currently selected item in
+ the picklist. This is updated on exit if the
+ dialog is accepted.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>text</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The text for the picklist
+ entries. This is treated as an array of character
+ pointers.</td>
+ </tr>
+ </table>
+ <p>The fields in the PLAT_DIALOG structure are:</p>
+ <table border="0" cellpadding="3" cellspacing="6">
+ <tr>
+ <td valign="top" nowrap>text</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This defines the text for this
+ field in the dialog. NULL marks the end of the
+ list of dialog entries.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>type</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">The type of field this is.
+ Possible values are PLAT_DIAL_STRING,
+ PLAT_DIAL_INTEGER, PLAT_DIAL_DOUBLE and
+ PLAT_DIAL_PICKLIST.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>data.i</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This is the field that is
+ displayed and updated on exit if the type is
+ PLAT_DIAL_INTEGER.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>data.s</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This is the field that is
+ displayed and updated on exit if the type is
+ PLAT_DIAL_STRING.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>data.d</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This is the field that is
+ displayed and updated on exit if the type is
+ PLAT_DIAL_DOUBLE.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap>data.pl</td>
+ <td valign="top" nowrap>-</td>
+ <td valign="top">This is the structure that
+ defines how a PLAT_DIAL_PICKLIST is displayed.
+ The current field in this is updated if the
+ selected picklist value changes.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+<p>Note that along with the types, the following predefined
+values are set (these are read from the INI file). Note that they
+should be considered to be unset until immediately prior to
+viDOOM's call to <strong><tt>GUI_setscreen()</tt></strong>:</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><strong>GUI_HI</strong></td>
+ <td valign="top">The brightest colour used to draw the 3D
+ looking interface.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>GUI_MID</strong></td>
+ <td valign="top">The medium colour used to draw the 3D
+ looking interface.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>GUI_LO</strong></td>
+ <td valign="top">The darkest colour used to draw the 3D
+ looking interface.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>GUI_TEXT</strong></td>
+ <td valign="top">The colour of text.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>GUI_TEXTSHADOW</strong></td>
+ <td valign="top">The colour of the shadow behind text.
+ This is only really used by viDOOM's own portable GUI
+ routines.</td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><strong>GUI_BOLD</strong></td>
+ <td valign="top">The colour of bold text (used for
+ titles).</td>
+ </tr>
+</table>
+
+<h3>Functions</h3>
+
+<p>The following interfaces are defined by the PLATGUI object.
+Note that all these calls are assumed to not destroy screen
+contents (ie. the screen should be restored after displaying the
+GUI object):</p>
+
+<p><strong><tt>void GUI_setscreen(int width, int height)</tt></strong></p>
+
+<blockquote>
+ <p>Once the display has been opened with <a href="#GFX_OPEN"><strong>GFX_open()</strong></a>
+ then this is called to inform the platform's GUI routines of
+ the display size.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_yesno(char *question)</tt></strong></p>
+
+<blockquote>
+ <p>Display an alert with <em>question</em> in it and <em>Yes</em>
+ and <em>No</em> buttons. Returns TRUE if <em>Yes</em> is
+ pressed and FALSE if <em>No</em> is pressed.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_yesno_all(char *question)</tt></strong></p>
+
+<blockquote>
+ <p>Works like <strong>GUI_yesno()</strong>, but displays to
+ extra options - &quot;Yes to All&quot; and &quot;No to
+ All&quot;. If either of these options are selected then
+ further calls to this function should return TRUE/FALSE
+ accordingly, until <strong>GUI_start_yesno__all()</strong> is
+ called.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_start_yesno_all(void);</tt></strong></p>
+
+<blockquote>
+ <p>Resets <strong>GUI_yesno_all()</strong>.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_alert(char *title, char *text, char
+*button_text)</tt></strong></p>
+
+<blockquote>
+ <p>Display an alert with a title of <em>title</em>,
+ containing <em>text</em> as the message and with a single
+ button labelled <em>button_text</em>. Note that text is split
+ into multiple lines by the pipe (|) character.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_menu(char *title, int x, int y, PLAT_MENU
+menu[], int defval)</tt></strong></p>
+
+<blockquote>
+ <p>Displays a menu with title <em>title</em> at position <em>x,y</em>.
+ The displayed items are taken from <em>menu</em>. The return
+ is the client_index field from the selected menu item, or
+ from the selected option in a child menu, or <em>defval</em>
+ if the menu is cancelled.</p>
+</blockquote>
+
+<p><strong><tt>char *GUI_fsel(char *title, char *default_path,
+char filter)</tt></strong></p>
+
+<blockquote>
+ <p>Allows a file to be selected. The file selector should
+ have <em>title</em> for it's title and start selecting from
+ the <em>default_path</em>. If <em>filter </em>is NULL then
+ all files should be displayed, otherwise only files ending in
+ <em>filter</em>.</p>
+ <p>The return is NULL if the selector is cancelled. Otherwise
+ a pointer is returned containing the fully qualified path of
+ the selected file. This pointer must be dynamically allocated
+ and will be freed using <a href="#FRELEASE"><strong>FRelease()</strong></a>.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_picklist(char *title, char *opts[])</tt></strong></p>
+
+<blockquote>
+ <p>Displays a picklist with title <em>title</em>. The options
+ are taken from the array of character pointers <em>opts</em>.
+ The return value is the index of the selected item in <em>opts</em>
+ if selected, or -1 if the picklist is cancelled.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_client_picklist(char *title, PLAT_PICKLIST
+opts[], int defval)</tt></strong></p>
+
+<blockquote>
+ <p>Displays a picklist with title <em>title</em>. The text
+ items to display are taken from <em>opts</em>. The return is
+ the client_index field from the selected picklist item, or <em>defval</em>
+ if the picklist is cancelled.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_image_picklist(char *title,
+PLAT_IMG_PICKLIST opts[], int defval)</tt></strong></p>
+
+<blockquote>
+ <p>Displays a picklist with title <em>title</em>. The text
+ items and associated image to display are taken from <em>opts</em>.
+ The return is the client_index field from the selected
+ picklist item, or <em>defval</em> if the picklist is
+ cancelled.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_radio_box(char *title, PLAT_RADIO opts[],
+int current, int defval)</tt></strong></p>
+
+<blockquote>
+ <p>Displays a dialog containing radio buttons with title <em>title</em>.
+ The text to display is taken from <em>opts</em>. The selected
+ object when the the radio box is first displayed is the
+ option who's client_index field matches <em>current</em> (or
+ the first item if there is no match). The return is the
+ client_index field from the selected radio button, or <em>defval</em>
+ if the radio box is cancelled.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_multi_box(char *title, PLAT_MULTI opts[])</tt></strong></p>
+
+<blockquote>
+ <p>Display a mutli-selection radio box. The items are
+ described <em>opts</em>. The return is TRUE if the dialog is
+ accepted, otherwise FALSE.</p>
+</blockquote>
+
+<p><strong><tt>int GUI_dialog(char *title, int no, PLAT_DIALOG
+dial[])</tt></strong></p>
+
+<blockquote>
+ <p>Displays a dialog with the title <em>title</em>. The
+ fields for the dialog are extracted from <em>dial</em>, for
+ which there is expected to be <em>no</em> elements. The
+ return is TRUE if the dialog is accepted, or FALSE if it is
+ cancelled. On being cancelled the contents of the data union
+ within the <em>dial</em> elements is undefined.</p>
+</blockquote>
+
+<p><strong><tt>void GUI_file_view(char *title, char *file)</tt></strong></p>
+
+<blockquote>
+ <p>Displays the contents of a text file, allowing the user to
+ move around and view the file. What form this takes is no
+ concern at all to viDOOM.</p>
+ <p>If is assumed this can view both DOS format (lines
+ terminated with CR and LF) and UNIX format text files (lines
+ terminated with LF).</p>
+</blockquote>
+
+<p><strong><tt>char *GUI_text_edit(char *title, char *text)</tt></strong></p>
+
+<blockquote>
+ <p>Allows simple text editting. The form this display takes
+ is of noconcern to viDOOM (if applicable it would be more
+ than OK to start an external text editor). <em>text </em>is a
+ pointer to the original text, which is one long string with
+ line breaks denoted by the '\n' character.</p>
+ <p>The return is a newly allocated copy of the edited text is
+ the text is OKed, or NULL if the text is cancelled. In either
+ case, the original string pointed to by text should be as it
+ was.</p>
+</blockquote>
+
+<hr>
+
+<h2><a name="FILE_H"></a>File interface</h2>
+
+<p><strong><u>file.c</u></strong></p>
+
+<p>This provides access to various file system functions and also
+provides some filename manipulation routines. The following
+interfaces should be provided:</p>
+
+<p><strong><tt>char *Pwd(void)</tt></strong></p>
+
+<blockquote>
+ <p>This call should return the current working directory. The
+ return should be static.</p>
+</blockquote>
+
+<p><strong><tt>void Cd(char *path)</tt></strong></p>
+
+<blockquote>
+ <p>This call should change the current working directory to <em>path</em>.</p>
+</blockquote>
+
+<p><strong><tt>char *Dirname(char *path)</tt></strong></p>
+
+<blockquote>
+ <p>This call should return the directory part of <em>path</em>
+ if any. The return should be static.</p>
+</blockquote>
+
+<p><strong><tt>char *Basename(char *path)</tt></strong></p>
+
+<blockquote>
+ <p>This call should return the filename part of <em>path</em>.
+ The return should be static, or a pointer into the <em>path</em>
+ parameter.</p>
+</blockquote>
+
+<p><strong><tt>int FileExists(char *path)</tt></strong></p>
+
+<blockquote>
+ <p>This call should return TRUE if the file pointed to by <em>path</em>
+ exists.</p>
+</blockquote>
+
+<p><strong><tt>int FilenamesEqual(char *path1, char *path2)</tt></strong></p>
+
+<blockquote>
+ <p>This call should return TRUE if the file pointed to by <em>path1</em>
+ and <em>path2</em> are the same file. At it's most basic
+ (e.g. like in the DOS port) it can simply makes sure that
+ directory separators are in the same form and then does <strong>strcasecmp()</strong>
+ on the paths.</p>
+</blockquote>
+
+<hr>
+
+<h2><a name="MEM_H"></a>Memory allocation</h2>
+
+<p><strong><u>mem.c</u></strong></p>
+
+<p>This provides memory allocation. While memory allocation can
+generally be done portably using <tt>malloc()</tt> providing this
+library just covers for any possible OS dependent twist. Also
+these routines are expected to handle errors internally. In all
+the interfaces <em>file</em> and <em>line</em> parameters are
+included so that errors can be reported more accurately.</p>
+
+<p>The following interfaces should be provided:</p>
+
+<p><strong><tt>void *FGrab (char *file, int line, int len)</tt></strong></p>
+
+<blockquote>
+ <p>This call should allocate <em>len</em> bytes and return a
+ pointer to it. A <em>len</em> of zero is valid. Memory should
+ be initialised to zero. Failure to allocate the memory should
+ terminate the program.</p>
+</blockquote>
+
+<p><strong><tt>void *FReGrab (char *file, int line, void *ptr,
+int len)</tt></strong></p>
+
+<blockquote>
+ <p>This call should re-allocate the memory pointed to by <em>ptr</em>
+ and return a new memory area of <em>len</em> bytes. The
+ original data pointed to by <em>ptr</em> should be copied to
+ the new memory area. Failure to allocate the memory should
+ terminate the program.</p>
+</blockquote>
+
+<p><strong><tt>char *FStrdup (char *file, int line, char *str)</tt></strong></p>
+
+<blockquote>
+ <p>This call should allocate enough bytes to copy the nul
+ terminated <em>str</em> to it. The returned pointer should
+ point to the new copy of <em>str</em>.<em> </em>Failure to
+ allocate the memory should terminate the program.</p>
+</blockquote>
+
+<p><strong><tt>void *FCopy (char *file, int line, void *ptr, int
+len)</tt></strong></p>
+
+<blockquote>
+ <p>This call should allocate <em>len</em> bytes and copy <em>len</em>
+ bytes from <em>ptr</em> into the new area. The newly
+ allocated memory should be returned. Failure to allocate the
+ memory should terminate the program.</p>
+</blockquote>
+
+<p><a name="FRELEASE"></a><strong><tt>void FRelease (char *file,
+int line, void *ptr)</tt></strong></p>
+
+<blockquote>
+ <p>This call should release the memory pointed to by <em>ptr</em>,
+ which will have been allocated by FGrab, FReGrab, FStrdup or
+ FCopy.</p>
+</blockquote>
+
+<hr>
+
+<h2><a name="RUNCMD_H"></a>External command execution</h2>
+
+<p><strong><u>runcmd.c</u></strong></p>
+
+<p>Provides a mechanism to run an external command. The following
+interfaces should be provided:</p>
+
+<p><strong><tt>int RunCommand(char *argv[], char *path)</tt></strong></p>
+
+<blockquote>
+ <p>Run a command. The output from the command (if there is
+ any) should NOT disturb the screen contents. The call should
+ return TRUE if the call succeeds, FALSE otherwise.</p>
+ <p>The <em>argv</em> list is an array of pointers to various
+ sections of the command and it's arguments, terminated with a
+ NULL pointer. Note that arguments may contain more than one
+ argument in each line - the actual command is described
+ simply by concatenating all the pointers together, eg.</p>
+ <p><tt>argv[0]=&quot;bsp&quot;<br>
+ argv[1]=&quot;file.wad&quot;<br>
+ argv[2]=&quot;-o file.wad&quot;<br>
+ argv[3]=NULL</tt></p>
+ <p>The <em>path</em> argument is a place to copy the path to
+ a file where the output from the command has been stored. If
+ this is not supported then the empty string should be
+ assigned to it. viDOOM will <tt>remove()</tt> the file after
+ it has read it.</p>
+</blockquote>
+
+<hr>
+
+<h2><a name="VSTRING_H"></a>Portable String routines</h2>
+
+<p><strong><u>vstring.c</u></strong></p>
+
+<p>Provides common string functions that are not actually part of
+the ANSI standard. While these can easily be portably written,
+they are provided as functions in case local implementations
+supply them (which will probably more effecient):</p>
+
+<p><strong><tt>int StrCaseCmp(char *a, char *b)</tt></strong></p>
+
+<blockquote>
+ <p>Performs in exactly the same way as the ANSI <tt>strcmp()</tt>
+ function, save for the fact that the case of the strings
+ being compared is ignored.</p>
+</blockquote>
+
+<p><strong><tt>int StrNCaseCmp(char *a, char *b)</tt></strong></p>
+
+<blockquote>
+ <p>Performs in exactly the same way as the ANSI <tt>strncmp()</tt>
+ function, save for the fact that the case of the strings
+ being compared is ignored.</p>
+</blockquote>
+
+<hr>
+
+<h2><a name="INSTALLATION"></a>Installation script</h2>
+
+<p>Each platform should provide a makefile called <strong>install</strong>.
+This is invoked from the top level makefile like this:</p>
+
+<blockquote>
+ <p><tt>cd $(PLATFORM) ; $(MAKEINSTALL)</tt></p>
+</blockquote>
+
+<p>Note that the install makefile will be invoked with the <a
+href="#PLATFORMVAR">PLATFORM</a> directory as the current working
+directory.</p>
+
+<p>The following files must be copied (where $SRC represents the
+source build directory and $INSTALLDIR the install directory):</p>
+
+<table border="1" cellpadding="3">
+ <tr>
+ <td valign="top" nowrap><tt>$SRC/vidoom</tt></td>
+ <td valign="top"><tt>$INSTALLDIR/vidoom</tt><p>Note that
+ this file may have a system specific extension (e.g. .EXE
+ in DOS)</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><tt>$SRC/LICENSE</tt></td>
+ <td valign="top"><tt>$INSTALLDIR/LICENSE</tt><p>The GNU
+ GPL should be copied into the installation directory so
+ that binary distributions can be easily generated with
+ the license included and so that the LICENSE can be
+ viewed from viDOOM's main menu.</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><tt>$SRC/base.ini</tt></td>
+ <td valign="top"><tt>$INSTALLDIR/vidoom.ini</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><tt>$SRC/*.cfg</tt></td>
+ <td valign="top"><tt>$INSTALLDIR/*.cfg</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><tt>$SRC/doc/*.htm</tt></td>
+ <td valign="top"><tt>$INSTALLDIR/doc/*.htm</tt></td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap><tt>$SRC/doc/*.gif</tt></td>
+ <td valign="top"><tt>$INSTALLDIR/doc/*.gif</tt></td>
+ </tr>
+</table>
+
+<p>Note that, obviously, any OS specific files should also be
+copied.</p>
+
+<hr>
+
+<h2><a name="DOCUMENTATION"></a>Documentation</h2>
+
+<p>If you release a port of viDOOM to any platform please update <a
+href="bugs.htm#CONTACTS">doc/bugs.htm</a> with a contact address
+for problems on that platform. Also include a link to a system
+specific HTML document detailing how the GUI works and any know
+bugs, from <a href="sys.htm">doc/sys.htm</a>.</p>
+
+<p>For an example look at the <a href="djgpp.htm">DJGPP</a>
+documentation. As you can see, it doesn't have to be too big.</p>
+
+<hr>
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id$</tt></p>
+</body>
+</html>
diff --git a/doc/sys.htm b/doc/sys.htm
new file mode 100644
index 0000000..a50827e
--- /dev/null
+++ b/doc/sys.htm
@@ -0,0 +1,24 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">System Dependent</h1>
+
+<p>The following is a list of the pages provided for each port:</p>
+
+<ul>
+ <li><a href="djgpp.htm">DJGPP</a></li>
+</ul>
+
+<hr>
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id$</tt></p>
+</body>
+</html>
diff --git a/doc/thanks.htm b/doc/thanks.htm
new file mode 100644
index 0000000..edb3834
--- /dev/null
+++ b/doc/thanks.htm
@@ -0,0 +1,91 @@
+<html>
+
+<head>
+<meta name="GENERATOR" content="vim">
+<title>viDOOM - Free Software DOOM editor</title>
+</head>
+
+<body>
+
+<h1 align="center">Acknowledgements and Thanks</h1>
+
+<p>viDOOM could not have been written without help from the
+following sources. Please mail me if there are any errors or I
+have been misinformed on who actually did something. </p>
+
+<p><b><i>Doom - </i></b><a href="http://www.idsoftware.com"><b>id
+Software</b></a><br>
+Creators of DOOM, who thankfully wrote a terribly nice game and
+then made it even nicer by making the WAD format simple and open.
+</p>
+
+<p><a name="BOOM"></a><em><strong>BOOM </strong></em>- <a
+href="http://www.teamtnt.com"><strong>Team TNT</strong></a><br>
+One of the first newly extended versions of DOOM I saw after the
+sources where released, and quite a revelation to see
+transparencies, conveyer belts, water and all sorts making an
+appearance. Still not to sure about the wind effect though :-)</p>
+
+<p><a name="ZDOOM"></a><em><strong>ZDoom </strong></em>- <a
+href="http://zdoom.notgod.com"><strong>Randy Heit</strong></a><br>
+My personal favourite out of the extended DOOMs. This took the
+extensions added by BOOM, then went the whole hog and allowed
+scripting and HEXEN style hub maps in DOOM. And made the editor
+much harder to write :-)</p>
+
+<p>Version 1.17b was used as the test for levels generated by
+viDOOM during it's development.</p>
+
+<p><a name="DOOMSPEC"></a><b><i>Unofficial Doom Specs -</i></b> <a
+href="mailto:msfell@aol.com"><b>Matthew S Fell</b></a><br>
+Writer and maintainer of the <a
+href="ftp://ftp.cdrom.com/pub/idgames/docs/editing/dmspec16.zip">Unofficial
+DOOM Specs</a>. viDOOM would have been impossible without this
+marvellous tome.</p>
+
+<p><a name="BSP"></a><b><i>BSP -</i></b> <b>Colin Reed/ </b><a
+href="mailto:killough@classicgaming.com"><b>Lee Killough</b></a><br>
+Developers of the BSP node builder. Without this viDOOM is
+completely useless. </p>
+
+<p><a name="WARM"></a><em><strong>WARM</strong></em><strong> -
+Robert Frenske</strong><br>
+The HEXEN compatible node builder used when developing the HEXEN
+editing mode.</p>
+
+<p><b><i>Maths help -</i></b> <a
+href="mailto:matthew@mjwilson.demon.co.uk"><b>Mathew Wilson</b></a><br>
+Someone who knows much more maths than I ever will and writer of
+the LinesCross() algorithm - saviour of the LINEDEF selection
+code.</p>
+
+<p><em><strong>More maths help - </strong></em><a
+href="http://www.faqs.org/faqs/graphics/algorithms-faq/"><strong>comp.graphics.algorithms
+FAQ</strong></a><br>
+Provided a much better 'is a point in a polygon?' than my
+original one ever was...</p>
+
+<p><b><i>Music -</i></b> <a
+href="http://www.c64audio.com/c64audio.asp"><b>C64 Audio</b></a><br>
+Call me sad, call me mad, or call me a nutter who needs to get
+out more and find a life, but some of the Commodore 64 CDs and
+MP3's didn't half help the coding and vague stabs at
+documentation along some evenings. </p>
+
+<p><b><i>VIM -</i></b> <a href="http://www.vim.org/"><b>Bram Moolenaar et al
+</b></a><br>
+VI iMproved. My favourite editor, and inspiration (well, the
+original) for the name viDOOM. Now, if only all these flash IDEs
+would realise that people may actually want to use something
+other than their own bundled multi-coloured swap-shop editors... </p>
+
+<p>&nbsp;</p>
+
+<hr width="99%">
+
+<p><a href="index.htm">Back to index</a></p>
+
+<p><tt>$Id: thanks.htm,v 1.6 2000/08/18 23:24:35 dosuser Exp
+dosuser $ </tt></p>
+</body>
+</html>