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.
Haiku does not accept `-pthread`, and puts its network functions in a
separate library. Add a special HaikuPlatformSettings to handle these
quirks.
Reported-by: LambdaCalculus37 <https://github.com/dxx-rebirth/dxx-rebirth/issues/641>
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.
These are not referenced in SConstruct. messagebox.c uses C linkage for
symbols that would be referenced from a C++ file, so this has likely
been broken since the common code moved to C++.
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.
Newer gcc has become more effective at propagating values and now proves
that certain tests will always throw. This proof triggers a
compile-time error, which is desirable in the main program, but not in
the unit test. Add an indirection to hide the value from the compiler
so that it is forced to emit runtime code, which can then throw and
catch as intended.
- 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.
The preceding commit breaks OpenGLES + SDL1 support, by referencing
SDL_GL_* constants that are new in SDL2. Add a preprocessor guard to
skip over the new constants when using SDL1.
Fixes: c90ac3e611 ("Fix OpenGL ES build on SDL2.")