sides[] is large and caused all members after it to require disp32
offsets. Move it to the end so that all members can use disp8 offsets.
This saves ~1300 bytes of text on an editor+debug build.
Move the skip-Viewer check from render_object up to build_object_lists
so that, instead of skipping the viewer, the viewer is not scheduled
to be rendered.
The code immediately overwrites the computed value with a standard
value. Optimizing compilers deleted the `light_intensity=0` store as
dead. Delete the entire block to save a d_rand call.
Mako88 reports that some users want not to autoselect while firing, but
do not notice when a new weapon is added to the HUD, and end up never
activating a preferred weapon. Add a new autoselect mode that remembers
what would be selected and switches to it once the player ceases firing.
Changes since Mako88's proposed version:
- Use `enum class` for autoselection mode and a radio button to
represent the decision of Immediate/Never/Delayed.
- Handle delayed autoselect for vulcan ammo.
- Set Delayed_primary == Primary_weapon to indicate no change is needed,
rather than Delayed_primary==-1. This lets some paths use
Delayed_primary without checking for a magic value.
- Likewise Delayed_secondary / Secondary_weapon.
- Update Delayed_primary/Delayed_secondary when changing active
primary/secondary weapon, so that a player who changes weapons while
firing will automatically clear any deferred change.
Requested-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/97>
Based-on-patch-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/pull/147>
Previously, Rebirth on __unix__ always set the write directory to
"~/.d*x-rebirth" (or "~/Library/Preferences/D*X Rebirth/" on Mac). Add
$D*X_REBIRTH_HOME and $REBIRTH_HOME to override it. If
$D*X_REBIRTH_HOME is set, use that. If not, then try $REBIRTH_HOME. If
that is also unset, then use the hardcoded default.