*****************************************************************************

  bmp2map  - A conversion utility to quickly convert 256 color .BMPs
   v.05      into Quake .MAPs complete with texturing and entities.
             Originally written to convert 2D floor/street plans
             into 3D maps.

    Author - Jack Perdue (aka Silicon Slick) - si_slick@cy-net.net
      Date - May 10th, 1997 v.01
             June 13th, 1997 v.02
             July 5th, 1997 v.03
             July 11th, 1997 v.04
             July 22nd, 1997 v.05
  Compiler - Borland TurboC 2.0 for MS-DOS

 Copyright(C) 1997 - Silicon Slick's Software, Supplies and Support Services
          http://www2.cy-net.net/~si_slick  si_slick@cy-net.net

     You are welcome to copy and modify the source code as long as you
       include this copyright statement in all derivative source code.
		   You may distribute any derivative products for free.

							   HOWEVER,

	No products derived from this program, either .MAPs or other programs,
 may be sold without the expressed, written and signed consent of the author.
        (That is, if it helps you to make some bucks, I want a few. ;)

                     "Quake" is copyright id Software
*****************************************************************************

    What's new in v.05?

    - changed the way walls are written.  Now writes a brush from
      the floor to the window bottom, from the window bottom to the
      lower of door/window top, from the lower of door/window top
      to the higher of door/window top, from the higher of door/window
      top to the ceiling.  This has provided a 40% reduction in the
      final brush count of the maps I'm creating (actually, the sample's
      brush count has gone up by 20, so YMMV).  The downside is
      that there are a lot more brushes to compress which detracts
      from the benefits of ...
    - improved brush compression strategy.  Now starts at 64 brushes
      in memory and increases it as needed.  This can be changed using
      the membrushes tag in the .CFG.  Seperated wall brushes (.MP3)
      from everything else (.MP1).  Does one pass compression as brushes
      are read and then a multi pass compression after that point.
      All in all, it's much faster considering the increased brush
      count from above.
    - added sealtopbottom flag for .CFG file.  Set to 0 if you don't
      want a ceiling/floor tacked on to the .MAP.
    - added time started/ended and duration output
    - added logging - most of the output (everything but the repetitive
      brush compression messages) to the console is now echoed
      to <mapname>.LOG.  Each session is appended, so you'll want to
      delete this file on occastion.
    - comments can be placed in the .CFG file now.  Any line beginning
      with a semi-colon (;) will be ignored.
    - and of course... a revised sample
      SAMPLE5.BMP is the same as SAMPLE.BMP from v.04
      SAMPLE5.CFG is much more informative (thanks to comments)
      SAMPLE5.MAP is 340 brushes instead of 323 like v.04's (???)
      SAMPLE5.BSP is the new .BSP from the new .MAP
      SAMPLE5.LOG is the log file generated by BMP2MAP

    What's new in v.04?

    - support for over 40,000 brushes (brush compression on the fly)
    - modified command line
    - eliminated default pixel colors - they must be defined in the .CFG now
    - yet another sample revision with revised .WAD (added sliplite)

    What's new in v.03?

    - bug fix (unchecked array index was trashing memory)
    - teleport destination platforms
    - arrow texture alignment enhancement
    - documentation of features undocumented in last release
    - skyed ceilings (thanks to Excalibur/Curt for this suggestion)
    - CD track/map name
    - worldspawn flag
    - revised sample to show newest features
    - new .WAD (added tele_top)

    What's new in v.02?

    - support for entities
    - default lighting level
    - more control flags (joinents and sealsides)
    - arrow textures on ceiling for CTF
    - carving and trigger textures
    - alternate texturing for door and window frames
    - better configuration checking (still not great)
    - a new sample


    USE: Copy bmp2map.exe to the subdirectory containing the bitmaps
         you want to convert.  .BMPs must be 8-bit (256 color)
         and must be uncompressed (not .RLE).

         Create a .CFG to control the conversion process (details below).
         You can use SAMPLE.CFG as a base.

         The command line is:

                  BMP2MAP <name1.BMP> [<name2.CFG>]

         The .CFG name is optional.  If provided, the output files
         (.MAP and .EN1) will use name2.  Otherwise, they'll use
         name1.  BMP2MAP will first attempt to load configuration
         data from name2.CFG (if provided).  Failing that, it will
         try name1.CFG.  Failing that, it will try BMP2MAP.CFG.
         Failing that, it will quit.

         You _must_ edit the .CFG file to control how the
         conversion is done.  Simply change the value of the
         keys described below.  Important keys include
         the palette indices to use for doors/walls/sky etc.
         You'll need to use a paint program to determine
         the palette index of the colors used.

         The wadfile name is easiest set by looking at a previously
         created .MAP file on your system.

         If you use the autolight, make sure to set the interval
         appropriately.  8000 lights in a level tends to croak
         some editors.

 arrowtexturequnits - size of red/blue arrow textures in Quake units
          autolight - If 1, spread some lights around the level.  If 0, don't.
    autolightqunits - defines spacing, in Quake units, between lights
          autostart - If 1, put an info_player_start in the center of the map
   bluearrowtexture - name of texture for blue arrows (eg. BARROW)
 blueeastarrowcolor - palette index of blue arrow point east
