Jonathan
510023e089
step 1 of finishing the rewrite I started of the image subsystems.
...
- for Quake-likes, WADs will be added as file system archives directly when the first brush is encountered since the wad key is ready to go by that point.
- after loading the .map and before constructing the BSP, what I call secondary textures (animation frames for Quake-likes) are added to the list, and the BSP's miptex data is filled.
- BSP miptex data is now opaque to the BSP process; the BSP simply copies the raw miptex information from the input. This simplifies the BSP structures and reading/writing routines.
- the img subsystem supports reading from raw miptexes now, although in practice this only happens for Quake-likes atm
- instead of a "wal cache", maps now have a "meta cache" which stores the metadata information for all games instead of just Quake II
- texture meta can now be ref'd out rather than needing to be copied every time (mainly only a gain for the std::string)
- wad.cc/wad.hh is gone; wads are now pushed into the filesystem archive
- fixed broken wad_archive
- fs subsystem iterated on a little bit; supports marking archives as external (only used for wads currently; see `LoadTextureData`)
- load_tga has better error handling
- add in foot-gun protection to the BSP readers; now they assert on failure to read instead of silently propagating that error throughout the rest of the process
- bsputil uses img stuff now, so it should handle palettes better
2022-06-27 03:58:23 -04:00
Eric Wasylishen
c7111cc99e
qbsp: move FloodAreas to portals.cc for parity with qbsp3
2022-06-27 01:32:34 -06:00
Eric Wasylishen
5624f7012a
qbsp: moving PortalThru->Portal_VisFlood, Portal_EntityFlood to portals.cc for qbsp3 parity
...
also fixes to both to match qbsp3
2022-06-27 01:13:21 -06:00
Eric Wasylishen
aabd1c27dc
qbsp: face_t: make contents, lmshifts single sided
...
side_t: same, also remove contents (unused)
2022-06-24 01:14:11 -06:00
Eric Wasylishen
7b81702c08
qbsp: remove unneeded fields from side_t/face_t
2022-06-24 00:54:02 -06:00
Eric Wasylishen
afec0a947e
qbsp: change bspbrush_t.sides from face_t to side_t
2022-06-24 00:43:40 -06:00
Eric Wasylishen
fac5ea384d
qbsp: rename bspbrush_t.faces to .sides
2022-06-24 00:21:55 -06:00
Eric Wasylishen
7e4169f001
qbsp: add a placeholder side_t that's just a copy of fae_t
2022-06-24 00:18:19 -06:00
Eric Wasylishen
b37d29ee33
common: rename side_t -> planeside_t (side_t is used by qbsp3)
2022-06-24 00:16:46 -06:00
Eric Wasylishen
4a1c5842a3
qbsp: rename solidbsp.cc -> brushbsp.cc for consistency with qbsp3
2022-06-24 00:08:12 -06:00
Eric Wasylishen
038651fca6
qbsp: rename brush_t -> bspbrush_t for consistency with qbsp3
2022-06-24 00:01:02 -06:00
Eric Wasylishen
4f3ca8c252
qbsp: wip import MarkVisibleSides from qbsp3
2022-06-19 16:04:54 -06:00
Eric Wasylishen
5fc6cbc95e
qbsp: wip import MakeFaces from qbsp3
2022-06-19 16:04:54 -06:00
Eric Wasylishen
c91bf3fc8d
qbsp: add missing include
2022-06-19 16:04:29 -06:00
Eric Wasylishen
b91973bae1
qbsp: remove old/unused portal code
2022-06-18 13:44:24 -06:00
Eric Wasylishen
214a2550f4
qbsp: isolate portal_state_t in prtfile.cc
2022-06-18 00:32:40 -06:00
Eric Wasylishen
1fb5753f60
qbsp: import CreateVisPortals_r from qbsp3
2022-06-17 23:59:19 -06:00
Eric Wasylishen
af2dd987d8
qbsp: import BaseWindingForNode from qbsp3
2022-06-17 22:10:11 -06:00
Eric Wasylishen
3e2045479b
qbsp: move .prt writing to prtfile.cc to align with qbsp3
2022-06-17 20:31:37 -06:00
Jonathan
0b67acd4ba
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# include/common/bspfile.hh
2022-06-16 20:22:36 -04:00
Jonathan
e57633bbca
the old Safe read/writes are gonedy now
2022-06-16 20:22:03 -04:00
Eric Wasylishen
83271c5dac
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-06-16 17:06:45 -06:00
Jonathan
5855ab3528
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-06-16 12:06:45 -04:00
Jonathan
f53a6a19fe
move extended_texinfo_t to qbsp, since it's only used during compilation and not related to the BSP file
2022-06-16 09:50:00 -04:00
Jonathan
617cd3b089
consistency rename; texdata_t -> maptexdata_t
2022-06-16 09:35:46 -04:00
Jonathan
c62480c337
consistency rename; mtexinfo_t -> maptexinfo_t
2022-06-16 09:35:08 -04:00
Eric Wasylishen
b8dcc7535e
qbsp: rename FreeAllPortals -> FreeTreePortals_r
2022-06-15 23:27:39 -06:00
Eric Wasylishen
dfb8d7c9fc
qbsp: refactoring portal code towards qbsp3
2022-06-15 21:37:19 -06:00
Eric Wasylishen
3474dd00c5
qbsp: add portal_t::onnode, tree_t from qbsp3
2022-06-15 00:45:58 -06:00
Jonathan
17656eff78
don't return string ref, since it can be modified after it's inserted because of the vector growing
2022-06-14 18:34:01 -04:00
Jonathan
78b979d670
Merge branch 'type-cleanup' into brushbsp
...
# Conflicts:
# include/light/entities.hh
# qbsp/brush.cc
# qbsp/map.cc
2022-06-14 17:19:30 -04:00
Jonathan
d24ea4922a
entdict cleanup
2022-06-14 17:18:13 -04:00
Jonathan
7827885f0f
add texturedef support
...
change Q2_CONTENTS_TRANSLUCENT parsing; remove it always, but if the surface doesn't have TRANS then swap it with DETAIL which is probably what they intended
2022-06-14 10:50:35 -04:00
Jonathan
b2a0f8039e
remove dm/start/coop checking
...
remove entity target(name) checking; as mods and maps get more complex, this is best left up to the editors to use the FGD to report these things.
2022-06-13 07:10:53 -04:00
Jonathan
4e2e1c9bb3
default filltype to auto, which uses outside for hullnum > 0 and inside otherwise (lower leaf & node counts)
2022-06-13 06:19:58 -04:00
Jonathan
4755f23efa
re-implement inside filling (not working fully yet)
2022-06-13 01:44:06 -04:00
Jonathan
98682f41fa
move brush/leaf counts into gamedef
...
(Q2 stores every combo currently, old code kept in case we want to use that instead)
2022-06-12 03:35:44 -04:00
Eric Wasylishen
64159d92f1
Merge remote-tracking branch 'github-desktop-paril/type-cleanup' into brushbsp
2022-06-10 21:32:23 -06:00
Jonathan
42c4060a64
canonize plane stuff into an enum type, remove duplicates
...
more macros into constexpr's
use options.epsilon directly instead of ON_EPSILON in qbsp
2022-06-10 04:43:56 -04:00
Eric Wasylishen
6c3b8a9413
Merge branch 'type-cleanup' into brushbsp
2022-06-07 20:05:02 -06:00
Eric Wasylishen
4941a86cbe
qbsp: rest of fix for qbsp_q2_bmodel_collision, only needed on type-cleanup branch
2022-06-07 19:49:39 -06:00
Jonathan
d348a4cb6b
fix nodes getting negative planes from certain splits
...
# Conflicts:
# include/qbsp/brush.hh
# qbsp/solidbsp.cc
2022-06-07 20:31:28 -04:00
Jonathan
3d539b9660
fix nodes getting negative planes from certain splits
2022-06-07 20:30:10 -04:00
Jonathan
c5e864fca1
re-enable stuff
...
undo the shared lock stuff
2022-06-06 03:26:19 -04:00
Jonathan
8f50108b5e
slight optimization for winding_t: use memcpy directly. the copy constructor can't automatically optimize it into a memcpy because of the iterator wrapper.
...
use side_t where appropriate
add a shared lock to map.planes, and hide the original vector to prevent non-locked read/writes
move MakeSkipTexinfo to the beginning of the operation - make a global skip texinfo as the first texinfo. it will get culled out later if need be.
re-enable ChooseMidPlaneFromList; seems to work, but maybe there's a test that is failing that is the reason it was if'd out?
enable parallelization of PartitionBrushes since map.planes is lockable now
2022-06-05 22:52:02 -04:00
Eric Wasylishen
e3ee12e985
Merge branch 'type-cleanup' into brushbsp
2022-06-03 23:44:03 -06:00
Jonathan
8b4bd6deeb
non-recursive method for animated textures; makes it easier to follow and makes sure the chain ends in -1
2022-06-01 17:42:37 -04:00
Eric Wasylishen
016e9a89f2
qbsp: fix base1.map leak with epsilon hacks
2022-05-22 00:38:08 -06:00
Eric Wasylishen
3b83508f37
Revert "qbsp: remove unused face csg code"
...
This reverts commit 2ad9e27d3b .
2022-05-21 01:44:59 -06:00
Eric Wasylishen
f8c227acbf
Merge branch 'type-cleanup' into brushbsp
2022-05-18 23:17:40 -06:00
Jonathan
b63eb11275
wadpath/xwadpath always take 1 argument
2022-05-18 17:50:05 -04:00
Eric Wasylishen
b21b7466ce
Merge branch 'type-cleanup' into brushbsp
2022-05-16 21:33:57 -06:00
Eric Wasylishen
8fe5d9d694
common: adjust formatting of usage line
...
-remove version hash as it's printed above
-rename `usage` variable to `programDescription`
2022-05-15 17:44:17 -06:00
Eric Wasylishen
6f1ca3c79d
Merge branch 'type-cleanup' into brushbsp
2022-05-15 14:02:42 -06:00
Jonathan
d9c6e52bd3
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-05-15 10:09:41 -04:00
Jonathan
e2512372c3
fix -convert not working properly for Q2 maps
...
begin code for alias files
2022-05-15 10:09:38 -04:00
Eric Wasylishen
c82741ff8a
Merge branch 'type-cleanup' into brushbsp
2022-05-15 00:46:49 -06:00
Eric Wasylishen
e834b848b9
qbsp: fix areanodes test
2022-05-15 00:15:17 -06:00
Eric Wasylishen
c537ad39c1
qbsp: move wadlist to map struct
2022-05-14 15:55:18 -06:00
Eric Wasylishen
bc90198006
qbsp: move wal_cache to map struct
2022-05-14 15:29:58 -06:00
Eric Wasylishen
fa18a6755a
qbsp: fix q2 brush export breaking when multiple tests run
2022-05-14 15:13:47 -06:00
Eric Wasylishen
4957622c50
Merge branch 'type-cleanup' into brushbsp
2022-05-13 01:24:14 -06:00
Jonathan
59db5bfdc5
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
...
# Conflicts:
# include/qbsp/qbsp.hh
# qbsp/map.cc
# qbsp/qbsp.cc
2022-05-11 09:50:46 -04:00
Jonathan
cbdb5c0c73
slight bit of cleaning
2022-05-11 09:46:39 -04:00
Eric Wasylishen
a1b8a38283
merge non-brush bsp specific changes from brushbsp branch
2022-05-11 01:58:53 -06:00
Eric Wasylishen
4a711908c8
Merge branch 'pr/322' into brushbsp
2022-05-11 00:29:58 -06:00
Eric Wasylishen
abc799554d
build: fix all clang-cl warnings
2022-05-10 21:57:17 -06:00
Eric Wasylishen
66ba184083
Merge branch 'type-cleanup' into brushbsp
2022-05-10 00:47:41 -06:00
Eric Wasylishen
0c4833226a
settings: implement reset(). Fix setting_mangle::copyFrom()
...
We can't use the string serialization/deserialization trick because setting_mangle transforms
the value upon parsing
2022-05-10 00:43:22 -06:00
Eric Wasylishen
b06736dea4
qbsp: fix leak in base1leak test
2022-05-05 01:01:33 -06:00
Eric Wasylishen
5cae1919ce
qbsp: fix areaportals
2022-05-04 21:04:36 -06:00
Eric Wasylishen
893b0b080e
qbsp: move to unique_ptr<brush_t> vectors
2022-05-03 02:35:43 -06:00
Eric Wasylishen
bec0357352
qbsp: proper marksurfaces population
2022-05-02 02:35:13 -06:00
Eric Wasylishen
e1eb0e8cbd
qbsp: fix noclipfaces issues
2022-05-02 00:05:50 -06:00
Eric Wasylishen
2ad9e27d3b
qbsp: remove unused face csg code
2022-05-01 01:13:03 -06:00
Eric Wasylishen
81e0da4d62
qbsp: mark invisible sides on brush entities
...
fixes brush_clipping_order test failure
2022-05-01 00:01:11 -06:00
Eric Wasylishen
5b4a9956c6
qbsp: add -debugchop
2022-04-30 15:10:19 -06:00
Eric Wasylishen
cb2268efdf
qbsp: initial ChopBrushes implementation
2022-04-30 14:33:26 -06:00
Eric Wasylishen
029e95dc3b
qbsp: add PruneNodes
2022-04-28 00:49:26 -06:00
Eric Wasylishen
8efb6f689b
qbsp: add -outsidedebug flag
2022-04-27 19:18:27 -06:00
Eric Wasylishen
90e064e9e1
testqbsp: attempt to add a q2 test case (not working yet)
2022-04-26 23:45:44 -06:00
Eric Wasylishen
d5320d5aaa
qbsp: subdivide faces after merging
2022-04-26 21:41:03 -06:00
Eric Wasylishen
df9d530c21
qbsp: fix weird calling convention of SubdivideFace
2022-04-26 21:32:24 -06:00
Eric Wasylishen
f9aa40a50f
qbsp: fix outside filling in maps with detail
2022-04-26 00:25:52 -06:00
Eric Wasylishen
064147b908
qbsp: move PortalizeWorld() to portals.hh
2022-04-24 01:07:20 -06:00
Eric Wasylishen
133ee77fc5
testqbsp: fix textures not loading in tests
2022-04-20 01:31:26 -06:00
Eric Wasylishen
aa3174d732
testqbsp: initialize filesystem the same as a regular qbsp run
2022-04-20 01:25:29 -06:00
Eric Wasylishen
78210947ff
qbsp: add -keepprt option
2022-04-19 01:03:18 -06:00
Eric Wasylishen
28c9cda561
Merge remote-tracking branch 'Paril/type-cleanup' into brushbsp
2022-04-17 13:46:50 -06:00
Eric Wasylishen
20a1b7b94b
qbsp: szBSPName -> bsp_path, szMapName -> map_path
2022-04-17 13:41:23 -06:00
Jonathan
0b41f0a03b
notriggermodels support
2022-04-16 22:20:29 -04:00
Eric Wasylishen
f467257f72
qbsp: start test case for qbsp_simple_sealed2.map
2022-04-15 21:05:14 -06:00
Eric Wasylishen
8a71b372bd
qbsp: remove unnecessary num*() helpers from mapdata_t
2022-04-15 00:27:50 -06:00
Eric Wasylishen
5df0dde756
map.cc: move rgfStartSpots to map struct
2022-04-11 17:49:49 -06:00
Eric Wasylishen
9d2f00a1b2
qbsp: tidying: move pWorldEnt() to mapdata_t
2022-04-11 00:13:42 -06:00
Eric Wasylishen
b7fbb48763
qbsp: enable new outside filling
2022-04-10 00:00:28 -06:00
Eric Wasylishen
a3d54cf48d
qbsp: remove unused face_t::original
2022-04-09 23:40:35 -06:00
Eric Wasylishen
407b39cad1
qbsp.hh: remove writebsp.hh and outside.hh includes
2022-04-09 23:30:42 -06:00
Eric Wasylishen
b736704e5e
qbsp.hh: remove portals.hh include
2022-04-09 23:28:12 -06:00
Eric Wasylishen
95824d26e4
qbsp.hh: remove surfaces.hh include
2022-04-09 23:25:54 -06:00