Commit Graph

67 Commits

Author SHA1 Message Date
Eric Wasylishen 80a4aa1b97 Merge branch 'master' into qbsp-contentflags 2021-09-22 00:12:27 -06:00
Ozkan Sezer 69cb6b981f
bsputil: write ents in binary mode and print its crc in 4-digit hex (#317) 2021-09-08 17:50:32 -06:00
Jonathan b01fddf7f1 More Q2 support 2021-09-04 18:49:01 -04: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 c8b2f6f8e6 decompile: fix "done" message 2021-02-08 23:35:07 -07:00
Eric Wasylishen fcf0ebbbfe build: upgrade googletest 2021-02-07 14:42:12 -07:00
Eric Wasylishen b5fcdec19e cleanup: remove "byte" typedef 2021-02-07 14:02:35 -07:00
Eric Wasylishen 03e1171039 decompile: fix some warnings 2021-02-07 00:49:25 -07:00
Eric Wasylishen fcb0da5190 decompile: add a simplifed --decompile-geomonly mode 2021-02-07 00:30:49 -07:00
Eric Wasylishen c1a479c8ff decompile: optimize by doing the RemoveRedundantPlanes in parallel 2021-02-06 22:01:58 -07:00
Eric Wasylishen f981b5e670 decompile: parallelize 2021-02-06 20:23:05 -07:00
Eric Wasylishen 638f250949 decompile: remove some log spam, change copy to const ref 2021-02-06 17:24:57 -07:00
Eric Wasylishen 2d242fcab6 decompile: pick best split 2021-02-06 17:04:34 -07:00
Eric Wasylishen cc116a4729 decompile: restore coplanar faces 2021-02-06 16:19:15 -07:00
Eric Wasylishen 8b9e14eaf1 decompile: setup for splitting up coplanar faces 2021-02-06 14:11:24 -07:00
Eric Wasylishen 32d3fb7f10 decompile: fix typo 2021-02-06 13:57:52 -07:00
Eric Wasylishen 9ae2f8678e decompile: wip brush creation code 2021-02-05 22:42:44 -07:00
Eric Wasylishen e44dbf9307 decompile: add some comments, skip empty brushes 2021-02-04 22:01:37 -07:00
Eric Wasylishen 8bb848d221 decompile: initial texturing 2021-01-31 01:27:35 -07:00
Eric Wasylishen 54525f4dae decompile: handle water leafs 2021-01-30 22:09:26 -07:00
Eric Wasylishen bec54ac47d decompile: handle brush/point entities 2021-01-30 21:32:53 -07:00
Eric Wasylishen 9124653156 common: move EntData_ function to common 2021-01-30 21:11:25 -07:00
Eric Wasylishen 760f18f2ae bsputil: decompiler wip 2021-01-30 20:25:47 -07:00
Eric Wasylishen d4aa42f0ab bsputil: decompiler wip 2021-01-30 14:49:18 -07:00
Eric Wasylishen 569e7fad02 bsputil: make --settexinfo operate in place on the .bsp 2020-05-14 19:53:48 -06:00
Eric Wasylishen 78e902b75e bsputil: add option for swapping a face's texinfo, --findfaces 2020-05-14 17:32:54 -06:00
Eric Wasylishen 8a47233bbf bsputil: start a --compare feature for helping with qbsp testing 2019-01-10 02:58:37 -07:00
Eric Wasylishen 5e472bf817 bsputil: --check: log world mins/maxs 2017-12-12 20:48:57 -07:00
Eric Wasylishen b85d627c8f change branding to ericw-tools 2017-10-19 16:35:37 -06:00
Eric Wasylishen b52c495574 common: fix q2 conversion bugs 2017-10-02 23:32:06 -06:00
Eric Wasylishen 7e429c560c bsputil: add --convert option 2017-10-02 18:27:20 -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 7236e47ef4 bsputil: print used lighstyles 2017-06-25 16:40:06 -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 13922a2b92 bsputil --check: add some stats on visleafs and vis clusters 2017-06-21 13:24:05 -06:00
Eric Wasylishen c1a9b01c44 bsputil: print BSP node heights for the first few levels of the tree
to check if it's decently balanced
2017-06-13 17:19:42 -06:00
Eric Wasylishen 8a4d1ff218 common: add 4x4 (from mesa) and 2x2 matrix inverse 2017-04-23 15:58:51 -06:00
Eric Wasylishen 880ad3b381 bpsutil, common, light, vis: bounds check bsp->dfaces access 2017-03-18 16:31:52 -06:00
Eric Wasylishen a6468984bf all: finish c++ification 2016-10-17 19:52:17 -06:00
Eric Wasylishen 299e68e7e5 build: support Ubuntu 14.04 2016-09-23 15:13:58 -06:00
Eric Wasylishen 9340ce223a build: clean up request for C++11. require cmake 3.1 (which introduced CMAKE_CXX_STANDARD) 2016-08-09 16:00:09 -06:00
Eric Wasylishen 939778bd23 build: add snprintf wrapper from QuakeSpasm (vs2013 compat) 2016-08-06 15:47:40 -07:00
Eric Wasylishen b087f0f010 build: specify c99 2016-04-18 14:22:33 -06:00
Eric Wasylishen 8773e0bb15 build: fix build error on Linux due to missing target_link_libraries(qbsp ) 2016-03-16 10:48:00 -06:00
Eric Wasylishen 99d5a4d4f9 build: setup CPack to package binaries in a zip file 2015-12-09 16:23:36 -08:00
Eric Wasylishen 420125cc67 replace tabs with spaces.
for FILE in $(find . -name "*.h" -or -name "*.c"); do cat $FILE | expand > temp; cat temp > $FILE; done
2015-12-07 15:08:48 -07:00
Eric Wasylishen c149ed2bf6 build: VS2015 support 2015-12-07 14:23:13 -07:00
Eric Wasylishen 3a109ac84d build: split up cmake build system into subprojects.
-DDOUBLEVEC_T now correctly used for qbsp only.
2015-05-05 12:34:39 -06:00
Kevin Shanahan bdd2ac6127 bsputil: fix wad export from bsp with missing textures
We need to skip over the textures with missing data lumps in the BSP,
i.e. having data offset -1.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2014-02-21 09:21:35 +10:30
Kevin Shanahan 509289efd3 bsputil: don't test < 0 on unsigned vertex and marksurf numbers
Now that our type constraints dictate they can never appear < 0.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-09-29 08:45:06 +09:30