this is to get thousands separators, e.g. 10000 prints as 10,000
the `auto old = std::locale::global(std::locale("en_US.UTF-8"));` line was throwing
on Win8.1
add a specialized stream buffer which just tracks how much would be written to it; used to get the output size of the texture lump, since that's no longer tracked
display dmodel byte size
display BSPX lumps a bit differently (no need to repeat BSPX per line)
add header to both lists, to make it more obvious what's coming up
re-introduce chop since it may be a key to the puzzle for hullnums
allow caller to do full fragmentation, add option to force it
fix BrushGE causing liquids, etc to be cut up
add more timers in a few spots
by default, display percent timers but don't display elapsed for non-verbose stuff (bmodels); this is so it still shows that it's "working" instead of just showing blank for large maps, give user an idea on progress for certain stuff
merge all "side not found"s into a single line
time `FillOutside`
time `ProcessMapBrushes`
time `Brush_LoadEntity`
fix logging::percent getting stomped in multi-threaded operations
add new stats facility to make creating lists of single-use stats easier to manage
fix SplitBrush storing a bunch of extra stats for ChopBrushes
change temp-named planeside_ to plane_flipped
commit 8b3938f5069837e76504a16ffd019a8682fd4325
Author: Jonathan <jonno.5000@gmail.com>
Date: Wed Jul 27 05:35:05 2022 -0400
fix compile errors/warnings
commit 0c19a922490a332a084ceb65bbb88368fecb40a1
Merge: 31edc84e a2451a41
Author: Jonathan <jonno.5000@gmail.com>
Date: Wed Jul 27 05:30:54 2022 -0400
Merge branch 'brushbsp' into paril/brushbsp_plane2
# Conflicts:
# qbsp/portals.cc
# qbsp/tree.cc
commit 31edc84e5a0f16196aacb4e465657954a523ccf9
Author: Jonathan <jonno.5000@gmail.com>
Date: Wed Jul 27 02:55:52 2022 -0400
use std::map for the two other hashes (edge/vertex) for speed
commit a9bb68b6ea203226d21f73d42558ffe388fc3051
Author: Jonathan <jonno.5000@gmail.com>
Date: Wed Jul 27 02:31:45 2022 -0400
remove final uses of FindPlane
commit 951a2b1977f813751c93417901a775a7a0cb77f4
Author: Jonathan <jonno.5000@gmail.com>
Date: Wed Jul 27 02:01:19 2022 -0400
only set flipped status if we actually flipped; this seems to have no affect in practice, but it was wrong in theory
commit 97610203bebb115391ef39ea2b5c6400b9ce2d89
Author: Jonathan <jonno.5000@gmail.com>
Date: Wed Jul 27 01:56:19 2022 -0400
remove FindPositivePlane
commit d424afbb2cfa32669883f5aafcf34555169eec3e
Author: Jonathan <jonno.5000@gmail.com>
Date: Wed Jul 27 01:22:10 2022 -0400
side_t uses plane and side_ now
commit af883bc111049a8c6fcb12c8c888e17f03cf30ff
Author: Jonathan <jonno.5000@gmail.com>
Date: Wed Jul 27 00:46:52 2022 -0400
face_t uses internal plane
commit 1cd776c89b683b0af0d8a642eee7e54b5f54b559
Author: Jonathan <jonno.5000@gmail.com>
Date: Tue Jul 26 22:59:47 2022 -0400
node_t using plane directly, pulling planenum in when necessary
commit 8b34312ef9c3d416c011f2694a34fb9d5eba4faa
Author: Jonathan <jonno.5000@gmail.com>
Date: Tue Jul 26 22:22:28 2022 -0400
remove PLANENUM_LEAF, use a boolean for the separation
Fixes bogus (huge integers) content stats reporting on macOS (also fix tjunc stats reporting)
having the non-copyable std::atomic<size_t> inside a std::any which must
be copyable was problematic
IMO this is slightly better because it lets us use non-copyable types
- no more "isLocked" - use getSource directly (locked is a confusing name)
- no more split parse/setValue functions. there's only one entry point each now, and all they do is pass along the source passed to it from its parser.
- no separate setters, use setValue(value, source)
- add a "game target" source, which is low priority and indicates to the user that the value would have been default but was changed to a better value for the game target
use stb_image_write for PNGs for better compression on bsp.json
add in code for spitting out a lightmap from a face. doesn't support other styles and such yet.
add a new meta format, which is just a JSON representation of the metadata contained in a .wal
simplify texture loading in `light`
fix `light` not handling replacement textures very well
string_iequals take string_view like the others
move averageColor to be alongside pixel data, where it belongs
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
- 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
support for radiosity _surface lights with `_surface_radiosity` key
allow lightstyles for _surface radiosity lights
bounce enabled by default on Q2
remove ValueForKey, use epairs directly
remove byteswap as it wasn't used any more
re-introduce imemstream and omemstream to make it harder to accidentally use the wrong operators
add dynamic padding stream manipulator
use memstreams for BSPX
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
simplified gamedef stuff by checking which functions were still necessary, and no need to pass extended flags through at all now
detail type moved into Q1
remove hint from brush; hint is technically a surface flag rather than a content flag, so we can infer it from the sides rather than needing to store it as a unique flag (we could still cache the result somewhere but this makes it consistent between q1 and q2)