Commit Graph

176 Commits

Author SHA1 Message Date
Jonathan 9bce4fd80a move the sky|nodraw fix to an earlier stage 2022-06-02 12:18:58 -04:00
Jonathan 464b87f095 remove a debugbreak
"fix" broken q2 maps
2022-06-02 10:23:39 -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
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 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
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 bc90198006 qbsp: move wal_cache to map struct 2022-05-14 15:29:58 -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
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
Jonathan b7fbf28e51 fix .wal loading (Again...) 2022-04-27 14:57:40 -04:00
Jonathan c81e9ace28 remove old threading code entirely
add new parallel logging stuff in common/parallel which wraps parallel_for(_each) and provides automatic percentage indicator
fix issue with light not pulling in settings
move logging stuff into its own namespace and simplify
2022-03-01 10:28:59 -05:00
Jonathan cca64bf0da Fix another cmdargs bug
Fix areaportal warning
2022-02-27 05:55:26 -05:00
Jonathan df92d9ce12
Command line args systems (#2)
* cmd

* cmake change for tbb DLLs
add in test for double-hyphens

* cmd

* game version

* settings!

* bsp texture usage
decompile fix for q1bsp

* finish up the options for qbsp

* light finished?

* finish up the few missing bits

* move scalar/int32 up

* Run clang-format pass

* natvis for our mathlib
use slightly faster storage for winding
fix light tests

* allow dictionary to be a base type

* re-run style

* Remove cfg_static
Fix options summary

* natvis for lockable_value<T>

* last-ish pass?

* format

* forgot last few lockables
2022-02-27 00:01:57 -05:00
Eric Wasylishen 1e79abafa0 qbsp: q2: fix empty optional access when compiling q2 map lacking extended flags 2022-02-20 16:25:46 -07:00
Jonathan b0ece93f83 Fix/implement animated textures for Q2 2022-02-16 19:23:19 -05:00
Jonathan 15484b55f8 Use better tjunction vertex addition
Parallel MergeAll
Allow modifyable iterators from polylib; resizing may invalidate them however
2022-01-28 09:45:29 -05:00
Jonathan 4f32722dfc Multiply bounds by 2 so we have less room for leaks 2022-01-27 04:08:31 -05:00
Jonathan d076920665 Revert "Instead of calculating brush extents globally, do it per brush creation"
This reverts commit 069720078f.
2022-01-27 01:52:08 -05:00
Jonathan 069720078f Instead of calculating brush extents globally, do it per brush creation
Use portal node bounds for extents
2022-01-27 01:03:38 -05:00
Jonathan 3f37de95a5 Fix tests 2022-01-26 18:15:53 -05:00
Jonathan 571e7337fc Fix the temporary hintskip detection and finally move it to gamedef
Dynamic extent calculation - turned on by default - will automatically determine the extents used for winding_from_plane beforehand. On a 50kb .map file it only takes about 10ms, so for the majority of maps it should be instantaneous.
2022-01-26 18:03:31 -05:00
Jonathan 674be0c812 Fix a few messages (missing newlines, period in wrong place)
Use fragments to store TJunction bits instead of having them in separate-but-chained faces
2022-01-25 03:23:39 -05:00
Jonathan 1764afb475 Revert "Revert "make brush::faces a vector""
This reverts commit 11d2d51165.

Fixes implementation - was swapped logic in brush bevels
2022-01-24 14:55:21 -05:00
Jonathan 11d2d51165 Revert "make brush::faces a vector"
This reverts commit 30c7ef94ac.

This was causing issues with bevel brushes in Q2 mode. Not sure why yet. Will attempt this again soonish.
2022-01-24 14:26:28 -05:00
Jonathan be865bc5b8 Fix `face_get_contents` not handling hintskip properly
Simplify `Brush_GetContents` and use the first non-skip face as the base contents
Move period out of `LoadExternalMap` error message so it doesn't confuse the reader
Fix `WriteEntitiesToString` crashing on entities without any brushes (note: need a column/line on mapentity in future)
2022-01-23 23:18:59 -05:00
Jonathan 6c20e49cc3 change the flow of `face_get_contents` a bit; move earlier code into this block
remove `Brush_IsDetail`, as it's legacy and not required any more
MIST is no longer automatically "CFLAGS_DETAIL_ILLUSIONARY"
MIST/AUX default to _mirrorinside 1 if it's not set, matching vanilla behavior
2022-01-22 21:26:57 -05:00
Jonathan 6895fea115 Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup 2022-01-22 17:55:42 -05:00
Jonathan 8dbb18cc94 Use stem() instead of filename() when we're only wanting to change filename without extension 2022-01-22 17:55:37 -05:00
Eric Wasylishen c31edc6599 qbsp: FindMiptex: fix empty optional access when a .wal couldn't be found 2022-01-22 15:32:14 -07:00
Jonathan 008d6db056 Fix detail for Q2 maps
Simplify winding::flip
Add an assert that a generated surface has a non-empty bounds (have a map that generates a face with 0,0,0 bounds)
2022-01-20 19:25:58 -05:00
Jonathan 53b4f640e2 use vector<brush_t> directly now 2022-01-17 11:06:13 -05:00
Jonathan 1a0b8c724a use vector of unique_ptrs for brushes; temporary, going to simplify it further 2022-01-17 10:42:24 -05:00
Jonathan 30c7ef94ac make brush::faces a vector 2022-01-17 09:49:10 -05:00
Jonathan 10fa97e6b8 Use string_view where appropriate for parser, add some additional constructors for ease of use 2022-01-16 04:17:06 -05:00
Eric Wasylishen f02bbca0c7 parser: fix reading past end of buffer 2022-01-15 18:31:35 -07:00
Jonathan e2d64e0e5d FS simplification
Fix transparency calculation (33% is 33% opacity, not 33% transparency)
2021-12-20 14:51:14 -05:00
Jonathan 0c827208ec Allow `-subdivide 0` to turn off subdivision
imglib now lives in common
fs 'load' split into two functions, where and load. the former allows you to query for and return archive & path for a given file, whereas the latter handles that for you.
use log verbose in light rather than own verbose flag
2021-11-21 15:08:02 -05:00
Jonathan 8cadf06d81 New FS!
First FS test: use it for decompile for Q2 to prevent unnecessary suffixes
2021-11-05 19:25:37 -04:00
Jonathan c37ec80667 Implement game-agnostic Brush_GetContents 2021-10-26 09:13:48 -04:00
Jonathan 1ccbe9e12c wrbrushes lump using streaming now
temp(?) fix for structural covered by detail
2021-10-25 19:24:07 -04:00
Jonathan e0ed70cc87 no more Vector! 2021-10-25 10:38:15 -04:00
Jonathan e1695ebfd3 VectorAdd & simplify TexDef_BSPToBrushPrimitives (needs testing) 2021-10-25 08:39:29 -04:00
Jonathan a5f8ecd471 VectorSubtract 2021-10-24 23:26:20 -04:00
Jonathan 3c2ca93b0c normalizeInPlace no longer nodiscard since you might want to only normalize the ref
remove VectorNormalize
2021-10-23 13:34:12 -04:00
Jonathan 74253fd189 Fixed Unix/Clang compilation
Adjusted makefile to work with both clang and msvc on win32
Removed "WIN32", use the standard _WIN32 instead
Fixed bad VectorCopy's
Use qvec4b instead of special color_rgba type
qvec now follows built-in type procedures for handling operators; this means that (qvec3i + qvec3f) will now properly produce a float, as one would expect, instead of adding the float to the integers without casting to the common type.
2021-10-23 07:35:41 -04:00
Jonathan 04e88085b6 Fix concave angle being clamped incorrectly
Use abs for phongdebug - matches q2rtx and seems to look nicer overall
Fix lightsurf snormal being calculated wrong
2021-10-22 04:22:54 -04:00