Jonathan
aac5027ec6
simplify texture load
2022-06-28 10:35:17 -04:00
Jonathan
44c50717c3
move generic image loading routine to `img`
...
move light-specific "load textures from BSP" routine to light
fix a couple bugs with external wad textures (there should always be at least a 40-byte miptex in there)
light can now load external textures
move -paths to common settings
fix bug with missing texture not filling miptex name
2022-06-28 01:37:12 -04:00
Jonathan
c23b7d2ec9
allow Quake-likes to load textures similarly to Q2 (finding best place to load them from)
...
allow Quake and Q2 to handle other texture formats (mainly just TGA for now)
2022-06-27 11:30:28 -04:00
Jonathan
bf1cb56e5a
fix build
...
add setting to control file priority
2022-06-27 10:41:24 -04:00
Jonathan
3b777a05a9
remove unnecessary init_palettes
2022-06-27 08:13:32 -04:00
Jonathan
732621c59a
fix bugs in miptex writing
...
clear FS when loading filesystem again (for tests mainly)
move img::load_palette to where it is in brushbsp
2022-06-27 08:13:04 -04:00
Jonathan
ba7c18fd35
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-06-27 03:58:41 -04:00
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
9423e68e9f
qbsp: fix _noclipfaces
2022-06-17 17:55:17 -06:00
Eric Wasylishen
8c90c5c3dc
qbsp: fix dangling std::string access through string_view
2022-06-16 20:58:46 -04:00
Eric Wasylishen
a746506d6a
clang-cl build fix
2022-06-16 20:54:15 -04:00
Jonathan
eedabe6f1c
fix bugs
2022-06-14 18:38:22 -04:00
Jonathan
d24ea4922a
entdict cleanup
2022-06-14 17:18:13 -04:00
Jonathan
79ca3c1543
fix inversion on content types portal visibility in Q2 (opaque water, etc was considered see-through; now it correctly assumes they are solid)
2022-06-10 06:53:38 -04:00
Jonathan
812797f7ed
enable lighting for warp/sky in Q2
...
simplify bitflag definitions
change nudging light warning to make more sense
another #define -> constexpr pass
2022-06-10 06:29:14 -04:00
Jonathan
5b4660fa63
simplify crc code
2022-06-10 04:47:10 -04: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
Jonathan
0d56c49d7a
remove hardcoded lightstyles max, use config option
2022-06-10 04:22:12 -04: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
Eric Wasylishen
0326374d68
testqbsp: bmodel collision issue where world and bmodel are interfering
2022-06-07 19:27:42 -06:00
Eric Wasylishen
633aaf3954
testqbsp: mark lavaclip test as [!mayfail]
2022-06-07 19:27:16 -06:00
Jonathan
76ac68861e
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-06-07 20:36:22 -04: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
Eric Wasylishen
a12427b47d
decompile: fix --decompile-ignore-brushes
2022-06-06 00:07:39 -06:00
Eric Wasylishen
c2b39a6502
decompile: fix texture name crash with missing texinfo
2022-06-06 00:07:37 -06:00
Eric Wasylishen
fe31e1c1ce
bsputil: add --decompile-ignore-brushes option for visualizing leafs in q2 maps
2022-06-06 00:07:31 -06:00
Jonathan
490ea24fc1
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-06-04 02:28:29 -04:00
Eric Wasylishen
e3892617ed
testqbsp: add testmap for q2 lava intersecting clip (fails currently)
2022-06-03 23:29:23 -06:00
Eric Wasylishen
b6c421d30e
bspfile.hh: #define -> constexpr for content flags
2022-06-03 20:12:04 -06:00
Jonathan
19fafd9d46
don't add bounce lights that have no color
...
increase bounce scale a bit to match Q2 again
2022-06-03 14:59:06 -04:00
Eric Wasylishen
3d8da90eec
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-06-02 20:58:06 -06:00
Eric Wasylishen
5488f47eda
light: GetDirectLighting: fix wrong order in surfpointToLightDist calculation
2022-06-02 20:58:03 -06:00
Jonathan
a824b9436c
hardcode omnidirectional surface lights - seems closer to Q2's defaults
...
hardcode dot of 1.0 for surface lights
halve bounce data since the former changes blow out lighting a bit
2022-06-02 22:12:31 -04:00
Jonathan
d05b8fc3db
don't output texinfo for SKIP faces - rendered faces won't reference them anyways (unless includeskip is on)
2022-06-02 18:59:51 -04:00
Jonathan
a7afc4fbb5
fix infinite loop chain again
2022-06-02 14:31:23 -04:00
Jonathan
9bce4fd80a
move the sky|nodraw fix to an earlier stage
2022-06-02 12:18:58 -04:00
Jonathan
6ba71cb1b9
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-06-02 10:23:44 -04:00
Jonathan
464b87f095
remove a debugbreak
...
"fix" broken q2 maps
2022-06-02 10:23:39 -04:00
Eric Wasylishen
0eeabaeb21
qbsp: fix incorrect return in FindAreas
2022-06-01 23:21:43 -06:00
Jonathan
1f28be4a4c
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-06-02 01:05:48 -04:00
Jonathan
11f937f0ad
add mottling that was used for _minlight on objects in Q2 maps
...
fix _minlight for Q2
set up a few better defaults for Q2
temp-ish fix for areaportals
2022-06-02 01:05:41 -04:00
Eric Wasylishen
d43f10ae2b
qbsp: fix areaportals touching detail
2022-06-01 22:01:48 -06:00
Jonathan
65852ef042
adjust settings_set to only accept one token per entry
...
radlights is now a set (only loads one though)
2022-06-01 20:42:06 -04:00
Jonathan
aad711bb73
HACK: always connect bmodels to their brushes. this is temporary until we can figure out why the node bounds are wrong
2022-06-01 18:45:02 -04:00
Jonathan
f64c8e7160
remove Q2_CONTENTS_TRANSLUCENT on load, since it breaks stuff
...
more areaportal fatal -> warning
2022-06-01 18:36:09 -04: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
Jonathan
487c0fa1c6
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-06-01 15:30:32 -04:00
Jonathan
a9e9c14e0d
warning for invalid face contents rather than a hard assert error
...
remove _wad warning for Quake II, Q2 doesn't use wads
areaportals are still fiddly, but this should help track down the errors - print entity # (bounds still not working)
2022-06-01 15:30:27 -04:00
Eric Wasylishen
0f2ea5333d
move CompressRow/DecompressRow from vis to common
2022-05-24 21:01:41 -06:00
Eric Wasylishen
e7f02daddb
testmaps: remove obsolete shell script based test
2022-05-24 20:13:19 -06:00