summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tile2.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-01 20:05:11 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-01 20:05:11 +0000
commit853c58cb69e332fff75188ff728dae72d408b76d (patch)
tree5475fcb8e11f3df3b6f8180d0e30b98d4b26f27d /crawl-ref/source/tile2.cc
parent9f31ec780f2eec15a533437643cbbeca0cce13ac (diff)
downloadcrawl-ref-853c58cb69e332fff75188ff728dae72d408b76d.tar.gz
crawl-ref-853c58cb69e332fff75188ff728dae72d408b76d.zip
Fixing Win32 tile issue with cursor not being displayed on out of sight tiles.
Reverting previous change to make cursor be red on out of sight tiles that have been seen. You can still click on them to travel and so it feels wrong to have the cursor appear invalid. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3498 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tile2.cc')
-rw-r--r--crawl-ref/source/tile2.cc33
1 files changed, 17 insertions, 16 deletions
diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc
index 109d2485b7..ae5cdc57e6 100644
--- a/crawl-ref/source/tile2.cc
+++ b/crawl-ref/source/tile2.cc
@@ -697,21 +697,6 @@ void tcache_compose_normal(int ix, int *fg, int *bg)
if ((bg0 & TILE_FLAG_SANCTUARY) && !(bg0 & TILE_FLAG_UNSEEN))
tcache_overlay(tc_img, ix, TILE_SANCTUARY, TREGION_0_NORMAL, &c, NULL);
- // Tile cursor
- if (bg0 & TILE_FLAG_CURSOR)
- {
- int type = ((bg0 & TILE_FLAG_CURSOR) == TILE_FLAG_CURSOR1) ?
- TILE_CURSOR : TILE_CURSOR2;
-
- if ((bg0 & TILE_FLAG_CURSOR) == TILE_FLAG_CURSOR3)
- type = TILE_CURSOR3;
-
- tcache_overlay(tc_img, ix, type, TREGION_0_NORMAL, &c, NULL);
-
- if (type != TILE_CURSOR3)
- c = 2;
- }
-
// Apply the travel exclusion under the foreground if the cell is
// visible. It will be applied later if the cell is unseen.
if ((bg0 & TILE_FLAG_TRAVEL_EX) && !(bg0 & TILE_FLAG_UNSEEN))
@@ -797,13 +782,29 @@ void tcache_compose_normal(int ix, int *fg, int *bg)
tcache_overlay(tc_img, ix, TILE_TRAVEL_EXCLUSION, TREGION_0_NORMAL, &c,
NULL);
}
+
+ // Tile cursor
+ if (bg0 & TILE_FLAG_CURSOR)
+ {
+ int type = ((bg0 & TILE_FLAG_CURSOR) == TILE_FLAG_CURSOR1) ?
+ TILE_CURSOR : TILE_CURSOR2;
+
+ if ((bg0 & TILE_FLAG_CURSOR) == TILE_FLAG_CURSOR3)
+ type = TILE_CURSOR3;
+
+ tcache_overlay(tc_img, ix, type, TREGION_0_NORMAL, &c, NULL);
+
+ if (type != TILE_CURSOR3)
+ c = 2;
+ }
+
}
// Tile cursor
int TileDrawCursor(int x, int y, int cflag)
{
int oldc = t2buf[x+1][y+1] & TILE_FLAG_CURSOR;
- t2buf[x+1][y+1] &= ~ TILE_FLAG_CURSOR;
+ t2buf[x+1][y+1] &= ~TILE_FLAG_CURSOR;
t2buf[x+1][y+1] |= cflag;
update_single_grid(x, y);
return oldc;