Eric Wasylishen
72b39bc576
qplane3::operator-: implement "inverting" the normal as 0 - normal
...
to avoid introducing -0, for consistency with the old code, which tended to flip normals this way.
2021-10-24 14:47:02 -06:00
Jonathan
11c3511605
new normal calculation cherry-picked from branch
...
Fix entdata not having its '\0'
don't write unnecessary extended texinfo
2021-10-24 15:21:26 -04:00
Jonathan
3456f62a90
Smaller equalExact (probably should just get rid of this tbh)
...
Fix for ClosestPointOnLine
2021-10-24 14:20:24 -04:00
Jonathan
bfc854efcb
base64 bmp images for texture debug
...
Fix qv::length
2021-10-24 13:55:27 -04:00
Jonathan
d0e557b9cb
Fix BSPX on q2bsp
...
Fix normalize generating NaNs to match old behavior of generating zero on zero length
Remove extended texinfo file before potentially not writing new one
2021-10-24 06:56:31 -04:00
Jonathan
5f40d5a7ae
Fix segfault
2021-10-24 05:09:47 -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
fae69309a0
VectorLength
2021-10-23 13:24:25 -04:00
Jonathan
7c661a3759
distance-squared
2021-10-23 13:22:32 -04:00
Jonathan
865fbb0745
VectorMA
2021-10-23 13:20:43 -04:00
Jonathan
4dca2d7d07
VectorInverse, VectorSet, VectorClear gone
2021-10-23 13:15:38 -04:00
Jonathan
c607c0d98f
Fix extraneous maybe_unused's
...
Fix qmat::row
2021-10-23 09:34:33 -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
Jonathan
443be60a74
Compress texinfo a bit
2021-10-22 03:50:15 -04:00
Jonathan
a21be0362c
replace VectorCompare, CrossProduct, DotProduct
...
qv::dot handles inputs a bit more gracefully now
plane::distance_to for distance checks, and dplane has the fast version
2021-10-21 23:25:19 -04:00
Jonathan
cb3c81aaf8
vec3_t gonedy
2021-10-21 20:21:28 -04:00
Jonathan
fdeb7d34f5
missing file
2021-10-21 20:05:17 -04:00
Jonathan
84b4388f4b
Added a deprecation sniffer so I can find problematic areas later
...
Revert tjunc fixes
Add -notjunc to match other editors
Rid Light_Add since it's too simple
2021-10-20 04:27:22 -04:00
Jonathan
1bf6261826
constexpr/inline qv:: where appropriate
...
comment out rewrite test in bspinfo
updated tjunc code
2021-10-19 23:26:43 -04:00
Jonathan
95b47db922
More qmat/qvec where appropriate
...
Add a json.hh file which includes common JSON serialization types
surfflags_t::extended uses booleans instead of a bitflag for simplicity
JSON serialization for surfflags
2021-10-19 21:15:00 -04:00
Jonathan
46ea7b4822
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2021-10-19 16:39:49 -04:00
Jonathan
c11ad63358
Merge branch 'ericwa:master' into type-cleanup
2021-10-19 16:39:38 -04:00
Jonathan
a7de4bdae2
Remove unused thingies
...
Use qplane3 where we can
2021-10-17 06:24:02 -04:00
Jonathan
fd18fc154c
Fix various warnings by testing a clang-cl compile
2021-10-12 14:39:15 -04:00
Jonathan
c6393abdd9
Fix for qmat::qmat
2021-10-12 13:56:36 -04:00
Jonathan
e974285fe7
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2021-10-12 13:52:53 -04:00
Jonathan
e1290fd0f4
Snap normals/tangents/bitangents written from WriteNormals to save some bits
...
Texvec inherits mat<2, 4> now, since it's the most logical type for it to be based on.
2021-10-12 13:52:47 -04:00
Jonathan
e6fd6b653e
A few more vec3_t -> qvec
...
qmat follows other type conventions (T, N, M) and is annotated differently so it's not as confusing to follow
Removed qmat::operator[] - it's not clear from calling it that it's column-major (as evidenced by the comments needing to explicitly make clear at call sites that it's column, not row), so I've collapsed them into two separate functions that explicitly fetch either a column or a row. This also ties them nicely into qvec<N>.
2021-10-12 12:03:59 -04:00
Eric Wasylishen
b68b370147
bspfile: replace 'abstract' with '= 0' (abstract seems to be a C++/CLI keyword?)
2021-10-11 23:22:19 -06:00
Eric Wasylishen
15930bb573
testmaps: update e1m1 hashes to account for outside filling change
2021-10-11 23:18:24 -06:00
Eric Wasylishen
ebd3d4e5c2
testmaps: add qbsp_sealing_point_entity_on_outside.map
2021-10-11 22:50:32 -06:00
Eric Wasylishen
c88274f806
qbsp: outside.cc: rewrite with outside -> in filling
2021-10-11 22:40:26 -06:00
Jonathan
6ec134a1f0
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2021-10-11 19:46:04 -04:00
Jonathan
bd6bc0dc56
surfflags remap -> is_valid to match contentflags
...
warn on excessive key/value lengths, per-game
2021-10-11 19:45:55 -04:00
Eric Wasylishen
134c286b5e
qbsp: fix spurious leak in base1.map
2021-10-11 13:48:17 -06:00
Eric Wasylishen
a60581c99a
qvec: fix undefined behaviour in PolyCentroid
2021-10-11 12:59:37 -06:00
Eric Wasylishen
fe99d69d07
qvec: implement Google Test formatter
2021-10-11 12:55:06 -06:00
Eric Wasylishen
feb57abbe2
qvec.hh: build fix
...
qvec3f is defined lower in the file
2021-10-11 12:19:39 -06:00
Eric Wasylishen
41d125c32e
qbsp: add _omitbrushes to tell qbsp to discard all brushes in a func_
2021-10-10 12:25:47 -06:00
Jonathan
e2ba8d7b5a
fNoclip not required for Q2 any more
2021-10-10 14:12:02 -04:00
Jonathan
bd59be4d5d
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2021-10-10 14:04:16 -04:00
Jonathan
01b8abf93c
Removed a lot of unused functions
...
Moved vector-related operations from mathlib to qvec, moved a few into qv::
Use clamp/max/min directly instead of #define'ing them
Move a few single-use functions directly above their usages
2021-10-10 14:04:09 -04:00
Eric Wasylishen
a1609ae1e6
qbsp: add _omitbrushes to tell qbsp to discard all brushes in a func_
2021-10-09 15:22:27 -06:00
Eric Wasylishen
ed1982b782
testmaps: update expected .json output to account for nexttexinfo change
2021-10-09 13:06:16 -06:00
Jonathan
a8d5125321
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2021-10-09 14:14:54 -04:00
Jonathan
eb4bcf96dc
-includeskip for Q2RTX
...
Fix missing fmt include
Default nexttexinfo to -1 to match other tools
Fmt support for bspversion_t, use that instead of a static function
Cleanup write functions
2021-10-09 14:14:49 -04:00
Eric Wasylishen
f0f7722909
light: fix build
2021-10-09 11:48:18 -06:00
Eric Wasylishen
9dcef7839a
common: remove dead code (mesh_t, octree)
2021-10-09 11:40:35 -06:00
Eric Wasylishen
4accc4d56b
light: remove incorrect assertion face->lightofs != -1
...
This can happen for Q1 with a solid black face
2021-10-09 00:13:23 -06:00