Commit Graph

645 Commits

Author SHA1 Message Date
Kevin Shanahan 4275149cee light: improve "bad surface extents" error info
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-19 14:59:35 +09:30
Kevin Shanahan 2a93375e0e qbsp: small cleanup in MakeFaceEdges
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-19 14:43:35 +09:30
Kevin Shanahan 683a894290 qbsp: trivial cleanups in GrowNodeRegion_r
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-19 11:28:54 +09:30
Kevin Shanahan 8e57b7c9e6 qbsp: factor out special texture name recognition
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-19 11:28:11 +09:30
Kevin Shanahan 3dc06c6f21 qbsp: add a -noskip option for troubleshooting skip related problems
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-19 09:48:43 +09:30
Kevin Shanahan 7e6474c03d qbsp: keep verticies from skip/hint faces in vertex count
We still end up short if we just discard these counts - still don't
need faces for them, but every edge could be real unless it's shared
with another skip face.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-18 12:58:46 +09:30
Kevin Shanahan f20033fdd7 light: dynamically allocate entities and entstring
Removes the MAX_MAP_ENTITIES and MAX_MAP_ENTSTRING limitations by
counting how much space we will need before parsing/writing.

Now that I look at it, I'm not sure why we should even be re-writing
the entity string in the new bsp file, but I'll leave that behaviour
alone... for now.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-18 09:45:52 +09:30
Kevin Shanahan cd188ebc99 qbsp: increase unique vertex estimate to cope with skip faces
The old assumption about unique verticies is sometimes untrue when
skip faces are included in the map.  Be more generous with the vertex
memory allocation. This is not an area of peak memory usage anyway, so
shouldn't be a big deal.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-18 08:21:27 +09:30
Ozkan Sezer 828a34a959 common: fix undefined array reference behavior in SwapBSPFile
Thanks to a -Waggressive-loop-optimizations warning from gcc-4.8:

common/bspfile.c: In function 'SwapBSPFile':
common/bspfile.c:121:41: warning: iteration 4u invokes undefined behavior [-Waggressive-loop-optimizations]
      texinfo[i].vecs[0][j] = LittleFloat(texinfo[i].vecs[0][j]);
                                         ^
common/bspfile.c:120:2: note: containing loop
  for (j = 0; j < 8; j++)
  ^

Signed-off-by: Ozkan Sezer <sezero@users.sourceforge.net>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-14 09:12:31 +09:30
Kevin Shanahan 99d9bccb4e Merge branch 'master' of ssh://tuon/~/scm/tyrutils 2013-04-14 09:06:49 +09:30
Ozkan Sezer 3eff2401a9 common: fix parsing quoted strings when EOF is reached mid-string
Signed-off-by: Ozkan Sezer <sezero@users.sourceforge.net>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-14 09:05:58 +09:30
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