From 853c58cb69e332fff75188ff728dae72d408b76d Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 1 Mar 2008 20:05:11 +0000 Subject: 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 --- crawl-ref/source/tile2.cc | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'crawl-ref/source/tile2.cc') 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; -- cgit v1.2.3-54-g00ecf