Commit Graph

74 Commits

Author SHA1 Message Date
Jonathan 335db1c0e4 move map_source_location to parser as parser_source_location since the locations actually come from there rather than from the map; now the parser keeps track of the location, so it's a bit easier to follow 2022-08-05 23:17:15 -04:00
Jonathan 26a18d5cc3 add logging::header/funcheader to easily and consistently print function or "active routine" headers
add OOP percent_clock wrapper to make printing percents easier, not used yet
2022-08-01 09:35:21 -04:00
Jonathan 1d8a0c1df3 clang-format pass 2022-07-28 06:14:54 -04:00
Eric Wasylishen b7969eee49 vis: rename options -> vis_options 2022-07-10 17:26:55 -06:00
Jonathan 1718512b09 remove unnecessary "uncompressed_q2" - can just be a single buffer now
another ptr->vector
2022-06-23 17:08:50 -04:00
Jonathan 3ac1d02624 fix missing noexcept
explicit initialization in some cases for vis winding_t's parameters
more vector
2022-06-23 17:02:18 -04:00
Jonathan 6f6185e1a3 use unique_ptr for leafbits allocations 2022-06-22 16:04:55 -04:00
Jonathan 3fbdfa2a36 allow removing the vis file if completed 2022-06-21 20:46:46 -04:00
Jonathan e366898796 re-introduce vis culling, mainly for Q2/surface lit maps
-novisapprox gone; replaced with -visapprox auto|none|vis|rays
2022-06-18 23:56:45 -04:00
Jonathan b54e72a184 re-implement the vis changes 2022-06-18 18:42:00 -04:00
Jonathan b21920841d revert some of the vis stuff, but re-implement it in a more working state 2022-06-18 18:36:09 -04:00
Jonathan dfa1282d40 simplify/c++-ize CompressRow code and related areas (less allocations overall) 2022-06-18 18:25:23 -04:00
Jonathan ac05a7ecf6 Revert "simplify/c++-ize CompressRow code and related areas (less allocations overall)"
This reverts commit 46aaa81ffd.
2022-06-18 17:29:07 -04:00
Jonathan 95cd13373a slight speed improvement 2022-06-17 15:10:20 -04:00
Jonathan b0dad9d01d save a few more cycles by just using raw pointers. it's a bit uglier, but this is hard to represent with shared_ptr and I think it was the wrong choice anyways since the ownership chain is difficult to represent in a shared_ptr here. 2022-06-17 14:56:17 -04:00
Jonathan c3bb07acaa ~33% speed improvement on vis by using already-allocated memory for the vis stack 2022-06-17 13:53:35 -04:00
Jonathan 46aaa81ffd simplify/c++-ize CompressRow code and related areas (less allocations overall) 2022-06-17 12:06:37 -04:00
Eric Wasylishen f6309a91cb vis: move .prt reader to common 2022-06-16 21:55:03 -06:00
Eric Wasylishen b173e18e51 vis: refactor LoadPortals 2022-06-16 21:39:22 -06:00
Jonathan e57633bbca the old Safe read/writes are gonedy now 2022-06-16 20:22:03 -04:00
Jonathan 812797f7ed enable lighting for warp/sky in Q2
simplify bitflag definitions
change nudging light warning to make more sense
another #define -> constexpr pass
2022-06-10 06:29:14 -04:00
Eric Wasylishen 0f2ea5333d move CompressRow/DecompressRow from vis to common 2022-05-24 21:01:41 -06:00
Jonathan f6ba5d77f9 allow recompilation of PHS from PVS data via -phsonly 2022-05-21 02:45:30 -04:00
Eric Wasylishen 49c78292dd testvis: stub setup 2022-05-15 15:52:54 -06:00
Eric Wasylishen 9c806d2d15 settings: don't call exit(0) in printHelp() as it's problematic for tests 2022-05-14 18:11:14 -06:00
Eric Wasylishen d763b2e336 build: support clang-cl 2022-05-10 21:39:58 -06:00
Jonathan c81e9ace28 remove old threading code entirely
add new parallel logging stuff in common/parallel which wraps parallel_for(_each) and provides automatic percentage indicator
fix issue with light not pulling in settings
move logging stuff into its own namespace and simplify
2022-03-01 10:28:59 -05:00
Jonathan 6baea3bc03 Fix three bugs that slipped by for cmdargs
Remove old threading code, use tbb internally
2022-02-27 04:09:28 -05:00
Jonathan df92d9ce12
Command line args systems (#2)
* cmd

* cmake change for tbb DLLs
add in test for double-hyphens

* cmd

* game version

* settings!

* bsp texture usage
decompile fix for q1bsp

* finish up the options for qbsp

* light finished?

* finish up the few missing bits

* move scalar/int32 up

* Run clang-format pass

* natvis for our mathlib
use slightly faster storage for winding
fix light tests

* allow dictionary to be a base type

* re-run style

* Remove cfg_static
Fix options summary

* natvis for lockable_value<T>

* last-ish pass?

* format

* forgot last few lockables
2022-02-27 00:01:57 -05:00
Jonathan b824acb376 Reverse ordering of faces to match old code
Fix missing max(1) on leaf/cluster counts
2022-01-17 16:09:10 -05:00
Eric Wasylishen 5e325867b6 vis: remove unused LeafFlow 2022-01-16 21:19:39 -07:00
Eric Wasylishen 549c1dbfcc vis: use ClusterFlow in all cases 2022-01-16 20:42:25 -07:00
Jonathan 8cadf06d81 New FS!
First FS test: use it for decompile for Q2 to prevent unnecessary suffixes
2021-11-05 19:25:37 -04:00
Jonathan a21be0362c replace VectorCompare, CrossProduct, DotProduct
qv::dot handles inputs a bit more gracefully now
plane::distance_to for distance checks, and dplane has the fast version
2021-10-21 23:25:19 -04:00
Jonathan a7de4bdae2 Remove unused thingies
Use qplane3 where we can
2021-10-17 06:24:02 -04:00
Jonathan 01b8abf93c Removed a lot of unused functions
Moved vector-related operations from mathlib to qvec, moved a few into qv::
Use clamp/max/min directly instead of #define'ing them
Move a few single-use functions directly above their usages
2021-10-10 14:04:09 -04:00
Eric Wasylishen ed527217c6 vis: fix writing leaf.visofs for Q1 cluster vis 2021-10-08 23:52:46 -06:00
Eric Wasylishen 447b9e0492 Merge remote-tracking branch 'origin/master' into pr/322 2021-10-07 23:40:57 -06:00
Eric Wasylishen eeededb619 vis: don't crash on vising 1 leaf maps 2021-10-07 23:34:05 -06:00
Jonathan 52839d4e7f Run clang-format pass 2021-10-05 15:54:06 -04:00
Jonathan 4ad798e29c Fix origin brushes
Fix merge stuff from qbsp-contentflags
2021-10-05 15:50:18 -04:00
Jonathan 7590230111 Merge remote-tracking branch 'remotes/origin/qbsp-contentflags' into type-cleanup
# Conflicts:
#	bspinfo/bspinfo.cc
#	common/bspfile.cc
#	include/common/bspfile.hh
#	qbsp/brush.cc
#	qbsp/csg4.cc
#	qbsp/portals.cc
#	qbsp/qbsp.cc
#	qbsp/solidbsp.cc
#	qbsp/surfaces.cc
#	qbsp/writebsp.cc
#	vis/vis.cc
2021-10-05 01:21:16 -04:00
Eric Wasylishen 997a039b65 vis: fix test failure with Q1 2021-10-04 21:21:53 -06:00
Jonathan 9d828d2085 Structured texture data!
Move vis decompress/compress back to vis since phs is handled there now too
Fix missing textures in Q1BSP
Comment areaportaling for now
2021-09-30 11:33:04 -04:00
Jonathan a6f6cc2d15 qvec now has an empty default initializer, for speed purposes; fixed up places that relied on this behavior
simplified constructor for qvec(T...) that uses fold expressions
simplified rgba_miptex_t
fixed a lot of broken winding_base_t behavior
merged all winding types into winding_base_t
removed now-empty files
2021-09-27 20:44:15 -04:00
Jonathan 87d31e6d4f A lot of type-y stuff here:
- bsp store vectors now
- vis stored in a way that is compatible with both Q2 and Q1
- binary reading of stuff, so swapping is done at load time now
- vis cleanup, although there's still a lot of raw long modification that should get simplified later
2021-09-25 23:58:02 -04:00
Jonathan 41b9a79e83 Merge branch 'qbsp-contentflags' into type-cleanup
# Conflicts:
#	bsputil/bsputil.cc
#	common/bspfile.cc
#	common/cmdlib.cc
#	include/common/bspfile.hh
#	include/common/cmdlib.hh
#	qbsp/brush.cc
#	qbsp/portals.cc
#	qbsp/writebsp.cc
#	vis/vis.cc
2021-09-23 18:42:25 -04:00
Eric Wasylishen ab4fa45306 vis: various fixes for vising q2 maps
# Conflicts:
#	vis/vis.cc
2021-09-23 14:46:28 -04:00
Jonathan 6ff2d67d12 major C++-esque change to BSP conversion:
- main mbsp types are declared first in the files, and types that were single-member are now not structs
- conversion is handled by the sub-types themselves. Currently no diagnostic for *what* members overflow, but, overflow is handled via thrown exceptions on all overflowable members
- aabb type is used where appropriate now, simplifying a few areas
2021-09-22 17:30:46 -04:00
Jonathan 403bae7a7b Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
# Conflicts:
#	vis/vis.cc
2021-09-19 22:23:54 -04:00