Commit Graph

643 Commits

Author SHA1 Message Date
Jonathan 15b9a78fd1 fix gate being incorrect
add surflight grouping
fix minlight on color'd _surface lights
2022-12-05 20:35:44 -05:00
Eric Wasylishen f66e4790a4 qbsp/light: add no_phong texinfo flag (currently not used/exposed) 2022-12-01 01:16:17 -07:00
Eric Wasylishen 1065adecc6 qbsp/light: implement _phong_group key, equivalent to Q2 "value" field 2022-12-01 00:25:05 -07:00
Eric Wasylishen 96bdf141bb light: block phong if certain surfflag bits differ between the two faces
this prevents liquids from phonging with solids
2022-11-30 22:15:58 -07:00
Eric Wasylishen ab78b43c52 decompile: BuildInitialBrush_Q2: prefer earlier brush sides
fixes issue with bevels sometimes being used to texture faces,
which have randomly wrong texture projections
2022-11-26 19:34:25 -07:00
Jonathan 96e88cfab1 allow a .map to be updated with a .ent file as input using replace-entities 2022-11-25 04:51:00 -05:00
Eric Wasylishen f7370db0be decompile: avoid generating three points from micro-faces 2022-11-25 01:05:41 -07:00
Eric Wasylishen 8b82460201 decompile: output source brush number 2022-11-25 00:32:31 -07:00
Eric Wasylishen 743e177694 decompile: BuildInitialBrush_Q2: fix handling of redundant planes 2022-11-25 00:32:18 -07:00
Eric Wasylishen 04adb17b1b qbsp: fix -nodetail in q2 mode 2022-11-21 00:10:26 -07:00
Eric Wasylishen 5d3fab75b6 light: allow .wal_json metadata to contain "light": [ r, g, b ] to override emissive color
Use this to fix the "emissive lights" test case so it can run on CI without any texture data
2022-11-20 23:01:05 -07:00
Eric Wasylishen 91a0c8e86a test_ltface.cc: add assertions to catch command line options leaking
across tests
2022-11-19 18:41:46 -07:00
Eric Wasylishen c9111b2a6c
Merge pull request #337 from TTimo/colorcodes
Enable support for ANSI color codes on Windows 10 and newer, without …
2022-11-19 09:10:24 -08:00
Eric Wasylishen 9ab4ea8176 Move SetConsoleMode() call to logging::preinitialize(); helper
Don't do ENABLE_VIRTUAL_TERMINAL_INPUT as it breaks arrow key history
navigation in Windows Terminal after running one of the ericw-tools exe's.
2022-11-19 10:05:14 -07:00
Eric Wasylishen 4c218f5e91 common: factor out LMSCALE_DEFAULT = 16.0; 2022-11-15 23:52:34 -07:00
Eric Wasylishen 629f86625e log.cc: use fmt::group_digits to avoid locale manipulation
this is to get thousands separators, e.g. 10000 prints as 10,000