bluenortharrowcolor -  "" north
bluesoutharrowcolor - "" south
 bluewestarrowcolor - ""west
  carveceilingcolor - create a brush to carve a hole in the ceiling
     carvebothcolor - like ceiling but also floor
    carvefloorcolor - like ceiling but for floor
            cdtrack - CD track number to play when map starts
            ceiling - Quake coordinates for the ceiling (eg. 64)
     ceilingtexture - Quake texture to use for the ceiling (eg. CEILING1_3)
          doorcolor - palette index of color used to represent doors
     doorframecolor - framed doorway sans door brush
        doortexture - Quake texture to use for doors (eg. DOOR02_03)
            doortop - Quake coordinates for level of door tops (eg. 48)
             entity - entity color,name (eg. entity=104,item_rockets)
              floor - Quake coordinates for the floor (eg. -64)
       floortexture - Quake texture to use for the floor (eg. AFLOOR1_8)
       frametexture - texture for top/bottom of window/door frame brushes
         joinentmap - if 1, copy entity (.EN1) file to end of .MAP file
         lightlevel - intensity for individual light entities put into level
            mapname - level start msg (underscores in name replaced with spaces)
         membrushes - max # of brushes in mem - smaller = quicker compression
        outerqunits - thickness of ceiling,floor and sealing walls (if used)
       qunitsperpel - controls the number of Quake units for each pixel (eg. 16)
    redarrowtexture - name of texture for red arrows (eg. RARROW)
  redeastarrowcolor - palette index of red arrow point east
 rednortharrowcolor -  "" north
 redsoutharrowcolor - "" south
  redwestarrowcolor - ""west
          sealsides - if 1, write wall of sky around level
      sealtopbottom - if 1, write floor/ceiling brushes
    skyceilingcolor - texture ceiling with sky
         skytexture - Quake texture to use for sky (eg. SKY4)
        skywincolor - palette index of color used for windows filled with sky
  teleplatformcolor - palette index for teleport destination platforms
teleplatformtexture - texture for teleport destination platforms
teleplatformtexturequnits
                    - size, in Quake units, of teleport destination texture
       triggercolor - palette index to represent trigger brushes
            wadname - name of .WAD file the textures can be found in
          wallcolor - palette index of color used to represent walls
        walltexture - Quake texture to use for walls (eg. TECH03_2)
           wincolor - palette index of color used to represent empty windows
       windowbottom - Quake coordinates for level of window bottom (eg. -24)
          windowtop - Quake coordinates for level of window top (eg. 24)
         worldspawn - if 1, enclose brushes in "worldspawn"

    Once your map is created, just load it into your favorite editor
    to tweak the directions of the monsters and info_player_*'s.
    Then QBSP/LIGHT/VIS/Quake it.

    Have fun!!!  Impress the kids.  Tell them mommy/daddy can
    turn any picture they draw into a playable Quake map. ;)

                   [Note from first release]
    "This is probably as far as I'm going to take this program."

    Obviously, that was a lie.  I will make no such claim this time. ;)

    If you like this program, please feel free to e-mail me
    and tell me what you're doing with it.  

    I would like to hear about any problems from those who 
    can't get it to work after reading this file.  
        
    jack (aka Silicon Slick)
    si_slick@cy-net.net
    Clan 13th Man - http://http.tamu.edu/~jkp2866/Clan13thMan/

*****************************************************************************
