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
f7256907d5
common: fix build of bsputils.cc with double == vec_t
2021-08-22 15:12:19 -06:00
Eric Wasylishen
4ba0e99d3f
Light_PointInSolid: add check against model bounds
2021-05-21 22:35:41 -06:00
Eric Wasylishen
ab6956c9d0
bsputils: fix comment
2021-05-21 22:25:05 -06:00
Eric Wasylishen
b5fcdec19e
cleanup: remove "byte" typedef
2021-02-07 14:02:35 -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
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
8a47233bbf
bsputil: start a --compare feature for helping with qbsp testing
2019-01-10 02:58:37 -07: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
75bc7b86d0
light: add FIXME
2017-12-05 21:06:51 -07:00
Eric Wasylishen
f356ea40d1
bsputils: add more bounds-checked accessors
2017-11-23 23:45:05 -07:00
Eric Wasylishen
abf2a3665b
vis: fix to use mbsp_t
2017-10-24 20:01:04 -07:00
Eric Wasylishen
37e2b94d3e
bsputils: add leafnum bounds check to Light_PointInSolid_r
2017-10-19 13:41:14 -07:00
Eric Wasylishen
873e0b8a35
common: Face_IsLightmapped: q2 support
2017-10-03 14:42:19 -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
f7635162c9
common: bspfile refactoring
2017-10-01 20:51:16 -06:00
Eric Wasylishen
c8ac9d2670
light: print position of degenerate faces during phong shading
2017-07-30 12:01:00 -06:00
Eric Wasylishen
602616451c
bsputils: add BSP_GetWorldModel
2017-06-25 14:37:26 -06:00
Eric Wasylishen
5eb4fd8790
common: make Face_Plane_E return a plane3f
2017-04-24 01:54:25 -06:00
Eric Wasylishen
a7df1994dc
common: fix up Face_Plane to remove unnecessary distance calc
2017-04-24 01:47:46 -06:00
Eric Wasylishen
68b084a6c3
replace glm with qvec
2017-04-24 00:26:49 -06:00
Eric Wasylishen
880ad3b381
bpsutil, common, light, vis: bounds check bsp->dfaces access
2017-03-18 16:31:52 -06:00
Eric Wasylishen
29884e2b4a
bsputils: add bounds checking to Face_GetNum
2017-03-18 16:17:01 -06:00
Eric Wasylishen
9aae46bd1c
light: adjust Light_PointInSolid to take a model param
2017-02-10 15:54:07 -07:00
Eric Wasylishen
bd0556cf22
light: switch to new Face_Centroid
2017-02-09 00:17: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
9246454bfc
light: refactor some more stuff to GLM
2017-02-06 23:00:48 -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
a6468984bf
all: finish c++ification
2016-10-17 19:52:17 -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
857b4402ad
light: change assertions to Q_assert (so they are all enabled in release builds)
2016-09-18 15:41:56 -06:00
Eric Wasylishen
687b1b20f6
light: bsp backend: fix and simplify Face_Contents to only look at texture names. it was broken when -splitspecial was used.
2016-09-09 13:04:53 -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