CleverRaven/Cataclysm-DDA — pull request #6992 by BevapDin (2014-03-29 18:14:31+00:00)
Title: Partially rewrite how field and item symbols are displayed on the map

There is an exploit: because the field drawing code contains a check of items on the square one could use this to determine if a SEALED square contains items. A (closed) cargo crate with blood on it appears as X if there are no items in it. It appears as '%' (blood field symbol) if there are items in it. Same for beds.

What happens is this:
The item symbol is drawn only when the symbol of the square (without any items) is either '.' or '%'. For example road/dirt/grass have '.' and items on those tiles replace the terrain symbol with the item symbol. But a metal wreckage/dirt mound/bed have a '#' as symbol and items do not replace the terrain symbol, they just invert/highlight it (blue background).

Now add a smoke field. It changes the terrain symbol of the square to '8' (ignoring the symbol of the terrain/furniture/trap), which is neither '.' nor '%' and therefor (similar to beds) makes items appear as blue background only.

There is a special case in `map::drawsq`: when the field symbol is '%', it will not draw items on the square, only the field. Otherwise (field symbol != '%') it will draw the items instead of the field. This dates back to the first commit.

A blood field appears as '%' and does *not* override the terrain/furniture/trap symbol. But there is one exception: if there are items on the tile, the blood field is drawn anyway and drawing the items is disabled.

Fixes #5344

This also applies the color from being boomered / having night vision / low light as last step. This makes all stuff around one magenta (in case of boomered), not just the terrain and furniture.

This PR makes the item visible (if not hidden by furniture), it applies the field color if the field itself is hidden by the furniture / items.

This means items on a blood field appear as item symbol, but red (from the field).
Same for walls, they appear read (from the field) but still as wall.