Commit Graph

584 Commits

Author SHA1 Message Date
Ozkan Sezer 4a80c38081 common: add support for C-style /*..*/ comments
Signed-off-by: Ozkan Sezer <sezero@users.sourceforge.net>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-14 09:03:54 +09:30
Kevin Shanahan 4220341252 build: create build version file and dependencies
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-10 16:10:26 +09:30
Kevin Shanahan 02e1f44f51 build: clean the dist directory too
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-10 16:02:46 +09:30
Kevin Shanahan daa2d4c868 post-release version update
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-10 16:02:25 +09:30
Kevin Shanahan 2539b73868 TyrUtils v0.7
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-10 14:39:52 +09:30
Kevin Shanahan a8348418e6 Merge branch 'master' of ssh://tuon/~/scm/tyrutils 2013-04-10 14:33:07 +09:30
Kevin Shanahan af9caf4048 build: set up snapshot targets for Win32 and OSX
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>
2013-04-10 14:21:59 +09:30
Kevin Shanahan c193c18d5b make -gate affect linear falloff lights as well
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-06 13:25:11 +10:30
Kevin Shanahan ee2dc38f71 light: make command line set sun anglescale as well
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-06 08:35:38 +10:30
Kevin Shanahan 4625245b09 light: implement the -addmin command line parameter
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>
2013-04-04 15:55:58 +10:30
Kevin Shanahan 4021c06852 build: fix ghetto unix2dos conversion to work on msys
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>
2013-04-04 14:30:09 +10:30
Kevin Shanahan dec714eac9 qbsp: add hintskip texture support
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-04 13:30:47 +10:30
Kevin Shanahan f1396045c6 qbsp: support *waterskip, *slimeskip and *lavaskip
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>
2013-04-04 12:59:09 +10:30
Kevin Shanahan dce122ea3a qbsp: fix loading func_group/detail brushes into worldspawn
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>
2013-04-04 10:18:39 +10:30
Kevin Shanahan 9b5868ad6d build: tag builds with uncommitted changes as dirty
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-28 10:00:57 +10:30
Kevin Shanahan 9c8cbfd601 vis: add the -noambient* options to disable auto ambient sounds
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-28 08:28:47 +10:30
Kevin Shanahan f0af8eac91 build: fix for text documentation generation
Fix the date/version tags in the man pages also.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 10:42:55 +10:30
Kevin Shanahan f369c97f68 build: fix directory names properly in fatbin rules
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 15:52:48 +10:30
Kevin Shanahan 2c4f898bbf build: insert the date/version into the man pages
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 15:38:04 +10:30
Kevin Shanahan 08408888bc build: small tidy up to documentation generation
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 14:11:41 +10:30
Kevin Shanahan 2da19f77f9 build: small tidy up to version number generation
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 14:08:23 +10:30
Kevin Shanahan f24a94eab5 build: improve man2txt and man2html rules
* 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>
2013-03-18 13:59:45 +10:30
Kevin Shanahan b4ff9663cc build: add ability to compile for WIN64 using MinGW64
Fix a few minor int<->pointer size warnings.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-15 21:49:16 +10:30
Kevin Shanahan 636a94f260 light: implemented _anglescale key (AKA "_angelsense")
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-15 21:27:14 +10:30
Kevin Shanahan 4abc7d31b7 light: remove the old -compress option
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-15 20:43:12 +10:30
Kevin Shanahan af80a06f74 docs: convert docs to unix man page format with generated html and text
Had to increase the width of the quiet_cmd_* defines to fit the new
MAN2HTML quiet command.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-15 20:16:23 +10:30
Kevin Shanahan 1a0ff742eb qbsp: enable use of clip-only bmodels
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-15 14:43:11 +10:30
Kevin Shanahan 323a0af0ae qbsp: use PLANENUM_LEAF instead of magic constant
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-15 13:22:09 +10:30
Kevin Shanahan ed1cdfb6c5 qbsp: include clip brushes in model bounds
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>
2013-03-15 11:17:34 +10:30
Kevin Shanahan 91cc81da04 qbsp: fix handling of missing textures
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-14 19:53:20 +10:30
Kevin Shanahan 34401e91ee vis: change the default testlevel to 4
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-14 11:36:41 +10:30
Kevin Shanahan cc8477c6d9 light: implement -soft command line option
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>
2013-03-14 11:28:22 +10:30
Kevin Shanahan 7401127b1c build: use BUILD_DIR instead of BIN_PFX for building OSX fat binaries
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-13 12:56:23 +10:30
Kevin Shanahan 15eaf4b8a8 build: hack together a quick way to build a win32 snapshot
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-13 12:55:35 +10:30
Kevin Shanahan 1dc62b426a common: add VecStrf debugging helper and increase buffers to 8
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-13 12:57:56 +10:30
Kevin Shanahan a9e05ffd07 qbsp: make wadlist a null-terminated linked list of wads
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-13 12:56:57 +10:30
Kevin Shanahan 0348f64274 qbsp: add WADList_FindTexture helper
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-13 12:03:15 +10:30
Kevin Shanahan 31484a8bcd light: remove comment about removing texmins, etc. from surfinfo_t
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>
2013-03-13 11:59:48 +10:30
Kevin Shanahan 3676261441 qbsp: add support for WAD3 texture wad format
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-13 10:58:31 +10:30
Kevin Shanahan cc36d8eadc light: rewrite light tracing function and update callers
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>
2013-03-12 16:40:16 +10:30
Kevin Shanahan f208efcfa0 Merge branch 'master' of ssh://tuon/~/scm/tyrutils
Conflicts:
	light/ltface.c

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-11 18:25:34 +10:30
Kevin Shanahan 359ddfa41e light: remove nominlimit option and negative color value support
"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>
2013-03-10 20:24:19 +10:30
Kevin Shanahan e8d640f88f light: use lightsample_t for minlight and sunlight
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-10 18:42:35 +10:30
Kevin Shanahan f82562f9e4 light: use lightsample_t for entity light values
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-10 18:28:00 +10:30
Kevin Shanahan d57e7d50fd light: use lightsample_t for modelinfo->minlight
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-10 17:17:42 +10:30
Kevin Shanahan 46277eec41 light: fix -nominlimit option causing extra bright lighting
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>
2013-03-10 17:07:14 +10:30
Kevin Shanahan f2395a3dd3 light: re-arrange lightdata_t structure into array of lightmap_t
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>
2013-03-10 15:45:06 +10:30
Kevin Shanahan f7e76f16b6 light: factor out writing light data from LightFace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-10 09:37:33 +10:30
Kevin Shanahan eb92d5eac1 light: remove a couple of unneeded function declarations from header
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-09 19:18:36 +10:30
Kevin Shanahan 3749cfa734 light: pass the dface pointer into lightface
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-09 19:14:33 +10:30