Eric Wasylishen
6b5b426636
qbsp: remove internal list in face_t
2022-02-07 00:02:51 -07:00
Jonathan
ed325eedea
surface faces now use list/vector
2022-02-06 11:39:22 -07:00
Jonathan
b7a06f4bb3
Don't automatically assign SOLID to brushes that have a valid trace type
...
Fix mixed contents warning displaying the wrong contents
2022-02-05 13:32:06 -05:00
Jonathan
0392698bd3
Fix for engines that require edges reference valid vertices (edge 0 references vertex 0 but it might not be set in some cases)
...
Change `Brush_GetContents` again so that clip works
2022-02-05 13:18:21 -05:00
Jonathan
d076920665
Revert "Instead of calculating brush extents globally, do it per brush creation"
...
This reverts commit 069720078f .
2022-01-27 01:52:08 -05:00
Jonathan
069720078f
Instead of calculating brush extents globally, do it per brush creation
...
Use portal node bounds for extents
2022-01-27 01:03:38 -05:00
Jonathan
571e7337fc
Fix the temporary hintskip detection and finally move it to gamedef
...
Dynamic extent calculation - turned on by default - will automatically determine the extents used for winding_from_plane beforehand. On a 50kb .map file it only takes about 10ms, so for the majority of maps it should be instantaneous.
2022-01-26 18:03:31 -05:00
Jonathan
1764afb475
Revert "Revert "make brush::faces a vector""
...
This reverts commit 11d2d51165 .
Fixes implementation - was swapped logic in brush bevels
2022-01-24 14:55:21 -05:00
Jonathan
11d2d51165
Revert "make brush::faces a vector"
...
This reverts commit 30c7ef94ac .
This was causing issues with bevel brushes in Q2 mode. Not sure why yet. Will attempt this again soonish.
2022-01-24 14:26:28 -05:00
Jonathan
be865bc5b8
Fix `face_get_contents` not handling hintskip properly
...
Simplify `Brush_GetContents` and use the first non-skip face as the base contents
Move period out of `LoadExternalMap` error message so it doesn't confuse the reader
Fix `WriteEntitiesToString` crashing on entities without any brushes (note: need a column/line on mapentity in future)
2022-01-23 23:18:59 -05:00
Jonathan
6c20e49cc3
change the flow of `face_get_contents` a bit; move earlier code into this block
...
remove `Brush_IsDetail`, as it's legacy and not required any more
MIST is no longer automatically "CFLAGS_DETAIL_ILLUSIONARY"
MIST/AUX default to _mirrorinside 1 if it's not set, matching vanilla behavior
2022-01-22 21:26:57 -05:00
Jonathan
07dd73e5bc
Persist native contents when converting them to detail
...
Simplify hull areas
Q2's `face_get_contents` generated empty surfaces when SKIP was used. It now has another line of defense to ensure contents aren't set to empty, but I'm not sure where the other line of defense went that was supposed to do this.
Remove old comment
2022-01-22 17:23:51 -05:00
Jonathan
68424edb8d
introduce a flag for whether the target game supports bmodels with contents
...
move the check in SubdivideFace so that it can early-exit if subdivision isn't even enabled
2022-01-21 00:51:06 -05:00
Jonathan
02a4463d00
include <list>
2022-01-17 16:24:29 -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
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