Commit Graph

832 Commits

Author SHA1 Message Date
Eric Wasylishen ca0fbba4bf qbsp: write correct .prt file for Q2 (PRT1 with clusters) 2021-09-18 00:02:32 -06:00
Jonathan 17606fde4b Use variant instead of having all BSP types allocated at once (even though they are smol)
Move ownership of pointers to the bsp structures themselves for now.
2021-09-16 11:52:37 -04:00
Jonathan e8bd554cc0 winding_t is now a C++ type - a hybrid stack/heap array.
In preparation for converting all of the vec_t[3] to qvec's, the Vector routines are now templated and work with any type that provides indexing operators.
Polylib.cc is gone, since this all needs to be in header now
qvec can now implicitly convert from T[N]
constexpr where appropriate
static inline -> inline
side_t is now an enum, moved into mathlib
2021-09-16 03:10:51 -04:00
Jonathan 1dd4df1b20 calloc/malloc/free -> new/new/delete (except for specific scenarios) 2021-09-14 11:39:12 -04:00
Jonathan eb6bb81d61 use the C++ includes
stdbool not required
_vsnprintf and _snprintf are standard in MSVC since 2015, so I just use them directly now. They'll be replaced by std::fmt later anyways.
use <thread> for threading, instead of pthreads/windows.h thread directly
2021-09-14 08:46:03 -04:00
Jonathan 7f8d2cfb49 Fix single line functions 2021-09-14 02:56:44 -04:00
Jonathan 4e7542b111 Clang format pass
typedef -> using
include guards -> pragma once
typedef struct x { } y; -> struct y { }
some fixes to extremely old code that shouldn't be required any more
2021-09-14 02:32:26 -04:00
Jonathan f89d5534b6 yay I can test tests now 2021-09-13 11:24:40 -04:00
Jonathan 4944ea36c7 set game on tests 2021-09-13 11:15:08 -04:00
Jonathan 75c303b503 last fix :( 2021-09-13 11:03:10 -04:00
Jonathan e3378432ff Fix test_qbsp (needs proper fixes, this is just a temp one) 2021-09-13 10:24:14 -04:00
Eric Wasylishen d2ea0cee41 Merge remote-tracking branch 'origin/master' into qbsp-use-common 2021-09-12 23:04:42 -06:00
Jonathan ae02ff5393 Implement leafbrushes cache
Fix bmodel leafbrushes (tank Spoike)
2021-09-12 13:27:39 -04:00
Jonathan 42cc946db1 Fix texinfo 2021-09-12 11:14:52 -04:00
Jonathan 91f0c47128 remove test code
fix two errors
2021-09-12 08:38:21 -04:00
Jonathan c95a1e2ccb q2 and bug fixes
# Conflicts:
#	include/qbsp/qbsp.hh
#	include/qbsp/winding.hh
#	qbsp/brush.cc
#	qbsp/csg4.cc
#	qbsp/merge.cc
2021-09-12 08:34:01 -04:00
Ozkan Sezer b2911290a7
fix hexen2 hull sizes (#318) 2021-09-11 11:46:03 -06:00
Jonathan 8cdb9ff6c4 Initial attempt at leafbrushes 2021-09-09 05:11:47 -04:00
Jonathan 35040d1bd3 Q2 working sorta 2021-09-09 02:13:28 -04:00
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 c16bbf403d Change miptex thingies to handle const as the comment wishes they would
Use optional to properly indicate the intended purpose of optional/"unset" values rather than a magic number (also because for some reason outputnum was stuck at 0 even though it defaults to -1 and I didn't want to debug why)
beginning of Q2 contents
2021-09-07 03:24:16 -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 437459a4dd Finish using game everywhere 2021-09-06 18:09:13 -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
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
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
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 8ed7dc9c05 qbsp: build fix 2021-08-30 01:18:47 -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 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
Eric Wasylishen ad2ac31e71 qbsp: use common's PrintBSPFileSizes 2021-08-24 01:36:22 -06:00
Eric Wasylishen 50a16fa2bf qbsp: use common to write bsp
NOTE: produces almost binary-identical e1m1.bsp as last commit, the only
difference is due to the old QBSP using ascii space as a padding byte,
and common using \0
2021-08-24 01:29:21 -06:00
Eric Wasylishen 00cdc2924a qbsp: fix name conflict with miptex_t (qbsp used it as a std::string alias) 2021-08-24 00:25:10 -06:00
Eric Wasylishen 6b1aaac9e9 qbsp: remove some bspx bits 2021-08-24 00:11:18 -06:00
Eric Wasylishen e0710859fb qbsp: remove mapentity_t::lumps 2021-08-23 23:25:31 -06:00
Eric Wasylishen c55112b47f qbsp: refactor lmshifts lump export 2021-08-23 23:18:43 -06:00
Eric Wasylishen 31d5e67603 qbsp: delete qbsp's copy of bspx code 2021-08-23 23:03:25 -06:00
Eric Wasylishen 490e71bb1a qbsp: remove cTotal 2021-08-23 22:50:03 -06:00
Eric Wasylishen df3ae568e5 qbsp: remove dead code 2021-08-23 22:45:27 -06:00
Eric Wasylishen a7fd04af12 qbsp: refactor texdata writing 2021-08-23 22:44:22 -06:00
Eric Wasylishen 6a7e59026c qbsp: refactor entities lump writing 2021-08-23 22:20:08 -06:00
Eric Wasylishen bfef548ba5 qbsp: remove uses of AddLump for lighting/visdata 2021-08-23 21:13:42 -06:00
Eric Wasylishen 561ffffb9b qbsp: refactor model writing 2021-08-23 21:01:49 -06:00
Eric Wasylishen c3d338616b qbsp: remove dead code 2021-08-23 20:18:15 -06:00
Eric Wasylishen f59bc08db8 qbsp: refactor face writing 2021-08-23 20:16:40 -06:00
Eric Wasylishen a0bdbf89d1 qbsp: refactor surfedges writing 2021-08-23 19:52:46 -06:00
Eric Wasylishen d7c7fb6b2d qbsp: remove dead code 2021-08-23 19:46:39 -06:00
Eric Wasylishen 8147b97dc6 qbsp: refactor vertexes writing 2021-08-23 19:45:31 -06:00
Eric Wasylishen f4700f978d qbsp: refactor edges writing 2021-08-23 19:36:41 -06:00
Eric Wasylishen 671bacf30c 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-23 18:05:37 -06:00
Eric Wasylishen bc5e743817 qbsp: writebsp: delete dead code 2021-08-23 18:02:05 -06:00
Eric Wasylishen 382a725f2b qbsp: refactor writing of leafs, nodes, marksurfaces lump
- only support bsp29 for now
2021-08-23 18:02:05 -06:00
Eric Wasylishen 24fc2ffc6a qbsp: refactor plane lump writing 2021-08-23 18:02:05 -06:00
Eric Wasylishen 460428d099 qbsp: refactor texinfo lump writing 2021-08-23 18:02:05 -06:00
Eric Wasylishen ff7f8a1542 qbsp: add -nothreads debug option 2021-08-23 00:12:38 -06:00
Eric Wasylishen 29652b4a7a qbsp: fix some threading issues with solidbsp.cc stats 2021-08-23 00:00:01 -06:00
Eric Wasylishen a53cf8dbbe qbsp: fix some thread safety bugs (mostly affecting stats output) 2021-08-22 23:45:42 -06:00
Eric Wasylishen 7a78e0a5b5 build: remove unused includes, fixes compat with tbb 2021.3.0 2021-07-13 21:47:52 -06:00
Eric Wasylishen c9570260fa gcc 11: pass constant to offsetof 2021-05-30 23:12:17 -06:00
Eric Wasylishen 386faa9315 qbsp: raise MAX_SUPERFACE_POINTS from 512 to 8192 2021-03-23 21:05:52 -06: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 1dee7269d6 qbsp: dont't clip self-intersecting func_detail_fence and func_detail_illusionary
Makes foliage easier with _mirrorinside 1
2020-07-21 20:46:18 -06:00
Eric Wasylishen c30a0a46a9 qbsp: fix origin brushes in hexen 2. Drop _no_bbox_rotation_expansion
document origin brushes. Never expand the bbox when origin brushes are in
use.
2020-02-24 01:26:53 -07:00
Eric Wasylishen a91ee8cc7e qbsp: fix heap corruption errors on VS2019. Winding bookkeeping is wrong
now
2020-01-29 22:46:39 -07:00
Eric Wasylishen 0873b0af2c qsbp: code cleanup 2020-01-29 22:45:55 -07:00
Eric Wasylishen d083f0f87f qbsp: parallelize PartitionSurfaces 2020-01-29 21:14:55 -07:00
Eric Wasylishen 1a161b3ad5 qbsp: code cleanup 2020-01-29 20:56:29 -07:00
Eric Wasylishen f74d85c022 Revert "qbsp: parallelize solidbsp"
This reverts commit 2ebfa8d780.
2020-01-29 01:51:31 -07:00
Eric Wasylishen 2ebfa8d780 qbsp: parallelize solidbsp 2020-01-29 01:22:29 -07:00
Eric Wasylishen 1f565d7e7a qbsp: parallelize CSGFaces 2020-01-28 21:18:08 -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
Eric Wasylishen 5e74b4d0bb qbsp: fix external maps with no worldspawn brushes
Thanks to ZungryWare for the report
2019-11-29 21:03:54 -07:00
Eric Wasylishen cefd20c8da qbsp: fixes for -wrbrushes + rotation 2019-11-24 17:23:41 -07:00
Eric Wasylishen d7d797b898 qbsp: restore bounds expansion for rotators.
Add "_no_bbox_rotation_expansion" key for opting-out of the bounds expansion

Fixes #271
2019-10-27 23:02:05 -06:00
Eric Wasylishen 79d3aa99de qbsp: fix relative paths for .wad files
Fixes #279
2019-10-27 19:03:45 -06:00
Eric Wasylishen 4ec22ee3f9 qbsp: more logging of face line numbers for errors/warnings 2019-10-13 23:10:42 -06:00
Eric Wasylishen 1577981960 qbsp: fix clip brushes export with -wrbrushes, and various other
fixes for -wrbrushes
2019-10-03 19:59:56 -06:00
Eric Wasylishen 209d481b4c qbsp: attempted fix of -wrbrushes (ProcessEntity behaviour was changed
a while ago and copy/pasted code in BSPX_CreateBrushList wasn't updated)
2019-10-03 00:13:00 -06:00
Eric Wasylishen 04601656ff qbsp: Add support for _minlight_excludeN where N is in 2..9 2019-08-15 19:45:51 -06: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 ac3553cb50 brush.cc: temporary hotfix, disable bounding box tweak when rotate_offset
is set. Breaks usage of origin brush with func_train
2019-06-29 18:27:05 -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 83d9071269 qbsp: fix tjuncs on bmodels
Fixes #232
2019-03-25 01:31:43 -06:00
Eric Wasylishen ad65449cef qbsp: add "-midsplitsurffraction n" option as an alt. to -maxnodesize
switch to midsplit if the node contains more than this fraction of the
model's total surfaces. Try 0.15 to 0.5. Works better than
maxNodeSize for maps with a 3D skybox (e.g. +-128K unit maps)
2019-02-11 00:52:38 -07:00
Eric Wasylishen 16ad2b077a qbsp: -objexport debugging: Add another point where an .obj is dumped 2019-01-26 22:22:07 -07:00
Eric Wasylishen 2df839cfc2 light: Add "_bounce" "-1" to disable bouncing for a func_detail/etc. 2019-01-22 00:02:46 -07:00
Eric Wasylishen 0ac4909396 qbsp: change outside.cc to not fill leafs that have faces that are
straddling in and out of the void.

Previously, we were just deleting these faces, leaving HOMs.
Keeping them but filling the leaf in as solid doesn't work either, because
if they are the only faces left in the leaf it messes up the content type
determination later.

Fixes test_tjunc01.map test case from Qmaster.
2019-01-19 21:56:05 -07:00
Eric Wasylishen 4a360989f3 qbsp: add -worldextent option for compiling large maps, default 65536 2018-12-24 01:53:08 -07:00
Eric Wasylishen fc72bbb935 qbsp: fix _mirrorinside on bmodels so that they have CONTENTS_SOLID
as expected
2018-08-28 21:23:08 -06:00
Eric Wasylishen 8164506d30 qbsp: read valve 220 with q2/q3 flags
Fixes #212
2018-04-12 15:07:07 -06:00
Eric Wasylishen 02e66edd5b qbsp: make "too many edges" have a clear error message, instead of
an assertion failure
2018-04-05 22:18:28 -06:00
Eric Wasylishen 4491598bdb qbsp: fix qbsp crash when worldspawn has 0 brushes 2018-03-23 14:48:20 -06:00
Eric Wasylishen 30c19ab9da qbsp: support reading Q2/Q3 detail flag 2018-03-18 19:50:35 -06:00
Eric Wasylishen f92b48a8cb qbsp: experimental _noclipfaces key 2018-03-13 12:23:41 -06:00
Eric Wasylishen c9b32214c1 qbsp: fix "_mirrorinside" on bmodels.
NOTE: This turns the contents of bmodels to CONTENTS_EMPTY if
"_mirrorinside" is used. This is not ideal (e.g. if used on a func_door,
bullets will go through the door but it blocks the player), but it's
usable for func_illusionary at least.
2018-03-12 21:15:31 -06:00
Eric Wasylishen 94dbd0a705 qbsp: _phong_angle_concave support 2018-01-30 01:20:38 -07:00
Eric Wasylishen 3b3d753cf4 qbsp: make -omitdetail affect all detail types 2018-01-30 01:10:25 -07:00
Eric Wasylishen 95e9fdcd21 qbsp: tidy up "repairing" warning message 2018-01-28 02:03:00 -07:00
Eric Wasylishen 84bf594892 qbsp: heal invalid texture projections 2018-01-28 01:55:09 -07:00
Eric Wasylishen 23b25a0a0e qbsp: add failing tests for healing invalid texture projections 2018-01-28 01:54:58 -07:00
Eric Wasylishen 57510eab0e qbsp: remove hint/skip texinfo clearing hack.
Fixes https://github.com/ericwa/ericw-tools/issues/196

This should be by stripping unreferenced texinfo at the end of compiling
2018-01-06 01:29:31 -07:00
Eric Wasylishen 84b493d7d2 qbsp: update manual 2017-10-25 14:07:25 -07:00
Eric Wasylishen ddf29d4104 qbsp: fix not being able to see between leafs within a func_illusionary_visblocker 2017-10-25 12:04:52 -07:00
Eric Wasylishen 2ea0076160 qbsp: experimental func_illusionary_visblocker 2017-10-24 22:17:10 -07:00
Eric Wasylishen b85d627c8f change branding to ericw-tools 2017-10-19 16:35:37 -06:00
Eric Wasylishen 7a7d3b843c qbsp: add bsp2 check if int16_t nodes/leafs are exceeded 2017-10-19 16:19:47 -06:00
Eric Wasylishen bcf3f2e3e3 qbsp: add _external_map_scale key for misc_external_map 2017-10-01 12:39:15 -06:00
Eric Wasylishen d4f3e5de65 qbsp: partially revert "csg: mirror faces, even for solid, to help leaf content assignment" and turn it into a flag
(comit a910dd861a)
fixes https://github.com/ericwa/tyrutils-ericw/issues/175 (swtest2.map)
2017-09-16 11:18:30 -06:00
Eric Wasylishen 1ac4bf5a6b qbsp: hack to fix slightly off grid overlapping brushes having missing the overlapping parts deleted after CSG
fixes https://github.com/ericwa/tyrutils-ericw/issues/174
2017-09-15 21:08:04 -06:00
Eric Wasylishen d195c0bd2a qbsp: add _mirrorinside key for func_water, etc. 2017-08-27 12:14:09 -06:00
Eric Wasylishen a910dd861a qbsp: csg: mirror faces, even for solid, to help leaf content assignment
Mark them as skip so they don't get saved.

This fixes csg_fail.map (in combination with -epsilon 0.1)
2017-07-24 23:12:37 -06:00
Eric Wasylishen 38a7d6a944 qbsp: expose PointInLeaf as debug helper 2017-07-24 22:57:43 -06:00
Eric Wasylishen a936686fe5 qbsp: allow empty leak lines for pathological maps (single brush) 2017-07-24 18:07:40 -06:00
Eric Wasylishen c300170752 qbsp: disable q3map stuff 2017-07-24 14:13:57 -06:00
Eric Wasylishen 9377663e3c qbsp: fix rejecting valid brushes in SplitBrush 2017-07-23 16:29:00 -06:00
Eric Wasylishen 51fa4dc056 qbsp: expose WriteBspBrushMap 2017-07-23 14:20:35 -06:00
Eric Wasylishen 8bfe9b4602 qbsp: exportobj.cc: helpers for exporting face/brush vectors 2017-07-23 14:15:10 -06:00
Eric Wasylishen 3efc9c1f3e qbsp: make Contents_Priority public 2017-07-23 14:08:34 -06:00
Eric Wasylishen 39aa7dcd0f qbsp: add FilterStructuralBrushesIntoTree 2017-07-23 13:13:09 -06:00
Eric Wasylishen b38c04b372 qbsp: clean up brush memory leaks 2017-07-23 13:12:14 -06:00
Eric Wasylishen 7c49d499c2 qbsp: tidy FreeBrushes 2017-07-23 02:48:58 -06:00
Eric Wasylishen 2ee9017879 qbsp: test brush contents are propogated by SplitBrush 2017-07-23 01:55:53 -06:00
Eric Wasylishen 120dfda49a qbsp: small test refactor 2017-07-23 01:51:46 -06:00
Eric Wasylishen 578d24951d qbsp: fix memory corruption in SplitBrush 2017-07-23 01:51:31 -06:00
Eric Wasylishen 9629134612 qbsp: fix some issues with SplitBrush 2017-07-23 01:32:04 -06:00
Eric Wasylishen 3bb22ef22b qbsp: add SplitBrush from q3map (not yet tested) 2017-07-23 00:42:09 -06:00
Eric Wasylishen d246d2a798 qbsp: add FlipWinding 2017-07-22 23:53:33 -06:00
Eric Wasylishen 1859a1c0b5 qbsp: make DivideWinding saner + const 2017-07-22 21:29:04 -06:00
Eric Wasylishen 11a7e7bc88 qbsp: refactor BrushMostlyOnSide to take separate normal/dist 2017-07-22 19:36:55 -06:00
Eric Wasylishen b8dec3ed2b qbsp: add ChopWindingInPlace from q3map 2017-07-22 19:30:51 -06:00
Eric Wasylishen 3c7ea88c37 qbsp: add CopyBrush 2017-07-22 18:20:03 -06:00
Eric Wasylishen 5158b6d296 qbsp: add BoundBrush (from q3map) 2017-07-22 17:09:03 -06:00
Eric Wasylishen 7ef5ad162d qbsp: add BrushMostlyOnSide (from q3map) 2017-07-22 17:05:09 -06:00
Eric Wasylishen 9868c7f965 qbsp: Add BrushVolume 2017-07-22 16:33:26 -06:00
Eric Wasylishen 7d1dc71069 qbsp: add Face_Plane 2017-07-22 16:31:26 -06:00
Eric Wasylishen bca6a55662 qbsp winding: add WindingArea 2017-07-22 16:31:21 -06:00
Eric Wasylishen 0ebbdac5f9 qbsp: refactor FindPlane 2017-07-17 21:24:32 -06:00
Eric Wasylishen a34f3df88d qbsp: surfaces.cc: use std::map for vertex hashing 2017-07-17 16:35:11 -06:00
Eric Wasylishen 3e9e388545 qbsp: surfaces.cc: refactor vertex hashing 2017-07-17 16:06:03 -06:00
Eric Wasylishen fc7a085893 qbsp: surfaces.cc: rewrite edge hash to use std::map
ad_test1.map compiles to a binary-identical .bsp
2017-07-17 16:05:46 -06:00
Eric Wasylishen 8b9f5ea40a qbsp: fix handling of duplicate planes
fixes spurious leak in e1m4.map
2017-07-15 13:51:26 -06:00
Eric Wasylishen ceff3bba82 qbsp: fix const warning 2017-07-15 12:37:15 -06:00
Eric Wasylishen 1a15d5f0e9 qbsp: add -leaktest option (from q2) 2017-07-15 12:23:11 -06:00
Eric Wasylishen 0263f95e59 qbsp: add -expand flag from q3map for testing hull1 expansion 2017-07-11 17:54:28 -06:00
Eric Wasylishen 2710f9b1a1 qbsp: remove/comment dead code 2017-07-11 00:07:32 -06:00
Eric Wasylishen be2799578f qbsp: remove dead code (extrafaces) 2017-07-11 00:05:57 -06:00
Eric Wasylishen 53743ddf0e qbsp: SubdivideFace: revert change to splitting logic from 1630b87
Fixes #160
2017-07-10 21:46:14 -06:00
Eric Wasylishen f54abd9a2c qbsp: WriteBSPFile: print the bsp file name to the log 2017-07-10 21:26:06 -06:00
Eric Wasylishen 240d65f788 qbsp: outside.cc rewrite
- no more recursively traversing portals, as this can overflow the stack
- better outside filling and .pts file generation, inspired by q3map
  (do a bfs from all leafs with entities, storing the number of steps
   from an occupied leaf in each leaf. Then do a dfs from the outside node
   to the first entity we hit.)
- .por file writing was dropped for now, can be re-added later
2017-07-10 12:46:22 -06:00
Eric Wasylishen bb3e296a0d qbsp: FillOutside: count portals yourself 2017-07-09 01:06:49 -06:00
Eric Wasylishen 3069996a6f qbsp: portals.cc: remove statics, move to portal_state_t struct 2017-07-09 00:46:06 -06:00
Eric Wasylishen e848d00f92 qbsp: get an actual test for #158, currently disabled 2017-07-08 17:38:33 -06:00
Eric Wasylishen 01fa4a9f58 qbsp: set up test case for #158 2017-07-08 16:23:08 -06:00
Eric Wasylishen 34a6bf7876 qbsp: add testqbsp target 2017-07-08 15:49:14 -06:00
Eric Wasylishen 7656d5c2f1 qbsp: external map: merge all brush entities with worldspawn 2017-07-07 20:26:27 -06:00
Eric Wasylishen a4e3a3a887 Revert "qbsp: move node_t markfaces list to a std::vector"
This reverts commit 31df408333.
2017-07-05 18:10:56 -07:00
Eric Wasylishen cef3b3da9f qbsp: misc_external_map: add "_external_map_angles" for pitch/yaw/roll 2017-07-05 15:13:09 -06:00
Eric Wasylishen cf6af89bdf qbsp: fix some comments 2017-07-03 17:48:43 -06:00
Eric Wasylishen 117f568cd7 qbsp: don't write unused texinfo.
also cleanup planes writing
2017-07-03 01:58:26 -06:00
Eric Wasylishen 31df408333 qbsp: move node_t markfaces list to a std::vector 2017-07-02 21:03:41 -06:00
Eric Wasylishen 97787e9d2c qbsp: add extrafaces argument to MakeFaceEdges 2017-07-02 20:06:41 -06:00
Eric Wasylishen eef45d79eb qbsp: more refactoring GrowNodeRegion 2017-07-02 17:27:35 -06:00
Eric Wasylishen 014770b212 qbsp: refactor GrowNodeRegion 2017-07-02 17:18:19 -06:00
Eric Wasylishen d7e90b1cf2 qbsp: PrintBSPFileSizes: reformat 2017-07-02 16:34:55 -06:00
Eric Wasylishen 80380fa7fd qbsp: drop ExportNodePlanes. Planes were already deduplicated by
FindPlanes.
2017-07-01 17:25:02 -06:00
Eric Wasylishen af264821b7 mathlib: factor out SetPlanePts 2017-06-20 14:39:15 -06:00
Eric Wasylishen 85a6b9095d qbsp: refactor PlaneInvEqual 2017-06-20 13:07:17 -06:00
Eric Wasylishen 73ffb37417 misc_external_map: fix -onlyents 2017-06-15 17:38:49 -06:00
Eric Wasylishen 37ed11c2ed qbsp: experimental "misc_external_map" entity
"_external_map" - map to load
"_external_map_classname" - classname to switch to (e.g. func_wall)
"_external_map_angle" - rotation angle around Z axis
2017-06-15 03:43:39 -06:00
Eric Wasylishen ceab425885 map.cc: factor out plane-points setting code 2017-06-15 03:30:02 -06:00
Eric Wasylishen 8d2a257729 wad.cc: factor out .wad file opening 2017-06-15 03:29:55 -06:00
Eric Wasylishen 19dd7b1c4a qbsp: log number of planes after calling Brush_LoadEntity 2017-06-10 01:15:49 -06:00
Eric Wasylishen 77f3da30bf qbsp: add func_detail_fence 2017-06-09 15:13:13 -06:00
Eric Wasylishen 7198884392 qbsp: ExportDrawNodes: add assertion from DP that node children are different
DetailToSolid: collapse redundant nodes where both children are
solid (-1) to just be the leaf -1. Any faces on-node should be
impossible to see so they can be safely discarded.
2017-06-09 13:14:52 -06:00
Eric Wasylishen d01b740b5b qbsp: add -omitdetailwall and -omitdetailillusionary 2017-06-07 14:12:02 -06:00
Eric Wasylishen 37401937ae qbsp: fix LinkNodeFaces documentation 2017-06-07 12:23:25 -06:00
Eric Wasylishen 5f4520ee8b exportobj.cc: remove redundant #defines 2017-06-05 20:29:36 -06:00