the `auto old = std::locale::global(std::locale("en_US.UTF-8"));` line was throwing
on Win8.1
2022-11-13 18:58:08 -07:00
Eric Wasylishen d7acd046c3 light/qbsp: add _surflight_rescale key 2022-11-12 17:07:02 -07:00
Eric Wasylishen e6cec0eb5e qbsp: fix _mirrorinside 0 in q2 mode 2022-11-06 23:53:06 -07:00
Eric Wasylishen 928bbf3dee default -lowpriority to true
makes no difference to tool runtime (31.9s -> 31.4s for a light run), avoids unnecessarily making
Windows unusable
2022-11-06 17:06:35 -07:00
Eric Wasylishen ca45f06bdf bspinfo: fix format string 2022-11-04 00:53:34 -06:00
Eric Wasylishen 221ea65efb light: fix -world_units_per_luxel on sloped faces 2022-11-03 23:45:47 -06:00
Eric Wasylishen ca0efbf3d3 light: wip -world_units_per_luxel and DECOUPLED_LM BSPX lump 2022-11-03 02:39:15 -06:00
Eric Wasylishen eb2d697cef faceextents_t: refactor to store world <-> lm matrices rather than tex space <-> lm 2022-11-02 09:39:20 -06:00
Eric Wasylishen 1f01b65873 faceextents_t: rename texextents/texmins 2022-11-02 09:27:41 -06:00
Eric Wasylishen 02202b81bb faceextents_t: move texmins out of structure 2022-11-02 09:21:42 -06:00
Eric Wasylishen f3cc0907c8 faceextents_t: refactor to remove lightmapshift member 2022-11-02 00:56:23 -06:00
Eric Wasylishen c39ee38454 qvec: add 3x3 matrix inverse, row major factory method 2022-11-02 00:32:06 -06:00
Eric Wasylishen 388cd39821 common: parser: fix compile time of parser_source_location 2022-10-31 23:06:20 -06:00
Eric Wasylishen 2bd2515792 all: cleanup unused includes (Clion - detect not directly used) 2022-10-31 21:37:34 -06:00
Eric Wasylishen 728fafde8c light: remove dead code 2022-10-30 18:00:48 -06:00
Eric Wasylishen 586204a6bc bspinfo: fix half-texel error in .obj lightmap preview 2022-10-29 22:47:35 -06:00
Eric Wasylishen a70ef5ea7b bspinfo: log the .obj/.png creation (lightmap preview) 2022-10-29 22:37:26 -06:00
Eric Wasylishen 53a0be5e50 build: compile time optimizations 2022-10-26 23:30:02 -06:00
Eric Wasylishen 34f32f851c common, qbsp: more functions moved from header -> source 2022-10-26 23:29:54 -06:00
Eric Wasylishen 501ced4bfe qbsp: restore func_detail_wall support 2022-10-21 18:33:38 -06:00
Eric Wasylishen 636b376577 squash brushbsp-compilation-speedup branch
move function implementations out of headers
2022-10-21 18:00:58 -06:00
Jonathan 315ab418d2 fix warning
only enable the clock counter errors in debug
2022-10-02 16:20:27 -04:00
Eric Wasylishen 73713c8666 common: try precompiling some std headers 2022-09-29 22:24:22 -06:00
Eric Wasylishen 1726f95484 use <fmt/core.h> instead of <fmt/format.h>
Should lighten compile times.

