VR requires glDrawBuffer, which Mesa OpenGL ES does not offer. Default
VR to disabled for OpenGL ES users. Users who want to try it anyway can
still set use_stereo_render=1 in the SCons environment.
These are read from a packed binary file shipped with the game, so their
size must not change. If the size does change, later fields will be
loaded from the wrong offset, causing the in-memory values to be
incorrect.
The existing handling always wrote to slot 0, but did so in a convoluted
way. The variable names suggest this was not intended, but no one has
ever reported it as broken, and some otherwise valid data files may
depend on this quirk.
The existing handling always wrote to slot 0, but did so in a convoluted
way. The variable names suggest this was not intended, but no one has
ever reported it as broken, and some otherwise valid data files may
depend on this quirk.
Change from `uint_fast32_t` to `std::size_t` for consistency with how
arrays are typically indexed.
Change the decltype() lookup to use a non-template function for the
fallback case.
Move the remove_reference logic into the caller, to allow fewer
instantiations of `array_index_type`.
std::ranges::find_if permits use of a sentinel instead of a full
iterator, and supports std::ranges::find as an alternative to certain
simple uses of std::find_if.
Where possible, use the form that takes a range, rather than the form
that takes two iterators.
Add a declared, but not defined, default constructor for
self_return_iterator to satisfy the standard library's concept
`semiregular`, which insists that sentinels be default-constructible,
even for those functions that never need to do so.
Add a defined, but unused, operator++(postfix) for zip_iterator to
satisfy a standard library concept for `forward_iterator`.
If the player's name is presented without decoration, then it can be
rendered directly from the callsign buffer. It only needs to be copied
to a temporary buffer if it will be decorated to reflect use of automap
or in-game messaging.
clang-14 fails with:
```
similar/main/net_udp.cpp:4381:11: error: use of overloaded operator '!=' is ambiguous (with operand types 'exact_type<dcx::player>' and 'exact_type<const dcx::player>')
if (&i != &self)
~~ ^ ~~~~~
common/include/pack.h:28:17: note: candidate function
constexpr bool operator==(const T *rhs) const { return p == rhs; }
^
common/include/pack.h:28:17: note: candidate function (with reversed parameter order)
1 error generated.
```
gcc handles the old form without error.
clang-14 on OSX, but not clang-14 on x86_64-pc-linux-gnu, fails
class template argument deduction when given:
```
char *c1 = initializer();
const char *c2 = c1 + 1;
std::span{c1, c2};
```
clang correctly refuses to match this to `std::span(pointer, pointer)`,
but fails to find the constructor `std::span(iterator, sentinel)`.
Work around this by changing the type of the sentinel from
`const uint8_t *` to `color_palette_index *` (an alias of `uint8_t *`).
Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/issues/664>
Windows shells interpret quoting differently from Linux shells, causing
some of the generated strings to have ugly escape sequences in them.
Switch to passing the defined values as lists of character codes, so
that no quoting is needed. This makes the command line uglier, but
produces more readable strings in the generated program.
Fix the one remaining site that was redirected by this. Remove the
redirection macro, so that the literal and variadic forms can have
differing types for their string field.
Adjust code_window_point to use the same masks as clipping_code.
Previously, it had top and bottom swapped. However, since its output
was only ever compared for equality to 0, this transposition should not
affect the observable behavior.
Change piggy_register_sound to take the sound offset as a parameter,
rather than assuming the caller will set SoundOffset accordingly.
Remove a spurious sound reset in piggy_register_bitmap. Based on the
duplicated comment, this was probably incorrectly copied from
piggy_register_sound, where it made sense, into piggy_register_bitmap,
where it does not.
- Document the logic for resetting the values to default
- For D1: load the untrusted values directly into an array, instead of
loading them to temporaries and then copying the temporaries to the
array.
- For D2: optimize the read by loading 22 bytes in a single step,
instead of loading single bytes 22 times.