std::ranges::find_if permits use of a sentinel instead of a full
iterator, and supports std::ranges::find as an alternative to certain
simple uses of std::find_if.
Where possible, use the form that takes a range, rather than the form
that takes two iterators.
Add a declared, but not defined, default constructor for
self_return_iterator to satisfy the standard library's concept
`semiregular`, which insists that sentinels be default-constructible,
even for those functions that never need to do so.
Add a defined, but unused, operator++(postfix) for zip_iterator to
satisfy a standard library concept for `forward_iterator`.
Two paths are always local. One path is always remote. Split the
handler function to remove the locality test and rely on the caller's
knowledge of whether the affected player is local.
Embedding it in d_level_shared_robot_info_state is reasonable from a
relational perspective, but interferes with referencing
d_robot_info_array when only a forward declaration of
d_level_shared_robot_info_state is available.
Players are not robots, but the show-path cheat tried to pretend they
are, and triggered a BUG warning[1] when looking up robot information
from the player object. Fix this by passing in the robot_info when the
caller is providing a robot, and a named `nullptr` value (as
`create_path_unused_robot_info`) when the caller is providing a
non-robot object.
[1] As below, but repeated many times
```
similar/main/ai.cpp:1905: BUG: object 0x555555858550 has type 4, expected 2
similar/main/ai.cpp:1974: BUG: object 0x555555858550 has type 4, expected 2
```
If two or more events are delivered in the same loop, the previous
implementation would count joystick motion multiple times. Fix this by
moving the joystick interpretation to occur once, after all the events
have been processed.
Change it from the level number on which the path was created to a
true/false flag. The previous logic only tested whether the number was
equal to the current level number.
This also fixes a bug where the action was not available on the first
secret level, since that level is `-1`, and the value was set to `-1` to
indicate that it should be enabled.
Avoids switching cockpit views to CM_LETTERBOX when player dies or
level ends which stereo viewport is active, as well as other calls
to select_cockpit().
When player gets killed, the screen inexplicably switches to
another viewport format to show explosion POV and then switches
to cockpit viewport, which is not compatible with stereo formats.
Unable to locate where exactly cockpit gets switched on player
dead state, so hack is in place to keep stereo formats fullscreen.
Used 1x VR_eye_offset to track image shift adjustments via OGL frustum planes
instead of 2x VR_eye_offset used in Descent 1.5 image shift adjustments.
Without any HUD rect offset, HUD overlays would appear to match the zero-parallax
view plane instead of appearing in an out-of-screen parallax view plane.
Enable stereo mode when launched via -gl_stereo option.
GL_STEREO quad buffering may not be available unless OGL layer
supports stereo pixel format descriptors.
Half-height viewport rendering for above/below format.
Half-width viewport rendering for side/by/side formats.
HUD & cockpit elements disabled when stereo views active.
clang warns for an unused constexpr global variable. gcc does not.
Move the affected variable into the same #if that guards the use of the
variable.
Fixes: 4a8d7c7574 ("Default to 1024x768 for new users, not 640x480")
640x480 is too small to render some dialogs correctly, and is much
smaller than even a small laptop screen. Smaller resolutions are still
supported, if the user chooses to switch.