Pull in some of the techniques from my TyrQuake Makefile and build OSX
fat binaries in one invocation of 'make'.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Makes minlight additive rather than just bringing low levels up to the
minimum. Not entirely identical to the bjp implementation as it seems to
treat local minlights in some strange ways, but in most cases the
behaviour should be identical.
Added missing help text for -anglescale|-anglesense parameters too.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
The only thing that seems to be able to convert \n to \r\n is awk, so use
that everywhere.
I don't understand why, but echoing the verbose command on OSX echos a
literal \r and messes up the output. Adding an extra \ escape fixes it
there, but then Linux/Msys echo the extra \... I think the OSX behaviour
might be broken here, oh well...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Extend skip support to recognise the liquid skip texturenames the same as
metlslime's "newskip" utility. Add documentation and describe hint
surfaces (briefly) as well.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
The old logic did not deal properly with the case where the source entity
did not add any brushes.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
* Output to temp file and only move to final location upon success
* Fix echo of command in verbose mode (requires quotes)
* Don't use $(call ...) to invoke the groff command
* Use printf to generate the \r for the sed "unix2dos" replacement
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Normally the engine won't do collision detection against a bmodel
unless the entity being tested is within the model's bounds. This
means collision doesn't work as expected when a model has clip brushes
that extend beyond the bounds of any visible brushes. This fixes that
case.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Add the -soft command line option which implements post-processing on
the lightmap surface to blend adjacent samples together to smooth out
hard shadow lines.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
A relatively small amount of state to keep, just leave it there rather
than inventing any more types to pass around. Now that lightmap_t,
surfinfo_t & texorg_t are separate, I'm less concerned.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Substantial changes to TestLineOrSky which now becomes TraceLine to
more conveniently trace lines through the BSP and, terminate the trace
on specific contents and return information about the termination
point.
TraceLine also more correcly handles the cases where points are close
enough to the node planes to be considered "on-node" to ensure we get
a good intersection point back, when requested.
Finally, the algorithm for making the small adjustments to surface
points in CalcPoints has been changed so if the surface point can't
see the midpoint, we find the obscuring surface and move the surface
point just above that. Seems to work better and eliminates some (but
not quite all - midpoint is still not quite the ideal point to use)
random black spots.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
"nominlimit" is a more sensible default - people expect negative
lights to be able to subtract from minlight. The negative colors never
really worked properly and there's not really any worthwhile use for
the (that I know of).
Hopefully nobody will be too upset by these two changes to the old
behaviour.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This option has been broken for a while, because we only dealt with
positive vs. negative colours and didn't properly handle the light
intensity.
All this messing around to try and correctly handle negative colors
seems just stupid. I might have to remove support for that in
future... is there really any good use for it?
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
More messing with data structures. Now a single sample has a
brightness and colour component and a lightmap structure captures all
the non-surface lightmap data.
The pointer arithmetic for iterating over the supersamples in
WriteLightmaps is perhaps a little silly, but it works well enough. It
might be smarter to generate the sample points in a different order
instead. Maybe later.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>