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
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
75339df231
Simplify surface_t by using lists
2022-01-23 19:00:01 -05:00
Jonathan
5f81657621
move calculatesurfaceinfo into a member func
2022-01-23 00:46:11 -05:00
Jonathan
5dd2deba8e
use custom type for two-sided things to simplify brain power (.front/.back is easier to process than [0]/[1])
2022-01-23 00:26:58 -05:00
Jonathan
5a2d522892
partial revert of 1dee7269d6 - restores old tool behavior w/r/g noclipfaces
2022-01-22 21:46:32 -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
0cca14d1b2
Fix bug in bitangent calculation - thank you AlexP
...
Allow `calc_sides` to skip writing outputs if they are not required, & return counts since they are constant sized
2022-01-20 16:35:56 -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
a937e3cdba
qbsp: areaportal support
2021-10-27 22:51:43 -06:00
Jonathan
1ccbe9e12c
wrbrushes lump using streaming now
...
temp(?) fix for structural covered by detail
2021-10-25 19:24:07 -04:00
Jonathan
e0ed70cc87
no more Vector!
2021-10-25 10:38:15 -04:00
Jonathan
7c661a3759
distance-squared
2021-10-23 13:22:32 -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
a7de4bdae2
Remove unused thingies
...
Use qplane3 where we can
2021-10-17 06:24:02 -04:00
Eric Wasylishen
a84de6a2d6
csg4.cc: don't use alloca inside loop
...
it's crashing in release builds on macOS..
not sure exactly why, but it's also leaking stack
since none of them are freed until the function exits
2021-10-06 01:02:03 -06:00
Jonathan
52839d4e7f
Run clang-format pass
2021-10-05 15:54:06 -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
5b62f61b29
qbsp: revert contents handling to be closer to master
2021-10-04 20:39:47 -06:00
Eric Wasylishen
2560603f9b
qbsp: csg4.cc: bring closer to original behaviour
2021-10-03 12:32:50 -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
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
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
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
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
326626f127
Remove some old stuff
...
Cleanup/rework of logging system. I'm not too happy about it still, but, it's at least a bit easier to follow now.
Started cleanup of file-related stuff.
2021-09-19 18:17:28 -04:00
Jonathan
1dd4df1b20
calloc/malloc/free -> new/new/delete (except for specific scenarios)
2021-09-14 11:39:12 -04:00
Jonathan
4e7542b111
Clang format pass
...
typedef -> using
include guards -> pragma once
typedef struct x { } y; -> struct y { }
some fixes to extremely old code that shouldn't be required any more
2021-09-14 02:32:26 -04:00
Jonathan
c95a1e2ccb
q2 and bug fixes
...
# Conflicts:
# include/qbsp/qbsp.hh
# include/qbsp/winding.hh
# qbsp/brush.cc
# qbsp/csg4.cc
# qbsp/merge.cc
2021-09-12 08:34:01 -04:00
Jonathan
35040d1bd3
Q2 working sorta
2021-09-09 02:13:28 -04:00
Jonathan
9800f4f738
Mostly all native!!
2021-09-09 00:26:17 -04:00
Jonathan
004fcb57c1
Content flags type, splitting up native and compiler flags.
...
Extreme WIP and likely not working properly. Need to rid all direct .native usages and direct them through target_version->game
2021-09-07 06:13:17 -04:00
Jonathan
c16bbf403d
Change miptex thingies to handle const as the comment wishes they would
...
Use optional to properly indicate the intended purpose of optional/"unset" values rather than a magic number (also because for some reason outputnum was stuck at 0 even though it defaults to -1 and I didn't want to debug why)
beginning of Q2 contents
2021-09-07 03:24:16 -04:00
Jonathan
00efa6e67d
Fix operator<
...
Introduce gamedef, to reduce rewriting of data in bspversions
fix name of needs_subdivision
include value in texinfo, in prep for Q2
2021-09-07 01:41:32 -04:00
Jonathan
dad0e61f63
Fix for texinfo/miptex searching routines
...
surf flags now use the "native + extended" format that will eventually be used for brush contents. Q1 output seems identical, haven't tested Q2 yet.
2021-09-05 16:56:29 -04:00
Eric Wasylishen
1123205d47
qbsp: replace FreeMem uses
2021-08-24 22:49:06 -06:00
Eric Wasylishen
1f7ac25f0c
qbsp: removing fancy AllocMem uses
2021-08-24 22:40:35 -06:00
Eric Wasylishen
a53cf8dbbe
qbsp: fix some thread safety bugs (mostly affecting stats output)
2021-08-22 23:45:42 -06:00
Eric Wasylishen
7a78e0a5b5
build: remove unused includes, fixes compat with tbb 2021.3.0
2021-07-13 21:47:52 -06:00
Eric Wasylishen
1dee7269d6
qbsp: dont't clip self-intersecting func_detail_fence and func_detail_illusionary
...
Makes foliage easier with _mirrorinside 1
2020-07-21 20:46:18 -06:00
Eric Wasylishen
0873b0af2c
qsbp: code cleanup
2020-01-29 22:45:55 -07:00
Eric Wasylishen
1f565d7e7a
qbsp: parallelize CSGFaces
2020-01-28 21:18:08 -07:00