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
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
Jonathan
35040d1bd3
Q2 working sorta
2021-09-09 02:13:28 -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
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
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
bc44af4d1d
qbsp: fix unused variable warnings
2021-08-31 22:42:49 -06:00
Eric Wasylishen
1123205d47
qbsp: replace FreeMem uses
2021-08-24 22:49:06 -06:00
Eric Wasylishen
6a7e59026c
qbsp: refactor entities lump writing
2021-08-23 22:20:08 -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
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
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
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
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
Eric Wasylishen
8164506d30
qbsp: read valve 220 with q2/q3 flags
...
Fixes #212
2018-04-12 15:07:07 -06:00
Eric Wasylishen
30c19ab9da
qbsp: support reading Q2/Q3 detail flag
2018-03-18 19:50:35 -06:00
Eric Wasylishen
94dbd0a705
qbsp: _phong_angle_concave support
2018-01-30 01:20:38 -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
2ea0076160
qbsp: experimental func_illusionary_visblocker
2017-10-24 22:17:10 -07:00
Eric Wasylishen
bcf3f2e3e3
qbsp: add _external_map_scale key for misc_external_map
2017-10-01 12:39:15 -06:00
Eric Wasylishen
51fa4dc056
qbsp: expose WriteBspBrushMap
2017-07-23 14:20:35 -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
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
01fa4a9f58
qbsp: set up test case for #158
2017-07-08 16:23:08 -06:00
Eric Wasylishen
7656d5c2f1
qbsp: external map: merge all brush entities with worldspawn
2017-07-07 20:26:27 -06: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
117f568cd7
qbsp: don't write unused texinfo.
...
also cleanup planes writing
2017-07-03 01:58:26 -06:00
Eric Wasylishen
af264821b7
mathlib: factor out SetPlanePts
2017-06-20 14:39:15 -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
77f3da30bf
qbsp: add func_detail_fence
2017-06-09 15:13:13 -06:00
Eric Wasylishen
44445becb8
qbsp: rename "_nosurfacefragment" to func_detail_wall
2017-06-05 16:22:15 -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
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
9034eb107a
qbsp: move remaining headers to include directory
2017-04-20 19:52:06 -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
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
Eric Wasylishen
5fae648506
qbsp: refactor TexDef_BSPToValve
2017-03-23 14:39:34 -06:00
Eric Wasylishen
57bed163be
qbsp: change "brushprimtivies" label to shorter "bp"
2017-03-23 14:38:08 -06:00
Eric Wasylishen
78d517a99d
qbsp: remove placeholder entity inserted at the end of the vecotr
2017-03-22 19:22:23 -06:00
Eric Wasylishen
6f17758fc7
qbsp: quake/valve map output: avoid divide by 0 when calculating scale
2017-03-22 18:27:13 -06:00
Eric Wasylishen
be78da93e8
qbsp: quark ETP: add missing negative sign to match bjptools-xt output
2017-03-22 17:13:36 -06:00
Eric Wasylishen
fc2b5e438d
qbsp: brush primitives output
2017-03-22 16:39:43 -06:00
Eric Wasylishen
e8a7e55bb7
qbsp: refactoring to SetTexinfo_BrushPrimitives
2017-03-22 16:39:43 -06:00
Eric Wasylishen
3dda0e9c4e
qbsp: hook up "to quake" conversion
2017-03-22 02:39:55 -06:00
Eric Wasylishen
aab47605bb
qbsp: add TexDef_BSPToQuakeEd()
2017-03-22 02:12:16 -06:00
Eric Wasylishen
f04f34524c
qbsp: TextureAxisFromPlane: add extra param for returning the snapped axis
2017-03-22 01:11:21 -06:00
Eric Wasylishen
8e1b7effca
qbsp: mark unreachable code
2017-03-22 00:40:33 -06:00
Eric Wasylishen
c2bb2bea32
qbsp: first draft of * to valve220 conversion
2017-03-21 21:01:10 -06:00
Eric Wasylishen
d607aa1a89
qbsp: whitespace fix
2017-03-21 21:01:10 -06:00
Eric Wasylishen
986aad52c2
qbsp: save _mincolor to the .texinfo file
2016-11-02 17:10:01 -06:00
Eric Wasylishen
e5f5b99584
qbsp: bounds check some array accesses
2016-11-02 16:52:12 -06:00
Eric Wasylishen
05447ee0b9
qbsp: use a mtexinfo_t for texinfo before writing to bsp
2016-11-02 16:45:41 -06:00
Eric Wasylishen
a6468984bf
all: finish c++ification
2016-10-17 19:52:17 -06:00
Eric Wasylishen
cc12810da3
qbsp: brush primitives support
2016-10-04 22:39:13 -06:00
Eric Wasylishen
939778bd23
build: add snprintf wrapper from QuakeSpasm (vs2013 compat)
2016-08-06 15:47:40 -07:00
Eric Wasylishen
1340529234
qbsp: add -splitsky and -splitturb, finer control over -splitspecial
2016-04-16 22:53:33 -06:00
Eric Wasylishen
91f321493e
qbsp: fix wrong return type in ParseEntity
2016-04-07 21:11:53 -06:00
Eric Wasylishen
177e037de3
qbsp: better bounds checking for mapbrush_t::face and mapentity_t::mapbrush
2016-03-20 20:02:39 -06:00
Eric Wasylishen
86e92ee6b3
qbsp: add missing include
2016-03-20 14:08:34 -06:00
Eric Wasylishen
60c0b64906
qbsp: change mapdata_t to use std::vector
2016-03-20 14:02:31 -06:00
Eric Wasylishen
4ee88ede3b
qbsp: turn map.num* into functions
2016-03-12 13:50:24 -07:00
Eric Wasylishen
3db441eea2
qbsp: rename files to .cc
2016-03-12 13:02:28 -07:00