About this beta
---------------

Ok, hi, and welcome, etc.  Be sure to change 'dmapedit.ini' if your doom
files aren't where you installed DMapEdit.  'setup.txt' explains the setup
proceedure, so read that file if you need to.

I'd just like to say real quick that I have set up a DMapEdit homepage on
the WWW.  If you have netscape (or mosiac, I guess.. :) check it out.
You will be able to grab the latest beta version from there, when they
become available, as well as find all sorts of information about DMapEdit
and what's going on with it.  You can also check out other pages I have,
like for example, the new game I'm writting.

http://www.umn.edu/nlhome/g253/hoffo002/             (my root homepage)
http://www.umn.edu/nlhome/g253/hoffo002/dmapedit     (DMapEdit homepage)

Ok, v4.0 is very overdue by now.  Should have been released a long time ago,
but it never was.  I am going to try and get this out soon, though, probably
the next release after this beta.  I kinda forget exactly what all is still
not quite done that I want to get done for the big release, so those with
email accounts, beta test and let me know what you still want in for the
official v4.0 release.  If it's something big, it can wait for the next
release.  Sound good?

I'm working on Heretic and Hexen support for DMapEdit too.  Right now, I
don't know too much about how Hexen all works, but I'll figure it out as I
mess with it more.  That will all wait until v4.0 is done, though.

The old demo that I had made for DMapEdit no longer works with the latest
versions of DMapEdit.  A new demo will have to be recorded, and I'll do that
for the next version.  For right now, I've deleted the old one, and there
isn't one not.  If anyone would like to help out by recording a demo to
explain something or rather (making an working example map, how to make some
basic structures, or whatever), go ahead and then send them to me.  If you
don't have a clue how to record demos, it's all explained in the file
'demos.txt'

Editing state information is now saved to the 'dmapedit.ini' file, instead of
'state.dme', and it is in plain ascii, so you can edit it if you wish, not
that there is a lot of reason to do so, but hey, it's your editor, so knock
yourselves out! :)

Ok, new stuff..  If the last version you used was v3.01 (or below) then
there's so much new stuff I couldn't begin to list it all here.  Play
around and you should find it all.  Or, of course, read the docs.. :)
Dunno really what state the docs are in, though.  Probably not very up to
date, but might be half up-to-date.  For those who had a recent beta,
though, here's what's new:

Beta 13:
--------

* Added scale, rotate and scretch options in the edit menu.  For all those
   who have been waiting for that, it's finally in.  It has a slight problem
   with leaving garbage on the screen when the mouse crosses one of the
   'non-fixed' lines.  I can't figure out how to eliminate it.  Everything I
   try seems to get me nowhere.  If anyone can figure out how to fix it, let
   me know, and I'll throw your name in the 'thanx to' section of the docs.
   Let me know if you'd like me to explain the problem and theory behind the
   code, and where the problem is.  Oh hell, I'll just throw it at the end
   of this file instead. :)

* Fixed the bug that caused DMapEdit to crash if you passed a PWAD to it via
   the command line.

* Fixed the line edit window bug that didn't realize it was supposed to be
   changing the default line, instead of linedef #-1. :)

* Fixed the bug that didn't allow you to have negative values for offsets in
   the second sidedef in the line edit window.

* Fixed a bug in the map data group saving function.  It indents the entry
   now and doesn't duplicate it, like it was before.

* Fixed a bug that causes the wall texture names to be screwed up when a map
   is autoloaded at startup (any time you didn't tell DMapEdit specifically
   that you want to load a map).

* Updated (not completely finished yet though) the description comments in
   the 'dmapedit.ini' file.  Also removed existing slots and data groups,
   instead of leaving you with configurations I last used.

Beta 12:
--------

* Revamped the INI reader.  It will now handle all the information that
   state.dme stored, and in plain text, making it easily changable by you
   the user if you wish to, and also makes it more flexible.  It also stores
   the information for all the map slots instead of just the current slot,
   so the full map slot state can be restored as well.

* Default thing type #'s 1-3 now increment to the next type # when a thing
   is placed on the map.  This makes it simple to add all 4 player start
   points at once.  Simply pick type #1, and click in four different places
   to set start points there.  After the first start point is placed, the
   default thing type will be 2, etc.

* Ability to spawn Doom now.  If you want to try your map out in Doom real
   quick and see if it looks and plays ok or whatever, just select this
   option from the file menu.  It'll generate nodes and stuff if you need
   them, and then run doom directly for you.  Once you quit Doom, it'll
   come back to DMapEdit again.  This is the first time I've messed with
   spawning programs and such, so I dunno how great a job I did with it all,
   so let me know if you run into problems.  Right now it defaults to level
   3 difficulty.  I'll put in a selection window so you can pick different
   options soon, but for now, you have to live without that. :)

