summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilepick.h
diff options
context:
space:
mode:
authorFlorian Diebold <flodiebold@gmail.com>2011-12-28 21:41:51 +0100
committerFlorian Diebold <flodiebold@gmail.com>2011-12-28 21:42:04 +0100
commit2cdada0216b57c076ecc08160ad221583b31dc12 (patch)
tree6194981cbabd050418d22386d5eec243f8ca4458 /crawl-ref/source/tilepick.h
parent11e5df14021eb9e8a50db3eed168a07406af14ba (diff)
downloadcrawl-ref-2cdada0216b57c076ecc08160ad221583b31dc12.tar.gz
crawl-ref-2cdada0216b57c076ecc08160ad221583b31dc12.zip
Fix #5133: secret door positions revealed next to walls with redefined tiles.
This was a regression from my tilepick.cc changes. Since the tile picking code now operates on map_knowledge, it didn't know about the undetected secret door and thus didn't use the tile override from adjacent tiles. This is a bit of a problem with tile_flv, which on the one hand is player-accessible (parts of it get transmitted to the webtiles client, for example), but on the other hand could contain "secret" data, like in this case (maybe the only one at the moment). (Note that this "secret" data didn't actually get sent to the client, but it could easily have been if more tile picking logic was on the client side.) I've opted to fix up tile_flv directly in tile_init_flavour, so that secret doors take the tile override of their neighbours. Of course, that causes the problem that the tile override is still there when the secret door gets turned into an open door, which resulted in an assert ("non-door tile"). That's why now, only certain tiles are allowed as door overrides; all others simply do nothing for doors since they are assumed have been set for undetected secret doors. It also means that you can either override the appearance of an undetected secret door, or its appearance after detection, but not both. I don't think that was done anywhere, but if it was, a more complicated solution might be necessary.
Diffstat (limited to 'crawl-ref/source/tilepick.h')
-rw-r--r--crawl-ref/source/tilepick.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/tilepick.h b/crawl-ref/source/tilepick.h
index 2b82248098..1c26d3bfbc 100644
--- a/crawl-ref/source/tilepick.h
+++ b/crawl-ref/source/tilepick.h
@@ -16,6 +16,8 @@ struct item_def;
class monster;
struct show_type;
+bool is_door_tile(tileidx_t tile);
+
// Tile index lookup from Crawl data.
tileidx_t tileidx_feature(const coord_def &gc);
tileidx_t tileidx_out_of_bounds(int branch);