Commit Graph

1665 Commits

Author SHA1 Message Date
Eric Wasylishen 0aeb0acd94 qbsp: adjust tjunc logic 2024-01-24 00:22:27 -07:00
Eric Wasylishen 280f630d54 tjunc.cc: rename var for clarity 2024-01-22 22:57:05 -07:00
Jonathan Linat 39074b8249
CI: Enable Qt5 + lightpreview (#406)
* chore(CI): refine current 'cmake.yml' file content

* chore(CI): enable Qt5 on Linux and macOS

* Appveyor.yml: remove deploy step

we are deploying from GitHub Actions now

* build-linux-64.sh: adjust .zip wildcard

to hopefully not break on PR builds

* build-linux-64.sh: remove fragile unzip/readelf lines

* lightpreview\CMakeLists.txt: only install Qt on Win/Mac

* lightpreview: attempt to fix mac Qt packaging

* lightpreview: apple fixes

* Install qtdbus on macOS

* try alternate dbus module name

* try cmake find_package for dbus

* also find Qt5PrintSupport

* build-osx.sh: remove coreutils install

we don't use sha256sum anymore

* lightpreview/CMakeLists.txt: create .app bundle on macOS

* Update CMakeLists.txt

* build-*: run cpack as part of the build command

on my macOS test system, running cpack separately
is doubling the build time

* cmake: factor out add_loader_path_to_rpath function, apply to all targets

* chore(CI): add steps to re-pack the 'doc' and 'bin' directories

* chore(CI): remove GitHub release-related step (to be re-introduced)

* chore(CI): adjust inflating destination directories

---------

Co-authored-by: Eric Wasylishen <ewasylishen@gmail.com>
2024-01-08 20:16:41 -07:00
Eric Wasylishen 126931a151 qbsp: fix ChooseMidPlaneFromList selecting detail splits too early leading to leaks 2024-01-05 12:32:01 -07:00
Eric Wasylishen 1c692d6f47 qbsp: record portal type 2024-01-05 12:32:01 -07:00
Eric Wasylishen 6351cc50e6 rename: vec_t -> double 2023-12-23 21:09:16 -07:00
Eric Wasylishen f0c8d92993 qbsp: add -missing_textures_as_zero_size flag to allow writing 0x0 textures when a texture is missing
this allows us to write the texture name, but it's non-standard.

light: warn when a surface light template doesn't match any faces in the bsp
2023-12-21 00:05:40 -07:00
Jonathan 1eaf2170f8 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
# Conflicts:
#	light/trace_embree.cc
2023-12-07 14:13:36 -05:00
Jonathan 9ed4f3d042 bunch of double -> float
fix Q2 animated textures
2023-12-07 14:11:46 -05:00
Eric Wasylishen 3eb5cb7c64 qbsp: omit func_detail_illusionary from bspx brushlist
also func_illusionary_visblocker

fixes #371

qbsp: fix bspx brushes
2023-11-26 01:17:03 -07:00
Eric Wasylishen b58b976693 tests: add qbsp content type tests 2023-11-26 00:23:41 -07:00
Eric Wasylishen ad9fd7fc59 common: structured bspxbrushes reading/writing 2023-11-25 17:28:26 -07:00
Jonathan ec452e2291 remove implicit conversion for qplane3 2023-11-19 19:41:58 -05:00
Eric Wasylishen c77f4ba2dd qbsp: fix misc_external_map + -wrbrushes
- fix world extents not including external maps
- thanks @DaZombieKiller for pointing this out

Fixes #372
2023-11-18 15:14:38 -07:00
iknowsomething bf50e0d604 qbsp, maputil: add parser location to "brush primitives" error messages 2023-11-18 11:22:18 -07:00
iknowsomething 3969f857cb qbsp: fix crashing on empty brushes 2023-11-18 11:22:18 -07:00
iknowsomething 815e2c2cef qbsp, maputil: fix empty brush format detection (was detected as brush_primitives) 2023-11-18 11:22:18 -07:00
Eric Wasylishen 8888506821 qbsp: fix -notex option 2023-11-09 23:57:07 -07:00
Jonathan b83c4a6440 use fold expr instead of for statements in vec3
fix a bunch of clang warnings
2023-11-04 19:01:08 -04:00
Jonathan 24e0cb0d5c Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2023-11-01 20:14:40 -04:00
Jonathan 7186f411bb fix animation infinite loops 2023-11-01 20:14:36 -04:00
Eric Wasylishen f9a9733068 qbsp: fix crash in CheckPlaneAgainstVolume if node->volume is already empty 2023-09-28 20:30:49 -06:00
Eric Wasylishen 8362ffa385 qbsp: fix memory/.bsp file corruption if map contains a texture name longer than 31 characters 2023-09-24 19:42:42 -06:00
Eric Wasylishen 872f5fe8a0 build: copy + install mingw dll's libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll 2023-09-16 14:28:06 -06:00
Jonathan 6baa1243cf allow auto-gamedir to handle subdirectoried maps properly
fix include paths
2023-09-08 08:41:56 -04:00
Jonathan 7d881768fa Revert "Revert "reduce memory usage by only storing VPLs when we need to, and only once""
This reverts commit 2e0e23622b.

Disable rescale by default on sky faces.
Light is now in control of rescales' default value.
Multiply omni light faces by 0.5 to better match qrad3
Remove some asserts to increase perf
2023-09-04 02:51:20 -04:00
Jonathan cec120dfc9 maputil starting point 2023-09-04 00:16:23 -04:00
Eric Wasylishen b893e67309 light: add _light_twosided 1 key for forcing two-sided light receiving on opaque surfaces 2023-08-29 01:44:16 -06:00
Jonathan 9d7f83a46a don't remove style keys from non-areaportals if the map leaks 2023-08-21 10:54:10 -04:00
Eric Wasylishen 7608a78b44 style: use std::min/std::max/std::clamp and remove using 2023-08-07 15:42:29 -06:00
Eric Wasylishen db42b2116a use std::abs in remaining places that were using C abs() 2023-08-07 15:23:12 -06:00
Jonathan 3dde7a60d9 display full absolute paths of input and output 2023-07-22 23:04:31 -04:00
Jonathan 19500bca0a fix bounds checks only checking [0] 2023-07-21 00:21:58 -04:00
Eric Wasylishen 99be5a84bc qbsp: experimental -filldetail feature (defaults to on)
also change default -filltype from auto to inside
2023-07-09 23:00:15 -06:00
Eric Wasylishen f3edc52a00 qbsp: cleanup outside.cc terminology to reflect what is actually happening 2023-07-09 16:08:00 -06:00
Eric Wasylishen 465e59fc16 apply auto formatting 2023-07-09 15:04:16 -06:00
Jonathan 5dea42e012 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2023-07-09 15:44:28 -04:00
Jonathan aa70d6dc00 draw lines and portals
disable leakdist by default
2023-07-09 15:44:23 -04:00
Random 2637a5fb65
-notex should now work (#365) 2023-07-08 15:55:34 -06:00
Eric Wasylishen 9760f5b8da qbsp: fix detection of areaportal leaks (FindAreaPortalExits_R was aborting the search for "exits" early) 2023-07-06 22:37:28 -06:00
Jonathan 9898eab474 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2023-07-06 08:25:11 -04:00
Jonathan 064e7980fd allow --scale to take three parameters. negatives *kind of* work but won't work with lightgrid, etc. 2023-07-06 08:25:02 -04:00
Eric Wasylishen 7691706bda build: only use <fmt/core.h>, other headers have a heavy compilation time impact 2023-07-02 17:08:14 -06:00
Eric Wasylishen 5616fd97f4 common: use compile-time format string checking 2023-06-26 01:19:54 -06:00
Jonathan 11d73b71d8 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2023-06-26 00:50:15 -04:00
Jonathan 93da0c9905 add the ability to specify a chop order; this is to help with "nested" func_groups and layers, since TB makes them an implicit object at random spots in the BSP. Now you can be sure your objects will chop in the right order. 2023-06-26 00:50:08 -04:00
Eric Wasylishen fbea58d679 code formatting pass 2023-06-25 18:29:48 -06:00
Jonathan be8ae00fa6 fix so that the brush list has no dupes and is sequential again 2023-06-21 07:48:57 -04:00
Jonathan 2b22e35669 make sure world brush entities are in BSPX wrbrushes 2023-06-20 19:36:05 -04:00
Jonathan 06d48e6822 fix areaportal issue 2023-06-14 02:50:23 -04:00
Jonathan d36e2f5114 --scale option for BSPUtil to do a post-process scale 2023-06-12 15:23:47 -04:00
Eric Wasylishen 9c6f6c2589 common: change FError to throw an exception 2023-06-03 22:24:20 -06:00
Eric Wasylishen d38ef2d8af qbsp: allow _litwater/_splitturb as a bmodel key
supports both opt-in and opt-out
2023-05-28 23:44:57 -06:00
Eric Wasylishen f6d5e6e24d qbsp: fix test failure in last commit (stale pointers in map.hashedges) 2023-05-28 16:51:20 -06:00
Eric Wasylishen 731bafd9fe qbsp: fix edge reuse causing software renderer artifacts with liquids
fixes q1_liquid_software.map in tyrquake
thanks to Mankrip for reporting this
2023-05-28 16:28:33 -06:00
Eric Wasylishen ed7a684583 qbsp: remove dead code contents_are_mirrored() 2023-05-28 11:43:30 -06:00
Eric Wasylishen fa890456f6 qbsp: don't merge faces across sky boundaries 2023-05-27 23:42:33 -06:00
Eric Wasylishen 2703761edb bsputil: fix --extract-textures writing in text mode
also correction to .prt writing, always use text mode
2023-05-27 16:56:07 -06:00
Jonathan 9d57f6dae7 fix region texture names getting picked up by accident 2023-05-23 17:54:20 -04:00
Eric Wasylishen 261d6da37d qbsp: revert b994bb7 "disable CheckPlaneAgainstVolume checks"
it was causing leaks through solids
2023-05-22 23:01:07 -06:00
Eric Wasylishen 752cd95c02 qbsp: -debugexpand: write to .bsp output dir 2023-05-20 21:17:14 -06:00
Random c6ea63ba95
made CMake relative for use as a sub-project within other CMake projects (#356) 2023-05-10 19:45:51 -06:00
Jonathan 0ab3aae111 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
# Conflicts:
#	common/bspfile.cc
2023-05-08 17:47:12 -04:00
Jonathan 1548f25daf allow individual brush chop control
allow passing _surflight_targetname to set targetnames for switchable lights on bmodels
2023-05-08 17:44:32 -04:00
Eric Wasylishen d9e16a943a qbsp: add -noextendedsurfflags flag to suppress .texinfo writing (for testing/debugging) 2023-05-07 23:56:30 -06:00
Eric Wasylishen 18a7df1a1b style: reformat 2023-05-07 21:44:29 -06:00
Eric Wasylishen 3e446e6ea6 qbsp, light: fix inheriting minlight from worldspawn
Update q2_light_group.map to support this
2023-05-07 21:44:29 -06:00
Eric Wasylishen b994bb750d brushbsp: disable CheckPlaneAgainstVolume checks
this check prevents splitting on small brush fragments, where we actually need to split.
if we don't the small fragments cause incorrect leaf contents to be assigned.
2023-05-05 23:07:16 -06:00
Eric Wasylishen 5d142e4ab2 qbsp: remove -contenthack (dead code) 2023-05-01 22:38:00 -06:00
Eric Wasylishen 0628f768e2 qbsp: minor clarification in SplitBrush 2023-04-29 12:26:48 -06:00
Jonathan bd047020d2 fix antiportals up a bit 2023-04-29 13:40:34 -04:00
Jonathan 5777fdf914 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2023-04-28 13:32:00 -04:00
Jonathan 39a54abfc6 add support for a region brush (code needs to be cleaned up a bit though)
allow _surflight_style on brush models
2023-04-28 13:31:50 -04:00
Eric Wasylishen 537bc3686d qbsp: experimental -scale flag for applying uniform scale to map 2023-04-25 18:41:21 -06:00
Jonathan 6035290c70 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
# Conflicts:
#	include/common/imglib.hh
#	light/entities.cc
#	light/light.cc
#	light/surflight.cc
2023-04-24 02:19:04 -04:00
Jonathan dddc48e98b simplify `needs_write` for surfflags
add `_surflight_color` key; allows overriding surface light color on an entity basis
load the .wal from wal_json and use the values as a base, if they exist
allow `_surflight_minlight_scale` to be specified on entities
2023-04-24 02:16:39 -04:00
Eric Wasylishen 50d97321d7 qbsp: add -bmodelcontents flag 2023-04-22 19:15:55 -06:00
Eric Wasylishen a2d89e3307 qbsp: q1: fix visportals being created to solid leafs
fixes crash on ej3_cc.map
2023-04-17 23:42:00 -06:00
Eric Wasylishen ed756bd602 common: add support for writing .rst documentation from settings 2023-04-16 14:55:43 -06:00
Eric Wasylishen e069d7b9b8 style: update settings api to follow current coding style 2023-04-16 11:55:38 -06:00
Eric Wasylishen 8d368060eb qbsp: sealing: in hull1/2 treat onnode point entities as being in empty space 2023-04-07 17:06:56 -06:00
Jonathan 00bcead0fb Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2023-04-03 05:26:49 -04:00
Jonathan a0e98242a4 fix hintskip; when loading a hint brush, mark all other sides as hintskip 2023-04-03 05:26:41 -04:00
Eric Wasylishen 68eaf37e40 qbsp: q1: fix detail to be non-sealing again 2023-03-27 21:43:54 -06:00
Eric Wasylishen 8830a949e6 qbsp: only print "doesn't touch two areas" once per entity
log source location as well
2023-03-27 20:15:19 -06:00
Eric Wasylishen 2a2bc5d966 qbsp: clean up debug spam from DebugAreaPortalBothSidesLeak 2023-03-27 20:09:01 -06:00
Eric Wasylishen 4569ab1b33 qbsp: delete leftover areaportal leak files on startup 2023-03-27 20:05:33 -06:00
Jonathan d067630bc1 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2023-03-27 03:23:19 -04:00
Eric Wasylishen d7db2bdae5 qbsp: debug helper for finding areaportal leaks 2023-03-27 01:20:53 -06:00
Eric Wasylishen f12cefb2c9 qbsp: if Q2_CONTENTS_SOLID bit is set, always assign invalid area 2023-03-26 19:02:25 -06:00
Jonathan 0bab917dc4 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2023-03-26 20:24:51 -04:00
Eric Wasylishen 759811b548 qbsp: fix Portal_EntityFlood check 2023-03-26 18:04:06 -06:00
Jonathan 1dcfe58563 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2023-03-26 18:29:41 -04:00
Jonathan 5daaeee6fb allow `surflight_minlight_scale` to be specified per brush 2023-03-26 18:29:37 -04:00
Eric Wasylishen 6e064ae3c7 qbsp: restore detail to non-sealing 2023-03-26 16:20:10 -06:00
Eric Wasylishen 3c408f5d30 qbsp: better debug visualization for "missing portal sides" warning
writes a .missing_portal_sides.prt file for inspection in TB
2023-03-26 14:09:54 -06:00
Eric Wasylishen 7b7cabaf09 qbsp: don't merge above- and below- water faces in Q1 mode
works around caustics effects in ezQuake/nQuake leaking onto above-water faces.
2023-03-13 23:50:32 -06:00
Eric Wasylishen 41a4375376 qbsp: q2: reject DEADMONSTER and MONSTER in input brushes
we currently (hackily) use MONSTER as detail_wall internally (this will likely change later though.)

In any case these are invalid in input maps.
2023-03-12 23:39:25 -06:00
Eric Wasylishen 7ed36c9bec qbsp: reject Q2 maps with mixed visible contents 2023-03-07 22:12:22 -07:00
Jonathan 1091183293 fix infinite loop if a texture is missing in the animation chain 2023-03-03 16:48:25 -05:00