summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-18 09:20:53 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-18 09:27:38 +0100
commit7a1d7018bc0e074c83abc861fb3420e9a8057111 (patch)
tree20c8581f7c23d725ade3361958bd2525c61f49a5 /crawl-ref/source/view.cc
parent01c78d3add27d344f1a20266790c7c7df33ac7ab (diff)
downloadcrawl-ref-7a1d7018bc0e074c83abc861fb3420e9a8057111.tar.gz
crawl-ref-7a1d7018bc0e074c83abc861fb3420e9a8057111.zip
Move tile_draw_floor into view.cc.
It seems like it should be merged with some of the other code there.
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index c11a309c6d..d5802c06a3 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -725,6 +725,34 @@ static void player_view_update()
update_exclusion_los(update_excludes);
}
+void tile_draw_floor()
+{
+ for (int cy = 0; cy < env.tile_fg.height(); cy++)
+ for (int cx = 0; cx < env.tile_fg.width(); cx++)
+ {
+ const coord_def ep(cx, cy);
+ const coord_def gc = show2grid(ep);
+
+ int bg = TILE_DNGN_UNSEEN | tile_unseen_flag(gc);
+
+ if (in_bounds(gc) && you.see_cell(gc))
+ {
+ dungeon_feature_type feat = grid_appearance(gc);
+ bg = tileidx_feature(feat, gc.x, gc.y);
+
+ if (feat == DNGN_DETECTED_SECRET_DOOR)
+ bg |= TILE_FLAG_WAS_SECRET;
+ else if (is_unknown_stair(gc))
+ bg |= TILE_FLAG_NEW_STAIR;
+ }
+
+
+ // init tiles
+ env.tile_bg[ep.x][ep.y] = bg;
+ env.tile_fg[ep.x][ep.y] = 0;
+ }
+}
+
static void draw_unseen(screen_buffer_t* buffy, const coord_def &gc)
{
#ifndef USE_TILE