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>
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.
Whenever a robot is sent to peers, it needs to be added to the local
mapping also. Move the one use so far into multi_send_boss_create_robot
to simplify maintenance.
gcc generates better code for:
if (variable == magic_constant)
return magic_constant;
than it does for:
if (variable == magic_constant)
return variable;
even though the two have the same result. Switch to the form which
generates slightly better code.