summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-13 17:14:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-13 17:14:35 +0000
commit429cc16cb83f54b3f983e151ce1f080b2a3e8ec0 (patch)
treeae0f9519ca6d905d6fa8e8b0d1a6caa8ae260c65 /crawl-ref/source/tilereg.cc
parente7f07ca39819b9370578f0ceb71ba86f0ce8e801 (diff)
downloadcrawl-ref-429cc16cb83f54b3f983e151ce1f080b2a3e8ec0.tar.gz
crawl-ref-429cc16cb83f54b3f983e151ce1f080b2a3e8ec0.zip
* Add a tile for detected secret doors as suggested by zebez, then turned
the idea on its head. * Fix corpses getting the wrong blood stain background tile (also a patch by zebez), and change around the colours a bit: a red blood stain now shows that Vampires can drain the corpse, undrainable corpses get the green background instead * Apply a small patch by Josh Triplett to give more appropriate messages when glowing weapons are sacrificed and disappear "without a glow" git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10209 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilereg.cc')
-rw-r--r--crawl-ref/source/tilereg.cc56
1 files changed, 32 insertions, 24 deletions
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index cc015ab602..af00afb78b 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -259,38 +259,46 @@ void DungeonRegion::load_dungeon(unsigned int* tileb, int cx_to_gx, int cy_to_gy
void DungeonRegion::pack_background(unsigned int bg, int x, int y)
{
unsigned int bg_idx = bg & TILE_FLAG_MASK;
+
if (bg_idx >= TILE_DNGN_WAX_WALL)
{
tile_flavour &flv = env.tile_flv[x + m_cx_to_gx][y + m_cy_to_gy];
m_buf_dngn.add(flv.floor, x, y);
}
-
m_buf_dngn.add(bg_idx, x, y);
- if (bg & TILE_FLAG_BLOOD && bg_idx > TILE_DNGN_UNSEEN)
- {
- tile_flavour &flv = env.tile_flv[x + m_cx_to_gx][y + m_cy_to_gy];
- int offset = flv.special % tile_dngn_count(TILE_BLOOD);
- m_buf_dngn.add(TILE_BLOOD + offset, x, y);
- }
-
- if (bg & TILE_FLAG_HALO)
- m_buf_dngn.add(TILE_HALO, x, y);
+ if (bg & TILE_FLAG_WAS_SECRET)
+ m_buf_dngn.add(TILE_DNGN_DETECTED_SECRET_DOOR, x, y);
- if (bg & TILE_FLAG_SANCTUARY && !(bg & TILE_FLAG_UNSEEN))
- m_buf_dngn.add(TILE_SANCTUARY, x, y);
+ if (bg_idx > TILE_DNGN_UNSEEN)
+ {
+ if (bg & TILE_FLAG_BLOOD)
+ {
+ tile_flavour &flv = env.tile_flv[x + m_cx_to_gx][y + m_cy_to_gy];
+ int offset = flv.special % tile_dngn_count(TILE_BLOOD);
+ m_buf_dngn.add(TILE_BLOOD + offset, x, y);
+ }
- // Apply the travel exclusion under the foreground if the cell is
- // visible. It will be applied later if the cell is unseen.
- if (bg & TILE_FLAG_EXCL_CTR && !(bg & TILE_FLAG_UNSEEN))
- m_buf_dngn.add(TILE_TRAVEL_EXCLUSION_CENTRE_BG, x, y);
- else if (bg & TILE_FLAG_TRAV_EXCL && !(bg & TILE_FLAG_UNSEEN))
- m_buf_dngn.add(TILE_TRAVEL_EXCLUSION_BG, x, y);
+ if (bg & TILE_FLAG_HALO)
+ m_buf_dngn.add(TILE_HALO, x, y);
- if (bg & TILE_FLAG_RAY)
- m_buf_dngn.add(TILE_RAY, x, y);
- else if (bg & TILE_FLAG_RAY_OOR)
- m_buf_dngn.add(TILE_RAY_OUT_OF_RANGE, x, y);
+ if (!(bg & TILE_FLAG_UNSEEN))
+ {
+ if (bg & TILE_FLAG_SANCTUARY)
+ m_buf_dngn.add(TILE_SANCTUARY, x, y);
+
+ // Apply the travel exclusion under the foreground if the cell is
+ // visible. It will be applied later if the cell is unseen.
+ if (bg & TILE_FLAG_EXCL_CTR)
+ m_buf_dngn.add(TILE_TRAVEL_EXCLUSION_CENTRE_BG, x, y);
+ else if (bg & TILE_FLAG_TRAV_EXCL)
+ m_buf_dngn.add(TILE_TRAVEL_EXCLUSION_BG, x, y);
+ }
+ if (bg & TILE_FLAG_RAY)
+ m_buf_dngn.add(TILE_RAY, x, y);
+ else if (bg & TILE_FLAG_RAY_OOR)
+ m_buf_dngn.add(TILE_RAY_OUT_OF_RANGE, x, y);
+ }
}
#define NUM_MAX_DOLLS 10
@@ -975,8 +983,8 @@ void DungeonRegion::pack_buffers()
return;
int tile = 0;
- for (int y = 0; y < crawl_view.viewsz.y; y++)
- for (int x = 0; x < crawl_view.viewsz.x; x++)
+ for (int y = 0; y < crawl_view.viewsz.y; ++y)
+ for (int x = 0; x < crawl_view.viewsz.x; ++x)
{
unsigned int bg = m_tileb[tile + 1];
unsigned int fg = m_tileb[tile];