The only loss here is we'll no longer inherit e.g. "float" format specifiers for qvec3f.
2022-09-29 19:49:48 -06:00
Jonathan 25cbbd42aa fix phong calculation
obj output adjustment
2022-09-21 05:35:11 -04:00
Jonathan 4ecd945587 use kmq2 flag instead of 33 | 66, which no engine supports 2022-09-10 07:49:06 -04:00
Jonathan 075481a36f add -nocolor for TB, etc
fix crashes on vis and light for invalid options
fix TB and others not receiving output
2022-08-31 12:58:04 -04:00
Eric Wasylishen 2f7ca41638 bspfile: fix typo in deriving basedir from gamedir 2022-08-27 14:21:43 -06:00
Eric Wasylishen d037b67be9 bspfile: log basedir and gamedir 2022-08-27 14:19:27 -06:00
Jonathan f6601a7c85 clean up the output table for BSPs
add a specialized stream buffer which just tracks how much would be written to it; used to get the output size of the texture lump, since that's no longer tracked
display dmodel byte size
display BSPX lumps a bit differently (no need to repeat BSPX per line)
add header to both lists, to make it more obvious what's coming up
2022-08-22 13:02:58 -04:00
Jonathan fe41b1ae1b fix format error for Q1 contents
re-introduce chop since it may be a key to the puzzle for hullnums
allow caller to do full fragmentation, add option to force it
fix BrushGE causing liquids, etc to be cut up
2022-08-21 16:16:09 -04:00
Jonathan 282c5ec69f stat printing adjustments 2022-08-21 15:01:45 -04:00
Eric Wasylishen c0c146d47c bsputil: move decompiler to common 2022-08-19 20:49:34 -06:00
Eric Wasylishen f5a8bc7b99 bsputils: add a helper struct for checking clipnode identity 2022-08-15 23:06:00 -06:00
Jonathan f7b8f85ece use an optional<uint8_t> to store hull number, which gets rid of special -1 collision hull number.
fixed no-hull always chopping even with chop off
2022-08-15 06:13:30 -04:00
Eric Wasylishen 06a116670b winding_t: make non-copyable 2022-08-12 02:06:23 -06:00
Jonathan 8b9c1bd784 fix missing includes 2022-08-12 02:42:52 -04:00
Jonathan bf162c7a86 allow explicit calling of percent_clock so it can be simplified a bit
add more timers in a few spots
by default, display percent timers but don't display elapsed for non-verbose stuff (bmodels); this is so it still shows that it's "working" instead of just showing blank for large maps, give user an idea on progress for certain stuff
merge all "side not found"s into a single line
time `FillOutside`
time `ProcessMapBrushes`
time `Brush_LoadEntity`
2022-08-12 01:30:04 -04:00
Jonathan 4bf2ab338c allowing logging::percent to handle indeterminate values
fix logging::percent getting stomped in multi-threaded operations
add new stats facility to make creating lists of single-use stats easier to manage
fix SplitBrush storing a bunch of extra stats for ChopBrushes
2022-08-11 20:33:12 -04:00
Jonathan 44eff2d7b1 throw in percent logging for MakeTreePortals
when node_t converts to leaf, destroy anything on it by re-initializing it
2022-08-09 20:33:49 -04:00
Eric Wasylishen f3b9de57c6 build: add tbbmalloc 2022-08-09 00:19:39 -06:00
Jonathan 335db1c0e4 move map_source_location to parser as parser_source_location since the locations actually come from there rather than from the map; now the parser keeps track of the location, so it's a bit easier to follow 2022-08-05 23:17:15 -04:00
Jonathan 24168c8e40 clang pass 2022-08-02 21:57:33 -04:00
Jonathan 93655913c0 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
# Conflicts:
#	include/qbsp/qbsp.hh
2022-08-02 06:24:46 -04:00
Jonathan 53adb9fed5 split winding_base_t into two types, so that we can switch out the backing storage
default winding_t for the main polylib to use heap-based, exact-memory-usage-only, winding
2022-08-02 06:09:20 -04:00
Eric Wasylishen e05a2bdf75 qbsp: "-add additional.map" feature 2022-08-01 19:13:10 -06:00
Jonathan 26a18d5cc3 add logging::header/funcheader to easily and consistently print function or "active routine" headers
add OOP percent_clock wrapper to make printing percents easier, not used yet
2022-08-01 09:35:21 -04:00
Jonathan b1b4cb0e09 try relative to current working dir if can't find archive (need to search relative to .map too) 2022-07-29 04:49:54 -04:00
Jonathan 7810875860 strip trailing spaces from keys 2022-07-28 20:41:43 -04:00
Jonathan 1d8a0c1df3 clang-format pass 2022-07-28 06:14:54 -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
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 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
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
Jonathan 8fc089aa34 fix lmscale with bounce lighting 2022-07-09 23:09:02 -04:00
Jonathan 72fc2f9e07 write out lightmaps by style ID, and do it faster 2022-07-09 01:36:26 -04:00
Jonathan 8696c6ee56 output all lightstyled lightmaps too 2022-07-09 01:36:25 -04:00
Jonathan b1a30496c3 fix bspx_lightmap not getting output by bspinfo
fix LMSTYLE getting output when there's no need for it from -novanilla
2022-07-09 01:36:25 -04:00
Jonathan 13245d14d6 don't crash on unlit maps 2022-07-08 03:45:14 -04:00
Jonathan 951464f52b allow SKY to be lightmapped (seems to be this way in vanilla maps) 2022-07-08 02:52:30 -04:00
Jonathan adc54dac61 fix bug with output of lmstyle/lmoffset lumps
bspinfo will output proper atlasses now
use faceextents_t everywhere
2022-07-08 02:06:07 -04:00
Jonathan 491071260e lightmap display, both vanilla and bspx 2022-07-08 02:06:07 -04:00
Jonathan 49bbfef253 fix trimming off last byte of BSPX on load 2022-07-08 02:06:06 -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 ba26bacb7c fix common tests 2022-07-06 20:13:40 -04: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 feaa15b712 only generate bounds if rays is enabled
don't lightmap sky again
2022-07-02 08:49:26 -04:00
Jonathan 74c2bb3385 Catch2 to 3.x again?
fix merge issue
2022-06-30 05:45:23 -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
Jonathan ee65e46d0a init palette for Q2 2022-06-30 02:43:25 -04:00
Jonathan 410106ff90 fix uninitialized memory 2022-06-29 14:27:00 -04: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 decee3ac83 Merge branch 'type-cleanup' into brushbsp 2022-06-28 10:35:29 -04:00
Jonathan aac5027ec6 simplify texture load 2022-06-28 10:35:17 -04:00
Jonathan c1dc3cb7d8 Merge branch 'type-cleanup' into brushbsp
# Conflicts:
#	include/common/bspfile.hh
2022-06-28 04:13:26 -04: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
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 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 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 92dd54c0b1 bspfile: fix is_any_solid() implementation to be just (contents.native & Q2_CONTENTS_SOLID) 2022-06-27 01:19:31 -06:00
Eric Wasylishen 22f0def4b1 update Catch2 to v3.0.1 2022-06-26 13:21:29 -06:00
Jonathan 7010cc7ed2 remove unnecessary includes from entdata 2022-06-23 19:07:10 -04:00
Jonathan 579140067f expose vector.size() using a subtype to not pollute winding_base_t 2022-06-23 18:42:38 -04:00
Jonathan cb3ef7b19f allow radlights to specify an entity dictionary instead (if the input is a .ent, it is an entity dict) which is more flexible 2022-06-22 17:03:00 -04:00
Eric Wasylishen d972a10152 parser: support quark comments 2022-06-21 22:05:27 -06:00
Eric Wasylishen 40f370dbd5 Merge branch 'portalfaces' into brushbsp 2022-06-21 16:25:19 -06:00
Jonathan 72914b4724 moving more raw pointers to vectors/smart pointers
support for radiosity _surface lights with `_surface_radiosity` key
allow lightstyles for _surface radiosity lights
bounce enabled by default on Q2
remove ValueForKey, use epairs directly
2022-06-21 13:41:51 -04:00
Eric Wasylishen 57473f7b4a Merge branch 'brushbsp' into portalfaces 2022-06-21 01:45:14 -06:00
Eric Wasylishen cacdad3481 contentflags_t::to_string: fix typo 2022-06-21 01:44:15 -06:00
Eric Wasylishen e39c8f9cf6 qbsp: fix simple_worldspawn_detail_wall 2022-06-20 23:05:56 -06:00
Eric Wasylishen 3276cfec56 wip 2022-06-20 22:23:00 -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 cd77b1a7e6 use vector as overflow instead of secondary storage for winding 2022-06-19 19:17:52 -04:00
Eric Wasylishen 4f3ca8c252 qbsp: wip import MarkVisibleSides from qbsp3 2022-06-19 16:04:54 -06: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 46aaa81ffd simplify/c++-ize CompressRow code and related areas (less allocations overall) 2022-06-17 12:06:37 -04: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 e57633bbca the old Safe read/writes are gonedy now 2022-06-16 20:22:03 -04:00
Jonathan 1431384b28 don't display mirror_inside/clips_same_type in to_string if, with the native contents value alone, it will have the same outcome as if it wasn't there at all 2022-06-16 13:52:12 -04:00
Jonathan 0f86849038 remove gamedef_generic; there's never any place where it could accidentally be used anyways. 2022-06-16 12:08:11 -04:00
Jonathan 5855ab3528 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-06-16 12:06:45 -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 41ef66190f consistency rename; gtexinfo_t -> mtexinfo_t 2022-06-16 09:36:31 -04:00
Eric Wasylishen 2a2ea90bc7 bspfile.cc: add missing 'override's 2022-06-15 19:22:35 -06: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 b9250d9243 fix Ubuntu build 2022-06-14 00:52:15 -06:00
Eric Wasylishen 6c613b2b51 fix clangcl build 2022-06-14 00:49:15 -06: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 be17bf7c7d fix mistype 2022-06-11 07:32:43 -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