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
acc65953ce
Use tie for mtexinfo too
2021-09-06 22:15:59 -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
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
8c7df2b062
Merge branch 'master' into qbsp-use-common
...
# Conflicts:
# qbsp/writebsp.cc
2021-09-06 17:25:12 -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
Eric Wasylishen
99f1da85a7
Merge remote-tracking branch 'origin/master' into qbsp-use-common
2021-09-06 15:12:09 -06:00
Eric Wasylishen
5fef157f53
qbsp: take floor/ceil of node/leaf bounds even for bsp2
...
for consistency with refactor branch
2021-09-06 14:53:05 -06:00
Eric Wasylishen
71bb22dc28
qbsp: auto switch to extended limits formats
2021-09-06 14:20:51 -06:00
Eric Wasylishen
b1892d6aa3
qbsp: merge from master
2021-09-06 13:52:28 -06:00
Eric Wasylishen
648ef89845
qbsp: naming fix
2021-09-06 13:44:36 -06:00
Eric Wasylishen
d85ca375e5
qbsp: fix node/leaf mins/maxs calculations
...
they should use floor/ceil.
Otherwise a node with max X=10.5 will be written
to bsp29 as having a max of 10
2021-09-06 12:03:59 -06:00
Eric Wasylishen
dc81db8b2f
testmaps: add phongtest2.map
2021-09-05 17:57:13 -06: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
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
1e6e938ead
qbsp: restore writing LMSHIFT bspx lump
2021-09-04 10:47:43 -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
bc44af4d1d
qbsp: fix unused variable warnings
2021-08-31 22:42:49 -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
8ed7dc9c05
qbsp: build fix
2021-08-30 01:18:47 -06:00
Eric Wasylishen
fd32600c4d
build: silence "inherits via dominance" warning
2021-08-30 01:05:45 -06:00
Eric Wasylishen
a75ad998e7
common: clean up Hexen II handling
2021-08-30 01:05:18 -06:00
Eric Wasylishen
968a840e47
light: make a certain degenerate face non-fatal
...
seen compiling ad_sepulcher.map with qbism q2 tools
2021-08-29 20:43:55 -06:00
Eric Wasylishen
5429655ce8
qbsp: move internal content types to bspfile.hh
2021-08-26 22:30:56 -06:00
Eric Wasylishen
e571d1a4b2
qbsp: remove bsp29 limit check, as it will be done in common
2021-08-26 21:44:02 -06:00
Eric Wasylishen
86407d7ef3
qbsp: writebsp: rename some functions
2021-08-26 21:17:51 -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
9688af5be3
build: msvc: silence 64->32 bit conversion warning until the codebase is cleaned up
2021-08-26 20:22:45 -06:00
Eric Wasylishen
f0d1c8488b
qbsp: pad lumps with \0 rather than ' ', for consistency with common/bspfile
2021-08-26 20:22:45 -06:00
Eric Wasylishen
8a1bc3ef20
qbsp: refactor clipnode writing (changes .bsp output)
...
- drop reshuffling feature from ExportClipNodes
As far as I can tell, the only purpose of this was to keep clipnodes
for a given model contiguous within the lump (i.e. keep the different
hulls contiguous).
Vanilla qbsp didn't appear to have done this, and the code was
unmaintainable/complex, so I'm dropping the feature.
2021-08-26 20:22:39 -06:00
Eric Wasylishen
6a50313ded
qbsp: add AddLumpFromBuffer function
2021-08-26 20:22:34 -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
1f7ac25f0c
qbsp: removing fancy AllocMem uses
2021-08-24 22:40:35 -06:00
Eric Wasylishen
208a9610ad
qbsp: delete bspfile.cc/hh
2021-08-24 22:23:24 -06:00