Commit Graph

193 Commits

Author SHA1 Message Date
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 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 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 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 f978d2a8d5 common: start adding overflow checks to ConvertBSPFormat 2021-09-05 00:44:25 -06:00
Jonathan b01fddf7f1 More Q2 support 2021-09-04 18:49:01 -04:00
Eric Wasylishen 54d9e08033 qbsp: handle target bsp version 2021-09-01 00:42:30 -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 a75ad998e7 common: clean up Hexen II handling 2021-08-30 01:05:18 -06:00
Eric Wasylishen 5429655ce8 qbsp: move internal content types to bspfile.hh 2021-08-26 22:30:56 -06:00
Eric Wasylishen 09d7b6e73f common: transfer comments from qbsp's bspfile.hh 2021-08-24 00:17:47 -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 b5fcdec19e cleanup: remove "byte" typedef 2021-02-07 14:02:35 -07:00
Eric Wasylishen f0e2f4ba96 common: small tweaks: CopyWinding accepts null, document face side 2021-02-05 22:26:13 -07:00
Eric Wasylishen d4aa42f0ab bsputil: decompiler wip 2021-01-30 14:49:18 -07:00
Eric Wasylishen d6136c154d light: add _light_alpha func_group key for making faces translucent for
light
2019-12-28 21:48:33 -07:00
Eric Wasylishen a4c1ce6ff6 qbsp, light: support _lightignore on func_detail/group 2019-12-09 00:09:20 -07:00
Shpoike 89365949bc Squashed commit of the following:
commit 8ca122916d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 20:54:23 2019 -0600

    fix linker error (radlights is in 2 .cpp files)

commit 8f06fc9c8d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 20:53:57 2019 -0600

    add clarification comment

commit 038a553fb0
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 20:30:27 2019 -0600

    fix tests compilation

commit 02e94ec507
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 19:59:25 2019 -0600

    hlbsp: use q_snprintf

commit 669a5a7911
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 19:56:21 2019 -0600

    Reformat

commit 6653760982
Merge: 347a455 ac3553c
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 19:28:06 2019 -0600

    Merge remote-tracking branch 'origin/master' into hlbsp

    # Conflicts:
    #	include/qbsp/qbsp.hh

commit 347a455102
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 28 02:18:16 2019 +0000

    Misc HLBSP tweaks

    Added support for multiple -wadpath args.
    Added -xwadpath (for eg valve/*.wad to avoid bloat/license issues).
    Reworked hint brushes - the non-hint surfaces can use any name, just so long as they're not 'hint', for compat with zhlt.
    Support 'bevel' and 'null' textures for compat with zhlt.

commit 7fb22c7367
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 28 01:59:42 2019 +0000

    Support for halflife-style .rad surface lights (probably too bright, but the basics work).

commit 2da504fb62
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 28 01:56:27 2019 +0000

    Add minus-prefixed textures for halflife's randomised-textures feature, instead of getting crash-to-desktop errors when the map is loaded.

commit 6366199bdb
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 21 04:51:24 2019 +0000

    First attempt at hlbsp output.
2019-07-04 21:08:17 -06:00
Eric Wasylishen b343b9504a qbsp, light: support _minlight_exclude on func_group, detail, etc. 2019-04-05 21:14:39 -06:00
Eric Wasylishen 2df839cfc2 light: Add "_bounce" "-1" to disable bouncing for a func_detail/etc. 2019-01-22 00:02:46 -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 94dbd0a705 qbsp: _phong_angle_concave support 2018-01-30 01:20:38 -07:00
Eric Wasylishen 7170aac1c3 light: FacesOverlappingEdge 2017-11-23 23:45:05 -07:00
Eric Wasylishen 4471a80aa9 common: add q2 content types (from: https://github.com/id-software/quake-2-tools ) 2017-10-03 18:17:10 -06:00
Eric Wasylishen 873e0b8a35 common: Face_IsLightmapped: q2 support 2017-10-03 14:42:19 -06:00
Eric Wasylishen 2dc22b7088 common: add loadversion to mbsp_t 2017-10-03 14:17:42 -06:00
Eric Wasylishen dff71edfe9 light: very early q2 support. half of the faces seem to be saved without lightmaps for some reason 2017-10-03 00:33:14 -06:00
Eric Wasylishen df06ead299 common: q2 <-> generic conversion 2017-10-02 16:02:01 -06:00
Eric Wasylishen b847af61e1 common: bsp29_t <-> mbsp_t conversion 2017-10-01 21:27:00 -06:00
Eric Wasylishen f7635162c9 common: bspfile refactoring 2017-10-01 20:51:16 -06:00
Eric Wasylishen dcac3e70c9 common: refactoring some of the generic bsp stuff 2017-10-01 18:08:38 -06:00
Eric Wasylishen 7aa5e4cc48 common: add "generic bsp" types 2017-09-26 16:14:25 -06:00
Eric Wasylishen 5fc3110df6 common: get bspinfo working with q2bsp 2017-09-25 00:22:10 -06:00
Eric Wasylishen 55f2c3c47e common: add q2 structs to bspfile.hh 2017-09-24 22:47:27 -06:00
Eric Wasylishen 989f0305ba bsputil: add checks for degenerate faces, unused planes/texinfo/verts,
clipnodes
2017-06-21 16:36:12 -06:00
Eric Wasylishen ea099775ef qbsp, light: allow _shadow -1 to disable shadows from func_detail 2017-06-05 14:01:12 -06:00
Eric Wasylishen fbeba25bd1 light: read _mincolor from .texinfo file 2016-11-02 17:23:25 -06:00
Eric Wasylishen a6468984bf all: finish c++ification 2016-10-17 19:52:17 -06:00