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
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
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
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
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
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
9dcef7839a
common: remove dead code (mesh_t, octree)
2021-10-09 11:40:35 -06:00
Eric Wasylishen
76d0dae890
mathlib: GLM_InterpolateNormal: quick hack to fix build of testlight
2021-10-08 19:31:06 -06:00
Eric Wasylishen
5cf82ee023
qbsp: restore use of options.worldExtent
...
should fix minor precision differences in .prt files
2021-10-08 19:04:11 -06:00
Jonathan
1b1679fa22
normals are now a special tuple-ish type, so that we can calculate tangents and bitangents for Q2RTX if requested (currently it always does it, but we can fix that later)
...
always emit texinfo for q2 brush sides
2021-10-08 14:17:48 -04:00
Eric Wasylishen
d40e79ae29
mathlib: revert Q_rint to match master
...
The one on master returns 0 ==Q_rint(-0)
whereas the std::rint returns -0 == Q_rint(-0)
2021-10-07 19:08:34 -06:00
Jonathan
aa2a94e0a7
Uninitialized values aren't constexpr, changing these default constructors to inline
2021-10-06 03:43:30 -04:00
Jonathan
16d3bcc7c7
Revert "clang /macOS: un-constexpr things that were erroring"
...
This reverts commit 33745c3cb8 .
Value-initialize v which removes the need for the bottom `if constexpr` expression.
2021-10-06 03:42:46 -04:00
Eric Wasylishen
fd28067b5c
fix gcc errors about reference to temporary
2021-10-05 23:28:33 -06:00
Eric Wasylishen
07b24cce79
qvec: fix mat * mat on clang/gcc
2021-10-05 23:12:02 -06:00
Jonathan
cb9d90744f
More constexpr
2021-10-05 23:49:15 -04:00
Jonathan
75bcccada1
Fix more unused value warnings
...
Fix operator >= and <= for tuple of arrays
2021-10-05 23:40:40 -04:00
Jonathan
e72934de81
Hopefully resolve clang warnings here now
...
Fix iterator wrapper
Fix >= <= tuple<T&> operators
2021-10-05 23:24:05 -04:00
Jonathan
ca0111ce5d
Fix missing unordered_map
...
Maybe fix for tons of -Wunused-value
2021-10-05 23:00:13 -04:00
Jonathan
a2edc09018
Resolve GCC wanting `template` before emplacements
2021-10-05 22:54:25 -04:00
Jonathan
b4afc32e2b
Fix winding_edges using old get() name
...
Another attempted fix at VA_ARGS
Fix missing typename prefix
2021-10-05 22:44:13 -04:00
Jonathan
f4fc8bc72b
Remove unused functions, fix math issues
...
MacOSX potential fix for __VA_ARGS__
2021-10-05 22:35:30 -04:00
Jonathan
37cb535f1a
implement MSVC-style setp
2021-10-05 22:05:35 -04:00
Jonathan
81b7fbf916
Fix MSVC extension for setp
...
Fix PointsAlongLine
2021-10-05 21:38:04 -04:00
Jonathan
52839d4e7f
Run clang-format pass
2021-10-05 15:54:06 -04:00
Jonathan
7590230111
Merge remote-tracking branch 'remotes/origin/qbsp-contentflags' into type-cleanup
...
# Conflicts:
# bspinfo/bspinfo.cc
# common/bspfile.cc
# include/common/bspfile.hh
# qbsp/brush.cc
# qbsp/csg4.cc
# qbsp/portals.cc
# qbsp/qbsp.cc
# qbsp/solidbsp.cc
# qbsp/surfaces.cc
# qbsp/writebsp.cc
# vis/vis.cc
2021-10-05 01:21:16 -04:00
Jonathan
0833d84a7a
Calculate tangents and bitangents (need to clean this up)
...
Implement formatters for qvec
Add -nolighting, which skips all non-lightstyled lights
2021-10-05 01:07:13 -04:00
Eric Wasylishen
5b62f61b29
qbsp: revert contents handling to be closer to master
2021-10-04 20:39:47 -06:00
Jonathan
037c587352
Merge remote-tracking branch 'remotes/origin/qbsp-contentflags' into type-cleanup
...
# Conflicts:
# bspinfo/bspinfo.cc
# include/common/bspfile.hh
# include/light/light.hh
# include/light/trace.hh
# light/light.cc
# light/ltface.cc
# light/trace.cc
# qbsp/brush.cc
# qbsp/csg4.cc
# qbsp/outside.cc
# qbsp/qbsp.cc
2021-10-03 13:08:50 -04:00
Jonathan
ae4512da2c
BSPX structurization and cleanup
...
Some more vec3_t removals
A bunch of float -> vec_t in light
Simplified construction of lockables
mapdata_t writes directly to an mbsp instead of vector copies
2021-10-03 12:16:13 -04:00
Jonathan
792951792c
some more cleanup
2021-10-02 05:56:45 -04:00
Eric Wasylishen
59e71d7600
Merge branch 'master' into qbsp-contentflags
2021-10-01 23:39:12 -06:00
Jonathan
9d828d2085
Structured texture data!
...
Move vis decompress/compress back to vis since phs is handled there now too
Fix missing textures in Q1BSP
Comment areaportaling for now
2021-09-30 11:33:04 -04:00
Jonathan
1a5dc9934f
Remove span offset code - the compression ratio was not worth it
...
Allow Q2-esque maps to compile under Q1 modes
Use Q2tools-adapted version of AddBrushBevels for compiling brush sides
Extended limits overflow code displays member that overflowed now, for debugging
2021-09-28 02:10:01 -04:00
Jonathan
cc932a96ee
Fix BSP being invalid in Q2 if vis is not run
...
Fixes for skylight in Q2
Don't throw on invalid area
2021-09-27 22:40:43 -04:00
Jonathan
b205127e81
Fix exactEmpty
...
Simplify output_dir
2021-09-27 21:03:24 -04:00
Jonathan
a6f6cc2d15
qvec now has an empty default initializer, for speed purposes; fixed up places that relied on this behavior
...
simplified constructor for qvec(T...) that uses fold expressions
simplified rgba_miptex_t
fixed a lot of broken winding_base_t behavior
merged all winding types into winding_base_t
removed now-empty files
2021-09-27 20:44:15 -04:00
Jonathan
87d31e6d4f
A lot of type-y stuff here:
...
- bsp store vectors now
- vis stored in a way that is compatible with both Q2 and Q1
- binary reading of stuff, so swapping is done at load time now
- vis cleanup, although there's still a lot of raw long modification that should get simplified later
2021-09-25 23:58:02 -04:00
Eric Wasylishen
8ff65cc05a
bspinfo: JSON export of BSPX BRUSHLIST lump
2021-09-25 16:54:14 -06:00
Eric Wasylishen
f1744118e2
qbsp: move BSPX BRUSHLIST struct types out to bspfile.hh
2021-09-25 15:42:42 -06:00
Eric Wasylishen
f7c0c80a26
qbsp, light: allow _minlight to go up to 510 instead of 255 on func_detail/etc.
2021-09-25 13:11:15 -06:00
Jonathan
41b9a79e83
Merge branch 'qbsp-contentflags' into type-cleanup
...
# Conflicts:
# bsputil/bsputil.cc
# common/bspfile.cc
# common/cmdlib.cc
# include/common/bspfile.hh
# include/common/cmdlib.hh
# qbsp/brush.cc
# qbsp/portals.cc
# qbsp/writebsp.cc
# vis/vis.cc
2021-09-23 18:42:25 -04:00
Jonathan
ed37289290
Store extended limits format in bspversion
2021-09-23 14:42:56 -04:00
Eric Wasylishen
4c5d8b99f9
add missing <tuple> include (for std::tie)
2021-09-22 22:32:37 -06:00
Jonathan
6ff2d67d12
major C++-esque change to BSP conversion:
...
- main mbsp types are declared first in the files, and types that were single-member are now not structs
- conversion is handled by the sub-types themselves. Currently no diagnostic for *what* members overflow, but, overflow is handled via thrown exceptions on all overflowable members
- aabb type is used where appropriate now, simplifying a few areas
2021-09-22 17:30:46 -04:00
Eric Wasylishen
80a4aa1b97
Merge branch 'master' into qbsp-contentflags
2021-09-22 00:12:27 -06:00
Jonathan
2ebfdb096f
Remove COM_Parse, use parser_t
...
Game controls hull sizes now
2021-09-20 19:45:09 -04:00
Jonathan
9f1f575761
Parser simplification and classification
...
Hulls stored in game definitions
2021-09-20 16:24:38 -04:00
Jonathan
49fd62b9f3
Lotta more file stuff. Have to think about fscanf though.
2021-09-19 22:20:39 -04:00
Jonathan
326626f127
Remove some old stuff
...
Cleanup/rework of logging system. I'm not too happy about it still, but, it's at least a bit easier to follow now.
Started cleanup of file-related stuff.
2021-09-19 18:17:28 -04:00
Jonathan
17606fde4b
Use variant instead of having all BSP types allocated at once (even though they are smol)
...
Move ownership of pointers to the bsp structures themselves for now.
2021-09-16 11:52:37 -04:00
Jonathan
e8bd554cc0
winding_t is now a C++ type - a hybrid stack/heap array.
...
In preparation for converting all of the vec_t[3] to qvec's, the Vector routines are now templated and work with any type that provides indexing operators.
Polylib.cc is gone, since this all needs to be in header now
qvec can now implicitly convert from T[N]
constexpr where appropriate
static inline -> inline
side_t is now an enum, moved into mathlib
2021-09-16 03:10:51 -04:00
Jonathan
1dd4df1b20
calloc/malloc/free -> new/new/delete (except for specific scenarios)
2021-09-14 11:39:12 -04:00
Jonathan
eb6bb81d61
use the C++ includes
...
stdbool not required
_vsnprintf and _snprintf are standard in MSVC since 2015, so I just use them directly now. They'll be replaced by std::fmt later anyways.
use <thread> for threading, instead of pthreads/windows.h thread directly
2021-09-14 08:46:03 -04:00
Jonathan
7f8d2cfb49
Fix single line functions
2021-09-14 02:56:44 -04:00
Jonathan
4e7542b111
Clang format pass
...
typedef -> using
include guards -> pragma once
typedef struct x { } y; -> struct y { }
some fixes to extremely old code that shouldn't be required any more
2021-09-14 02:32:26 -04:00
Jonathan
05e20a3360
astyle project; not using yet
2021-09-13 14:14:33 -04:00
Jonathan
facf3490c7
typedef changes
2021-09-13 13:04:18 -04:00
Eric Wasylishen
d2ea0cee41
Merge remote-tracking branch 'origin/master' into qbsp-use-common
2021-09-12 23:04:42 -06:00
Jonathan
c95a1e2ccb
q2 and bug fixes
...
# Conflicts:
# include/qbsp/qbsp.hh
# include/qbsp/winding.hh
# qbsp/brush.cc
# qbsp/csg4.cc
# qbsp/merge.cc
2021-09-12 08:34:01 -04:00
Jonathan
9800f4f738
Mostly all native!!
2021-09-09 00:26:17 -04:00
Ozkan Sezer
69cb6b981f
bsputil: write ents in binary mode and print its crc in 4-digit hex ( #317 )
2021-09-08 17:50:32 -06:00
Jonathan
004fcb57c1
Content flags type, splitting up native and compiler flags.
...
Extreme WIP and likely not working properly. Need to rid all direct .native usages and direct them through target_version->game
2021-09-07 06:13:17 -04:00
Jonathan
00efa6e67d
Fix operator<
...
Introduce gamedef, to reduce rewriting of data in bspversions
fix name of needs_subdivision
include value in texinfo, in prep for Q2
2021-09-07 01:41:32 -04:00
Jonathan
398b865c96
throw array in there too
2021-09-06 22:13:45 -04:00
Jonathan
9602772450
Use tie for operator</> of surfflags_t
2021-09-06 22:12:57 -04:00
Jonathan
01d1400971
Merge branch 'qbsp-use-common' of https://github.com/ericwa/ericw-tools into qbsp-use-common
...
# Conflicts:
# common/bspfile.cc
# qbsp/writebsp.cc
2021-09-06 17:27:42 -04:00
Jonathan
3bc9b1b0f8
Instead of directly comparing BSP version pointers just for game type, I compacted quake2/hexen2 into a single enum.
...
Feature check in bspver for colored lightmaps, which replaces the many "version == q2 || version == qbism || version == hl".
2021-09-06 17:13:37 -04:00
Jonathan
dad0e61f63
Fix for texinfo/miptex searching routines
...
surf flags now use the "native + extended" format that will eventually be used for brush contents. Q1 output seems identical, haven't tested Q2 yet.
2021-09-05 16:56:29 -04:00
Eric Wasylishen
f978d2a8d5
common: start adding overflow checks to ConvertBSPFormat
2021-09-05 00:44:25 -06:00
Jonathan
3b656e6ef1
Cleanup & preserve texture name for q2bsp
2021-09-04 22:15:04 -04:00
Jonathan
b01fddf7f1
More Q2 support
2021-09-04 18:49:01 -04:00
Eric Wasylishen
54d9e08033
qbsp: handle target bsp version
2021-09-01 00:42:30 -06:00
Eric Wasylishen
2e09ad509b
Merge remote-tracking branch 'origin/master' into qbsp-use-common
2021-08-31 22:40:51 -06:00
Jonathan
90973e1198
Q2bsp VIS support ( #315 )
...
* Add QBSP - the BSP2-esque variant to Q2BSP - to bspinfo, and all of its accompanying structures.
* pass around ident, since Q2 needs it - admittedly it's a bit ugly, but it works for now.
conversion for QBSP
* Fix light
* _qbsp_ -> _qbism_
* Introduced bspversion_t, a struct that holds pertinent information about different BSP versions and also acts as a tagged pointer type for direct comparisons. This makes a lot of code paths simpler. I'm not entirely set on the wordings or usages yet, and maybe we can stuff boolean flags inside of them for different behaviors (for instance Q2, QBism and HL would have the "colored lightmap" boolean set to true, which replaces the check-for-all-three in the lightmapper)
Swapped arguments to ConvertBSPFormat to have the conversion target last instead of first
Finished rename of qbsp -> qbism
Tested:
- bspinfo on various BSPs I had laying around (Q1, Q2, Qbism)
- bsputil converting between Q2 and Qbism, and that they loaded in engine/roundtripped properly
Not tested:
- vis/rad on anything major (I still can't run rad due to embree being weird)
- bsputil conversion of Q1-esque maps
* Q2 VIS
Almost working, just in-game is not 100% functional
* PHS! Q2 VIS!
* Fix missing loadversion assignment
Fix missing \n
* Implement q2bsp -> mbsp visdata copy
fix sky lighting to use arghrad compat
2021-08-31 22:38:12 -06:00
Eric Wasylishen
a75ad998e7
common: clean up Hexen II handling
2021-08-30 01:05:18 -06:00
Eric Wasylishen
5429655ce8
qbsp: move internal content types to bspfile.hh
2021-08-26 22:30:56 -06:00
Eric Wasylishen
bafea15753
Merge branch 'master' into qbsp-use-common
2021-08-26 21:14:49 -06:00
Eric Wasylishen
8beda9a039
common, qbsp: make Error() noreturn
2021-08-26 20:22:45 -06:00
Eric Wasylishen
09d7b6e73f
common: transfer comments from qbsp's bspfile.hh
2021-08-24 00:17:47 -06:00
Jonathan
eaa86c71c6
Q2BSP + QBSP ( #313 )
...
* Add QBSP - the BSP2-esque variant to Q2BSP - to bspinfo, and all of its accompanying structures.
* pass around ident, since Q2 needs it - admittedly it's a bit ugly, but it works for now.
conversion for QBSP
* Fix light
* _qbsp_ -> _qbism_
* Introduced bspversion_t, a struct that holds pertinent information about different BSP versions and also acts as a tagged pointer type for direct comparisons. This makes a lot of code paths simpler. I'm not entirely set on the wordings or usages yet, and maybe we can stuff boolean flags inside of them for different behaviors (for instance Q2, QBism and HL would have the "colored lightmap" boolean set to true, which replaces the check-for-all-three in the lightmapper)
Swapped arguments to ConvertBSPFormat to have the conversion target last instead of first
Finished rename of qbsp -> qbism
Tested:
- bspinfo on various BSPs I had laying around (Q1, Q2, Qbism)
- bsputil converting between Q2 and Qbism, and that they loaded in engine/roundtripped properly
Not tested:
- vis/rad on anything major (I still can't run rad due to embree being weird)
- bsputil conversion of Q1-esque maps
2021-08-23 09:56:33 -06:00
Eric Wasylishen
a618e5f5b5
common: assert(0) on Q_assert failure for better debugger experience
2021-08-22 23:27:05 -06:00
Eric Wasylishen
f7256907d5
common: fix build of bsputils.cc with double == vec_t
2021-08-22 15:12:19 -06:00
Eric Wasylishen
72885addf1
common: fix build failure
2021-03-23 21:17:09 -06:00
Eric Wasylishen
fea7849315
common: preserve order of key/value pairs
2021-02-10 00:05:53 -07:00
Eric Wasylishen
b5fcdec19e
cleanup: remove "byte" typedef
2021-02-07 14:02:35 -07:00
Eric Wasylishen
cc116a4729
decompile: restore coplanar faces
2021-02-06 16:19:15 -07:00
Eric Wasylishen
86a644680a
qvec: add constructor to extend a vector
2021-02-06 14:11:01 -07:00
Eric Wasylishen
f0e2f4ba96
common: small tweaks: CopyWinding accepts null, document face side
2021-02-05 22:26:13 -07:00
Eric Wasylishen
708d3eccd3
qvec: add unary minus
2021-02-04 22:00:55 -07:00
Eric Wasylishen
0cdd2f97ab
common: revert Face_Miptex change, it was breaking reading of
...
Q1 texture names. TODO: fix this properly?
2021-01-31 01:27:01 -07:00
Eric Wasylishen
9124653156
common: move EntData_ function to common
2021-01-30 21:11:25 -07:00
Eric Wasylishen
d4aa42f0ab
bsputil: decompiler wip
2021-01-30 14:49:18 -07:00
Eric Wasylishen
00e41688c3
light: quake2: arghrad-compatible phong support
...
(set face "value" to the same non-zero number, have light flag unset)
2020-12-31 12:39:17 -07:00
Eric Wasylishen
d6136c154d
light: add _light_alpha func_group key for making faces translucent for
...
light
2019-12-28 21:48:33 -07:00
Eric Wasylishen
a4c1ce6ff6
qbsp, light: support _lightignore on func_detail/group
2019-12-09 00:09:20 -07:00
Eric Wasylishen
79d3aa99de
qbsp: fix relative paths for .wad files
...
Fixes #279
2019-10-27 19:03:45 -06:00
Shpoike
89365949bc
Squashed commit of the following:
...
commit 8ca122916d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 20:54:23 2019 -0600
fix linker error (radlights is in 2 .cpp files)
commit 8f06fc9c8d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 20:53:57 2019 -0600
add clarification comment
commit 038a553fb0
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 20:30:27 2019 -0600
fix tests compilation
commit 02e94ec507
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 19:59:25 2019 -0600
hlbsp: use q_snprintf
commit 669a5a7911
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 19:56:21 2019 -0600
Reformat
commit 6653760982
Merge: 347a455 ac3553c
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date: Thu Jul 4 19:28:06 2019 -0600
Merge remote-tracking branch 'origin/master' into hlbsp
# Conflicts:
# include/qbsp/qbsp.hh
commit 347a455102
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 28 02:18:16 2019 +0000
Misc HLBSP tweaks
Added support for multiple -wadpath args.
Added -xwadpath (for eg valve/*.wad to avoid bloat/license issues).
Reworked hint brushes - the non-hint surfaces can use any name, just so long as they're not 'hint', for compat with zhlt.
Support 'bevel' and 'null' textures for compat with zhlt.
commit 7fb22c7367
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 28 01:59:42 2019 +0000
Support for halflife-style .rad surface lights (probably too bright, but the basics work).
commit 2da504fb62
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 28 01:56:27 2019 +0000
Add minus-prefixed textures for halflife's randomised-textures feature, instead of getting crash-to-desktop errors when the map is loaded.
commit 6366199bdb
Author: Shpoike <Shpoike@users.noreply.github.com>
Date: Thu Mar 21 04:51:24 2019 +0000
First attempt at hlbsp output.
2019-07-04 21:08:17 -06:00
Eric Wasylishen
b343b9504a
qbsp, light: support _minlight_exclude on func_group, detail, etc.
2019-04-05 21:14:39 -06:00
Eric Wasylishen
16ad2b077a
qbsp: -objexport debugging: Add another point where an .obj is dumped
2019-01-26 22:22:07 -07:00
Eric Wasylishen
2df839cfc2
light: Add "_bounce" "-1" to disable bouncing for a func_detail/etc.
2019-01-22 00:02:46 -07:00
Eric Wasylishen
8a47233bbf
bsputil: start a --compare feature for helping with qbsp testing
2019-01-10 02:58:37 -07:00
Eric Wasylishen
fa06716545
common: make VecStrf/VecStr threadsafe
2018-07-24 00:18:43 -06:00
MaxED
07447a633e
Rewritten parts of surface light logic. Should resemble qrad3 looks a bit more now...
...
Added "surflightscale", "surflightbouncescale" and "surflightsubdivision" cmdline/worldspawn settings.
Fixed: a face should not be skipped when it has both sky and nodraw texinfo flags.
Fixed some non-windows compilation errors.
2018-05-25 14:59:22 +03:00
MaxED
0661098bc5
Quake 2 support: area lights, palette/texture loading, transparent/sky/fence face flags.
2018-05-08 15:50:01 +03:00
Eric Wasylishen
94dbd0a705
qbsp: _phong_angle_concave support
2018-01-30 01:20:38 -07:00
Eric Wasylishen
23b25a0a0e
qbsp: add failing tests for healing invalid texture projections
2018-01-28 01:54:58 -07:00
Eric Wasylishen
82e3aef283
light: add FacePairConcavity
2018-01-11 21:57:48 -07:00
Eric Wasylishen
d31d3621bc
light: add MakePlane function
2017-12-10 21:28:35 -07:00
Eric Wasylishen
d4d2d537eb
light: split GLM_PolyRandomPoint into precomputed portion
...
take uniform random params explicitly
2017-11-24 18:01:18 -07:00
Eric Wasylishen
7170aac1c3
light: FacesOverlappingEdge
2017-11-23 23:45:05 -07:00
Eric Wasylishen
f356ea40d1
bsputils: add more bounds-checked accessors
2017-11-23 23:45:05 -07:00
Eric Wasylishen
88ee157b97
mathlib: add LinesOverlap function
2017-11-23 23:45:00 -07:00
Eric Wasylishen
abf2a3665b
vis: fix to use mbsp_t
2017-10-24 20:01:04 -07:00
Eric Wasylishen
cbba35a346
common: logprint: print to visual studio console
2017-10-24 19:51:29 -07:00
Eric Wasylishen
4471a80aa9
common: add q2 content types (from: https://github.com/id-software/quake-2-tools )
2017-10-03 18:17:10 -06:00
Eric Wasylishen
873e0b8a35
common: Face_IsLightmapped: q2 support
2017-10-03 14:42:19 -06:00
Eric Wasylishen
2dc22b7088
common: add loadversion to mbsp_t
2017-10-03 14:17:42 -06:00
Eric Wasylishen
dff71edfe9
light: very early q2 support. half of the faces seem to be saved without lightmaps for some reason
2017-10-03 00:33:14 -06:00
Eric Wasylishen
df06ead299
common: q2 <-> generic conversion
2017-10-02 16:02:01 -06:00
Eric Wasylishen
8813d272cb
common, light, vis: change from bsp2_t to mbsp_t
2017-10-01 22:32:20 -06:00
Eric Wasylishen
b847af61e1
common: bsp29_t <-> mbsp_t conversion
2017-10-01 21:27:00 -06:00
Eric Wasylishen
f7635162c9
common: bspfile refactoring
2017-10-01 20:51:16 -06:00
Eric Wasylishen
dcac3e70c9
common: refactoring some of the generic bsp stuff
2017-10-01 18:08:38 -06:00
Eric Wasylishen
7aa5e4cc48
common: add "generic bsp" types
2017-09-26 16:14:25 -06:00
Eric Wasylishen
5fc3110df6
common: get bspinfo working with q2bsp
2017-09-25 00:22:10 -06:00
Eric Wasylishen
55f2c3c47e
common: add q2 structs to bspfile.hh
2017-09-24 22:47:27 -06:00
Eric Wasylishen
c8ac9d2670
light: print position of degenerate faces during phong shading
2017-07-30 12:01:00 -06:00
Eric Wasylishen
9629134612
qbsp: fix some issues with SplitBrush
2017-07-23 01:32:04 -06:00
Eric Wasylishen
5893c16267
mathlib: add AddPointToBounds, ClearBounds
2017-07-22 16:31:15 -06:00
Eric Wasylishen
0d0f265f05
mathlib: add VectorClear
2017-07-17 21:20:17 -06:00
Eric Wasylishen
4853dd40ee
mathlib: RotateAboutX/Y/Z: change to double
2017-07-05 15:02:24 -06:00
Eric Wasylishen
602616451c
bsputils: add BSP_GetWorldModel
2017-06-25 14:37:26 -06:00
Eric Wasylishen
989f0305ba
bsputil: add checks for degenerate faces, unused planes/texinfo/verts,
...
clipnodes
2017-06-21 16:36:12 -06:00
Eric Wasylishen
4d9b41d3ec
mathlib: fix SetPlanePts linkage
2017-06-20 17:07:36 -06:00
Eric Wasylishen
98c5dd2913
mathlib: refactor ProjectPointOntoPlane
2017-06-20 16:01:34 -06:00
Eric Wasylishen
af264821b7
mathlib: factor out SetPlanePts
2017-06-20 14:39:15 -06:00
Eric Wasylishen
85d235393e
mathlib: add vec3_t version of ProjectPointOntoPlane
2017-06-20 14:29:53 -06:00
Eric Wasylishen
7545119593
mathlib: change RotateAboutZ to double
2017-06-15 03:30:10 -06:00
Eric Wasylishen
ea099775ef
qbsp, light: allow _shadow -1 to disable shadows from func_detail
2017-06-05 14:01:12 -06:00
Eric Wasylishen
157c3eeb4f
common: cmdlib: Add IsAbsolutePath from qbsp
2017-04-26 15:04:53 -06:00
Eric Wasylishen
e0564e8c2a
common: mathlib: don't need #define ANGLEEPSILON
2017-04-26 14:29:07 -06:00
Eric Wasylishen
ca58e90e15
common: remove EQUAL_EPSILON from mathlib.hh
2017-04-26 14:25:55 -06:00
Eric Wasylishen
03396787b2
common: mathlib: add VectorLengthSq
2017-04-26 14:21:19 -06:00
Eric Wasylishen
902c45c946
all: make VectorCompare take an explicit epsilon
2017-04-26 14:20:45 -06:00
Eric Wasylishen
15cc98eb27
common: move SignedDegreesBetweenUnitVectors from qbsp, add test
2017-04-26 14:04:33 -06:00
Eric Wasylishen
b1f86d7ac1
common: implement buildMeshFromBSP
2017-04-24 02:01:16 -06:00
Eric Wasylishen
5eb4fd8790
common: make Face_Plane_E return a plane3f
2017-04-24 01:54:25 -06:00
Eric Wasylishen
0a64905df8
common: fix msvc build errors
2017-04-24 00:34:37 -06:00
Eric Wasylishen
68b084a6c3
replace glm with qvec
2017-04-24 00:26:49 -06:00
Eric Wasylishen
122b5ff51c
common: qmat: use NaN to indicate no inverse
2017-04-24 00:19:47 -06:00
Eric Wasylishen
d12f703cb6
common: qvec: additional const hacky accessor for [col][row] access
2017-04-23 22:27:32 -06:00
Eric Wasylishen
1f5288c321
common: qvec: hacky accessor for [col][row] access
2017-04-23 22:27:27 -06:00
Eric Wasylishen
af8f4912b5
common: qvec: add component-wise qv::pow, qv::min, qv::max
2017-04-23 22:27:22 -06:00
Eric Wasylishen
779b2045c2
common: add qclamp macro
2017-04-23 22:27:16 -06:00
Eric Wasylishen
ff3a2f58f0
common: qvec: add qv::epsilonEqual
2017-04-23 22:27:11 -06:00
Eric Wasylishen
48e057b31a
common: add qv::to_string
2017-04-23 20:57:35 -06:00
Eric Wasylishen
7014757cb9
common: try fixing build error on Linux
2017-04-23 20:48:56 -06:00
Eric Wasylishen
fab993ad8d
common: add some rotation matrices
2017-04-23 19:59:57 -06:00
Eric Wasylishen
7887318def
common: move vec_from_mangle and mangle_from_vec to mathlib
2017-04-23 19:31:00 -06:00
Eric Wasylishen
eeb00bf74c
common: tidy qmat
2017-04-23 17:41:19 -06:00
Eric Wasylishen
8a4d1ff218
common: add 4x4 (from mesa) and 2x2 matrix inverse
2017-04-23 15:58:51 -06:00
Eric Wasylishen
6344e0723c
common: add some stuff to qvec
2017-04-23 15:22:35 -06:00
Eric Wasylishen
fd8eafddee
common: add ClosestPointOnLine[Segment]
2017-04-23 14:06:58 -06:00
Eric Wasylishen
0358bc07b8
common: mesh_t: first draft of tjunc fixing
2017-04-23 02:06:20 -06:00
Eric Wasylishen
3f067e001a
common: add DistToLineSegment
2017-04-23 02:05:19 -06:00
Eric Wasylishen
ed09b4af8d
common: qvec: add qplane. fix dot().
2017-04-23 01:40:23 -06:00
Eric Wasylishen
56513cdb8e
common: add DistToLine
2017-04-23 01:39:59 -06:00
Eric Wasylishen
24e579e251
common: first draft of qmat
2017-04-22 22:36:24 -06:00
Eric Wasylishen
b8f5a4f8e1
common: change mesh_t to use qvec3f
2017-04-22 20:39:50 -06:00
Eric Wasylishen
fbaee78379
common: qvec: hack to allow including in qbsp
2017-04-22 15:55:31 -06:00
Eric Wasylishen
28081f50c6
common: make float/double versions of aabb3
2017-04-22 15:11:41 -06:00
Eric Wasylishen
ee7181521d
fix build
2017-04-22 13:54:12 -06:00
Eric Wasylishen
c1189abccd
common: split up new octree/mesh/aabb/qvec stuff
2017-04-22 13:29:32 -06:00
Eric Wasylishen
f4c9b6c1a7
mathlib: expand qvec constructors
2017-04-20 12:32:37 -06:00
Eric Wasylishen
e0d555ffc8
mathlib: vs2013 compatibility
2017-04-20 01:21:27 -06:00
Eric Wasylishen
d374a01b5a
mathlib: octree: change to storing in a std::vector
2017-04-20 00:59:00 -06:00
Eric Wasylishen
b378ce9085
mathlib: add missing include
2017-04-19 19:53:18 -06:00
Eric Wasylishen
5b63ddbeba
mathlib: octree, aabb_t rework
2017-04-19 14:02:30 -06:00
Eric Wasylishen
055b5061f1
light: start a mesh_t class
2017-04-19 14:02:19 -06:00
Eric Wasylishen
30d9a53341
light: move FractionOfLine to mathlib
2017-03-18 23:26:16 -06:00
Eric Wasylishen
3e7b4448c1
mathlib: add GLM_PolyArea
2017-03-18 23:26:10 -06:00
Eric Wasylishen
880ad3b381
bpsutil, common, light, vis: bounds check bsp->dfaces access
2017-03-18 16:31:52 -06:00
Eric Wasylishen
aa10d2da93
common: add std::vector<glm::vec3> polylib::GLM_WindingPoints(const winding_t *w)
2017-03-15 10:59:46 -06:00
Eric Wasylishen
0eb6864744
mathlib: add GLM_PolyRandomPoint
2017-03-12 12:58:36 -06:00
Eric Wasylishen
902fe7073c
mathlib: add RotateFromUpToSurfaceNormal
2017-03-07 13:13:24 -07:00
Eric Wasylishen
3ba1859be4
mathlib: CosineWeightedHemisphereSample
2017-03-07 12:45:54 -07:00
Eric Wasylishen
97a00f0f41
light: avoid recomputing things in CalcPointNormal
2017-02-26 22:58:08 -07:00
Eric Wasylishen
d88581e2da
light: add GLM_ProjectPointOntoPlane
2017-02-22 01:40:58 -07:00
Eric Wasylishen
8ab0ef9687
mathlib: redo bilinear interpolation
2017-02-21 21:19:07 -07:00
Eric Wasylishen
044bd4c9c0
mathlib: PointsAlongLine: make into template
2017-02-21 21:18:22 -07:00
Eric Wasylishen
8067e0fa45
mathlib: add PointsAlongLine
2017-02-21 21:18:16 -07:00
Eric Wasylishen
29ecd209a2
add comment
2017-02-20 14:33:46 -07:00
Eric Wasylishen
d40c6b9912
mathlib: add bilinear interpolation
2017-02-20 14:32:31 -07:00
Eric Wasylishen
c4f3897f47
light: Adjust epsilon
2017-02-16 15:57:24 -07:00
Eric Wasylishen
52523c8208
mathlib: expose GLM_MakeInwardFacingEdgePlane()
2017-02-13 13:33:48 -07:00
Eric Wasylishen
2a17b4bccf
build fix
2017-02-12 11:54:52 -07:00
Eric Wasylishen
3a20d5410b
common: add shrink and clip poly funcs
2017-02-12 00:20:38 -07:00
Eric Wasylishen
b54f893942
common: add GLM_InterpolateNormal
2017-02-11 11:02:37 -07:00
Eric Wasylishen
8ed7544063
light: fix up barycentric coords code, add tests
2017-02-11 11:02:28 -07:00
Eric Wasylishen
9aae46bd1c
light: adjust Light_PointInSolid to take a model param
2017-02-10 15:54:07 -07:00
Eric Wasylishen
a9f99076fd
common: add GLM_ClosestPointOnPolyBoundary
2017-02-10 15:52:12 -07:00
Eric Wasylishen
bd0556cf22
light: switch to new Face_Centroid
2017-02-09 00:17:22 -07:00
Eric Wasylishen
f09cadbc76
light: switch to new world space <-> texture space code
2017-02-08 17:51:22 -07:00
Eric Wasylishen
90bf0134de
common: move vec3_t_to_glm() to mathlib.hh
2017-02-08 15:01:03 -07:00
Eric Wasylishen
3acc48269e
light: add lanczos filter
2017-02-07 14:27:51 -07:00
Eric Wasylishen
4813bf6aa2
common: remove unused function
2017-02-07 11:44:02 -07:00
Eric Wasylishen
9246454bfc
light: refactor some more stuff to GLM
2017-02-06 23:00:48 -07:00
Eric Wasylishen
f018b7324d
light: refactor phong shading to use GLM
2017-02-06 22:50:56 -07:00
Eric Wasylishen
7fdb77188c
light: work-in-progress stuff
2017-02-06 21:57:49 -07:00
Eric Wasylishen
9330d2c087
light: rename Face_MakeInwardFacingEdgePlanes() to Face_AllocInwardFacingEdgePlanes()
...
do memory allocation inside the function.
2017-02-01 14:38:42 -07:00
Eric Wasylishen
be3c84ec98
light: add a EdgePlanes_PointInside() function to bsputils.{hh,cc}
2017-02-01 14:38:42 -07:00
Eric Wasylishen
c035907ff8
light: move Face_MakeInwardFacingEdgePlanes() to bsputils.{hh,cc}
2017-02-01 14:38:42 -07:00
Eric Wasylishen
29b420c7dd
light: move Light_PointInSolid to bsputils.{hh,cc}
2017-02-01 14:38:42 -07:00
Eric Wasylishen
b46cba40a4
light: entity warnings: print bbox for bmodel entities
...
fixes https://github.com/ericwa/tyrutils-ericw/issues/120
2016-11-24 17:10:15 -07:00
Eric Wasylishen
fbeba25bd1
light: read _mincolor from .texinfo file
2016-11-02 17:23:25 -06:00
Eric Wasylishen
a6468984bf
all: finish c++ification
2016-10-17 19:52:17 -06:00
Eric Wasylishen
64ec89312d
common: Add Q_assert_unreachable()
2016-10-17 18:16:23 -06:00
Eric Wasylishen
d9bb0be32e
light: move Face_Contents to common
2016-10-17 17:37:28 -06:00
Eric Wasylishen
801d9652c0
common: add util function to get a face number
2016-09-20 00:01:15 -06:00
Eric Wasylishen
494f9bb050
common: make Q_assert inline
2016-09-18 15:44:04 -06:00
Eric Wasylishen
b2fb764e36
common: new assertion macro used in all builds (debug/release)
2016-09-18 15:39:16 -06:00
Eric Wasylishen
073ede98c7
light: when there are too many lightstyles on a face, sort them by descending average brightness and take the top 4
...
previous behaviour was random, which made needlessly ugly artifacts.
2016-09-18 15:12:57 -06:00
Eric Wasylishen
33093151c6
common: ClipWinding: fix constness
2016-09-10 15:32:50 -06:00
Eric Wasylishen
b849a79c3f
light: move GetDir to mathlib
2016-08-11 14:16:23 -06:00
Eric Wasylishen
4fb903bd8e
common: add more AABB functions
2016-08-09 17:56:55 -06:00
Eric Wasylishen
79525b9aee
common: mathlib: add UniformPointOnSphere
2016-08-09 17:20:51 -06:00
Eric Wasylishen
0b6578e4b3
common: mathlib: add some AABB functions
2016-08-09 16:27:51 -06:00
Eric Wasylishen
4be2fe289e
common: add RandomDir
2016-08-09 15:29:23 -06:00
Eric Wasylishen
68e1736ad1
light: move more stuff to bsputils.cc
2016-08-07 23:07:20 -06:00
Eric Wasylishen
486606eb88
light: rename GetSurfaceVertex to Face_VertexAtIndex
2016-08-07 22:57:45 -06:00
Eric Wasylishen
1a0fb22e40
light: move some helper functions to common/bsputils.{h,cc}
2016-08-07 22:55:44 -06:00
Eric Wasylishen
939778bd23
build: add snprintf wrapper from QuakeSpasm (vs2013 compat)
2016-08-06 15:47:40 -07:00
Eric Wasylishen
a807204fe6
build: vs2013 compat changes
2016-08-06 15:37:00 -07:00
Eric Wasylishen
78810fa765
common: fix COM_Parse const-ness
2016-07-06 17:06:28 -06:00
Eric Wasylishen
e0f8213cc9
common: add userinfo param to DiceWinding
2016-05-19 23:55:12 -06:00