Commit Graph

1665 Commits

Author SHA1 Message Date
Eric Wasylishen 2d54b3409a remove unused code related to "no_phong" 2025-02-08 16:03:46 -07:00
Eric Wasylishen ebe157cb43 cleanup: get_hull_sizes(): use std::span instead of std::initializer_list 2025-02-04 19:55:39 -07:00
Eric Wasylishen c65898dfd9 mapfile: texinfo_quake2_t::flags should be int, not surfflags_t 2025-02-01 23:55:15 -07:00
Eric Wasylishen d6ad1606b4 cleanup: SurfFlagsForEntity: take epairs 2025-02-01 18:08:58 -07:00
Eric Wasylishen bf6710e625 common: surfflags_t: convert is_hintship to function that checks for Q2_SURF_SKIP 2025-02-01 16:17:26 -07:00
Eric Wasylishen f930305695 common: surfflags_t: convert is_hint to function that checks for Q2_SURF_HINT 2025-02-01 16:04:08 -07:00
Eric Wasylishen 429921868a common: surfflags_t: convert is_nodraw to function that checks for Q2_SURF_NODRAW 2025-02-01 15:53:37 -07:00
Eric Wasylishen 6f1b4252d2 common: split surfflags_t::native into native_q1 and native_q2 2025-02-01 14:47:50 -07:00
Justin 2bbcaed34b
have notriggermodels output mins/maxs for hull 0 (#446) 2025-01-31 19:01:54 -07:00
Eric Wasylishen bbd5bc7ff8 qbsp: replace old .prt writing code with WritePortalfile 2024-12-15 22:34:40 -07:00
L-P d0788ac01f
Add _hulls property to allow a bmodel to set for which hulls it should have clipnodes (#442)
* Add _hulls bmodel property

Whitelist hulls for which to generate clipnodes.

* Fix _hulls when hull 0 is omitted

Add test

---------

Co-authored-by: Eric Wasylishen <ewasylishen@gmail.com>
2024-12-09 00:06:26 -07:00
Eric Wasylishen 0f1a7186d6 qbsp: never merge across liquids, deprecate -nomergeacrossliquids
we've had complaints from both Q1 and Q2 users with water caustics
leaking out from underwater. This was an attempt to save a few faces,
seems it's not worth the trouble.
2024-12-07 19:47:16 -07:00
Eric Wasylishen a0953767a2 qbsp: more func_illusionary_visblocker fixes
See #441

- fix visblocker merging with detail_illusionary, by introducing a new content type
- fix _mirrorinside 0 not working on visblocker
2024-11-23 22:21:51 -07:00
Eric Wasylishen 4e11e3ebe1 qbsp: remove treating __TB_empty as skip 2024-11-23 10:39:30 -07:00
Eric Wasylishen 9d6ce6d83c qbsp: fix func_illusionary_visblocker behaviour
- support liquid brushes (they are converted to mist - so empty contents for Q1)
- force _mirrorinside 1

Fixes #441
2024-11-20 20:19:34 -07:00
Eric Wasylishen 9f4cfb0c3d cleanup: code formatting pass 2024-11-18 21:25:27 -07:00
Eric Wasylishen 8038b730e1 qbsp: fix func_illusionary_visblocker
Fixes #440
2024-11-18 21:19:41 -07:00
Eric Wasylishen 1337919805 cleanup: don't pass std::string_view by reference
by value is the same on MSVC, may be marginally better elsewhere

see:
https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/
https://quuxplusone.github.io/blog/2021/11/19/string-view-by-value-ps/
2024-11-17 21:52:10 -07:00
Eric Wasylishen 71933f2be1 cleanup: don't pass double by reference (it's only 8 bytes) 2024-11-17 21:34:54 -07:00
Eric Wasylishen c755f47c03 cleanup: don't pass size_t by reference (it's only 8 bytes) 2024-11-17 21:26:27 -07:00
Eric Wasylishen b8fdbe3d41 cleanup: don't pass contentflags_t by reference (it's only 8 bytes) 2024-11-17 21:23:09 -07:00
Eric Wasylishen 3d7916e966 qbsp: fix -notex 2024-11-03 23:37:31 -07:00
Eric Wasylishen c5bc920b4a qbsp: fix bmodel bounds if clip brushes are used
Previously only a special case was handled (all clip).

