Jonathan
b21920841d
revert some of the vis stuff, but re-implement it in a more working state
2022-06-18 18:36:09 -04:00
Jonathan
dfa1282d40
simplify/c++-ize CompressRow code and related areas (less allocations overall)
2022-06-18 18:25:23 -04:00
Jonathan
ac05a7ecf6
Revert "simplify/c++-ize CompressRow code and related areas (less allocations overall)"
...
This reverts commit 46aaa81ffd .
2022-06-18 17:29:07 -04:00
Jonathan
7eedf52bf4
sync up BaseWinding checking
...
add constructor to aabb to construct from range
2022-06-18 14:33:16 -04:00
Jonathan
b0dad9d01d
save a few more cycles by just using raw pointers. it's a bit uglier, but this is hard to represent with shared_ptr and I think it was the wrong choice anyways since the ownership chain is difficult to represent in a shared_ptr here.
2022-06-17 14:56:17 -04:00
Jonathan
46aaa81ffd
simplify/c++-ize CompressRow code and related areas (less allocations overall)
2022-06-17 12:06:37 -04:00
Jonathan
238a7b8fa7
document FACENORMALS lump
2022-06-17 10:59:24 -04:00
Eric Wasylishen
259d95e47c
testqbsp: add a first portal test
2022-06-17 01:53:08 -06:00
Eric Wasylishen
0edd52517a
testqbsp: read .prt files back in
2022-06-16 23:22:15 -06:00
Eric Wasylishen
f6309a91cb
vis: move .prt reader to common
2022-06-16 21:55:03 -06:00
Eric Wasylishen
a746506d6a
clang-cl build fix
2022-06-16 20:54:15 -04:00
Jonathan
0b67acd4ba
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# include/common/bspfile.hh
2022-06-16 20:22:36 -04:00
Jonathan
e57633bbca
the old Safe read/writes are gonedy now
2022-06-16 20:22:03 -04:00
Eric Wasylishen
b164b7b250
bspfile: fix bad optional access on Q1 maps
2022-06-16 17:14:40 -06:00
Jonathan
d872514b56
split bspfile.hh into multiple files which store the respective BSP info for the different BSP types; bspfile_generic stores the upper-most data (the superset of all BSP types), whereas the individual files contain the subsets.
2022-06-16 12:06:37 -04:00
Jonathan
740ab24626
bspx stuff into its own file
...
change the printing to be less redundant on BSP version
2022-06-16 10:59:22 -04:00
Jonathan
f53a6a19fe
move extended_texinfo_t to qbsp, since it's only used during compilation and not related to the BSP file
2022-06-16 09:50:00 -04:00
Jonathan
41ef66190f
consistency rename; gtexinfo_t -> mtexinfo_t
2022-06-16 09:36:31 -04:00
Jonathan
8afcc54b74
move making contents valid from brush parsing into gamedef
2022-06-15 09:07:37 -04:00
Eric Wasylishen
0c24e7bbd0
clang-cl build fix
2022-06-14 20:18:06 -06:00
Jonathan
eedabe6f1c
fix bugs
2022-06-14 18:38:22 -04:00
Jonathan
17656eff78
don't return string ref, since it can be modified after it's inserted because of the vector growing
2022-06-14 18:34:01 -04:00
Jonathan
78b979d670
Merge branch 'type-cleanup' into brushbsp
...
# Conflicts:
# include/light/entities.hh
# qbsp/brush.cc
# qbsp/map.cc
2022-06-14 17:19:30 -04:00
Jonathan
d24ea4922a
entdict cleanup
2022-06-14 17:18:13 -04:00
Jonathan
f1fd0bd30f
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-06-14 10:50:54 -04:00
Jonathan
7827885f0f
add texturedef support
...
change Q2_CONTENTS_TRANSLUCENT parsing; remove it always, but if the surface doesn't have TRANS then swap it with DETAIL which is probably what they intended
2022-06-14 10:50:35 -04:00
Eric Wasylishen
a309e8467b
testmaps: add qbsp_q1_sealing.map
2022-06-14 00:44:50 -06:00
Jonathan
12caf1bcd4
move transsky/transwater code into portal_can_see_through
2022-06-13 02:34:39 -04:00
Jonathan
98682f41fa
move brush/leaf counts into gamedef
...
(Q2 stores every combo currently, old code kept in case we want to use that instead)
2022-06-12 03:35:44 -04:00
Jonathan
1a88b46e8c
RemapContentsForExport moved into gamedef
...
simplified gamedef stuff by checking which functions were still necessary, and no need to pass extended flags through at all now
detail type moved into Q1
2022-06-12 02:24:27 -04:00
Jonathan
54900cf7b6
move visblocker to a boolean
2022-06-12 01:02:31 -04:00
Jonathan
13bf99a7f3
fix test cases (implement equals(game) properly, and `is_empty` is false depending on get_content_type for Q2 now)
...
remove unnecessary condition from Q2 contents_are_empty since areaportals are already considered a valid non-empty type via get_content_type
2022-06-11 09:19:51 -04:00
Jonathan
10676603e9
move clip & origin into game-specific code
...
remove hint from brush; hint is technically a surface flag rather than a content flag, so we can infer it from the sides rather than needing to store it as a unique flag (we could still cache the result somewhere but this makes it consistent between q1 and q2)
2022-06-11 08:29:55 -04:00
Jonathan
b33e792458
move clip-own-typeness over to gamedef & contentflags (fixes Q2 edge case with a solid version of a type bordering a translucent version)
2022-06-11 06:01:36 -04:00
Jonathan
e61998dd54
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# qbsp/surfaces.cc
2022-06-11 05:43:29 -04:00
Jonathan
8b4f9f5480
move mirrorinside to gamedef
2022-06-11 05:37:50 -04:00
Eric Wasylishen
5372c4a568
qbsp: fix q2 liquids not mirrored
2022-06-10 23:29:28 -06:00
Eric Wasylishen
64159d92f1
Merge remote-tracking branch 'github-desktop-paril/type-cleanup' into brushbsp
2022-06-10 21:32:23 -06:00
Eric Wasylishen
fc5f1573ef
qbsp: simplify ShouldClipbrushEatBrush
...
fixes lavaclip test case
2022-06-10 20:00:42 -06:00
Eric Wasylishen
d4f1707cdb
qbsp: proper merging of Q2 contents
2022-06-10 19:19:00 -06:00
Jonathan
812797f7ed
enable lighting for warp/sky in Q2
...
simplify bitflag definitions
change nudging light warning to make more sense
another #define -> constexpr pass
2022-06-10 06:29:14 -04:00
Jonathan
5b4660fa63
simplify crc code
2022-06-10 04:47:10 -04:00
Jonathan
42c4060a64
canonize plane stuff into an enum type, remove duplicates
...
more macros into constexpr's
use options.epsilon directly instead of ON_EPSILON in qbsp
2022-06-10 04:43:56 -04:00
Eric Wasylishen
3c4f798e97
qbsp: add create_detail_illusionary/fence/solid_contents
2022-06-10 01:07:20 -06:00
Eric Wasylishen
8c1095715c
qbsp: refactor out is_detail(int32_t types = CFLAGS_DETAIL_MASK) since it's going to depend on game now
2022-06-09 23:48:26 -06:00
Eric Wasylishen
47aa1f7476
qbsp: replace is_detail() with is_any_detail(options.target_game)
2022-06-09 23:32:33 -06:00
Eric Wasylishen
33f1681261
bspfile.hh: updates to content type constants docs
2022-06-08 01:03:39 -06: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
Eric Wasylishen
b6c421d30e
bspfile.hh: #define -> constexpr for content flags
2022-06-03 20:12:04 -06:00
Jonathan
65852ef042
adjust settings_set to only accept one token per entry
...
radlights is now a set (only loads one though)
2022-06-01 20:42:06 -04:00
Eric Wasylishen
0f2ea5333d
move CompressRow/DecompressRow from vis to common
2022-05-24 21:01:41 -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
b21b7466ce
Merge branch 'type-cleanup' into brushbsp
2022-05-16 21:33:57 -06:00
Jonathan
ad85489580
fix windings > N being initialized wrongly
2022-05-15 21:07:35 -04:00
Eric Wasylishen
8fe5d9d694
common: adjust formatting of usage line
...
-remove version hash as it's printed above
-rename `usage` variable to `programDescription`
2022-05-15 17:44:17 -06:00
Eric Wasylishen
6f1ca3c79d
Merge branch 'type-cleanup' into brushbsp
2022-05-15 14:02:42 -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
c82741ff8a
Merge branch 'type-cleanup' into brushbsp
2022-05-15 00:46:49 -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
ba37ae3a54
move serialize_bsp() to common/bspinfo.cc
2022-05-14 14:54:21 -06:00
Eric Wasylishen
4957622c50
Merge branch 'type-cleanup' into brushbsp
2022-05-13 01:24:14 -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
6e3bb91d98
build: fix build on macOS/clang
2022-05-11 00:21:14 -06:00
Eric Wasylishen
e9abb212bb
settings: allow setting_enum to parse numeric representation of enums
...
use it for light forumla. disallow enums in setting_numeric.
2022-05-10 22:55:41 -06:00
Eric Wasylishen
d390ac2030
build: restore !enum check on setting_numeric constructor and boolValue()
...
with non-MSVC workaround
2022-05-10 22:08:41 -06:00
Eric Wasylishen
abc799554d
build: fix all clang-cl warnings
2022-05-10 21:57:17 -06:00
Eric Wasylishen
d763b2e336
build: support clang-cl
2022-05-10 21:39:58 -06:00
Eric Wasylishen
66ba184083
Merge branch 'type-cleanup' into brushbsp
2022-05-10 00:47:41 -06:00
Eric Wasylishen
0c4833226a
settings: implement reset(). Fix setting_mangle::copyFrom()
...
We can't use the string serialization/deserialization trick because setting_mangle transforms
the value upon parsing
2022-05-10 00:43:22 -06:00
Eric Wasylishen
081d63a64c
settings: add setting_container::copyFrom, setting_base::copyFrom
...
disable copy constructors on setting_container/setting_base, which were previously available but broken
2022-05-09 22:32:09 -06:00
Eric Wasylishen
4021d71700
polylib: make operator[] un-bounds-checked
2022-05-08 15:20:21 -06:00
Eric Wasylishen
1df848cfc1
testqbsp: areaportal test
2022-05-04 17:47:14 -06:00
Eric Wasylishen
e0d0d5246f
aabb: add disjoint_or_touching
2022-05-03 19:22:14 -06:00
Eric Wasylishen
ec20072440
testqbsp: expand q2 detail test
2022-05-02 20:24:18 -06:00
Eric Wasylishen
fa97116d12
testqbsp: wip markfaces test
2022-05-02 02:13:54 -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
13612f18d0
qbsp: factor out 'chops' condition in BrushGE
2022-05-01 00:48:58 -06: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
fb59c2e950
bspfile.hh: q1 contents from #defines to constexpr
...
now prints properly in GTest assertions
2022-04-28 00:47:34 -06:00
Eric Wasylishen
10fbfff20d
qbsp: liquids are higher priority than detail_illsuionary
2022-04-27 01:26:56 -06:00
Eric Wasylishen
d2c7412a44
testqbsp: proper test for detail_doesnt_remove_world_nodes
2022-04-26 19:08:44 -06:00
Eric Wasylishen
8731dcb469
bspfile.hh: remove covered_native
2022-04-26 01:23:36 -06:00
Eric Wasylishen
1a0b4c0733
qbsp: more covered_native stuff to remove
2022-04-25 22:01:10 -06:00
Eric Wasylishen
9977c14a2f
bspfile: add gamedef_t::contents_seals_map()
2022-04-25 18:40:55 -06:00
Eric Wasylishen
28c9cda561
Merge remote-tracking branch 'Paril/type-cleanup' into brushbsp
2022-04-17 13:46:50 -06:00
Jonathan
91310ef6b8
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-04-16 22:20:35 -04:00
Jonathan
6080e7fc5d
a bit of q2rtx stuff
2022-04-16 10:28:46 -04:00
Eric Wasylishen
24ca07188c
log: use ANSI colors for strings containing "warning" or "error"
2022-04-03 14:16:22 -06:00
Eric Wasylishen
a0fbfdbad5
log: use ANSI colors for strings containing "warning" or "error"
2022-04-03 12:56:11 -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
a479a5ddfb
use case-insensitive natsort for discoverArchives
...
add two other logging control bools, which -quiet now redirect to
add -lowpriority for CPU priority (on Windows)
2022-02-28 09:20:35 -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