* There's a new flicker-free mode to the 3D renderer.  The 'F' key toggles
   it.  What this does is draw the screen to a buffer and then transfers it
   all to the screen at once.  Kinda nice.  I'm using the GRX library
   directly for my new game, so I'm more used to the GRX type calls, so this
   is just a little benefit from what I learned there. :)

* Put something in to get around DJGPP's little problem of not bothering to
   pass the 0th argument to DMapEdit (making DMapEdit unable to tell where
   it is located on your system).  Just use the '-d' switch, so like
   'dmapedit -d c:\dme'.  Best to just throw this in a batch file that is
   in your path somewhere, and you'll be able to run DMapEdit from anywhere,
   and not just in it's home directory.

* On-the-fly Doom to DMapEdit color converting.  Big deal, right?  It
   already displayed Doom textures fine.  The reason this is significant is
   not for Doom, but for adding in support of other games, like Heretic and
   Hexen.  Displaying Heretic textures with the Doom palette doesn't look
   very pretty.  Now that this change is in, the way is clear for adding
   Heretic support, and Hexen, if anyone has the specs for it yet.

* Mark line/vertex moving doesn't do the abnoxious map-redraw every time the
   mouse moves anymore.

* Fixed a bug with the 'doom 2 path =' line in dmapedit.ini.  DMapEdit won't
   crash now if you don't have Doom II. :)

* Finally got around to adding default sectordef editing.

* Also finally got around to adding the sector blend mode bluebox.

* Automatic Linedef flipping to solve errors has been disabled.  Everyone is
   complaining about it, so we'll try it this way.  We'll see if Doom refuses
   to run maps more often from now on or not.

* Arrow keys supported in the picklists now, and letter keys work in the
   floor/ceiling texture picklist now.

* Bug in save window fixed.

* What else..  Other little things I can't remember right now.  One day I'll
   probably get better organized and keep track of the stuff I do as I do it,
   but I'm not that organized yet. :)

Beta 11:
--------

* Actually, I don't remember all that much what I've changed, but I'll list
   what I can remember.

* The DJGPP version now defaults to keeping the old textures in memory.
   This should speed up the wall texture view again.  A lot of people were
   complaining about it being slow, so maybe this solve that.  Let me know.

* Unavailable options in the menus are dimed now.

* Generate sectors now has a warning message to inform you that it will
   destroy existing sectors.

* Deleting a line doesn't automatically combine the 2 sectors into one
   anymore.  Easy enough just to rebuild the polygon if you want it to be
   one sector.

* Multi-map switching between maps with different wall textures has been
   fixed.  Copy and pasting between Doom 1 and Doom II maps in different
   slots should work fine now.  Did for me. :)

Beta 10:
--------

* Fixed more bugs!  All these bugs are getting pretty ridiculous.  Someone
   wanted me to make finer steps in the zoom routines.  Big mistake!  I'm
   still trying to fix everything to work with it now.  The only bug I
   still know about with this is the staircase builder.  Nothing big, but
   if it acts funny on you, change the zoom level by one.  My main goal for
   beta 10 was simply to get it stable again.  Here's a list of bugs fixed:

   + Scale mismatch errors have been fixed, wherever I could find them.
   + Found problems with Reject occuring.  (see below)
   + Fix sectors & generate sectors gets an error when there are no lines.
      Pointless to use it in such a case, but it still shouldn't give you a
      fatal error, so I fixed that.
   + Whenever you try to load a map without any nodes, it would erase all
      your vertexes, so the map looked like a huge jumble of lines.  Such a
      map is ok on disk, it's just that DMapEdit screwed it up after it
      loaded it.  Fixed now, though.  It should load a map like that fine
      now, if you encountered this bug.

* Roundoff (snap-to-grid) can be toggled on and off now with the ' key.
   This will allow you to keep your current roundoff level intact when you
   want to use it again.

* I found out that Reject was only calculated in one place in DMapEdit, and
   that was after a 'generate sectors'.  This could cause problems for wads
   that already have a reject bitmap when you add more sectors.  The reject
   bitmap no longer will be the correct size, and between the actual and the
   'should be size' is undefined, and could be set.  This can cause a number
   of problems:

   + Shooting rockets at walls point blank doesn't hurt you at all.
   + monsters round around you but never attack.
   + monsters looking straigh at you don't see you and thus don't 'wake up'.

   If you have a PWAD that you created that suffers from these problems,
   you can fix them now.  Reject is rebuild with a 'make', but can also be
   recalculated with Alt-J.