Fixes #438
2024-10-01 23:13:51 -06:00
Eric Wasylishen ed62ec1040 cleanup: remove unused game argument from contentflags_t::to_string() 2024-09-08 19:36:00 -06:00
Eric Wasylishen 6a72c96fd4 fix mac compilation 2024-09-07 11:54:35 -06:00
Eric Wasylishen 6ff979e450 qbsp: redesign _chop and _chop_order
- add docs and tests
2024-09-07 11:36:04 -06:00
Jonathan 6c9b681b0f Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2024-08-26 06:12:09 -04:00
Jonathan 2b700f0514 allow non-fatal compiler errors
fix crash in whitespace trim
increase stack size
2024-08-26 06:12:05 -04:00
Eric Wasylishen 3f1659dd84 qbsp: only reuse edges once for software renderer compat
Issue reported by Izhido
2024-08-05 15:45:55 -06:00
Jonathan b5089ce349 slight speedup by helping embree with alignment
merge some light algorithms together
allow changing attenuation on surface lights with _surflight_atten
replace some emplace_back's with push_back to improve compilation times
2024-06-02 19:49:32 -04:00
Jonathan 0f844ad3e2 don't output debug stuff if we don't need it 2024-05-29 07:12:56 -04:00
Jonathan 6c9962eb8c some more memory adjustments
settings cleanup, maputil/bsputil changes

(cherry picked from commit 59ac57306f13ff53f935f51bb5df1e59e76753ef)

# Conflicts:
#	bsputil/bsputil.cc
2024-05-20 11:28:03 -04:00
Eric Wasylishen e61630d4d9 qbsp: q2: adding structrual solid to a leaf now only clears detail bit, not other bits
fixes #420
2024-04-24 23:46:40 -06:00
Eric Wasylishen ee13179926 qbsp: LoadExternalMap: fix typo causing invalid read 2024-04-07 22:54:10 -06:00
Eric Wasylishen 4cd62ff157 qbsp: remove dead code from last commit 2024-04-07 22:25:57 -06:00
Eric Wasylishen c714ce597a qbsp: use mapfile.cc for .map file parsing
BP loading is broken by this commit, will need
to re-introduce loading the texture sizes in mapfile.
2024-04-07 22:20:33 -06:00
Eric Wasylishen 9985d6c8fd fix odr violations
not sure why these only started to be reported on this branch
2024-04-01 12:20:35 -06:00
Eric Wasylishen 275695a37c qbsp: remove -transsky flag which was broken
unknown what it was useful for
2024-03-09 22:07:55 -07:00
Eric Wasylishen aa3b8479b4 qbsp: shrink node_t from 280 to 208 bytes
- contentflags_t from 80 to 8 bytes
2024-03-09 19:37:23 -07:00
Jonathan 8c88704bdf revert anim change because it apparently causes infinite loops in kex 2024-03-08 14:37:53 -05:00
Jonathan ae2b46f115 oops i had commented this for testing 2024-03-08 14:13:32 -05:00
Jonathan 6157945d4d optimize Q2 brush info by using world-aligned defaults if they exist
optimize Q2 animations by using world-aligned defaults, since Q2 only needs the secondary texinfo for the texture
2024-03-05 11:11:20 -05:00
Eric Wasylishen ee075b5781 qbsp: shrink node_t from 328 to 280 bytes 2024-02-27 23:34:47 -07:00
Eric Wasylishen f3da00395d style: replace (void) with () 2024-02-26 21:07:22 -07:00
Eric Wasylishen 12b8066246 light: change remaining double -> float
tiny perf improvement on base1-test.map with light params:

-emissivequality high

before: 7.4s
after: 6.9s

no visible changes in base1.
2024-02-25 23:42:45 -07:00
Eric Wasylishen 765d95e189 qbsp: q1: make liquids detail when -transwater is in use (i.e. by default)
Fixes #353
Fixes #244
2024-02-10 21:08:29 -07:00
Eric Wasylishen 227a92f8a2 build: get rid of "bin" subdirectory 2024-02-04 19:52:16 -07:00
Eric Wasylishen aa970c0d18 qbsp: only pick up .wad textures when compiling for non-Q2 games
fixes #404
2024-02-04 19:41:45 -07:00
Eric Wasylishen d512abd27d qbsp: merge across liquids by default in q1
- change option name to -nomergeacrossliquids
- add docs
- allow using it in q2 as well (requested by jitspoe)
2024-01-25 23:04:31 -07:00
Eric Wasylishen 6396f87e15 qbsp: never write <3 vertex faces 2024-01-25 17:49:07 -07:00