Commit Graph

2237 Commits

Author SHA1 Message Date
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
Tyrann 20008a120a [PATCH] light: update version number
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 16:54:59 +09:30
Tyrann 9209eec0a1 [PATCH] light: Fix litfile memory allocation
Gah! Brown paper bag material here. Memory for the Lit data was never getting
allocated and writes were happening in no man's land off the end of the
lightdata area.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-23 16:46:22 +09:30
Ozkan Sezer 4b4da3e2d7 [PATCH] common: SetQdirFromPath fixes and documentation
Add somewhat better documentation for SetQdirFromPath which is actually a
painful functionality. Fixes a couple of corner cases like where the given
path contains no separator characters.

Signed-off-by: O.Sezer <sezero@users.sourceforge.net>
Edited-by: Tyrann <tyrann@disenchant.net>

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-08 21:04:50 +09:30
Ozkan Sezer 32d0cd9417 [PATCH] common: fixed a minor bug in ExpandPath of tyrutils
Signed-off-by: O.Sezer <sezero@users.sourceforge.net>
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-08 20:40:47 +09:30
Tyrann 2ef9568778 [PATCH] TyrUtils v0.2
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-23 21:02:00 +09:30
Tyrann 2ed0beb1c0 [PATCH] qbsp: Tweak epsilons
The choice of the various epsilon values is critical to having geometrically
complex maps compile correctly.

The one which seems most important (so far) is the ANGLE_EPSILON. This one
needs to be quite tight to avoid "bad things" happening when you create small
angles between adjacent surfaces.

Another epsilon inter-relationship I discovered, is that it seems
CONTINUOUS_EPSILON needs to be larger than EQUAL_EPSILON. It seems to play
havoc with the t-junction code otherwise.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-23 20:48:02 +09:30
Tyrann fba05c351a [PATCH] qbsp: Increase MAX_BSP_CLIPNODES
Offsets pointing to clipnodes were originally used as signed short (16-bit)
numbers, so that negative numbers could represent the various content types of
leaf nodes. However, only a small number of these types are required, so we
now make use of the rest of the clipnode range.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-23 20:48:02 +09:30
Tyrann 0a11bfd06b [PATCH] qbsp: Give enough space for the bsp stats output
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-23 20:48:02 +09:30
Tyrann 03edc38292 [PATCH] qbsp: Fix typo in PrintLeakTrail
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-23 20:48:02 +09:30
Tyrann 687d0d03b0 [PATCH] qbsp: Factor out WritePortals portal skip logic
When writing out portals for a node, we can skip over portals that separate
volumes with the same contents. The existing logic I find very hard to follow,
so I've separated that out in an attempt to make it more understandable.

While we're at it, equivalent logic is required in NumberLeafs, so re-use.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-23 20:48:02 +09:30
Tyrann d5f000838f [PATCH] qbsp: Remove big mapentity_t union
Remove the big union in mapentity_t, collecting together the information for
each lump in a struct. Still not 100% sure where I'm going with this, but I
think this will help me with removing some of the reliance on globals further
along (which will be important once it comes to multi-threading).

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-21 23:18:56 +09:30
Tyrann 1cfdcdb85a [PATCH] qbsp: Link against math lib
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-21 23:18:56 +09:30