Check type before checking signature. Objects with type OBJ_NONE are
not guaranteed to have any particular signature. Commit 91d31b1 removed
the statement which cleared the signature when the type changes to
OBJ_NONE.
Fixes: 91d31b1952 ("Wrap object signature in subtype")
Some call sites pass a uint8_t to objnum_remote_to_local, which is
zero-extended up to an int. The check for owner==-1 then fails, causing
the sanity check to trap to the debugger, even though the situation is
normal and harmless. Switch the type to int8_t to ensure that the value
is not sign/zero-extended.
I also changed the command line arguments a bit, gl_syncmethod and
gl_sycnwait are used now. Furthermore, I added the ew mode AUTO. This is
a conservative mode and the default for now: if GL_ARB_sync is available,
use the FENCE_SLEEP mode, otherwise, disable it completely.
Conflicts:
include/args.h
misc/args.c
similar/arch/ogl/gr.cpp
There is a an out-of-bounds access in digi_mixer_start_sound() when
soundnum is < 0. The bounds check I added here is already present in
digi_audio_start_sound().
This bug was triggered on the RPi d2x built when trying to show the
briefing screen because briefing_new_screen() tries to play
SOUND_BRIEFING_HUM, which digi_xlat_sound() translated to -1 in this
situation. The game finally crashed in mixdigi_convert_sound() because
GameSounds[-1] happened to contain some non-zero data (on my Linux desktop,
that memory seems to be always 0 by accident...). This was also the reason
why the pi version tried to allocate lots of memory before it crashed in
memcpy().
Kp already incorporated some small changes I made in my rpi branch into
unification/master. However, besides making the rpi helper functions
static as I did, he also changed the prototype from (void) parameters
to C++ style (). I've incorporated his version here.
Conflicts:
similar/arch/ogl/gr.cpp
Rebirth builds with -Werror=redundant-decls -Werror=undef, which are
triggered by the bcm_host.h. Making gcc treat those paths as
system headers avoids these issues. This was suggested by Kp.
If a sound is used, it may dereference Viewer. If Viewer is null, this
will crash. In 630f11945e,
digi_sync_sounds changed to assume Viewer is valid. This crashes during
early startup when not using the SDL_mixer backend, even though no
sounds are in use.
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/45>
Fixes: 630f11945e ("Cache Viewer in digiobj")
Drakona noted in Retro that objects retain their original size when
converted to shields. Fixed in Retro as "Objects turned into shields
were sometimes the wrong size."
Reported-by: Drakona <catherine.e.darrow@gmail.com>
btb reports that clang fails to link
<77ec36b9c3 (commitcomment-9992820)>.
When building at -O0, static member glow_num has its address referenced
because the compiler does not inline non-static method
glow_num_stub::operator=. Add a definition of this symbol.
Fixes: 77ec36b9c3 ("Convert g3_draw_morphing_model to class")
Various users want automatic demo recording. Add new command line options:
-auto-record-demo start recording on level entry
-record-demo-format set demo name automatically
For -record-demo-format, specify a template containing any mix of strftime
insertions, variable insertions, and literal text. As a special case, specify
"." to use the builtin template "%Y%m%d.%H%M%S-$p-$m". Most users should use
".". Supported variables:
$p name of pilot recording the demo
$m name of msn/mn2 file played
Suggested by jeffersoncarpenter in https://github.com/dxx-rebirth/dxx-rebirth/pull/33, but implemented by vLKp.
Use ?: to pick Stretch_scale_* value.
Mark bogosity as unlikely.
Cache vector subtraction.
Defer constructing rotation matrix.
Move uvl assignment into reusable lambda.
This also fixes clang build. btb reports that clang chokes on:
extern T t;
extern const T ct;
[]() {
if (a)
return ct;
return t;
}
with
error: return type 'vms_matrix' must match previous return type 'const vms_matrix' when lambda expression has unspecified explicit return type
Compiler failure report: d38dd0aeef (commitcomment-9909178)
Mac OS X defines uint_fast32_t to unsigned int, causing ambiguous
overloads between RAIIdmem::operator[](std::size_t) and
RAIIdmem::operator[](int). Adding a disambiguating overload for OS X
breaks Windows. Remove operator pointer and operator[]. Rely on the
inherited operator[] for indexing. Require users to call ->get() to
convert to a simple pointer.
First btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
Second btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/43
Locked doors, including the exit door, were permanently impassable in
Descent 1 because the door has state WALL_DOOR_OPENING even after it has
flags WALL_DOOR_OPENED.
Fixes: fd01d4c673 ("Reorder wall_is_doorway to favor likely results")
Reported by: zicodxx @ https://github.com/dxx-rebirth/dxx-rebirth/issues/40