***************************************************************************** bmp2map.c - A conversion utility to convert 256 color .BMPs into Quake .MAPs. It's intended use is to quickly convert 2D floor/street plans into 3D maps. Pixel colors are used to create boxes textured as solid walls, doors, windows or windows filled with sky (for outside walls). Author - Jack Perdue (aka Silicon Slick) - si_slick@cy-net.net Date - May 10th, 1997 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 this code at will as long as you include this copyright statement in all derivative works. "Quake" is copyright id Software ***************************************************************************** USE: Copy bmp2map.exe and bmp2map.cfg to the subdirectory containing the bitmaps you want to convert. .BMPs must be 8-bit (256 color) and must be uncompressed (not .RLE). Then just type: bmp2map foobar.bmp where foobar.bmp is the name of the bit map to convert. The map will be named foobar.map. You can edit the bmp2map.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. qunitsperpel - controls the number of Quake units for each pixel (eg. 16) floor - Quake coordinates for the floor (eg. -64) ceiling - Quake coordinates for the ceiling (eg. 64) windowbottom - Quake coordinates for level of window bottom (eg. -24) windowtop - Quake coordinates for level of window top (eg. 24) doortop - Quake coordinates for level of door tops (eg. 48) wallcolor - palette index of color used to represent walls doorcolor - palette index of color used to represent doors wincolor - palette index of color used to present empty windows skywincolor - palette index of color used for windows filled with sky walltexture - Quake texture to use for walls (eg. TECH03_2) doortexture - Quake texture to use for doors (eg. DOOR02_03) skytexture - Quake texture to use for sky (eg. SKY4) floortexture - Quake texture to use for the floor (eg. AFLOOR1_8) ceilingtexture - Quake texture to use for the ceiling (eg. CEILING1_3) wadname - name of .WAD file the textures can be found in autolight - If 1, spread some lights around the level. If 0, don't. autolightqunits - defines spacing, in Quake units, between lights Once your map is created, just load it into your favorite editor. The program automatically generates an info_player_start at coordinates 0,0,0, so if there is a wall there you will want to move it. Drop in some monsters. 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. ;) This is probably as far as I'm going to take this program. A feature that might be useful is support for entities (eg. palette index 24 = monster_army). But I'll leave that for someone else since it's probably just easier to use a real editor for such things. If you like this program, please feel free to e-mail me and tell me what you're doing with it. If you don't like this program, change it. That's why the source is included. I would like to hear about any problems from those who can't get it to work after reading this file. I plan on using this utility and would like to eliminate any bugs early on. jack (aka Silicon Slick) si_slick@cy-net.net Clan 13th Man - http://http.tamu.edu/~jkp2866/Clan13thMan/ *****************************************************************************