Eric Wasylishen
d3ee17ac59
testqbsp: remove -noprogress as it hinders debugging
2022-05-22 13:16:27 -06:00
Eric Wasylishen
ba884f6e1a
qbsp: CreateBrushFaces: list -> vector
2022-05-22 12:54:47 -06:00
Eric Wasylishen
016e9a89f2
qbsp: fix base1.map leak with epsilon hacks
2022-05-22 00:38:08 -06:00
Eric Wasylishen
6fafc19f74
qbsp: fix not clearing portals
2022-05-21 23:37:47 -06:00
Eric Wasylishen
f9f355474c
qbsp: fix broken FindOccupiedClusters_R
2022-05-21 16:32:36 -06:00
Eric Wasylishen
25b390aafe
qbsp: merge original brush lists when merging leafs in PruneNodes
2022-05-21 16:05:22 -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
3b83508f37
Revert "qbsp: remove unused face csg code"
...
This reverts commit 2ad9e27d3b .
2022-05-21 01:44:59 -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
6f1ca3c79d
Merge branch 'type-cleanup' into brushbsp
2022-05-15 14:02:42 -06:00
Eric Wasylishen
a4ebfab691
tests: fix case issue with catch includes
2022-05-15 13:19:46 -06:00
Eric Wasylishen
03d9df50e5
tests: don't include(CTest) as it generates unwanted targets
2022-05-15 12:43:35 -06:00
Eric Wasylishen
7f0f3e9992
tests: fix build errors
2022-05-15 12:40:20 -06:00
Eric Wasylishen
c925f7be74
test: convert test case macros to Catch2
2022-05-15 12:27:43 -06:00
Eric Wasylishen
28bea85d97
test: convert assertions to Catch2 format
2022-05-15 12:18:09 -06:00
Eric Wasylishen
9fe42ef6c7
test: swap GTest out in favour of Catch2
2022-05-15 12:00:50 -06:00
Eric Wasylishen
254310dc2c
tests: switch to Catch2 style
2022-05-15 11:20:02 -06:00
Jonathan
d9c6e52bd3
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-05-15 10:09:41 -04:00
Jonathan
e2512372c3
fix -convert not working properly for Q2 maps
...
begin code for alias files
2022-05-15 10:09:38 -04:00
Eric Wasylishen
215c6549b9
testqbsp: add test of nodraw + includeskip
2022-05-15 01:49:27 -06:00
Eric Wasylishen
67a895d1e7
testqbsp: fix use of msvc-ism
2022-05-15 00:50:53 -06:00
Eric Wasylishen
c82741ff8a
Merge branch 'type-cleanup' into brushbsp
2022-05-15 00:46:49 -06:00
Eric Wasylishen
d34d41a390
testqbsp: add helper for compiling with an external bsp tool
2022-05-15 00:37:58 -06:00
Eric Wasylishen
e834b848b9
qbsp: fix areanodes test
2022-05-15 00:15:17 -06:00
Eric Wasylishen
153bde886b
testmaps_q2.base1leak: remove brushbsp arg
2022-05-14 20:14:09 -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
c537ad39c1
qbsp: move wadlist to map struct
2022-05-14 15:55:18 -06:00
Eric Wasylishen
bc90198006
qbsp: move wal_cache to map struct
2022-05-14 15:29:58 -06:00
Eric Wasylishen
fa18a6755a
qbsp: fix q2 brush export breaking when multiple tests run
2022-05-14 15:13:47 -06:00
Eric Wasylishen
863a3de04f
testqbsp: write out .bsp.json files for testmaps
2022-05-14 15:08:49 -06:00
Eric Wasylishen
4957622c50
Merge branch 'type-cleanup' into brushbsp
2022-05-13 01:24:14 -06:00
Eric Wasylishen
2195a3f5a4
testqbsp: adjust testmaps_q2.detail to accept extra solid leafs generated on type-cleanup branch
2022-05-13 01:18:30 -06:00
Eric Wasylishen
b2e78376cb
qbsp: require nonzero intersection between leaf/brush in order to add a leafbrush
...
removes some unnecessary leafbrushes in testmaps_q2.detail
2022-05-13 01:17:45 -06:00
Eric Wasylishen
b3f35b28ad
testqbsp: relax node count requirement in simple_worldspawn_sky
2022-05-13 00:27:40 -06:00
Eric Wasylishen
b6ce6ae527
testqbsp: simple_worldspawn_sky: fix expectation so sky leafs don't fill outwards
2022-05-12 23:51:05 -06:00
Eric Wasylishen
8f0034565d
qbsp: surfaces.cc: don't output inside faces of sky brushes
...
Can't see them anyway
2022-05-12 23:43:32 -06:00
Jonathan
59db5bfdc5
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
...
# Conflicts:
# include/qbsp/qbsp.hh
# qbsp/map.cc
# qbsp/qbsp.cc
2022-05-11 09:50:46 -04:00
Jonathan
cbdb5c0c73
slight bit of cleaning
2022-05-11 09:46:39 -04:00
Eric Wasylishen
a1b8a38283
merge non-brush bsp specific changes from brushbsp branch
2022-05-11 01:58:53 -06:00
Eric Wasylishen
4a711908c8
Merge branch 'pr/322' into brushbsp
2022-05-11 00:29:58 -06:00
Eric Wasylishen
d763b2e336
build: support clang-cl
2022-05-10 21:39:58 -06:00
Eric Wasylishen
aed5ebe439
qbsp: fix settings clearing between test runs
2022-05-10 00:59:18 -06:00
Eric Wasylishen
a7e98d81d2
cmake: hacks to copy .dll's
2022-05-08 19:52:39 -06:00
Eric Wasylishen
a93eff23bc
testqbsp: expand base1leak test
2022-05-05 01:29:52 -06:00
Eric Wasylishen
b06736dea4
qbsp: fix leak in base1leak test
2022-05-05 01:01:33 -06:00
Eric Wasylishen
56844e4349
testqbsp: leak test case extracted from base1.map
2022-05-04 23:32:45 -06:00
Eric Wasylishen
095fb62c17
qbsp: fix -debugchop on q2
2022-05-04 22:52:02 -06:00
Eric Wasylishen
93d3a5f4c8
qbsp: fix areaportal crash
2022-05-04 22:51:54 -06:00
Eric Wasylishen
5cae1919ce
qbsp: fix areaportals
2022-05-04 21:04:36 -06:00
Eric Wasylishen
7275155d62
qbsp: remove obsolete/wrong comment
2022-05-04 20:53:41 -06:00
Eric Wasylishen
1df848cfc1
testqbsp: areaportal test
2022-05-04 17:47:14 -06:00
Eric Wasylishen
6d221502b0
testqbsp: add playerclip test case
2022-05-04 02:06:18 -06:00
Eric Wasylishen
5bf0a8b2c7
testqbsp: experiment with adding nanobench
2022-05-04 01:16:29 -06:00
Eric Wasylishen
8d6c59a00e
qbsp: rewrite SplitFace in terms of clip()
2022-05-03 23:55:22 -06:00
Eric Wasylishen
f5806076ff
qbsp: ChopBrushes: skip brushes that are just touching
2022-05-03 19:28:40 -06:00
Eric Wasylishen
c8125a2c95
testqbsp: add chop_no_change test map
2022-05-03 19:24:36 -06:00
Eric Wasylishen
893b0b080e
qbsp: move to unique_ptr<brush_t> vectors
2022-05-03 02:35:43 -06:00
Eric Wasylishen
b76cae3967
testqbsp: add stats goal for base1.bsp
2022-05-03 00:24:44 -06:00
Eric Wasylishen
ec20072440
testqbsp: expand q2 detail test
2022-05-02 20:24:18 -06:00
Eric Wasylishen
bec0357352
qbsp: proper marksurfaces population
2022-05-02 02:35:13 -06:00
Eric Wasylishen
fa97116d12
testqbsp: wip markfaces test
2022-05-02 02:13:54 -06:00
Eric Wasylishen
e1eb0e8cbd
qbsp: fix noclipfaces issues
2022-05-02 00:05:50 -06:00
Eric Wasylishen
3a30891476
testqbsp: add more detail_illusionary tests
2022-05-01 21:44:58 -06:00
Eric Wasylishen
59684a1c5d
Merge remote-tracking branch 'Paril/type-cleanup' into brushbsp
2022-05-01 01:21:01 -06:00
Eric Wasylishen
2ad9e27d3b
qbsp: remove unused face csg code
2022-05-01 01:13:03 -06:00
Eric Wasylishen
13612f18d0
qbsp: factor out 'chops' condition in BrushGE
2022-05-01 00:48:58 -06:00
Eric Wasylishen
fb0fcfa535
qbsp: fix water_detail_illusionary
2022-05-01 00:34:27 -06:00
Eric Wasylishen
ab59f5ea3e
testmaps: expand water_detail_illusionary test (failing)
2022-05-01 00:13:33 -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
Jonathan
d6377acff9
-q2rtx implies -q2bsp now
2022-04-30 23:30:18 -04:00
Jonathan
cc0e1a5561
move Face_IsLightmapped to light
...
Fix q2rtx, needs to include lightstyle for nodraw for emissive invisibles with lightstyles
fix wal (for the 900th time)
auto-set -nolighting for -q2rtx
2022-04-30 23:27:21 -04:00
Eric Wasylishen
5b4a9956c6
qbsp: add -debugchop
2022-04-30 15:10:19 -06:00
Eric Wasylishen
ed5e753ed9
qbsp: ChopBrushes: add missing brush file order check
2022-04-30 15:09:53 -06:00
Eric Wasylishen
cb2268efdf
qbsp: initial ChopBrushes implementation
2022-04-30 14:33:26 -06:00
Eric Wasylishen
019b8cb9ed
testqbsp: add test that settings reset
2022-04-30 12:37:13 -06:00
Eric Wasylishen
583dddcd98
solidbsp: don't penalize splitting non-visible
2022-04-29 02:19:57 -06:00
Eric Wasylishen
356ccd628b
testqbsp: remove -outsidedebug
2022-04-28 01:27:41 -06:00
Eric Wasylishen
21d3938626
testqbsp: add test case with detail_illusionary sticking into the void (wip)
2022-04-28 00:51:25 -06:00
Eric Wasylishen
92f352ce30
qbsp: MakeVisibleFaces: skip non-visible faces
2022-04-28 00:50:44 -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
029e95dc3b
qbsp: add PruneNodes
2022-04-28 00:49:26 -06:00
Eric Wasylishen
d04c90c883
Merge remote-tracking branch 'Paril/type-cleanup' into brushbsp
2022-04-27 19:39:10 -06:00
Eric Wasylishen
89a91a2cc9
testqbsp: expand simple_worldspawn_sky tests
2022-04-27 19:38:40 -06:00
Eric Wasylishen
8d5ca19d26
qbsp: fix extra faces being generated in simple_worldspawn_sky
2022-04-27 19:30:19 -06:00
Eric Wasylishen
8efb6f689b
qbsp: add -outsidedebug flag
2022-04-27 19:18:27 -06:00
Jonathan
b7fbf28e51
fix .wal loading (Again...)
2022-04-27 14:57:40 -04:00
Eric Wasylishen
4caba85428
testqbsp: wip sky test
2022-04-27 02:03:11 -06:00
Eric Wasylishen
10fbfff20d
qbsp: liquids are higher priority than detail_illsuionary
2022-04-27 01:26:56 -06:00
Eric Wasylishen
b0d791b649
testqbsp: enable more test maps
2022-04-27 01:05:26 -06:00
Eric Wasylishen
edfb9b3ae9
testqbsp: enable q2 testmap
2022-04-27 00:13:00 -06:00
Eric Wasylishen
90e064e9e1
testqbsp: attempt to add a q2 test case (not working yet)
2022-04-26 23:45:44 -06:00
Eric Wasylishen
9f3b752bec
testqbsp: add origin brush test
2022-04-26 23:16:43 -06:00
Eric Wasylishen
25dc4f5871
testqbsp: add brush_clipping_order test
2022-04-26 22:49:23 -06:00
Eric Wasylishen
d5320d5aaa
qbsp: subdivide faces after merging
2022-04-26 21:41:03 -06:00
Eric Wasylishen
df9d530c21
qbsp: fix weird calling convention of SubdivideFace
2022-04-26 21:32:24 -06:00
Eric Wasylishen
0e0e2d03d2
testqbsp: add more checks to the existing tests
2022-04-26 19:54:03 -06:00
Eric Wasylishen
84b835eacc
testqbsp: fix typo
2022-04-26 19:31:41 -06:00
Eric Wasylishen
d2c7412a44
testqbsp: proper test for detail_doesnt_remove_world_nodes
2022-04-26 19:08:44 -06:00
Eric Wasylishen
af84f840be
qbsp: fix _mirrorinside
2022-04-26 01:02:24 -06:00
Eric Wasylishen
617c3ee7c7
qbsp: make detail clip away faces
2022-04-26 00:54:02 -06:00
Eric Wasylishen
f9aa40a50f
qbsp: fix outside filling in maps with detail
2022-04-26 00:25:52 -06:00
Eric Wasylishen
9a3b43d1d1
qbsp: remove globals.cc
2022-04-25 23:42:32 -06:00
Eric Wasylishen
93e0226726
qbsp: add test that detail doesn't clip away worldspawn nodes (just visual faces)
2022-04-25 22:00:58 -06:00
Eric Wasylishen
e5b4a9863e
qbsp: add test that detail doesn't seal
2022-04-24 01:01:55 -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
133ee77fc5
testqbsp: fix textures not loading in tests
2022-04-20 01:31:26 -06:00
Eric Wasylishen
97692738c4
testqbsp: add noclipfaces test
2022-04-20 01:25:50 -06:00
Eric Wasylishen
aa3174d732
testqbsp: initialize filesystem the same as a regular qbsp run
2022-04-20 01:25:29 -06:00
Eric Wasylishen
78210947ff
qbsp: add -keepprt option
2022-04-19 01:03:18 -06:00
Eric Wasylishen
28c9cda561
Merge remote-tracking branch 'Paril/type-cleanup' into brushbsp
2022-04-17 13:46:50 -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
c349e59524
testqbsp: add (failing) detail_wall test
2022-04-17 03:07:39 -06:00
Eric Wasylishen
ea8af6d55c
testqbsp: export .bsp's to quake dir
2022-04-17 02:58:40 -06:00
Eric Wasylishen
2c8e433afa
qbsp: start test for qbsp_simple_worldspawn_worldspawn.map
2022-04-17 02:22:04 -06:00
Jonathan
0b41f0a03b
notriggermodels support
2022-04-16 22:20:29 -04:00
Jonathan
6080e7fc5d
a bit of q2rtx stuff
2022-04-16 10:28:46 -04:00
Eric Wasylishen
5d64d6b6e1
qbsp: add simple_sealed.map test
2022-04-16 02:29:32 -06:00
Eric Wasylishen
d2ae49c976
qbsp: fix void faces in qbsp_simple_sealed2.map
2022-04-16 02:09:11 -06:00
Eric Wasylishen
f467257f72
qbsp: start test case for qbsp_simple_sealed2.map
2022-04-15 21:05:14 -06:00
Eric Wasylishen
67f7d7ec8b
build: pass testmaps directory to testqbsp
2022-04-15 18:03:23 -06:00
Eric Wasylishen
ed8c758486
build: modernize GoogleTest setup
...
following https://google.github.io/googletest/quickstart-cmake.html
Fixes VS2022 test runner not working when opening ericw-tools as
a camke project
2022-04-15 14:55:58 -06:00
Eric Wasylishen
c78a911611
qbsp: add fixme
2022-04-15 02:33:08 -06:00
Eric Wasylishen
ed95e6a838
merge.cc: style
2022-04-15 02:01:19 -06:00
Eric Wasylishen
f38746a7eb
qbsp: call MergeAll in the right place
2022-04-15 02:01:06 -06:00
Eric Wasylishen
8a71b372bd
qbsp: remove unnecessary num*() helpers from mapdata_t
2022-04-15 00:27:50 -06:00
Eric Wasylishen
e577fba343
csg4.cc: remove unused statics
2022-04-11 17:49:59 -06:00
Eric Wasylishen
5df0dde756
map.cc: move rgfStartSpots to map struct
2022-04-11 17:49:49 -06:00
Eric Wasylishen
9b9239fc38
outside.cc: add comment
2022-04-11 17:42:11 -06:00
Eric Wasylishen
9d2f00a1b2
qbsp: tidying: move pWorldEnt() to mapdata_t
2022-04-11 00:13:42 -06:00
Eric Wasylishen
b7fbb48763
qbsp: enable new outside filling
2022-04-10 00:00:28 -06:00
Eric Wasylishen
a3d54cf48d
qbsp: remove unused face_t::original
2022-04-09 23:40:35 -06:00
Eric Wasylishen
407b39cad1
qbsp.hh: remove writebsp.hh and outside.hh includes
2022-04-09 23:30:42 -06:00
Eric Wasylishen
b736704e5e
qbsp.hh: remove portals.hh include
2022-04-09 23:28:12 -06:00
Eric Wasylishen
95824d26e4
qbsp.hh: remove surfaces.hh include
2022-04-09 23:25:54 -06:00
Eric Wasylishen
ca589906d8
qbsp.hh: remove merge.hh include
2022-04-09 23:25:01 -06:00
Eric Wasylishen
2e14909e84
qbsp.hh: remove map.hh include
2022-04-09 23:23:26 -06:00
Eric Wasylishen
f71ae3658e
qbsp.hh: remove solidbsp.hh include
2022-04-09 23:19:34 -06:00
Eric Wasylishen
147a76c11b
qbsp.hh: remove csg4.hh include
2022-04-09 23:17:43 -06:00
Eric Wasylishen
9295181f84
qbsp.hh: remove brush.hh include
2022-04-09 23:15:21 -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
449b76db70
qbsp: remove unused region.hh header
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
f5cda68416
clean up percent stuff
...
comment out "didn't split" message
fix winding resize
merge phong loops together
2022-03-07 14:49:50 -05: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
cca64bf0da
Fix another cmdargs bug
...
Fix areaportal warning
2022-02-27 05:55:26 -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
Eric Wasylishen
571953f126
qbsp: wip, reorganizing ProcessEntity
2022-02-22 01:50:31 -07:00
Eric Wasylishen
eee96576dc
qbsp: fix ConvertNodeToLeaf, move MakeMarkFaces
2022-02-21 16:56:18 -07:00
Eric Wasylishen
cab51405d6
qbsp: qbsp.cc: misc cleanup
2022-02-21 14:28:12 -07:00
Eric Wasylishen
fa4b14369a
qbsp: remove unused GatherNodeFaces_r
2022-02-21 13:02:01 -07:00
Eric Wasylishen
658d807052
qbsp: finish re-adding CSG code
2022-02-21 12:35:27 -07:00
Eric Wasylishen
b04a6e9a30
qbsp: csg: re-add checking of map file order
2022-02-21 12:00:26 -07:00
Eric Wasylishen
3b348af301
qbsp: wip mirroring faces
2022-02-21 00:47:57 -07:00
Eric Wasylishen
019fa63361
qbsp: remove unnecessary Entity_SortBrushes
2022-02-21 00:15:45 -07:00
Eric Wasylishen
91f7d9adaa
qbsp: remove surface_t
2022-02-21 00:05:48 -07:00
Eric Wasylishen
70ea752587
qbsp: restore MergeAll
2022-02-20 23:57:42 -07:00
Eric Wasylishen
50ef495000
qbsp: remove completed fixmes
2022-02-20 21:33:13 -07:00
Eric Wasylishen
b22e90585b
qbsp: fix brush.outputnumber assignment
2022-02-20 17:07:11 -07:00
Eric Wasylishen
1e79abafa0
qbsp: q2: fix empty optional access when compiling q2 map lacking extended flags
2022-02-20 16:25:46 -07:00
Eric Wasylishen
ebe07ca510
qbsp: q2: fix empty optional access when compiling q2 map lacking extended flags
2022-02-20 16:25:23 -07:00
Eric Wasylishen
cb464031da
qbsp: track original brushes, populate q2 leafbrushes accurately
2022-02-20 16:10:44 -07:00
Eric Wasylishen
8c84871129
qbsp: wip: add CSG-ing back in
2022-02-20 01:19:55 -07:00
Eric Wasylishen
2a257693c6
Merge branch 'type-cleanup' into brushbsp
2022-02-17 00:43:08 -07:00
Eric Wasylishen
60e7080e00
qbsp: remove FreeNodes call, double-free (?) on pwr1.map
2022-02-16 23:44:14 -07:00
Jonathan
542e6d63ad
fix detail (again)
2022-02-16 19:54:12 -05:00
Jonathan
b0ece93f83
Fix/implement animated textures for Q2
2022-02-16 19:23:19 -05:00
Eric Wasylishen
b94afcdd08
qbsp: SplitBrush: fix backwards midwinding
2022-02-13 22:03:20 -07:00
Eric Wasylishen
5b85a34ad2
qbsp: don't error on all-liquid worldspawn
2022-02-13 20:08:13 -07:00
Eric Wasylishen
055f865ef0
qbsp: add very rough pass of building visible faces
...
- faces are subdivided where neeed
- markfaces not calculated accurately
- overlaps/clipping not handled
2022-02-13 19:51:59 -07:00
Eric Wasylishen
1fbfd199c5
qbsp: wip port of BrushBSP from Q2 tools
...
currently can compile qbsp_simple.map (2 brushes)
no faces, but generates leafs/nodes which seem OK
2022-02-13 12:03:27 -07:00
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
4cf6bc9e28
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-02-05 13:32:11 -05: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
Eric Wasylishen
8531286777
qbsp: replace `-nothreads` with `-threads 1` for consistency with light/vis
2022-01-30 17:50:21 -07:00
Eric Wasylishen
5c897000f3
qbsp: make -nofill still write out .prt file, for diagnosis
2022-01-29 19:22:30 -07:00
Eric Wasylishen
aa71025970
cmake: add some hacks to copy TBB .dll's
2022-01-29 15:57:00 -07:00
Jonathan
15484b55f8
Use better tjunction vertex addition
...
Parallel MergeAll
Allow modifyable iterators from polylib; resizing may invalidate them however
2022-01-28 09:45:29 -05:00
Jonathan
c7d48e9c11
Remove entity bounds print
2022-01-27 04:08:58 -05:00
Jonathan
4f32722dfc
Multiply bounds by 2 so we have less room for leaks
2022-01-27 04:08:31 -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
3f37de95a5
Fix tests
2022-01-26 18:15:53 -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
40807048f5
since faces are dynamic now, we don't need a temporary superface
2022-01-25 17:58:03 -05:00
Jonathan
f9f76b6dbb
skip the flips - saves us a bit of time!
2022-01-25 04:18:52 -05:00
Jonathan
674be0c812
Fix a few messages (missing newlines, period in wrong place)
...
Use fragments to store TJunction bits instead of having them in separate-but-chained faces
2022-01-25 03:23:39 -05:00
Jonathan
dfd31d7441
make markfaces a vector to simplify usage
2022-01-25 00:13:12 -05:00
Jonathan
6dadb1d8f6
slight speed boost on large maps by merging this loop into one (saves calculating metrics twice)
2022-01-24 15:10:26 -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
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
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
e92b9f1ff9
Fix miscalculation for has_struct
...
Remove unused variable
2022-01-23 21:48:24 -05:00
Jonathan
5d6d7a71a2
Fix missing includes for list
2022-01-23 19:28:50 -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
Eric Wasylishen
edec33ad93
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into pr/322
2022-01-22 16:28:14 -07:00
Eric Wasylishen
d340bd06a5
qbsp: RemapContentsForExport: fix for q2 structural faces completely covered by detail fence not rendering
...
at least in yquake2, (vanilla?). Remaps the detail fence to "window"
2022-01-22 16:28:08 -07:00
Jonathan
6895fea115
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-01-22 17:55:42 -05:00
Jonathan
8dbb18cc94
Use stem() instead of filename() when we're only wanting to change filename without extension
2022-01-22 17:55:37 -05:00
Eric Wasylishen
c31edc6599
qbsp: FindMiptex: fix empty optional access when a .wal couldn't be found
2022-01-22 15:32:14 -07: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
008d6db056
Fix detail for Q2 maps
...
Simplify winding::flip
Add an assert that a generated surface has a non-empty bounds (have a map that generates a face with 0,0,0 bounds)
2022-01-20 19:25:58 -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
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
Jonathan
60070e27b2
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-01-17 09:16:27 -05:00
Eric Wasylishen
b681690807
qbsp: fix some memory leaks
2022-01-16 12:47:19 -07:00
Jonathan
10fa97e6b8
Use string_view where appropriate for parser, add some additional constructors for ease of use
2022-01-16 04:17:06 -05:00
Eric Wasylishen
e6e232d43e
qbsp: fix delete/delete[] mismatch
2022-01-15 23:26:59 -07:00
Eric Wasylishen
2ebcdc9fde
qbsp: fix memory leak identified by LeakSanitizer
2022-01-15 23:01:55 -07:00
Eric Wasylishen
07e7179c74
fix build
2022-01-15 18:51:33 -07:00
Eric Wasylishen
f02bbca0c7
parser: fix reading past end of buffer
2022-01-15 18:31:35 -07:00
Eric Wasylishen
0dd7a73cc1
qbsp: flip brush clipping order to match original qbsp
...
Patch from Paril
2022-01-15 14:35:02 -07:00
Jonathan
3d9277b711
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2021-12-20 14:51:20 -05:00
Jonathan
e2d64e0e5d
FS simplification
...
Fix transparency calculation (33% is 33% opacity, not 33% transparency)
2021-12-20 14:51:14 -05:00
Eric Wasylishen
d6a17d022c
qbsp: CreateBrushFaces: fix accessing empty winding in `w->clip(...)` expression
2021-12-15 22:43:21 -07:00
Jonathan
0c827208ec
Allow `-subdivide 0` to turn off subdivision
...
imglib now lives in common
fs 'load' split into two functions, where and load. the former allows you to query for and return archive & path for a given file, whereas the latter handles that for you.
use log verbose in light rather than own verbose flag
2021-11-21 15:08:02 -05: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
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
Eric Wasylishen
6856789eef
bspfile.cc: move "can't see through solid" to the top of portal_can_see_through
...
fixes LoadPortals: out of bounds leaf in portal 68 issue
2021-10-25 20:24:21 -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
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
e1695ebfd3
VectorAdd & simplify TexDef_BSPToBrushPrimitives (needs testing)
2021-10-25 08:39:29 -04:00
Jonathan
a5f8ecd471
VectorSubtract
2021-10-24 23:26:20 -04:00
Jonathan
11c3511605
new normal calculation cherry-picked from branch
...
Fix entdata not having its '\0'
don't write unnecessary extended texinfo
2021-10-24 15:21:26 -04:00
Jonathan
d0e557b9cb
Fix BSPX on q2bsp
...
Fix normalize generating NaNs to match old behavior of generating zero on zero length
Remove extended texinfo file before potentially not writing new one
2021-10-24 06:56:31 -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
7c661a3759
distance-squared
2021-10-23 13:22:32 -04:00
Jonathan
865fbb0745
VectorMA
2021-10-23 13:20:43 -04:00
Jonathan
4dca2d7d07
VectorInverse, VectorSet, VectorClear gone
2021-10-23 13:15:38 -04:00
Jonathan
74253fd189
Fixed Unix/Clang compilation
...
Adjusted makefile to work with both clang and msvc on win32
Removed "WIN32", use the standard _WIN32 instead
Fixed bad VectorCopy's
Use qvec4b instead of special color_rgba type
qvec now follows built-in type procedures for handling operators; this means that (qvec3i + qvec3f) will now properly produce a float, as one would expect, instead of adding the float to the integers without casting to the common type.
2021-10-23 07:35:41 -04:00
Jonathan
04e88085b6
Fix concave angle being clamped incorrectly
...
Use abs for phongdebug - matches q2rtx and seems to look nicer overall
Fix lightsurf snormal being calculated wrong
2021-10-22 04:22:54 -04:00
Jonathan
443be60a74
Compress texinfo a bit
2021-10-22 03:50:15 -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
84b4388f4b
Added a deprecation sniffer so I can find problematic areas later
...
Revert tjunc fixes
Add -notjunc to match other editors
Rid Light_Add since it's too simple
2021-10-20 04:27:22 -04:00
Jonathan
1bf6261826
constexpr/inline qv:: where appropriate
...
comment out rewrite test in bspinfo
updated tjunc code
2021-10-19 23:26:43 -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
fd18fc154c
Fix various warnings by testing a clang-cl compile
2021-10-12 14:39:15 -04:00
Jonathan
e974285fe7
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2021-10-12 13:52:53 -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
c88274f806
qbsp: outside.cc: rewrite with outside -> in filling
2021-10-11 22:40:26 -06:00
Jonathan
6ec134a1f0
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2021-10-11 19:46:04 -04:00
Jonathan
bd6bc0dc56
surfflags remap -> is_valid to match contentflags
...
warn on excessive key/value lengths, per-game
2021-10-11 19:45:55 -04:00
Eric Wasylishen
134c286b5e
qbsp: fix spurious leak in base1.map
2021-10-11 13:48:17 -06: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
Jonathan
e2ba8d7b5a
fNoclip not required for Q2 any more
2021-10-10 14:12: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
a1609ae1e6
qbsp: add _omitbrushes to tell qbsp to discard all brushes in a func_
2021-10-09 15:22:27 -06:00
Jonathan
a8d5125321
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2021-10-09 14:14:54 -04:00
Jonathan
eb4bcf96dc
-includeskip for Q2RTX
...
Fix missing fmt include
Default nexttexinfo to -1 to match other tools
Fmt support for bspversion_t, use that instead of a static function
Cleanup write functions
2021-10-09 14:14:49 -04:00
Eric Wasylishen
bf8f00df01
build: don't compile qbsp + light twice
2021-10-08 20:30:18 -06:00
Eric Wasylishen
34b6462641
build: build common as a static library
2021-10-08 20:08:26 -06:00
Eric Wasylishen
e8b943cf90
build: remove DOUBLEVEC_T (unused now)
2021-10-08 19:47:32 -06:00
Eric Wasylishen
5cf82ee023
qbsp: restore use of options.worldExtent
...
should fix minor precision differences in .prt files
2021-10-08 19:04:11 -06:00
Jonathan
1b1679fa22
normals are now a special tuple-ish type, so that we can calculate tangents and bitangents for Q2RTX if requested (currently it always does it, but we can fix that later)
...
always emit texinfo for q2 brush sides
2021-10-08 14:17:48 -04:00
Eric Wasylishen
cfee292e5f
qbsp: use fmt to print portals
2021-10-08 00:44:34 -06:00
Eric Wasylishen
9610841dd7
qbsp: use fmt to print "origin" keys for rotators
2021-10-07 23:52:30 -06:00
Eric Wasylishen
532b35c5bf
qbsp: insert new epairs at the end of an entity
2021-10-07 20:06:20 -06:00
Eric Wasylishen
681a916348
qbsp: wad.cc: zero out data after \0 in dmiptex_t.name
...
This is just for consistency with the cleanup branch which is also doing this
2021-10-07 00:31:11 -06:00
Eric Wasylishen
f6e9ba4eb2
qbsp: drop mapentity_t::epair_order and std::map for epairs
...
just store as a std::vector of pairs. Lookups aren't done much in qbsp
so linear search performance should be fine.
epair_order approach gets messy because we sometimes add epairs
2021-10-06 18:26:25 -06:00
Eric Wasylishen
ca7002cb38
qbsp: preserve .map file order of epairs
2021-10-06 17:58:20 -06:00
Eric Wasylishen
9b19828530
qbsp: avoid triggering MSVC std::vector access bounds check
...
even though we're just taking the address with &, face->edges[face->w.size()]
was accessing an out-of-bounds element
2021-10-06 16:44:14 -06:00
Eric Wasylishen
0d06489016
qbsp: change HashVec to inline (fixing macOS build)
2021-10-06 16:38:24 -06:00
Jonathan
16d3bcc7c7
Revert "clang /macOS: un-constexpr things that were erroring"
...
This reverts commit 33745c3cb8 .
Value-initialize v which removes the need for the bottom `if constexpr` expression.
2021-10-06 03:42:46 -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
Eric Wasylishen
22145327e6
qbsp: fix use-reference-after-vector-resize
2021-10-06 00:19:47 -06:00
Eric Wasylishen
097f033eb8
testqbsp: fix build
2021-10-05 23:41:43 -06:00
Eric Wasylishen
fd28067b5c
fix gcc errors about reference to temporary
2021-10-05 23:28:33 -06:00
Eric Wasylishen
33745c3cb8
clang /macOS: un-constexpr things that were erroring
...
neither clang nor gcc like the qvec(Args..) constructor
being constexpr.
GCC's error says:
error: member ‘qvec<3, double>::v’ must be initialized by mem-initializer in ‘constexpr’ constructor
2021-10-05 23:18:52 -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
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
Eric Wasylishen
ee8ee57cc1
qbsp: delete brushbsp.cc
2021-10-03 20:13:21 -06:00
Eric Wasylishen
1ed4dc71ad
Merge remote-tracking branch 'origin/master' into qbsp-contentflags
2021-10-03 20:04:19 -06:00