Commit Graph

622 Commits

Author SHA1 Message Date
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
Kevin Shanahan 5dce6ccc30 light: factor out init of lightsurf and lightdata
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-09 19:04:44 +10:30
Kevin Shanahan a919ad08bc light: split lightinfo_t into surface information and lightmap data
A lot of churn for a small gain, but now the surface information is
separate from the lightmap data. And we can pass the surface
information around via a const pointer.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-09 17:34:31 +10:30
Kevin Shanahan ea440c6da0 light: factor out WorldToTexCoord as a serparte function
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-09 16:36:57 +10:30
Kevin Shanahan 63393eee8e light: define a plane_t structure and use for lightinfo_t
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-09 15:58:26 +10:30
Kevin Shanahan fda3b230f9 light: lightinfo_t structure cleanup, part 1
The big lightinfo_t structure includes a lot of things that are only
loosely related and not used together. Start the cleanup by pulling
out the texture coordinate tranformation data that is used to generate
the surface sample points.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-09 15:38:52 +10:30
Kevin Shanahan 3ab6d59429 light: remove old experimental sun code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-08 15:08:48 +10:30
Kevin Shanahan d6ef23453a light: implement self shadowing option for brush models
Brush models can now self shadow without casting shadows on their
environment, using the "_shadowself" entity key.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-08 15:02:36 +10:30
Kevin Shanahan dc39137874 light: make shadow bmodels block sunlight too
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-08 13:47:20 +10:30
Kevin Shanahan feda78b4a3 light: compile fix
Incomplete commit for bmodel shadows change.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-08 13:28:50 +10:30
Kevin Shanahan a6e42ab860 light: implement brush model entity shadows
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-08 11:37:36 +10:30
Kevin Shanahan b7c2fd437f light: replace last CastRay user with TestLine and remove
We never made use of the length argument returned.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-08 09:14:02 +10:30
Kevin Shanahan b6b7aca665 TyrUtils v0.6
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-07 18:33:19 +10:30