Jonathan
d917c253c5
restore inside fill to working status
2022-06-13 02:20:34 -04:00
Jonathan
4755f23efa
re-implement inside filling (not working fully yet)
2022-06-13 01:44:06 -04:00
Jonathan
a94de7f8cc
use closer to Q2 version of WindingIsTiny
...
allow .outside.map to be written for Q2 as well
2022-06-06 17:54:05 -04:00
Jonathan
c5e864fca1
re-enable stuff
...
undo the shared lock stuff
2022-06-06 03:26:19 -04:00
Jonathan
8f50108b5e
slight optimization for winding_t: use memcpy directly. the copy constructor can't automatically optimize it into a memcpy because of the iterator wrapper.
...
use side_t where appropriate
add a shared lock to map.planes, and hide the original vector to prevent non-locked read/writes
move MakeSkipTexinfo to the beginning of the operation - make a global skip texinfo as the first texinfo. it will get culled out later if need be.
re-enable ChooseMidPlaneFromList; seems to work, but maybe there's a test that is failing that is the reason it was if'd out?
enable parallelization of PartitionBrushes since map.planes is lockable now
2022-06-05 22:52:02 -04:00
Eric Wasylishen
e3ee12e985
Merge branch 'type-cleanup' into brushbsp
2022-06-03 23:44:03 -06:00
Jonathan
a9e9c14e0d
warning for invalid face contents rather than a hard assert error
...
remove _wad warning for Quake II, Q2 doesn't use wads
areaportals are still fiddly, but this should help track down the errors - print entity # (bounds still not working)
2022-06-01 15:30:27 -04:00
Eric Wasylishen
f9f355474c
qbsp: fix broken FindOccupiedClusters_R
2022-05-21 16:32:36 -06:00
Eric Wasylishen
70706b4923
outside.cc: make FindOccupiedClusters safe to call more than once
2022-05-21 13:53:05 -06:00
Eric Wasylishen
cf91610738
brushbsp: wip, restore using invisible sides as splitters
...
- fill again after second BSP so PruneNodes works
2022-05-21 00:57:16 -06:00
Eric Wasylishen
a1b8a38283
merge non-brush bsp specific changes from brushbsp branch
2022-05-11 01:58:53 -06:00
Eric Wasylishen
893b0b080e
qbsp: move to unique_ptr<brush_t> vectors
2022-05-03 02:35:43 -06:00
Eric Wasylishen
81e0da4d62
qbsp: mark invisible sides on brush entities
...
fixes brush_clipping_order test failure
2022-05-01 00:01:11 -06:00
Eric Wasylishen
8b93754b1f
outside.cc: fixes for filling in detail in the void
2022-04-28 00:50:27 -06:00
Eric Wasylishen
8efb6f689b
qbsp: add -outsidedebug flag
2022-04-27 19:18:27 -06:00
Eric Wasylishen
f9aa40a50f
qbsp: fix outside filling in maps with detail
2022-04-26 00:25:52 -06:00
Eric Wasylishen
d372f0f0f4
qbsp: outside.cc: fix clearing occupied state on detail clusters
2022-04-23 15:07:20 -06:00
Eric Wasylishen
78210947ff
qbsp: add -keepprt option
2022-04-19 01:03:18 -06:00
Eric Wasylishen
20a1b7b94b
qbsp: szBSPName -> bsp_path, szMapName -> map_path
2022-04-17 13:41:23 -06:00
Eric Wasylishen
2c32177a69
qbsp: stop clobbering szBSPName
2022-04-17 13:36:19 -06:00
Eric Wasylishen
8a71b372bd
qbsp: remove unnecessary num*() helpers from mapdata_t
2022-04-15 00:27:50 -06:00
Eric Wasylishen
9b9239fc38
outside.cc: add comment
2022-04-11 17:42:11 -06:00
Eric Wasylishen
b7fbb48763
qbsp: enable new outside filling
2022-04-10 00:00:28 -06:00
Eric Wasylishen
b736704e5e
qbsp.hh: remove portals.hh include
2022-04-09 23:28:12 -06:00
Eric Wasylishen
2e14909e84
qbsp.hh: remove map.hh include
2022-04-09 23:23:26 -06:00
Eric Wasylishen
39d1930446
outside.cc: prototype marking visible brush sides
2022-04-09 21:46:01 -06:00
Eric Wasylishen
edad06cc5a
qbsp: planning outside filling approach, wip
2022-04-05 19:46:59 -06:00
Eric Wasylishen
a019088c2f
Merge branch 'type-cleanup' into brushbsp
2022-04-02 21:05:46 -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
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
Eric Wasylishen
571953f126
qbsp: wip, reorganizing ProcessEntity
2022-02-22 01:50:31 -07:00
Eric Wasylishen
6b5b426636
qbsp: remove internal list in face_t
2022-02-07 00:02:51 -07:00
Jonathan
dfd31d7441
make markfaces a vector to simplify usage
2022-01-25 00:13:12 -05:00
Jonathan
c9243d4fea
If we have a leak, reset occupied value so that FindOccupiedClusters can be re-entered later for areas
2022-01-24 14:41:37 -05:00
Eric Wasylishen
a937e3cdba
qbsp: areaportal support
2021-10-27 22:51:43 -06:00
Jonathan
e0ed70cc87
no more Vector!
2021-10-25 10:38:15 -04:00
Jonathan
865fbb0745
VectorMA
2021-10-23 13:20:43 -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
Eric Wasylishen
c88274f806
qbsp: outside.cc: rewrite with outside -> in filling
2021-10-11 22:40:26 -06:00
Eric Wasylishen
134c286b5e
qbsp: fix spurious leak in base1.map
2021-10-11 13:48:17 -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
a91bc56aaa
qbsp: outside.cc: match original behaviour
2021-10-05 01:07:26 -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
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
b78553d81b
qbsp: outside.cc: match original behaviour
2021-10-03 00:22:51 -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
49fd62b9f3
Lotta more file stuff. Have to think about fscanf though.
2021-09-19 22:20:39 -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
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
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
Shpoike
89365949bc
Squashed commit of the following:
...
commit 8ca122916d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 20:54:23 2019 -0600
fix linker error (radlights is in 2 .cpp files)
commit 8f06fc9c8d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 20:53:57 2019 -0600
add clarification comment
commit 038a553fb0
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 20:30:27 2019 -0600
fix tests compilation
commit 02e94ec507
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 19:59:25 2019 -0600
hlbsp: use q_snprintf
commit 669a5a7911
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 19:56:21 2019 -0600
Reformat
commit 6653760982
Merge: 347a455 ac3553c
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 19:28:06 2019 -0600
Merge remote-tracking branch 'origin/master' into hlbsp
# Conflicts:
# include/qbsp/qbsp.hh
commit 347a455102
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 28 02:18:16 2019 +0000
Misc HLBSP tweaks
Added support for multiple -wadpath args.
Added -xwadpath (for eg valve/*.wad to avoid bloat/license issues).
Reworked hint brushes - the non-hint surfaces can use any name, just so long as they're not 'hint', for compat with zhlt.
Support 'bevel' and 'null' textures for compat with zhlt.
commit 7fb22c7367
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 28 01:59:42 2019 +0000
Support for halflife-style .rad surface lights (probably too bright, but the basics work).
commit 2da504fb62
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 28 01:56:27 2019 +0000
Add minus-prefixed textures for halflife's randomised-textures feature, instead of getting crash-to-desktop errors when the map is loaded.
commit 6366199bdb
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 21 04:51:24 2019 +0000
First attempt at hlbsp output.
2019-07-04 21:08:17 -06:00
Eric Wasylishen
0ac4909396
qbsp: change outside.cc to not fill leafs that have faces that are
...
straddling in and out of the void.
Previously, we were just deleting these faces, leaving HOMs.
Keeping them but filling the leaf in as solid doesn't work either, because
if they are the only faces left in the leaf it messes up the content type
determination later.
Fixes test_tjunc01.map test case from Qmaster.
2019-01-19 21:56:05 -07:00
Eric Wasylishen
38a7d6a944
qbsp: expose PointInLeaf as debug helper
2017-07-24 22:57:43 -06:00
Eric Wasylishen
a936686fe5
qbsp: allow empty leak lines for pathological maps (single brush)
2017-07-24 18:07:40 -06:00
Eric Wasylishen
1a15d5f0e9
qbsp: add -leaktest option (from q2)
2017-07-15 12:23:11 -06:00
Eric Wasylishen
240d65f788
qbsp: outside.cc rewrite
...
- no more recursively traversing portals, as this can overflow the stack
- better outside filling and .pts file generation, inspired by q3map
(do a bfs from all leafs with entities, storing the number of steps
from an occupied leaf in each leaf. Then do a dfs from the outside node
to the first entity we hit.)
- .por file writing was dropped for now, can be re-added later
2017-07-10 12:46:22 -06:00
Eric Wasylishen
bb3e296a0d
qbsp: FillOutside: count portals yourself
2017-07-09 01:06:49 -06:00
Eric Wasylishen
a4e3a3a887
Revert "qbsp: move node_t markfaces list to a std::vector"
...
This reverts commit 31df408333 .
2017-07-05 18:10:56 -07:00
Eric Wasylishen
31df408333
qbsp: move node_t markfaces list to a std::vector
2017-07-02 21:03:41 -06:00
Eric Wasylishen
32eaa99d40
qbsp: rename our plane_t to qbsp_plane_t
2017-04-26 14:55:26 -06:00
Eric Wasylishen
902c45c946
all: make VectorCompare take an explicit epsilon
2017-04-26 14:20:45 -06:00
Eric Wasylishen
9034eb107a
qbsp: move remaining headers to include directory
2017-04-20 19:52:06 -06:00
Eric Wasylishen
e5f5b99584
qbsp: bounds check some array accesses
2016-11-02 16:52:12 -06:00
Eric Wasylishen
a6468984bf
all: finish c++ification
2016-10-17 19:52:17 -06:00
Eric Wasylishen
60c0b64906
qbsp: change mapdata_t to use std::vector
2016-03-20 14:02:31 -06:00
Eric Wasylishen
4ee88ede3b
qbsp: turn map.num* into functions
2016-03-12 13:50:24 -07:00
Eric Wasylishen
3db441eea2
qbsp: rename files to .cc
2016-03-12 13:02:28 -07:00