Instead of creating the powerup from a player, then overwriting the
location and velocity of the powerup, and fixing up its segment, create
the powerup directly where it should be, with the intended velocity.
Iterating over it returns each side number in turn. This allows
converting many loops of the form:
```
for (int i = 0; i < MAX_SIDES_PER_SEGMENT; ++i)
```
to the compact form:
```
for (const auto i : MAX_SIDES_PER_SEGMENT)
```
The compact form brings the usual benefit of range-based for: delegating
iteration to the compiler prevents the loop body from skipping a step,
and makes clear in the code that this is the case.
Some flags merit a type other than int8_t. Begin moving flags out to
distinct variables with their own type.
Add static_assert checks that the ABI relevant structures do not change.
A level can have a secret exit without having a mission entry describing
where to go when the secret exit is used. Switch from an assertion
failure in that case to a log message.
This triggers a diagnostic from -Wuseless-cast. It appears to be
unnecessary, after tracing down typedefs. It might need to be restored
if some platform uses a definition that is neither the same type nor
implicitly convertible.
clang treats names introduced by structured bindings specially, and
refuses to capture them for a lambda, even when it should be capturing
an rvalue reference. gcc accepts this capture.
Switch to initializing a lambda local variable from the structured
binding in the outer scope, which works with both compilers.
Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/issues/609>
This eliminates the only place that zip<>'s template parameter list is
written out in the source, which will allow later commits to change the
template parameter list.