the prompting on Windows wasn't working correctly if a prior game had crashed
and the self-recover feature was trying to kick in. This impacts tty, curses,
and mswin (GUI).
Taking off no-delay helmets, gloves, and boots were unintentionally
taking off suit instead and stayed worn themselves. As far as I
saw, only helmet types "fedora" and "dented pot" were applicable;
all gloves and boots have a small multi-turn delay. This was an
unintended side-effect of the first "slippery gloves" commit so
happened about three weeks ago.
Eliminate a couple of warnings about unused static routines.
That led to a couple of other things.
I hope I got host vs target right in the mdlib.c '#if's.
Performance profiling showed that multiple strcmpi() calls were
occurring each and every time a character was going to the map.
This update:
- honors the WC_COLOR capability
- It allows a window-port to control individual color availability should the window-port wish to do so.
- Makes checking on the individual colors for the active window-port is a straightforward table lookup at the CLR_ offset.
iflags.use_color remains a master on/off switch for use of color, regardless of the capability
compiled into the game (default TRUE).
The has_color() routine, which is now a shared routine in src/windows.c, could likely be made
into a simple macro to eliminate the function call, but this update does not go that far.
This hits a lot of port files due to the window-port interface change, mostly cookie-cutter.
Instead of the hardcoded value that's in this right at the moment,
the intention is to get the Lua version information directly from
Lua itself for the insertion. For now, this will have to do.
Memory allocated for a trap in getlev() wasn't being freed. There
is already one extra allocation which is supposed to get freed after
the loop, but the 'keepgoing' flag caused an extra trap allocation
before loop termination. So the unintentional one got freed but did
so by intercepting the free for the end-of-list one.
Fruit had similar code which applied to full game save and restore
rather than level save and restore so wasn't as noticeable.