Previously, do_laser_firing_player would update Next_laser_firing_time,
then do_omega_stuff would update it again. OMEGA_BASE_TIME is smaller
than Weapon_info[OMEGA_ID].fire_wait, so the first store was overridden
by the second. As a quirk, the override was skipped if the omega cannon
was unable to fire due to object limits or due to insufficient energy,
causing those rare cases to use the longer
Weapon_info[OMEGA_ID].fire_wait delay.
Fold the omega cannon handling of Next_laser_firing_time into
do_laser_firing_player to eliminate that quirk, simplify the code, and
remove the need to recompute fire_frame_overhead from
Last_omega_fire_time.
Constructing valptridx::basic_ptr with a known-invalid magic index does
not require an array. Simplify the static_assert to reject uses of
factory functions with known-invalid magic index values. Fix the two
sites that fail with the stricter static_assert.
If loading an pre-v22 save game, or loading any save where the player
died on the secret level, clear Omega_charge instead of retaining
whatever value the prior game used.
menu.cpp always needs SDL.h, but included it only as a side effect of
joy.h including SDL.h. joy.h only includes SDL.h when max_joysticks!=0.
Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/258>
Split ogl_get_verinfo() into ogl_tune_for_current() and
ogl_extensions_init(), and consolidate all the OpenGL extension handling
into ogl_extensions.cpp. Unify the code paths for texture anisotropy and
GPU synchronization for OpenGL and OpenGL ES.
Currently, our renderer only uses GLES 1.0, so no real world implementation
will support sync objects for such an old context, but the logic is valid,
and this way, the GLES specific code paths are reduced.
This patch also fixes an issue where the old ogl_get_verinfo() did modify
the texture filtering mode if no anisotropic filter was available. This
was some leftover from the time when the anisotropic filter was a just
a specific CGameConfig.TexFilt mode, and not a separate, orthogonal setting
CGameCfg.TexAnisotropy that it is now.
derhass reports that SDL on Raspbian provokes a warning from
-Wuseless-cast. Add a test that will report -Wuseless-cast as unusable
when SDL causes this warning. Developers on Raspbian will not get the
benefit of -Wuseless-cast, but their build will succeed.
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/257>
derhass reports that OpenGL ES builds warn for unused parameter
`texanis`. This parameter controls a feature that is not available in
current Rebirth OpenGL ES builds. Cast the parameter to void to silence
the warning. Long term, the code ought to be changed to advise the user
when their platform lacks this feature. In the short term, merge this
fix so that the build will succeed.
https://github.com/dxx-rebirth/dxx-rebirth/pull/256
Extended identifiers are convenient when supported, but derhass reports
that the latest stable gcc on Raspbian stable fails the test for
mandatory extended identifier support. Replace the Cxx11RequiredFeature
test for extended identifiers with an SConf test to selectively enable
-fextended-identifiers.
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/254>
Fixes: a8a41aa2ff ("Move git version into Python class")
The segiter code used objptridx because end is signalled by object_none,
and vobjptridx does not allow object_none. However, the compiler
produces better code if segment_object_range_t returns vobjptridx and
future cleanups are easier if iterating objects_in yields vobjptridx
objects. Add a special-case override of the normal checking rules, move
the required checks into segiter, and then let segiter break the rules
normally enforced by valptridx. Add a comment explaining that this
permits unsafe coding and should be done only with a clear understanding
of the responsibilities it brings.