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
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
Eric Wasylishen
ddf2a36d39
qbsp: make func_detail_wall an alias for func_detail_fence
2021-10-01 23:18:27 -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
74bbce9eab
First attempt at areaportals - sadly it seems like this method might not work with this compiler.
2021-09-28 13:17:27 -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
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
f1744118e2
qbsp: move BSPX BRUSHLIST struct types out to bspfile.hh
2021-09-25 15:42:42 -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
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
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
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
ae02ff5393
Implement leafbrushes cache
...
Fix bmodel leafbrushes (tank Spoike)
2021-09-12 13:27:39 -04: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
8cdb9ff6c4
Initial attempt at leafbrushes
2021-09-09 05:11:47 -04:00
Jonathan
9800f4f738
Mostly all native!!
2021-09-09 00:26:17 -04: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
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
04ad8e2962
OOP wad file stuff
2021-09-04 23:23:03 -04: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
54799a11fc
qbsp: restore bspx brushes writing
2021-09-04 11:47:33 -06:00
Eric Wasylishen
047bc1299a
qbsp: fix tests
2021-09-01 01:19:24 -06:00
Eric Wasylishen
54d9e08033
qbsp: handle target bsp version
2021-09-01 00:42:30 -06:00
Eric Wasylishen
3cbf54749e
qbsp: fix -onlyents
2021-08-31 23:53:40 -06:00
Eric Wasylishen
899b2b8384
qbsp: drop MemSize stuff
2021-08-24 22:51:44 -06:00
Eric Wasylishen
1123205d47
qbsp: replace FreeMem uses
2021-08-24 22:49:06 -06:00
Eric Wasylishen
208a9610ad
qbsp: delete bspfile.cc/hh
2021-08-24 22:23:24 -06:00
Eric Wasylishen
561ffffb9b
qbsp: refactor model writing
2021-08-23 21:01:49 -06:00
Eric Wasylishen
24fc2ffc6a
qbsp: refactor plane lump writing
2021-08-23 18:02:05 -06:00
Eric Wasylishen
460428d099
qbsp: refactor texinfo lump writing
2021-08-23 18:02:05 -06:00
Eric Wasylishen
ff7f8a1542
qbsp: add -nothreads debug option
2021-08-23 00:12:38 -06:00
Eric Wasylishen
b5fcdec19e
cleanup: remove "byte" typedef
2021-02-07 14:02:35 -07:00
Eric Wasylishen
79d3aa99de
qbsp: fix relative paths for .wad files
...
Fixes #279
2019-10-27 19:03:45 -06:00
Eric Wasylishen
209d481b4c
qbsp: attempted fix of -wrbrushes (ProcessEntity behaviour was changed
...
a while ago and copy/pasted code in BSPX_CreateBrushList wasn't updated)
2019-10-03 00:13:00 -06:00