SDL interface now displays reversed walls
commit30072888420197a972d6aca538c03c91d32ac6e4
authorPhilip Pavlick <philip@swash.link>
Sat, 4 Aug 2018 07:05:03 +0000 (4 03:05 -0400)
committerPhilip Pavlick <philip@swash.link>
Sat, 4 Aug 2018 07:05:03 +0000 (4 03:05 -0400)
tree426aa815720bf16cbd170ce164fe01558ff90631
parent54848d657ac798f12a16c2562aaf7e21e6ad1076
SDL interface now displays reversed walls

The SDL terminal interface will now display walls with reversed colors
if REVERSED_WALLS == true.  Keeping with conventions introduced in
previous versions, this is only the case if TEXT_EFFECTS == true.

In order to accomplish this, the "put_char" function in the SpelunkIO
interface has been given a bool "reversed" which defaults to false and
is activated if the given symbol's "color" member returns true when
bitwise-or'd with A_REVERSE in the "display" function.  It's kind of a
kludge, but it's a necessary kludge due to the way that the SDL
interface is written.

In order to make this work, the "symbol" struct has been edited so that
the "color" attribute is always present, one way or another.
Additionally, in order for the REVERSED_WALLS option to have an effect,
the instantiation of the Terrain enum has been altered using a static if
so that no tiles will be reversed if !REVERSED_WALLS.
src/iocurses.d
src/iomain.d
src/ioterm.d
src/sym.d
src/tsyms.d