DOOM levels player by Ivaylo Beltchev
email: ivob@geocities.com
url:   http://www.geocities.com/SiliconValley/Bay/2234


MAP file format:
MAP files are ASCII files.
On first line there is:
<number of walls> <start x> <start y> <start z> <start angle>
start x,y and z are starting position of the player.
<start angle> is starting looking position [0..127].

Then for every wall:
<x1> <y1> <x2> <y2> <h1> <h2> <h3> <h4> <wall texture> <front floor texture> <front ceiling texture> <back floor texture> <back ceiling texture> <x offset in texture> <y offset in texture>
x1,y1,x2,y2 are coordinates of wall ends.


SIDE VEIW OF A WALL:

front ceiling texture-|
                      v
---------------h4-------+
                        |
      wall texture ---> |
                        +--h3-------  <-- back ceiling texture


                        +--h2-------  <-- back floor texture
      wall texture ---> |
                        |
---------------h1-------+
                    ^
front floor texture-|

<wall texture> is a number that means that for that wall will be used
texture WALLxx.BMP
<floor texture> and <ceiling texture> mean FLOORxx.BMP
<x offset> and <y offset> determine how the texture is shifted along the wall

---------------------------------------------------------------------

MAKEBSP.EXE gets a MAP file and exports BSP file.

---------------------------------------------------------------------

BSP file format:
On first line there is:
<number of walls> <start x> <start y> <start z> <start angle>
Then for every wall:
<x1> <y1> <x2> <y1> <h1> <h2> <h3> <h4> <wall texture> <front floor texture> <front ceiling texture> <back floor texture> <back ceiling texture> <x offset in texture> <y offset in texture> <left wall> <right wall>
<left wall> and <right wall> are indexes for left and right successors in BSP tree.
First wall is the root and has index 0.
---------------------------------------------------------------------

To build BSP.EXE use Watcom C++ and Turbo Assembler. There is MAKEFILE in the ZIP.
To build MAKEBSP.EXE use MMBSP.BAT