Beta 9:
-------

* Fixed new bug that showed up in beta 8 with floor/ceiling textures not
   being found correctly from the IWADs.

Beta 8:
-------

* Beta 7 was actually quite buggy.  Here's what the bugs were:

   + When saving the editor state, it only recorded the filename itself,
      and not the full path to the current PWAD.  So when it tries to
      restore the state later, it tries to find the PWAD in the current
      directory.  If it wasn't there, it crashed.  However, even if it
      can't find it, it should just load up the IWAD instead.  This has
      been fixed now.

   + When working with multiple maps at once, not all the information was
      being swapped in and out, mainly the wall textures.  This could
      easily corrupt everything.  Unfortunately, I haven't managed to
      track down all the bugs here yet, so watch out if you use more than
      one map slot.

Beta 7:
-------

* 3D preview now allows you to use coloring in solid rendering mode that
   most closely matchs the texture on that wall.  Use 'C' to toggle this.

* Preference menu items and the editor state can not be saved and restored
   on exit/startup.  This is used by the demo functions, to keep a demo
   played back in a fixed state.  As a result, previous demos, if you have
   recorded any, won't work.  If you really want to convert them over,
   let me know and I'll explain how to do it.

* Multi-map is in and working.  I have done quite a bit of testing on it,
   and it's working pretty good now, but I really can't say how stable it
   is.  However, as beta testers, I would appreiciate it if you used it a
   lot, as long as you aren't working on anything important.  If you are,
   you could make a backup of it and then heavily test it. :)

* Grid style (solid or dotted lines) is now selectable in the dmapedit.ini
   file.  Variable is 'grid lines', and can be 'solid' or 'dotted'.  So, lets
   have a vote.  Try them both out and tell me which one you like better.  I
   will make the one that the most number of people like best the default
   grid style.  Also, if you zoom out too far, and the distance between
   grid lines gets below 8 pixils, DMapEdit will draw every other/every
   fourth/etc grid line until they are 8 or more apart.  That's not new.
   What's new is that the grid will be drawn in red now if all the grid
   lines aren't being drawn, so you know that the grid you see doesn't
   represent the true grid size indicated.

* Hold down the Alt key in rectangle creation mode while dragging out a
   rectangle will now force that rectangle to be a square instead.

* Fixed a bug with the 'grid' setting used in the dmapedit.ini file.

Before beta 7:
--------------

* 3D preview.  See above for more information of this.

* Auto staircase-builder.  Type 'b' to get it going.  Should work without
   and problems.  The ceiling problem has been fixed.

* Polygon generator.  Selectable from the misc menu.

* Convert sector to door function.  Type 'd' to activate it.

* Demo record/playback.

* Rectangle mode is in.  Only way to get to it right now is with F5.
   So, press F5 and drag yourself some boxes.  I think you'll enjoy it.  
   Currently only overlapping horizontal and vertical lines are checked 
   for and merged, but the other checks are on the way.

* Sidedef edit mode is in.  Use F6 to get to it.  It displays textures on
   the currently highlighted sidedef, and it is also handy for editing
   groups of sidedefs.  Ever wanted to edit all the sidedefs of a sector
   at once?  Just mark a sector in sector edit mode, switch to sidedef
   edit mode, and press spacebar.  Well, kinda.  I'm still working on it
   so it probably won't work correctly, but it will soon.

* Pretty minor, but when box-marking, or making a rectangle in rectangle 
   mode, you can press the delete button/key to cancel.  You will be 
   holding down one of the buttons already (for stretching the box), so 
   the remaining buttons (excluding the delete button) will switch you 
   to the opposite corner of the box.  Handy if you started the box but
   found you slipped slightly from where you wanted to start.

* New lines are created smarter now.  If the line is single sided, it 
   won't have a '-' for the middle texture.  If it's double sided, but 
   has a multi-patch texture for the middle, it'll change it to '-' 
   automatically for you.  So, creating lines shouldn't introduce
   sidedef errors of any type anymore.

* The merging problems with rectangle mode I decided to handle in the 
   add new line function.  So, new lines you create from line edit mode 
   will also merge.  Like I said, though, only the horizontal and 
   vertical overlap cases are currectly detected.

* add/remake sector function has been fixed up and improved.  Void
   detection worked much better now, and should be flawless.  It also
   won't alter anything if it fails during the process.  It's also much
   faster, since void checking is done 'as it goes' instead of before it
   even attempts to do anything.

