As the UI_DIALOG client is now responsible for freeing all gadgets (via unique_ptr's), this function now causes issues where it attempts to access freed gadgets (resulting in std::runtime_error("unknown gadget kind") exception when closing the AI Properties dialog on my Macbook, for example). Removing the offending function fixes the issue.
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.
Commit 30f9233b36 introduced a test for
Game_Mode, which does not exist, rather than Game_mode, which does
exist. However, the test for game mode is unnecessary. Objects of type
OBJ_NONE are always in segment_none and no object of any other type
should be in segment_none. Use that fact to test obj->type instead of
obj->segnum during multiplayer object clobber, so that multiplayer can
overwrite unallocated objects without accessing any undefined fields and
without making object::segnum a defined field.
Fixes: 30f9233b36 ("Reverted 2e6aa0f081 and partially reverted 7064fcccba to still allow segnum and signature init for multiplayer games, keeping consistency during object sync.")
Move the main part of obj_link into obj_link_unchecked. Implement
obj_link as sanity check assertions followed by a call to
obj_link_unchecked. Remove caller-side writes that were present solely
to bypass the assertions, since the assertions can now be bypassed by
calling obj_link_unchecked directly.
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.
One caller uses fuelcen_activate when segp->special != station_type.
Every other caller passes the type that was already on the segment.
Move the assignment into the one caller that needs it, then remove the
argument.