Commit Graph

2049 Commits

Author SHA1 Message Date
Kevin Shanahan 3382f9ca96 common: catch up thread progress bar if not starting from zero
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-07 21:14:14 +10:30
Kevin Shanahan 8d4bbbe3dc light: use the common threads progress indicator
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-07 21:12:53 +10:30
Kevin Shanahan 3e20dae28e common: add start arg to RunThreadsOn to set initial progress
In case we are not starting work from 0, allow this to be set...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-07 20:51:04 +10:30
Kevin Shanahan 853761d0d6 common: remove pacifier argument from RunThreadsOn
Set to true everywhere, just use it unconditionally.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-07 20:46:33 +10:30
Kevin Shanahan f0d3172d77 vis: calculate shift from loop variable instead
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-07 19:44:48 +10:30
Kevin Shanahan 148b07ef17 vis: remove old progress output message
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-07 19:38:36 +10:30
Kevin Shanahan 37a9935643 common: remove commented out "less portable" timing code
Precise timing is not important for the job vis does.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-07 19:36:16 +10:30
Kevin Shanahan 6ea82e47b0 vis: remove some code from old threads implementation
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-19 12:37:32 +10:30
Kevin Shanahan 815fd70265 vis: use leafbits_t struct and helpers to represent vis bit strings
Importing parts of this from TyrQuake - means that the base type used for
managing the bit vectors is unsigned long. Not really a performance win or
anything here, just a bit nicer to not have to cast from (byte *) to
(long *) - just adds a little extra work before writing out the compressed
data.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-19 12:12:47 +10:30
Kevin Shanahan 498286faa1 common: output thread progress in 2% increments
Provides a bit more granularity than the old meter which only updated
every 10%.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-18 17:49:08 +10:30
Kevin Shanahan c5ecfad903 common: flush stdout after printing log messages
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-18 17:48:51 +10:30
Kevin Shanahan 0192b3d732 vis: remove the MAX_PORTALS limit
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 17:49:20 +10:30
Kevin Shanahan ecb66fb2aa vis: convert full vis to use the thread progress code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 14:01:26 +10:30
Kevin Shanahan b538bed05f trivial: whitespace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 11:29:11 +10:30
Kevin Shanahan 686d4451b8 vis: thread the base portal vis
Make the base portal vis thread safe and run on multiple threads. Use the
common thread progress indicator code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 11:27:29 +10:30
Kevin Shanahan c42f0e26b4 vis: use the common threads code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 10:38:50 +10:30
Kevin Shanahan af9da631fd vis: create two separate verbosity levels
Add -vv option to hide extra verbose messages behing. Move a couple of
debug messages to the extra verbose level.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 10:22:55 +10:30
Kevin Shanahan 662a745202 qbsp: use correct array indicies comparing texinfo
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 09:38:44 +10:30
Kevin Shanahan 7ee8bc183b light: use the common threads code
Make light use the common threads code.
The common progress indicator code is still not used.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 09:35:26 +10:30
Kevin Shanahan 557a1faf20 common: make the common thread code usable on Win32/Linux
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 09:33:50 +10:30
Kevin Shanahan 2bbcdff931 vis: Try to propogate some extra vis info from completed portals
When a portal is completed, check the updated vis information for leafs
that can no longer be seen from the leaf the portal is attached to. Update
the portals on these no-longer-visible leaves to indicated that they can
no longer see our leaf.