So, what is multi-map?  Well, in MS-Windows, you can have several windows
open at once.  Now in DMapEdit, you can have several screens open at once.
Only one screen can be displayed at once, however.  I think that's good,
though, since it won't cut down your viewspace any.

There are 10 screen slots.  One is for the clipboard, and the rest are
numbered from 1-9.  You start in slot #1 at startup.  You can switch slots
at any time by selecting a slot to switch to from the view menu, or using
the hotkeys Alt-1 thru Alt-9.  Alt-0 will bring up the clipboard.  Yes, you
can view and edit the clipboard just like any other map.

The current slot you are viewing is displayed in the lower right corner of
the screen, in front of the map position display.  This slot number
indicator will be surrounded with either square brackets [] or angle
brackets <>.  This indicates if a map is linked or not.  Square brackets
indicate the map is linked with one or more slots besides this one.

You can load up completely different maps or start new maps in different
slots, or you can use a slot as a an additional view of a map in another
slot.  This is known as linked maps.  When you first switch to a new slot,
it hasn't been initialized yet.  By default, it will take on the settings
of the map you are switching from.  Since it's the same map in another
slot, it becomes a linked slot.

Since linked slots all share the same map, changes made to the map in one
slot will be reflected in all slots linked to it.  The clipboard is a
special case, and can't be linked.

A new 3D previewer has been added!  It is very fast, but only on computers
with a math coprocessor.  If you don't have one, it may be very very slow.
Sorry, but the nature of 3D graphics as I am employing it requires floating
point numbers.

It utilizes a bsp tree (nodes structure), if available, to render the view.
While there may or may not be much of a speed change between the two
methods, using the bsp tree will render the view correctly, while the
non-bsp renderer will occasionally draw walls in the wrong order, making
walls that should be behind other walls actually in front.  This makes the
view 'look funny', like it's an optical illusion or something.  So, if you
want it to look right, build the nodes.  The node generator works flawlessly
and very quickly.  Actually the fastest node generator available.

Not quite perfect yet, though, even with the bsp rendering mode.  What am
I refering to?  Floors and ceilings.  These are quite a bit trickier than
walls, since walls are always rectangles, but floors and ceilings can be
non-convex polygons.  They can also have holes inside them, etc.  Basically
any shape a sector can have.  I haven't quite figured out how I'm going to
go about solving this little dilemma, so until I do, you'll have to live
without solid floors/ceilings.

You can view the whole map, or you can mark some lines/sectors and just
view those instead.  This is very handy when you want to limit rendered
view to just a certain area of study.

While in the 3D preview mode, you can control the view in many ways.  First,
there are 3 mouse button functions to alter the rotation, the scale, and the
position.  These functions, their current values, and the button used for
each are shown at the top of the screen.  You can click on one with another
mouse button to make that mouse button control that function, just like you
do in normal editing mode.

In addition, there's a bunch of keyboard keys to control the rendering
options:

W - select wireframe rendering mode
S - toggle solid walls rendering
X - toggle x-ray viewing backs of walls (see note below)
H - toggle hiding of backs of walls
B - toggle between black/gray coloring of backs of walls
O - toggle axis display
C - toggle texture-majority coloring of solid walls
F - toggle flicker free mode

note: Backs of walls are the non-visible sides of walls.  If you can't see
      the front of the walls, you will, of course, see the back sides of
      them.  X-ray viewing lets you see right through these back sides,
      rendering them as wireframe, while the front sides of walls are
      rendered solid still.

Lately memory has been the biggest problem of all.  Not anymore, though!
DMapEdit has been ported to DJGPP, and it is working great.  It can use
all available memory in your machine, instead of just conventional memory
(640k area), allowing very huge maps to be created if you wish.  Also, it's
a lot faster than the Borland version.  Node generation went from 28
seconds on the Borland version to 10 seconds.  Error checking also zipped
by at warp speeds.  I've went through it and fixed whatever problems I
could find, so it should be working fine, but I may have overlooked
something.  So, please let me know if of anything not working correctly
in it that worked fine in the Borland version.

Node generator has been fixed up.  Guess there were a bug I introduced 
when I rewrote some of it.  Fixed it though.  As far as I know, it is 
now flawless.  Every map I've run through it has worked perfectly.  If
you have a wad it fails on, let me know.

Blockmap generator has also been rewritten, and is working great now.  
It also creates a packed blockmap, merging all empty blocks, so it uses 
less space usually.  I have tested it out, and it has worked fine for 
me.  If anyone runs into problems with the blockmap, let me know.

Btw, might interest you to know that both the nodes and blockmap I 
generate is smaller than the original ones id generated for their maps.  
My nodes also eliminated the 'sliver' bug that id had.  One such sliver
was in beginning of the zig-zag room of E1M1.

