Some compiler configurations warn that vertices[4] and vertices[5] may
be used uninitialized. Initialize them to a bogus value so that any
actual use will trap, but the comparisons will be well defined.
Current gcc requires a non-PIE cc1plus for working PCH support. If the
chosen compiler is PIE, it will succeed in building the PCH, then fail
when trying to use it.
Non-static globals were initialized at wrong scope, leading to netgame
duplicate options being forgotten across program restart.
Netgame.DuplicatePowerups is not initialized until well after global
initialization runs.
Literal strings were copied into a local buffer. Replace with a pointer
to the appropriate literal string.
Fixes: aa9a5df0d4 ("Rearrange Advanced Hosting Menu")
4a84320817b9e02f86f3ec2dd2678e3367cddcc removed lots of inclusions of
byteutil.h in various source files. However, when building with
WORDS_NEED_ALIGNMENT, interp.cpp makes use of the INTEL_SHORT and
GET_INTEL_SHORT macros defined there.
Fixes: c4a8432081 ("Remove WORDS_NEED_ALIGNMENT memcpy src cast to const uint8_t*")
Some outdated mingw32 headers also set the POSIX value when used on
Windows. Expand the override to force the non-standard Microsoft format
for all Windows platforms.
Additionally, improve handling of Primary_last_was_super. Previously,
it was cleared to 0, which made sense if the ship starts with only
lasers. Now that the ship can start with other weapons, clearing
Primary_last_was_super to 0 may override a player's choice. Preserve
player's last-was-super choice when the grant gives both the base and
super forms of a weapon.
Requested-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/140> [for the Primary_weapon part]