Jonathan
52839d4e7f
Run clang-format pass
2021-10-05 15:54:06 -04:00
Jonathan
4ad798e29c
Fix origin brushes
...
Fix merge stuff from qbsp-contentflags
2021-10-05 15:50:18 -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
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
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
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
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
73c665abfe
bspfile.cc: gamedef_q1_like_t: fix template argument shadowing
2021-09-23 00:39:10 -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
8093e94864
bspfile.cc: fix build
2021-09-22 00:25:23 -06:00
Eric Wasylishen
80a4aa1b97
Merge branch 'master' into qbsp-contentflags
2021-09-22 00:12:27 -06:00
Eric Wasylishen
8d51e23ecc
bspfile: add fixme about q2 overflow checking
2021-09-21 00:09:55 -06:00
Eric Wasylishen
0c0cc9ef81
bspfile: fix OverflowsUint16
2021-09-20 23:59:26 -06:00
Eric Wasylishen
7622ca1a3b
bspfile: fix incorrectly identifying bsp2 as hexen2bsp2
2021-09-20 19:38:38 -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
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
xDShot
4a1feadaab
#include <limits.h> ( #319 )
...
Fixes error about undefined INT_MAX in common/bspfile.cc
2021-09-12 00:15:02 -06:00
Jonathan
8cdb9ff6c4
Initial attempt at leafbrushes
2021-09-09 05:11:47 -04:00
Jonathan
35040d1bd3
Q2 working sorta
2021-09-09 02:13:28 -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
437459a4dd
Finish using game everywhere
2021-09-06 18:09:13 -04:00
Jonathan
dd3bcebe39
Fix missing newline
2021-09-06 17:29:09 -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
8fd1d89b8d
Fix double-delete
...
Fix typo
2021-09-05 17:39:17 -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
c90ac7d6a7
common: bsp29: validate edges/marksurfaces
2021-09-05 01:28:58 -06:00
Eric Wasylishen
948932f333
common: bsp29: validate clipnodes
2021-09-05 01:10:23 -06:00
Eric Wasylishen
a0ccb765e8
common: validate bsp29 nodes and faces
2021-09-05 01:04:39 -06:00
Eric Wasylishen
f978d2a8d5
common: start adding overflow checks to ConvertBSPFormat
2021-09-05 00:44:25 -06:00