So, being a beta, feedback would be appreciated, both bug reports and 
ideas or impressions, etc.  However, there are some bugs that I already 
know about..

* Fix lines stills seems to have some problems.  I know why, but I don't
   really have a clever plan to fix it yet.  If you only have one outer
   group, it should work fine.  If not, well, it could get confused.

* Not really a bug, but the global commands summary isn't quite up to date.
   I'm going to hold off on updating it until pretty much everything is
   done, because I'm getting tired of changing it all the time.

* Also, not everything is finished yet.  That's why this is a beta. :)

----- Mouse cursor/marked lines leaving trash bug -----

Ok, this bug only occurs when you have marked lines, and they are being drawn
in pulsating red (If you don't know what I mean, go into line edit mode and
mark some lines and watch it flash red in your face).  I have changed the
marked line drawing function so that it xdraws now instead of draws (xdraw
means that you draw the line in XOR mode, instead of copy mode.  This allows
it to not erase what you draw over, so that xdrawing it again, with the same
color you used before, you restore the screen to how it was before.  The
reason I made this change was because 1) it was highly annoying to have it
clear the screen and redraw everything when you are moving the marked lines,
and 2) I didn't want to do the clear and redraw thing for scaling, rotating
and stretching marked objects.  If I don't xdraw, it erases non-moving lines
as you move the lines around.  Moving lines include all marked lines, and all
lines attached to a marked vertex.

So, in order to pulsate the red like I do, I have to xdraw with the previous
color XORed with the new shade of red.  The previous color XORed in does the
erasing of the old line.  That works fine.  The mouse cursor would work fine
if I turned the mouse off before drawing, and turning it back on afterward.
However, having done this, I know that it causes the mouse to flicker like
crazy, and is very annoying.  So, I don't turn the mouse off, but just xdraw
over it.  Let me take a moment to explain how the mouse routines work..

When I turn the mouse on, I first save the background that I will draw over
with the mouse cursor first.  This is called MOUSE_SAVE.  I make a copy of
this then.  Lets call this BACKGROUND.  Now, I use a mask to determine what
pixils to copy from SHAPE (the mouse cursor image) to BACKGROUND.  Now, I
draw BACKGROUND to the screen (these are all block shapes, meaning they are
rectangular shapes).

Ok, to turn the mouse off, all I need to do is simply copy MOUSE_SAVE back
to the screen.  It's actually a little more complex when you figure the
mouse crosshairs into it, but that's not part of the problem, so I won't.

Ok, so back to the problem.  To avoid the mouse flicker, I don't erase the
mouse while drawing.  I simply xdraw over it.  This really shouldn't be a
problem, though, since we should be able to update MOUSE_SAVE to reflect the
new background, and then draw the mouse back over any part of it that might
have been corrupted.  When we mouse itself moves, we need to turn the mouse
off and back on at the new location.  Also, when the lines move, we turn the
mouse off first, redraw the lines, and turn it back on.  It's these situations
that we need the MOUSE_SAVE blockshape to be accurate.

So, starting at the beginning, we will erase all non-fixed lines, switch to
xdraw mode, and draw the lines.  Then, we turn the mouse on.  Now, since we
turned the mouse on after we drew the lines, the xdrawn lines are part of
MOUSE_SAVE.  Good so far.  When the time comes to rexdraw the lines in a
slightly different shade of red, we leave the mouse on and xdraw.  At this
point the lines are all slightly darker or lighter red, and there are lines
of whatever color over the mouse cursor.  The color should be the color of
the mouse cursor there XORed with the old red color XORed with the new red
color.  So, I now call rescan_mouse(), where I scan the screen again to
BACKGROUND, and look at the mouse mask for each pixil.  Where the mask says
we don't have mouse cursor, I just copy the pixil directly to MOUSE_SAVE.
Otherwise, we take the pixil from BACKGROUND, XOR it with SHAPE, and not we
have the difference between these 2 blockshapes, which will be non-zero for
anything that has xdrawn over the cursor.  The color will actually be the
old color XORed with the new color.  Xdrawing old lines with this color
produces lines in the new color, so we XOR pixils in MOUSE_SAVE with this
color, which should convert the old lines to the new color lines. in
MOUSE_SAVE.  Unfortunately, it doesn't, and I can't figure out why.  This is
the problem.  So, anyone who has read this far, and still isn't completely
confused and wants to take a crack at it, good luck.  I hope you can find it.
rescan_mouse() is in mouse.c, and move_marked() and plot_marked() is in
templace.c.  Any further question, feel free to email me.

Happy beta testing!

  -Jason