Seems to be at least a small gain on my test maps. I suspect there is
some further improvement to be gained by taking better advantage of this
optimisation by changing out choice of portals in GetNextPortal. Couldn't
find anything trivial that worked though.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-26 09:30:56 +10:30
Kevin Shanahan 725da016a4 vis: use INT_MAX in GetNextPortal
Tidy up variable names a little.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-25 21:30:00 +10:30
Kevin Shanahan a10316d7c9 vis: rename vstatus to pstatus
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-25 21:28:20 +10:30
Kevin Shanahan 0908b25f47 build: don't need (or want) -W arg to pwd on Windows
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-20 21:59:29 +10:30
Kevin Shanahan 1c8137d400 light: remove stale comment about MAXLIGHTMAPS
Yes, it really is 4.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-20 20:15:54 +10:30
Kevin Shanahan ef6c4c30c5 light: remove unused accounting variable
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-20 20:15:40 +10:30
Kevin Shanahan c51eb01291 light: remove workaround for old compiler bug
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-20 20:15:10 +10:30
Kevin Shanahan 6fab0a5358 light: make pthreads support work
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-20 20:14:39 +10:30
Kevin Shanahan f85b221da6 common: fix varargs use in log{,v}print
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-17 13:02:41 +10:30
Kevin Shanahan e100c9642b common: add prinf format attribute to logprint/logvprint
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-17 13:02:19 +10:30
Kevin Shanahan ee015abe53 qbsp: fix incorrect size for memset of planemapping
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-17 12:39:26 +10:30
Tyrann a911219515 Remove need for "prepare" in the Makefile
Just conditionally do mkdir if it's needed. Potentially a few more
calls to 'stat' during make, but should be cheap enough...
2012-01-07 18:01:32 +10:30
Tyrann 3136594bc4 Create separate Error() function so it can be marked "noreturn"
Silences some false warnings from the compiler
2012-01-07 16:48:02 +10:30
Tyrann a16d9b07c9 Properly include generated dependency files in Makefile 2012-01-07 16:45:31 +10:30
Tyrann c6d6d44326 trivial: fix printf integer size type mismatch 2012-01-06 21:35:55 +10:30
Tyrann ad964e7f28 trivial: remove some redundant assignments and unused variables 2012-01-06 21:34:47 +10:30
Tyrann ce369bfdd6 Use offsetof() consistently
And include stddef.h where we do use it
2012-01-06 21:32:53 +10:30
Tyrann d20e0cc8d4 Mark cmdlib's Error() function noreturn
Reduces compiler warning noise
2012-01-06 21:00:41 +10:30
Tyrann 7763d7d9fe Rewrite Makefile
Pretty much completely rewrite the Makefile using concepts from my
tyrquake Makefile. So we get quiet compiles, cross compiles and
properly generated dependencies.
2012-01-06 20:57:58 +10:30
Tyrann bcb8e0990d [PATCH] light: increase MAX_TSTACK
Managed to hit this limitation recently, so bump it up.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2008-01-19 21:21:20 +10:30
Tyrann 8a7304a54d [PATCH] TyrUtils v0.4
Quick release to fix the ongoing saga that is my crappy .lit coloured lighting
support. I really did test it this time...

I bumped the qbsp version as well, just to track the utils "package" version.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-25 11:18:00 +09:30
Tyrann a97a880bd0 [PATCH] light: fix alignment (again) on lit data
I really should do more testing before I embarress myself by releasing stuff
so obviously broken. Use the right pointer to align lit_filebase against.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-25 06:32:10 +09:30
Tyrann 8e774a9b30 [PATCH] TyrUtils v0.3
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 21:08:33 +09:30
Tyrann 9da84b6ee1 [PATCH] qbsp: use fast sphere test in SplitFace
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 21:04:28 +09:30
Tyrann 1d2cc1b780 [PATCH] qbsp: copy face sphere attributes in NewFaceFromFace
Makes sure we maintain the sphere, e.g. in SplitFace.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 21:04:23 +09:30
Tyrann accc80ef2f [PATCH] qbsp: always fix tjunctions, remove option
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 21:04:16 +09:30
Tyrann 11ca5bf377 [PATCH] qbsp: Remove unneeded plane variable
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 20:46:32 +09:30
Tyrann 7ce4402dfc [PATCH] qbsp: Use fast sphere test in FaceSide
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 20:46:28 +09:30
Tyrann 67981816c7 [PATCH] qbsp: Set up sphere around face for fast intersect checks
Set up a sphere around each face so we can do quick tests against planes to
see if there's any chance that it intersects the face. Since we're only using
it for a fast check, don't bother shrinking the sphere when a face gets cut or
split, just grow it when necessary (only in TryMerge AFIACT).

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 20:46:22 +09:30
Tyrann 17c994c430 [PATCH] qbsp: Fix mem leak in DividePlane
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 20:46:17 +09:30