Commit Graph

127 Commits

Author SHA1 Message Date
Jonathan 63b8608799 Remove unused functions & tests
Fix test harness
2022-01-17 14:35:18 -05:00
Jonathan 53b4f640e2 use vector<brush_t> directly now 2022-01-17 11:06:13 -05:00
Jonathan 1a0b8c724a use vector of unique_ptrs for brushes; temporary, going to simplify it further 2022-01-17 10:42:24 -05:00
Jonathan 30c7ef94ac make brush::faces a vector 2022-01-17 09:49:10 -05:00
Eric Wasylishen 0dd7a73cc1 qbsp: flip brush clipping order to match original qbsp
Patch from Paril
2022-01-15 14:35:02 -07:00
Eric Wasylishen d6a17d022c qbsp: CreateBrushFaces: fix accessing empty winding in `w->clip(...)` expression 2021-12-15 22:43:21 -07:00
Eric Wasylishen a937e3cdba qbsp: areaportal support 2021-10-27 22:51:43 -06:00
Jonathan c37ec80667 Implement game-agnostic Brush_GetContents 2021-10-26 09:13:48 -04:00
Jonathan 1ccbe9e12c wrbrushes lump using streaming now
temp(?) fix for structural covered by detail
2021-10-25 19:24:07 -04:00
Jonathan 550cacef3f Clean warnings 2021-10-25 13:46:04 -04:00
Jonathan e0ed70cc87 no more Vector! 2021-10-25 10:38:15 -04:00
Jonathan a5f8ecd471 VectorSubtract 2021-10-24 23:26:20 -04:00
Jonathan 3c2ca93b0c normalizeInPlace no longer nodiscard since you might want to only normalize the ref
remove VectorNormalize
2021-10-23 13:34:12 -04:00
Jonathan fae69309a0 VectorLength 2021-10-23 13:24:25 -04:00
Jonathan 4dca2d7d07 VectorInverse, VectorSet, VectorClear gone 2021-10-23 13:15:38 -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 cb3c81aaf8 vec3_t gonedy 2021-10-21 20:21:28 -04:00
Jonathan 95b47db922 More qmat/qvec where appropriate
Add a json.hh file which includes common JSON serialization types
surfflags_t::extended uses booleans instead of a bitflag for simplicity
JSON serialization for surfflags
2021-10-19 21:15:00 -04:00
Jonathan 46ea7b4822 Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup 2021-10-19 16:39:49 -04:00
Jonathan c11ad63358
Merge branch 'ericwa:master' into type-cleanup 2021-10-19 16:39:38 -04:00
Jonathan a7de4bdae2 Remove unused thingies
Use qplane3 where we can
2021-10-17 06:24:02 -04:00
Jonathan e1290fd0f4 Snap normals/tangents/bitangents written from WriteNormals to save some bits
Texvec inherits mat<2, 4> now, since it's the most logical type for it to be based on.
2021-10-12 13:52:47 -04:00
Jonathan e6fd6b653e A few more vec3_t -> qvec
qmat follows other type conventions (T, N, M) and is annotated differently so it's not as confusing to follow
Removed qmat::operator[] - it's not clear from calling it that it's column-major (as evidenced by the comments needing to explicitly make clear at call sites that it's column, not row), so I've collapsed them into two separate functions that explicitly fetch either a column or a row. This also ties them nicely into qvec<N>.
2021-10-12 12:03:59 -04:00
Eric Wasylishen 41d125c32e qbsp: add _omitbrushes to tell qbsp to discard all brushes in a func_ 2021-10-10 12:25:47 -06:00
Eric Wasylishen a1609ae1e6 qbsp: add _omitbrushes to tell qbsp to discard all brushes in a func_ 2021-10-09 15:22:27 -06:00
Eric Wasylishen 9610841dd7 qbsp: use fmt to print "origin" keys for rotators 2021-10-07 23:52:30 -06:00
Eric Wasylishen c54fea1e87 qbsp: face_t: use a std::vector for edges
shared_ptr of C arrays is not working on macOS,
but std::vector is also more correct semantically
2021-10-05 23:15:43 -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
Jonathan 0833d84a7a Calculate tangents and bitangents (need to clean this up)
Implement formatters for qvec
Add -nolighting, which skips all non-lightstyled lights
2021-10-05 01:07:13 -04:00
Eric Wasylishen 5b62f61b29 qbsp: revert contents handling to be closer to master 2021-10-04 20:39:47 -06:00
Eric Wasylishen f0d12fc8f3 qbsp: Brush_LoadEntity: bring closer to the original code 2021-10-03 12:02:52 -06:00
Jonathan 037c587352 Merge remote-tracking branch 'remotes/origin/qbsp-contentflags' into type-cleanup
# Conflicts:
#	bspinfo/bspinfo.cc
#	include/common/bspfile.hh
#	include/light/light.hh
#	include/light/trace.hh
#	light/light.cc
#	light/ltface.cc
#	light/trace.cc
#	qbsp/brush.cc
#	qbsp/csg4.cc
#	qbsp/outside.cc
#	qbsp/qbsp.cc
2021-10-03 13:08:50 -04:00
Jonathan ae4512da2c BSPX structurization and cleanup
Some more vec3_t removals
A bunch of float -> vec_t in light
Simplified construction of lockables
mapdata_t writes directly to an mbsp instead of vector copies
2021-10-03 12:16:13 -04:00
Jonathan 792951792c some more cleanup 2021-10-02 05:56:45 -04:00
Eric Wasylishen 59e71d7600 Merge branch 'master' into qbsp-contentflags 2021-10-01 23:39:12 -06:00
Eric Wasylishen ddf2a36d39 qbsp: make func_detail_wall an alias for func_detail_fence 2021-10-01 23:18:27 -06:00
Eric Wasylishen 690ac8d24e qbsp: Brush_GetContents_Q1: fix _mirrorinside 2021-10-01 21:19:18 -06:00
Jonathan 1a5dc9934f Remove span offset code - the compression ratio was not worth it
Allow Q2-esque maps to compile under Q1 modes
Use Q2tools-adapted version of AddBrushBevels for compiling brush sides
Extended limits overflow code displays member that overflowed now, for debugging
2021-09-28 02:10:01 -04:00
Jonathan cc932a96ee Fix BSP being invalid in Q2 if vis is not run
Fixes for skylight in Q2
Don't throw on invalid area
2021-09-27 22:40:43 -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
Eric Wasylishen b36c428bef brush.cc: attempt to fix test failures 2021-09-25 21:13:42 -06:00
Eric Wasylishen 5a1cb66308 brush.cc: fix sorting of clip brushes 2021-09-25 19:04:47 -06:00
Eric Wasylishen 54d7f50b38 brush.cc: clear CFLAGS_CLIP on bmodels to match old behaviour 2021-09-25 18:04:57 -06: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 b3258611c9 brush.cc: AdjustContentsFromName: fix all liquids getting set to water 2021-09-23 00:04:45 -06: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
Eric Wasylishen 80a4aa1b97 Merge branch 'master' into qbsp-contentflags 2021-09-22 00:12:27 -06:00
Jonathan 2ebfdb096f Remove COM_Parse, use parser_t
Game controls hull sizes now
2021-09-20 19:45:09 -04:00