Commit Graph

1636 Commits

Author SHA1 Message Date
Jonathan 521daad432 always use world entity for looking for _wad key 2022-07-29 21:20:10 -04:00
Jonathan 77e5990016 set default subdivision to Q2 non-software maximum when Q2 is used (twice as large as Q1) 2022-07-29 13:42:26 -04:00
Jonathan 3ee28fc416 fix crash in light from bounce lighting storage
move bounce lights to a forwardly linked list
fix minlight affecting style 0 for switchables
2022-07-29 00:41:24 -04:00
Jonathan 7810875860 strip trailing spaces from keys 2022-07-28 20:41:43 -04:00
Jonathan dd39bf9940 better print for areaportal warnings 2022-07-28 20:41:33 -04:00
Jonathan 6399c743a7 fix bogus brush splits from old Q2 world extents 2022-07-28 20:00:43 -04:00
Jonathan faa4c38985 fix logging being disabled wrongly at the last steps
remove vertex snapping done as a post-processing step; it causes hall of mirrors and doesn't work the same way as qbsp3. need to find a better option.
2022-07-28 09:21:42 -04:00
Jonathan 1d8a0c1df3 clang-format pass 2022-07-28 06:14:54 -04:00
Jonathan e03d99d807 fix spacing 2022-07-28 05:59:06 -04:00
Jonathan d9a9046e46 fix some foot-guns with qbsp_plane_t - type is auto-set now 2022-07-28 05:51:55 -04:00
Jonathan 64cd39c229 add optional vertex snapping to match qbsp3 2022-07-28 03:56:12 -04:00
Jonathan 3fc6225fee although it's rare, if there's a case where a zero-angle triangle is *required* to close up a face (MWT determines it's part of the optimal case), we'll just let it through 2022-07-28 01:35:12 -04:00
Jonathan c9935aaa38 hook up merge and subdivide stats 2022-07-27 23:02:09 -04:00
Jonathan 146f20f677 qbsp_plane_t is now used by other structures, and contains a faster epsilonEqual; since the majority of planes (especially nodes) are going to be axial, there's no need to use the slower full comparison when we can check if the axial component is ready. 2022-07-27 22:44:09 -04:00
Jonathan c5d0c4dc67 use a dummy plane for nodes with only empty leaves 2022-07-27 20:29:53 -04:00
Jonathan 9c73416594 Squashed commit of the following:
change temp-named planeside_ to plane_flipped

commit 8b3938f5069837e76504a16ffd019a8682fd4325
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 05:35:05 2022 -0400

    fix compile errors/warnings

commit 0c19a922490a332a084ceb65bbb88368fecb40a1
Merge: 31edc84e a2451a41
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 05:30:54 2022 -0400

    Merge branch 'brushbsp' into paril/brushbsp_plane2

    # Conflicts:
    #	qbsp/portals.cc
    #	qbsp/tree.cc

commit 31edc84e5a0f16196aacb4e465657954a523ccf9
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 02:55:52 2022 -0400

    use std::map for the two other hashes (edge/vertex) for speed

commit a9bb68b6ea203226d21f73d42558ffe388fc3051
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 02:31:45 2022 -0400

    remove final uses of FindPlane

commit 951a2b1977f813751c93417901a775a7a0cb77f4
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 02:01:19 2022 -0400

    only set flipped status if we actually flipped; this seems to have no affect in practice, but it was wrong in theory

commit 97610203bebb115391ef39ea2b5c6400b9ce2d89
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 01:56:19 2022 -0400

    remove FindPositivePlane

commit d424afbb2cfa32669883f5aafcf34555169eec3e
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 01:22:10 2022 -0400

    side_t uses plane and side_ now

commit af883bc111049a8c6fcb12c8c888e17f03cf30ff
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 00:46:52 2022 -0400

    face_t uses internal plane

commit 1cd776c89b683b0af0d8a642eee7e54b5f54b559
Author: Jonathan <jonno.5000@gmail.com>
Date:   Tue Jul 26 22:59:47 2022 -0400

    node_t using plane directly, pulling planenum in when necessary

commit 8b34312ef9c3d416c011f2694a34fb9d5eba4faa
Author: Jonathan <jonno.5000@gmail.com>
Date:   Tue Jul 26 22:22:28 2022 -0400

    remove PLANENUM_LEAF, use a boolean for the separation
2022-07-27 05:38:50 -04:00
Eric Wasylishen a2451a41fb qbsp: rewrite of q1 contents representation in bspfile.cc
use q2-like bitflags so we can represent mixes like (water | mist), which we need within the compiler
2022-07-27 02:31:49 -06:00
Jonathan 4e3739c751 use a reader/writer-esque lock (shared_mutex) instead of exclusive-only recursive lock to speed up plane stuff 2022-07-24 19:05:28 -04:00
Jonathan f089d0db20 default -nosoftware for qbism 2022-07-22 20:01:36 -04:00
Jonathan f6d6972b17 fix percents being output when not requested for submodels
tjunc using MWT algorithm
2022-07-22 12:25:06 -04:00
Jonathan 09a03d1668 remove delabella 2022-07-21 20:06:33 -04:00
Jonathan 46591c05f9 storing delaunay version 2022-07-21 20:05:55 -04:00
Jonathan f1f11e6f3b Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-07-19 08:42:13 -04:00
Jonathan 989788cf71 add a switch to optimize compiles for no software mode (mainly for Q2)
fix tjunc 3 vert faces being destroyed
2022-07-19 08:41:59 -04:00
Eric Wasylishen 6025585f01 switch from std::any to class hierarchy for content_stats_t
Fixes bogus (huge integers) content stats reporting on macOS (also fix tjunc stats reporting)

having the non-copyable std::atomic<size_t> inside a std::any which must
be copyable was problematic

IMO this is slightly better because it lets us use non-copyable types
2022-07-18 20:13:33 -06:00
Jonathan b6153e3084 use make_unique where appropriate
use unordered_map/set where ordering isn't important (faster for searching and smaller footprint)
2022-07-18 20:16:50 -04:00
Jonathan 6f4f3a56ad make a few errors warnings 2022-07-18 11:27:48 -04:00
Jonathan 7e5c4fe311 fix animation loops 2022-07-18 11:24:22 -04:00
Jonathan 5e90c5c7a1 spacing 2022-07-18 08:57:50 -04:00
Jonathan 577592ce45 adjust tjunc output to match the step orders (input/deformations -> delaunay -> retopo -> rotation -> splitting) 2022-07-16 10:50:13 -04:00
Jonathan acac6cb720 add in a "validator" setting which is just a thin wrapper to another setting type allowing for an additional validation step
simplify the face structure; now, "fragments" just mean the output windings (if you opt out of tjunction fixing, then there will only be 1 fragment with the same values as original_vertices)
move MakeTangentAndBitangentUnnormalized to qvec.hh since we will use it later
-tjunc allows for more fine-grained control now (-notjunc still exists)
-maxedges now throws if you specify a bad value (1 and 2)
remove the checks to OmitFaces - we can tell if a face was omitted because it will have an empty winding
remove static variables from tjunc
2022-07-16 10:45:24 -04:00
Jonathan da9546e260 change settings semantics to be simpler and more clear:
- no more "isLocked" - use getSource directly (locked is a confusing name)
- no more split parse/setValue functions. there's only one entry point each now, and all they do is pass along the source passed to it from its parser.
- no separate setters, use setValue(value, source)
- add a "game target" source, which is low priority and indicates to the user that the value would have been default but was changed to a better value for the game target
2022-07-14 09:03:59 -04:00
Jonathan feb6055b07 remove errors pertaining to MAXEDGES (except on output) since we dynamically expand now
allow command line to specify maxedges
default maxedges to 0 (no limit) for Quake II
2022-07-14 04:57:52 -04:00
Jonathan 4cf81197a3 fix SplitFaceIntoFragments 2022-07-14 02:18:41 -04:00
Jonathan ae4c5cd365 change face output to be slightly more robust
fix tjunc multithreading; added `original_vertices` which is a copy of the `output_vertices` that is safe for tjunc to read from since tjunc writes to the former
2022-07-14 01:56:18 -04:00
Jonathan a435f67f13 fix outputting noisy stuff 2022-07-13 22:26:08 -04:00
Jonathan 8240d753ee Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-07-13 04:35:46 -04:00
Jonathan d9dc54d267 remove vertex rounding
fix vertex hash not including negative axis points
use angle instead of zero-area triangle
2022-07-13 04:35:42 -04:00
Eric Wasylishen d30d4000bc qbsp: fix log spam from BrushBSP 2022-07-13 00:30:53 -06:00
Jonathan 0fb1b429a8 finish tjunc algorithm - can now retopologize by splitting fans up
lower zero-area triangle epsilon
2022-07-12 17:43:25 -04:00
Jonathan 632facc6a7 implement a non-brute force method to reduce vertices to test 2022-07-11 08:29:53 -04:00
Jonathan c1168bc8ae fix tjunc output not actually outputting proper new vertices
allow for basic rotation of face to find a good orientation
2022-07-11 05:12:48 -04:00
Jonathan 1e84284977 fix tjunc using w instead of output_vertices 2022-07-11 02:43:37 -04:00
Jonathan 1aa2a9b250 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
# Conflicts:
#	qbsp/qbsp.cc
2022-07-11 01:41:10 -04:00
Jonathan f98dd05f56 new, simpler qbsp3-esque TJunc code;
- currently uses naive brute force approach to finding vertices on faces
- simplify 'face fragments', which now only need to contain vertex indices since they are already emitted
2022-07-11 01:40:10 -04:00
Eric Wasylishen f86a5343fb qbsp: rename options -> qbsp_options 2022-07-10 17:30:00 -06:00
Eric Wasylishen 050886f32c tests: unify tests under one target
to ease sharing code. vis/light tests are going to need the testqbsp infrastructure.
2022-07-10 16:36:15 -06:00
Eric Wasylishen a9b9892761 qbsp: disable tjunc for now 2022-07-10 14:49:04 -06:00
Jonathan 4feb2bd2c7 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-07-10 14:11:31 -04:00
Jonathan b30d200543 remove `entity` from functions that no longer need it
EmitVertices as its own phase
2022-07-10 12:50:16 -04:00
Eric Wasylishen 54a6762a05 qbsp: add edge sharing test 2022-07-10 01:25:28 -06:00
Jonathan 17112d3683 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-07-10 03:21:44 -04:00
Jonathan f213f4aa45 fix edge sharing
remove the "don't share edges if they have different contents" thing
2022-07-10 03:21:36 -04:00
Eric Wasylishen 5da679d699 qbsp: trim some legacy comments/code 2022-07-10 00:15:25 -06:00
Eric Wasylishen d590e3d940 qbsp: move MakeBspBrushList to csg.cc for qbsp3 parity 2022-07-09 23:44:22 -06:00
Jonathan 5f37159224 allow disabling auto-upgrade, in the case where you don't want it to keep trying to output a BSP2/QBSP when it won't work in your target engine(s)
# Conflicts:
#	include/qbsp/qbsp.hh
2022-07-08 02:06:12 -04:00
Jonathan 43c5e942b2 move faceextents_t & friends to common
use stb_image_write for PNGs for better compression on bsp.json
add in code for spitting out a lightmap from a face. doesn't support other styles and such yet.
2022-07-08 02:06:06 -04:00
Jonathan 705ab73169 rename light option `lmscale` to `lightmap_scale` to reflect its qbsp usage (a forced replacement of the "default" lightmap scale)
allow qbsp to be passed an `-lmscale` to facilitate a global lmscale change for BSPX
fix code paths for writing both lightmap sizes out

# Conflicts:
#	include/qbsp/qbsp.hh
2022-07-08 02:06:06 -04:00
Eric Wasylishen 8a4caa40a2 testqbsp: remove !mayfail from dm1 test 2022-07-07 10:12:52 -06:00
Eric Wasylishen c2a2890240 testqbsp: add texture metadata for some of the base1.map special textures
so we can compile a working version of the map
2022-07-07 01:21:50 -06:00
Eric Wasylishen 5cd178e105 qbsp: revert change to SphereOnPlaneSide for now as it's breaking tests 2022-07-06 23:36:59 -06:00
Eric Wasylishen 4ab5a05d4c qbsp: swap BoxOnPlaneSide for SphereOnPlaneSide 2022-07-05 00:40:53 -06:00
Eric Wasylishen 20ca6d2ef9 qbsp: add sphere bounds for bspbrush_t 2022-07-05 00:20:57 -06:00
Eric Wasylishen bc6090d576 qbsp: move SubdivideFace to match qbsp3 2022-07-04 01:20:12 -06:00
Eric Wasylishen 92aa55db8f qbsp: clean up some dead code 2022-07-04 01:15:17 -06:00
Eric Wasylishen 554e29e861 tree.cc: sync PruneNodes_R condition with qbsp3 2022-07-04 00:37:02 -06:00
Eric Wasylishen ac80d11e69 qbsp: move FreeTreePortals to tree.cc 2022-07-04 00:26:28 -06:00
Eric Wasylishen fce258a7b7 qbsp: csg4.cc -> csg.cc 2022-07-04 00:17:18 -06:00
Eric Wasylishen 296426f526 qbsp: use unique_ptr for tree_t 2022-07-03 23:48:00 -06:00
Eric Wasylishen 97d360120b qbsp: use unique_ptr for node_t::facelist 2022-07-03 23:41:48 -06:00
Eric Wasylishen 4ab4cb7dc8 qbsp: use unique_ptr for portal_t 2022-07-03 22:45:25 -06:00
Eric Wasylishen de68bee886 qbsp: move tree_t to tree.hh 2022-07-03 21:36:17 -06:00
Jonathan a0d81372d1 improved path detection (and overriding) routines
(cherry picked from commit 32f33fb4b3)
2022-07-03 18:23:40 -04:00
Eric Wasylishen 40bba01b21 qbsp: brushbsp.cc import from qbsp3 2022-07-03 01:22:09 -06:00
Jonathan cb4a1ad8a3 re-add nodraw/sky warning 2022-06-30 15:12:42 -04:00
Jonathan f7016d1af0 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-30 05:24:53 -04:00
Jonathan 9f734ff976 Merge branch 'type-cleanup' into brushbsp
# Conflicts:
#	common/bspfile.cc
#	include/common/bspfile.hh
#	light/trace.cc
2022-06-30 05:23:05 -04:00
Eric Wasylishen 862d9bd5f2 testqbsp: add q1_clip_func_wall
Ensure submodels that are all "clip" get bounds set correctly
2022-06-30 00:53:02 -06:00
Eric Wasylishen 2127209955 qbsp: add CreateBrushWindings from qbsp3 2022-06-30 00:31:42 -06:00
Jonathan 03ee5c52e8 add an entry point for specifically loading meta-only file formats, like .wal; used for discerning replacements from their source material (since replacements are often larger than the default, we need the scale info)
add a new meta format, which is just a JSON representation of the metadata contained in a .wal
simplify texture loading in `light`
fix `light` not handling replacement textures very well
string_iequals take string_view like the others
move averageColor to be alongside pixel data, where it belongs
2022-06-29 12:59:33 -04:00
Jonathan 292d5afb5e Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-28 06:08:04 -04:00
Jonathan c1dc3cb7d8 Merge branch 'type-cleanup' into brushbsp
# Conflicts:
#	include/common/bspfile.hh
2022-06-28 04:13:26 -04:00
Eric Wasylishen 1693bb3877 qbsp: side_t doesn't need sphere culling 2022-06-28 02:01:41 -06:00
Eric Wasylishen b21e245d99 qbsp: surface.cc -> faces.cc 2022-06-28 00:23:47 -06:00
Eric Wasylishen c64b869248 testqbsp: make winding test [.releaseonly] as it crashes on msvc debug builds 2022-06-28 00:21:59 -06:00
Eric Wasylishen eb1f7acc02 qbsp: move PruneNodes to tree.cc for qbsp3 alignment 2022-06-28 00:06:18 -06:00
Jonathan 44c50717c3 move generic image loading routine to `img`
move light-specific "load textures from BSP" routine to light
fix a couple bugs with external wad textures (there should always be at least a 40-byte miptex in there)
light can now load external textures
move -paths to common settings
fix bug with missing texture not filling miptex name
2022-06-28 01:37:12 -04:00
Eric Wasylishen 29a622d106 testqbsp: use -noverbose by default 2022-06-27 22:44:08 -06:00
Eric Wasylishen 7439fc30db testqbsp: fix absolute path in q1_wad_external 2022-06-27 22:40:38 -06:00
Jonathan c23b7d2ec9 allow Quake-likes to load textures similarly to Q2 (finding best place to load them from)
allow Quake and Q2 to handle other texture formats (mainly just TGA for now)
2022-06-27 11:30:28 -04:00
Jonathan bf1cb56e5a fix build
add setting to control file priority
2022-06-27 10:41:24 -04:00
Jonathan 59bff81e9d tests for new WAD stuff 2022-06-27 08:14:30 -04:00
Jonathan 26608c1b37 Merge branch 'type-cleanup' into brushbsp
# Conflicts:
#	common/bspfile.cc
#	common/bspinfo.cc
2022-06-27 08:14:03 -04:00
Jonathan 732621c59a fix bugs in miptex writing
clear FS when loading filesystem again (for tests mainly)
move img::load_palette to where it is in brushbsp
2022-06-27 08:13:04 -04:00
Jonathan a7662a9c9b fix noclipfaces being inverted from type-cleanup 2022-06-27 06:56:20 -04:00
Jonathan cf04f644e0 Merge branch 'type-cleanup' into brushbsp
# Conflicts:
#	common/bspinfo.cc
#	include/common/bspfile.hh
#	include/qbsp/map.hh
#	include/qbsp/wad.hh
#	qbsp/wad.cc
2022-06-27 06:44:45 -04:00
Jonathan ba7c18fd35 Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup 2022-06-27 03:58:41 -04:00
Jonathan 510023e089 step 1 of finishing the rewrite I started of the image subsystems.
- for Quake-likes, WADs will be added as file system archives directly when the first brush is encountered since the wad key is ready to go by that point.
- after loading the .map and before constructing the BSP, what I call secondary textures (animation frames for Quake-likes) are added to the list, and the BSP's miptex data is filled.
- BSP miptex data is now opaque to the BSP process; the BSP simply copies the raw miptex information from the input. This simplifies the BSP structures and reading/writing routines.
- the img subsystem supports reading from raw miptexes now, although in practice this only happens for Quake-likes atm
- instead of a "wal cache", maps now have a "meta cache" which stores the metadata information for all games instead of just Quake II
- texture meta can now be ref'd out rather than needing to be copied every time (mainly only a gain for the std::string)
- wad.cc/wad.hh is gone; wads are now pushed into the filesystem archive
- fixed broken wad_archive
- fs subsystem iterated on a little bit; supports marking archives as external (only used for wads currently; see `LoadTextureData`)
- load_tga has better error handling
- add in foot-gun protection to the BSP readers; now they assert on failure to read instead of silently propagating that error throughout the rest of the process
- bsputil uses img stuff now, so it should handle palettes better
2022-06-27 03:58:23 -04:00
Eric Wasylishen c7111cc99e qbsp: move FloodAreas to portals.cc for parity with qbsp3 2022-06-27 01:32:34 -06:00
Eric Wasylishen e660182c37 testqbsp: readd "-nopercent" as test output is too verbose without 2022-06-27 01:20:16 -06:00
Eric Wasylishen 5624f7012a qbsp: moving PortalThru->Portal_VisFlood, Portal_EntityFlood to portals.cc for qbsp3 parity
also fixes to both to match qbsp3
2022-06-27 01:13:21 -06:00
Eric Wasylishen 4c2111bfd3 testqbsp: re-enable base1.map test as well as dm1.map (disabled by default as it's too slow on debug builds) 2022-06-27 00:33:04 -06:00
Eric Wasylishen 22f0def4b1 update Catch2 to v3.0.1 2022-06-26 13:21:29 -06:00
Eric Wasylishen aabd1c27dc qbsp: face_t: make contents, lmshifts single sided
side_t: same, also remove contents (unused)
2022-06-24 01:14:11 -06:00
Eric Wasylishen afec0a947e qbsp: change bspbrush_t.sides from face_t to side_t 2022-06-24 00:43:40 -06:00
Eric Wasylishen fac5ea384d qbsp: rename bspbrush_t.faces to .sides 2022-06-24 00:21:55 -06:00
Eric Wasylishen b37d29ee33 common: rename side_t -> planeside_t (side_t is used by qbsp3) 2022-06-24 00:16:46 -06:00
Eric Wasylishen 4a1c5842a3 qbsp: rename solidbsp.cc -> brushbsp.cc for consistency with qbsp3 2022-06-24 00:08:12 -06:00
Eric Wasylishen 038651fca6 qbsp: rename brush_t -> bspbrush_t for consistency with qbsp3 2022-06-24 00:01:02 -06:00
Jonathan ee596f3ff1 use vector for vis state
set autoclean default to true, make it invertable
2022-06-23 16:18:52 -04:00
Eric Wasylishen 92af2ed3f7 qbsp: restore weird 1 unit bounds shrinkage Q1 needs 2022-06-22 22:37:09 -06:00
Eric Wasylishen af802d5447 qbsp: fix model bounds 2022-06-22 22:23:14 -06:00
Eric Wasylishen 84263ef1a1 testqbsp: add model bounds test map 2022-06-22 22:11:40 -06:00
Eric Wasylishen b99ea58ed7 testqbsp: q1 leaf/node bounds tests 2022-06-22 21:43:41 -06:00
Eric Wasylishen f84c794668 testqbsp: make "origin" test accept legacy ericwtools output 2022-06-22 21:43:41 -06:00
Jonathan 0fa779afaa Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-22 14:43:57 -04:00
Eric Wasylishen c054db0f48 testqbsp: shouldn't use -keepprt as the tests are checking for the .prt files 2022-06-21 23:46:13 -06:00
Jonathan 54ac8123e3 use old WindingIsTiny 2022-06-22 01:02:12 -04:00
Eric Wasylishen b77c25dcd4 qbsp: fix -keepprt 2022-06-21 22:05:54 -06:00
Jonathan 60df9eba81 disable `ChooseMidPlaneFromList` to fix regression 2022-06-21 21:07:26 -04:00
Eric Wasylishen 8332c78871 testqbsp: flag water_detail_illusionary as mayfail 2022-06-21 17:25:56 -06:00
Eric Wasylishen 40f370dbd5 Merge branch 'portalfaces' into brushbsp 2022-06-21 16:25:19 -06:00
Jonathan 36a8327452 cherry-pick 812159312e from @Shpoike
Don't strip extended mip data.
2022-06-21 14:11:58 -04:00
Eric Wasylishen 7e1ede2ac3 qbsp: remove old face creation code 2022-06-21 02:01:52 -06:00
Eric Wasylishen 57473f7b4a Merge branch 'brushbsp' into portalfaces 2022-06-21 01:45:14 -06:00
Eric Wasylishen 98e27cf620 testqbsp: improve water_detail_illusionary test 2022-06-21 01:16:55 -06:00
Eric Wasylishen 6be54eadb0 testqbsp: improve water_detail_illusionary test 2022-06-21 01:05:41 -06:00
Eric Wasylishen b3f88d6797 qbsp: remove redundant MergeAll call 2022-06-21 00:40:31 -06:00
Eric Wasylishen 84e007b7ce qbsp: fix noclipfaces tests 2022-06-21 00:39:07 -06:00
Eric Wasylishen e39c8f9cf6 qbsp: fix simple_worldspawn_detail_wall 2022-06-20 23:05:56 -06:00
Eric Wasylishen 6770d8aa34 testqbsp: remove mayfail 2022-06-20 20:56:19 -06:00
Eric Wasylishen 1c4b90a032 qbsp: fix detail_illusionary_noclipfaces_intersecting 2022-06-20 20:53:56 -06:00
Jonathan df3e6d3988 remove Little* funcs, not used any more
remove byteswap as it wasn't used any more
re-introduce imemstream and omemstream to make it harder to accidentally use the wrong operators
add dynamic padding stream manipulator
use memstreams for BSPX
2022-06-20 21:39:08 -04:00
Jonathan c79e263753 simplify bspx code
remove old obj preview for wrnormals
2022-06-20 20:42:34 -04:00
Jonathan e422da15c3 simplify OutsideFill_Passable 2022-06-20 11:58:40 -04:00
Eric Wasylishen 83c1316cdd docs 2022-06-20 02:25:02 -06:00
Eric Wasylishen 4d30257907 testqbsp: fix test expectation for detail_illusionary_noclipfaces_intersecting 2022-06-20 02:23:06 -06:00
Eric Wasylishen b35233afa2 qbsp: fix assertion failure in qbspfeatures.map 2022-06-19 19:53:58 -06:00
Eric Wasylishen 5c5e6e1ea7 qbsp: fix brush_clipping_order 2022-06-19 17:32:18 -06:00
Eric Wasylishen 4f3ca8c252 qbsp: wip import MarkVisibleSides from qbsp3 2022-06-19 16:04:54 -06:00
Eric Wasylishen 59d6169b3d qbsp: add a test of just a cube 2022-06-19 16:04:54 -06:00
Eric Wasylishen 5fc6cbc95e qbsp: wip import MakeFaces from qbsp3 2022-06-19 16:04:54 -06:00
Eric Wasylishen 276b62e30a Revert "first attempt at clustering leaffaces together"
This reverts commit a41c68886a.
2022-06-18 16:26:31 -06:00
Eric Wasylishen 0a424ca79c testqbsp: add a markfaces test to simple_sealed 2022-06-18 16:26:28 -06:00
Eric Wasylishen 3492ef2b9e qbsp: fix invalid leaf bounds in MakeTreePortals_r 2022-06-18 16:13:00 -06:00
Eric Wasylishen ccf605794e qbsp: throw exception in ExportLeaf if a leaf bounds is invalid
add check in test suite that qbspfeatures.map doesn't get upgraded to BSP2 due to invalid leaf bounds
2022-06-18 16:11:29 -06:00
Jonathan ea985eb5ac Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-18 17:29:13 -04:00
Jonathan a41c68886a first attempt at clustering leaffaces together 2022-06-18 17:07:36 -04:00
Eric Wasylishen 6fb3bf957a qbsp: detail seals in q2 test passes now 2022-06-18 13:48:30 -06:00
Eric Wasylishen b91973bae1 qbsp: remove old/unused portal code 2022-06-18 13:44:24 -06:00
Eric Wasylishen 8d5978dcc2 qbsp: switch to qbsp3 implementation for MakeTreePortals
Quick update to outside filling to remove cluster handling, because now we perform filling with
all leaf portals
2022-06-18 13:42:41 -06:00
Eric Wasylishen 158c65b056 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-18 12:53:53 -06:00
Jonathan 7eedf52bf4 sync up BaseWinding checking
add constructor to aabb to construct from range
2022-06-18 14:33:16 -04:00
Jonathan 6a310de784 sort brush result sets by file order for determinism 2022-06-18 13:54:07 -04:00
Eric Wasylishen b14aaff705 qbsp: switch over to CreateVisPortals_r 2022-06-18 11:46:51 -06:00
Eric Wasylishen 501ccda2d1 qbsp: don't attempt to parallelize portal generation 2022-06-18 11:46:40 -06:00
Eric Wasylishen 214a2550f4 qbsp: isolate portal_state_t in prtfile.cc 2022-06-18 00:32:40 -06:00
Eric Wasylishen 1fb5753f60 qbsp: import CreateVisPortals_r from qbsp3 2022-06-17 23:59:19 -06:00
Eric Wasylishen 65e6fafb3e qbsp: import MakeNodePortal, MakeTreePortals from qbsp3 2022-06-17 23:52:33 -06:00
Eric Wasylishen 7d3b5a9c3f qbsp: import SplitNodePortals from qbsp3 2022-06-17 22:34:36 -06:00
Eric Wasylishen af2dd987d8 qbsp: import BaseWindingForNode from qbsp3 2022-06-17 22:10:11 -06:00
Eric Wasylishen 3e2045479b qbsp: move .prt writing to prtfile.cc to align with qbsp3 2022-06-17 20:31:37 -06:00
Eric Wasylishen 9423e68e9f qbsp: fix _noclipfaces 2022-06-17 17:55:17 -06:00
Eric Wasylishen 2248b8cd73 testqbsp: add more portal assertions 2022-06-17 02:41:39 -06:00
Eric Wasylishen 00d9d403ea testqbsp: fix wrong winding constructor being chosen 2022-06-17 01:58:26 -06:00
Eric Wasylishen 259d95e47c testqbsp: add a first portal test 2022-06-17 01:53:08 -06:00
Eric Wasylishen da346a931a testqbsp: quick setup of code to run test suite against a reference q1 compiler 2022-06-17 00:59:18 -06:00
Eric Wasylishen 7ac4012f92 testqbsp: replace map.leakfile checks with checking .prt file existence 2022-06-16 23:33:55 -06:00
Eric Wasylishen 0edd52517a testqbsp: read .prt files back in 2022-06-16 23:22:15 -06:00
Eric Wasylishen f1823f30fa testqbsp: rename LoadTestmap -> LoadTestmapQ1 2022-06-16 23:05:00 -06:00
Eric Wasylishen 8c90c5c3dc qbsp: fix dangling std::string access through string_view 2022-06-16 20:58:46 -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 83271c5dac Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-16 17:06:45 -06:00
Jonathan 5855ab3528 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-16 12:06:45 -04:00
Jonathan 41ef66190f consistency rename; gtexinfo_t -> mtexinfo_t 2022-06-16 09:36:31 -04:00
Jonathan 617cd3b089 consistency rename; texdata_t -> maptexdata_t 2022-06-16 09:35:46 -04:00
Jonathan c62480c337 consistency rename; mtexinfo_t -> maptexinfo_t 2022-06-16 09:35:08 -04:00
Eric Wasylishen b8dcc7535e qbsp: rename FreeAllPortals -> FreeTreePortals_r 2022-06-15 23:27:39 -06:00
Eric Wasylishen dfb8d7c9fc qbsp: refactoring portal code towards qbsp3 2022-06-15 21:37:19 -06:00
Eric Wasylishen 7ffae0754c Merge remote-tracking branch 'github-desktop-paril/type-cleanup' into brushbsp 2022-06-15 19:15:48 -06:00
Jonathan 8afcc54b74 move making contents valid from brush parsing into gamedef 2022-06-15 09:07:37 -04:00
Eric Wasylishen 3474dd00c5 qbsp: add portal_t::onnode, tree_t from qbsp3 2022-06-15 00:45:58 -06:00
Eric Wasylishen 27baeb8657 testqbsp: add check for no bspx lumps 2022-06-14 23:48:49 -06:00
Eric Wasylishen f5ed79c936 qbsp: fix dangling std::string access through string_view 2022-06-14 21:33:48 -06:00
Jonathan 7911782a3b only use alias data if it's classname or if it's not overridden 2022-06-14 19:37:36 -04:00
Jonathan 23ae3edd56 implement entity aliases 2022-06-14 18:47:44 -04: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 54c3103bdc mark it as warning 2022-06-14 10:50:47 -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 bf36bd56f7 qbsp: fix qbsp_q1_sealing test case 2022-06-14 02:03:50 -06:00
Eric Wasylishen a309e8467b testmaps: add qbsp_q1_sealing.map 2022-06-14 00:44:50 -06:00
Eric Wasylishen 0266507833 testqbsp: tag qbsp_q2_detail_seals as mayfail 2022-06-13 23:37:46 -06:00
Eric Wasylishen 4e7ecbf9ff testqbsp: add qbsp_q2_detail_seals 2022-06-13 22:50:01 -06:00
Eric Wasylishen 1cddbf1ad9 testqbsp: add qbsp_q2_seal_empty_rooms 2022-06-13 22:39:04 -06:00
Jonathan 7b38f24ae8 Q2 doesn't use the old animation method 2022-06-13 07:26:23 -04:00
Jonathan b2a0f8039e remove dm/start/coop checking
remove entity target(name) checking; as mods and maps get more complex, this is best left up to the editors to use the FGD to report these things.
2022-06-13 07:10:53 -04:00
Jonathan 81686200c3 simplify illusionary line (hullnum is never > 0 for Q2 or the wrbrushes hull) 2022-06-13 07:02:02 -04:00
Jonathan 4e2e1c9bb3 default filltype to auto, which uses outside for hullnum > 0 and inside otherwise (lower leaf & node counts) 2022-06-13 06:19:58 -04:00
Jonathan 12caf1bcd4 move transsky/transwater code into portal_can_see_through 2022-06-13 02:34:39 -04:00
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 c5141e7a30 remove unused counters
only print nodefaces for the main BSP
2022-06-12 11:33:18 -04:00
Jonathan 215ae86566 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-12 03:35:49 -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
Eric Wasylishen 4fde404e6b testqbsp: mark q2_liquids as [!mayfail] for now 2022-06-12 00:27:36 -06:00
Jonathan 93291b21fc Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-12 02:24:32 -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
Eric Wasylishen c5b84d9eb7 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-11 14:07:21 -06: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 0dfeff934a fix test failures introduced from noclipfaces change 2022-06-11 08:38:30 -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 948d3463ba testqbsp: Add q2_liquids test 2022-06-11 01:21:17 -06: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 66063168f6 testqbsp: all q2 tests pass against these tools + q2tools-220 2022-06-10 20:30:20 -06:00
Eric Wasylishen b3cedd7fed testqbsp: adjust detail test case to pass in q2-220 tools 2022-06-10 20:21:00 -06:00
Eric Wasylishen c878a11f1d testqbsp: fix detail test expectations 2022-06-10 20:14:54 -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
Eric Wasylishen 31ab4546a3 testqbsp: update playerclip test expectation to match q2tools_220 2022-06-10 19:00:19 -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 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 014e0d8aaa qbsp: replace some contents.extended reads with new is_detail_*() getters 2022-06-10 00:07:01 -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 5025985348 testqbsp: hide current test failures 2022-06-09 23:20:19 -06:00
Eric Wasylishen f15e3b958a testqbsp: fix some test expectations to match q2tools 2022-06-08 01:02:00 -06:00
Eric Wasylishen c8841fb1bf testqbsp: add lavawater test 2022-06-08 01:01:17 -06:00
Eric Wasylishen 6c3b8a9413 Merge branch 'type-cleanup' into brushbsp 2022-06-07 20:05:02 -06:00
Eric Wasylishen 4941a86cbe qbsp: rest of fix for qbsp_q2_bmodel_collision, only needed on type-cleanup branch 2022-06-07 19:49:39 -06:00
Eric Wasylishen 0326374d68 testqbsp: bmodel collision issue where world and bmodel are interfering 2022-06-07 19:27:42 -06:00
Eric Wasylishen 633aaf3954 testqbsp: mark lavaclip test as [!mayfail] 2022-06-07 19:27:16 -06:00
Jonathan d348a4cb6b fix nodes getting negative planes from certain splits
# Conflicts:
#	include/qbsp/brush.hh
#	qbsp/solidbsp.cc
2022-06-07 20:31:28 -04:00
Jonathan cc8719cb84 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-07 20:30:19 -04:00
Jonathan 3d539b9660 fix nodes getting negative planes from certain splits 2022-06-07 20:30:10 -04:00
Eric Wasylishen ad8e6a7a75 testqbsp: bmodel collision issue where world and bmodel are interfering 2022-06-07 17:05:03 -06: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 80664675aa fix extra LMSHIFT lump 2022-06-06 04:20:34 -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
Eric Wasylishen e3892617ed testqbsp: add testmap for q2 lava intersecting clip (fails currently) 2022-06-03 23:29:23 -06:00
Jonathan d05b8fc3db don't output texinfo for SKIP faces - rendered faces won't reference them anyways (unless includeskip is on) 2022-06-02 18:59:51 -04:00
Jonathan a7afc4fbb5 fix infinite loop chain again 2022-06-02 14:31:23 -04:00
Jonathan 9bce4fd80a move the sky|nodraw fix to an earlier stage 2022-06-02 12:18:58 -04:00
Jonathan 6ba71cb1b9 Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup 2022-06-02 10:23:44 -04:00
Jonathan 464b87f095 remove a debugbreak
"fix" broken q2 maps
2022-06-02 10:23:39 -04:00
Eric Wasylishen 0eeabaeb21 qbsp: fix incorrect return in FindAreas 2022-06-01 23:21:43 -06:00
Jonathan 1f28be4a4c Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup 2022-06-02 01:05:48 -04:00
Jonathan 11f937f0ad add mottling that was used for _minlight on objects in Q2 maps
fix _minlight for Q2
set up a few better defaults for Q2
temp-ish fix for areaportals
2022-06-02 01:05:41 -04:00
Eric Wasylishen d43f10ae2b qbsp: fix areaportals touching detail 2022-06-01 22:01:48 -06:00
Jonathan aad711bb73 HACK: always connect bmodels to their brushes. this is temporary until we can figure out why the node bounds are wrong 2022-06-01 18:45:02 -04:00
Jonathan f64c8e7160 remove Q2_CONTENTS_TRANSLUCENT on load, since it breaks stuff
more areaportal fatal -> warning
2022-06-01 18:36:09 -04:00
Jonathan 8b4bd6deeb non-recursive method for animated textures; makes it easier to follow and makes sure the chain ends in -1 2022-06-01 17:42:37 -04:00
Jonathan 487c0fa1c6 Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup 2022-06-01 15:30:32 -04: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 442a7d0484 testqbsp: add tests for qbsp_angled_brush.map, qbsp_sealing_point_entity_on_outside.map 2022-05-24 20:04:08 -06:00
Eric Wasylishen 5a0d6bbeef testqbsp: add qbsp_func_detail.map test case 2022-05-24 19:51:32 -06:00
Eric Wasylishen c051834ef5 Merge branch 'type-cleanup' into brushbsp 2022-05-22 13:37:33 -06:00
Eric Wasylishen e4f6201bbe testbqsp: add simple_sealed_rotated 2022-05-22 13:36:19 -06:00
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