Commit Graph

13 Commits

Author SHA1 Message Date
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
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 d6c888bee9 vis add -nostate debug option, skips loading from state file 2021-08-15 13:22:57 -06:00
Eric Wasylishen c9570260fa gcc 11: pass constant to offsetof 2021-05-30 23:12:17 -06:00
Eric Wasylishen b5fcdec19e cleanup: remove "byte" typedef 2021-02-07 14:02:35 -07:00
tk 19f8ac8110
Add -visdist param from bjptools (#300)
* Add support for -visdist param from bjp tools

* add mention to man

Co-authored-by: Shpuld Shpuldson <shp@cock.li>
2020-09-18 19:11:38 -06:00
Eric Wasylishen 74e1a0f6f0 vis: fix for microleafs blocking vis
Fixes #261
2019-03-24 21:14:57 -06:00
Eric Wasylishen 7bb84a7119 vis: fix "average leafs visible" overflowing 2018-03-18 20:02:35 -06:00
Eric Wasylishen abf2a3665b vis: fix to use mbsp_t 2017-10-24 20:01:04 -07:00
Eric Wasylishen b85d627c8f change branding to ericw-tools 2017-10-19 16:35:37 -06:00
Eric Wasylishen 258f69a27f Revert "vis: remove max portals on leaf limit"
This reverts commit b111346cca.
2017-09-15 14:32:13 -06:00
Eric Wasylishen b111346cca vis: remove max portals on leaf limit 2017-09-13 13:29:46 -07:00
Eric Wasylishen a6468984bf all: finish c++ification 2016-10-17 19:52:17 -06:00