Commit Graph

590 Commits

Author SHA1 Message Date
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
Eric Wasylishen 44445becb8 qbsp: rename "_nosurfacefragment" to func_detail_wall 2017-06-05 16:22:15 -06:00
Eric Wasylishen f8f007f7df qbsp: detail brushes with CFLAGS_DETAIL_NOSURFACEFRAGMENT don't
clip ordinary detail brushes, only those that also have the flag set
2017-06-05 16:11:04 -06:00
Eric Wasylishen 3ca83ea46e qbsp: add logging for func_detail_illusionary and _nosurfacefragment 2017-06-05 14:37:40 -06:00
Eric Wasylishen ac78efed98 qbsp: func_detail rewrite.
- Fix corrupt VIS issues when using func_detail
- func_detail no longer seals the map.
- add func_detail_illusionary entity type
- add func_detail key "_nosurfacefragment"
2017-06-05 14:09:31 -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 e3da31b308 writebsp.cc: Assert we never write a private contents type to the bsp 2017-06-05 14:00:01 -06:00
Eric Wasylishen dffee91191 csg4.cc: refactor if() statement to match comment 2017-06-01 19:40:06 -06:00
Eric Wasylishen 8236efa613 csg4.cc: clarify SaveInsideFaces docs and add assertions 2017-06-01 14:25:14 -06:00
Eric Wasylishen e3b7b9615a qbsp: fix check for needing PRT2 (unlikely to matter on real maps) 2017-06-01 01:16:36 -06:00
Eric Wasylishen 213e4b9f7d qbsp: add a -nodetail switch, for debugging func_detail issues 2017-05-31 23:23:53 -06:00
Eric Wasylishen f5d4cd9202 qbsp: add -forceprt1 option for generating a PRT1 to load in editors
This is for previewing the portals between clusters, since no editors
can load PRT2.
2017-05-31 23:18:04 -06:00
Eric Wasylishen 8385797ce7 csg4.cc: add a clarifying comment 2017-05-31 13:09:42 -06:00
Eric Wasylishen 224b0c4d2e qbsp: "Couldn't create brush faces": print .map line number 2017-04-30 19:05:01 -06:00
Eric Wasylishen 85a4249852 qbsp: csg: make hint brushes never clip anything else. 2017-04-30 12:39:12 -06:00
Eric Wasylishen 8f4b506608 qbsp: refactor cmake setup 2017-04-28 13:04:51 -06:00
Eric Wasylishen 64efc77055 qbsp: expose some stuff in qbsp.hh 2017-04-28 13:04:44 -06:00
Eric Wasylishen 3ec36f6550 qbsp: use common/cmdlib 2017-04-26 15:08:49 -06:00
Eric Wasylishen a548ada3d0 qbsp: fix build 2017-04-26 14:57:23 -06:00
Eric Wasylishen 32eaa99d40 qbsp: rename our plane_t to qbsp_plane_t 2017-04-26 14:55:26 -06:00
Eric Wasylishen 8c89e128c7 qbsp: drop internal mathlib 2017-04-26 14:51:27 -06:00
Eric Wasylishen 902c45c946 all: make VectorCompare take an explicit epsilon 2017-04-26 14:20:45 -06:00
Eric Wasylishen 68b084a6c3 replace glm with qvec 2017-04-24 00:26:49 -06:00
Eric Wasylishen 1f7bd69385 qbsp: optimize FindTexinfo 2017-04-22 16:59:14 -06:00
Eric Wasylishen 43798edcfe qbsp: split out winding.hh 2017-04-20 20:09:24 -06:00
Eric Wasylishen 9034eb107a qbsp: move remaining headers to include directory 2017-04-20 19:52:06 -06:00
Eric Wasylishen c34d958d7a qbsp: split up qbsp.hh 2017-04-20 19:44:10 -06:00
Eric Wasylishen 66744e33e2 qbsp: map conversion: output epairs in the correct order 2017-03-27 19:36:53 -06:00
Eric Wasylishen 30b8503ccf qbsp: -convert quake: silence annoying warnings 2017-03-26 17:46:31 -06:00
Eric Wasylishen 73082828b4 qbsp: don't use regex stuff, doesn't work on the travis version of gcc 2017-03-26 17:41:22 -06:00
Eric Wasylishen ed89dc487a qbsp: add docs for -convert option 2017-03-26 17:07:52 -06:00
Eric Wasylishen 62f17545b9 qbsp: expose LoadBrush in header 2017-03-26 16:41:16 -06:00
Eric Wasylishen af355a87be qbsp: fix -convert quake2 2017-03-26 16:35:26 -06:00
Eric Wasylishen f3caed2f8b qbsp: support -convert quake2 to write classic q2/q3 format with three 0 flags 2017-03-26 16:06:21 -06:00
Eric Wasylishen 32b001b4d9 qbsp: fix typo in QuakeEd .map conversion 2017-03-26 16:05:33 -06:00
Eric Wasylishen dbec32efaf qbsp: -convert bp: write 0 0 0 face flags 2017-03-26 15:49:15 -06:00
Eric Wasylishen 8294e1d750 qbsp: change -convert valve220 to shorter -convert valve 2017-03-26 15:32:58 -06:00
Eric Wasylishen 75c3fdadf6 qbsp: rewrite .map printing code. Print as integers if it can be done losslessly. 2017-03-26 15:29:36 -06:00
Eric Wasylishen 2fe14087db qbsp: QuakeEd .map conversion: normalize shifts 2017-03-26 15:08:10 -06:00
Eric Wasylishen 6c336738c4 qbsp: QuakeEd .map conversion: drop the RMSE test as it sometimes picked worse visual results (wood roof trim in ad_swampy) 2017-03-26 14:42:13 -06:00
Eric Wasylishen 39c137c2a3 qbsp: SetTexinfo_QuakeEd_New: treat scale=0 as scale=1 2017-03-26 13:00:07 -06:00
Eric Wasylishen 94ba5560c7 qbsp: fix QuakeEd map conversion 2017-03-26 12:40:06 -06:00
Eric Wasylishen ce673b813e qbsp: remove dead code 2017-03-23 14:40:03 -06:00