BENGT LIGHT COLOURED
--------------------

This is a new version of Aguirre's Light tool that has been modified to support coloured light and LIT files.
It was created to meet the requirements of the RMQ team, and - following it's successful compilation of The Map
From Hell - is now publicly released.

As well as coloured light it has also been properly multi-threaded for a substantial speed-up.  A further
speed-up is possible by utilising the vis data in the map (if present) to eliminate surfaces that would not be
hit by the light at an early stage, but I didn't bother do that.

I used the source code available at http://user.tninet.se/~xir870k/ as a base for this.  I guess the same license
terms apply, but I'd personally prefer GPL v3 if possible.

Right now it's Windows only; it would be GREAT if someone else could port this properly.

mh - November 2010

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

Usage
-----
By default coloured light is generated and a LIT file is produced.  There is no option to NOT generate a LIT file;
if you don't want one you can just use the original tool.

The -threads parameter has been restored and works properly, allowing you to spawn from 1 to infinity threads.
By default you don't need to specify this and 4 threads are created.  If you want more (or less) use -threads n
where n is the number of threads you want.

In general you should specify the same number of threads as you have CPU cores.  Be careful if you set this too
high as I didn't add error checking!

Mapper Notes
------------
To specify coloured light in a map just add a key called "_color" to your light entities.  I assume you know how
to do this in your editor of choice.

Give this 3 values in the order "r g b" specifying the light colour.

The light colour scale can be either 0 to 1 (floating point) or 0 to 255 (integer); the tool will detect which
scale you're using and calibrate itself automatically for you.  Values above 1 (or 255) can of course be set if
you wish.

Engine Coder Notes
------------------
The LIT file generated is compatible with LordHavoc's standard (QLIT 1).  Because of this, you may get a BSP/LIT
mismatch from time to time; for example if you load a BSP from a mod directory that has a correctly named LIT
in ID1 (this can already happen with Hipnotic or Rogue start.bsp accidentally loading ID1 start.lit)

It is suggested to do an extra check on the LIT file to validate that it's correct for the BSP file, like so:

	if (com_filesize != (l->filelen * 3) + 8) return false;

(Adapt for your own code).

This check has been tested with LIT files generated by both hmap2 and MHColour, and verified to be compatible
with them.
