summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tile2.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-18 00:31:16 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-18 00:31:16 +0000
commit2d552e655e12190228e8f737961ccf33875791a5 (patch)
tree77ed5e2f473edce1ec0660f9fb6e3cc66ab690d4 /crawl-ref/source/tile2.cc
parenta64069c6cb00d8eee7655ee1b6162b9b6ab0dbf7 (diff)
downloadcrawl-ref-2d552e655e12190228e8f737961ccf33875791a5.tar.gz
crawl-ref-2d552e655e12190228e8f737961ccf33875791a5.zip
Some more improvements for (you guessed it) the tiles.
Hey, I can't help it! :) Fix 1872624: Detect creatures revealing too much info The tiles drawn for detected monsters are now mons_genus(monster). It's not quite as strict as only showing the letter in ASCII (e.g. merfolk, minotaur and elephant slug have different genus but one common letter), but it's certainly better than showing the actual monster. Some more changes to L-click action in inventory, this time adding rods to the mix that can now be evoked rather than unwielded. Also: * Fix cut-off of first digit in item quantities > 99 * show friendly monsters on map overview as lightred (hostiles remain darkred) * show player on map overview as white even when zooming around in X-mode * general clean-up And, not tile-related: FR 1819454: * add mutation line for gourmand behaviour of Ogres and Troll. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3295 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tile2.cc')
-rw-r--r--crawl-ref/source/tile2.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc
index 6e88c8761a..353189e11b 100644
--- a/crawl-ref/source/tile2.cc
+++ b/crawl-ref/source/tile2.cc
@@ -2825,22 +2825,23 @@ void TileDrawOneItem(int region, int i, char key, int idx,
const int offset_amount = TILE_X/4;
int offset = 0;
+ int help = num;
- int c100 = num/100;
- num -= c100*100;
+ int c100 = help/100;
+ help -= c100*100;
if (c100)
{
- TilePutch('0'+ c100, r->backbuf, dx+offset, dy);
+ TilePutch('0' + c100, r->backbuf, dx+offset, dy);
offset += offset_amount;
}
- int c10 = num/10;
+ int c10 = help/10;
if (c10 || c100)
{
- TilePutch('0'+ c10, r->backbuf, dx+offset, dy);
+ TilePutch('0' + c10, r->backbuf, dx+offset, dy);
offset += offset_amount;
}
- int c1 = num % 10;
- TilePutch('0'+ c1, r->backbuf, dx+offset, dy);
+ int c1 = help % 10;
+ TilePutch('0' + c1, r->backbuf, dx+offset, dy);
}
// '?' mark
@@ -2890,13 +2891,13 @@ void TileDrawInvData(int n, int flag, int *tiles, int *num, int *idx,
if (i==MAX_ITEMLIST) break;
int tile0 = (i>=n) ? -1 : tiles[i];
- int idx0 = (i>=n) ? -1 : idx[i];
- char key = (iflags[i]&TILEI_FLAG_FLOOR) ? 0 : index_to_letter(idx[i]);
+ int idx0 = (i>=n) ? -1 : idx[i];
+ char key = (iflags[i]&TILEI_FLAG_FLOOR) ? 0 : index_to_letter(idx[i]);
if ( flag == itemlist_flag
&& tile0 == itemlist[i]
&& num[i] == itemlist_num[i]
- && key == itemlist_key[i]
+ && key == itemlist_key[i]
&& idx0 == itemlist_idx[i]
&& iflags[i] == itemlist_iflag[i]
&& !force_redraw_inv
@@ -2925,7 +2926,7 @@ void TileDrawInvCursor(int ix, bool flag)
(itemlist_flag == REGION_INV1) ? region_item:region_item2;
int tile0 = itemlist[ix];
- int num0 = itemlist_num[ix];
+ int num0 = itemlist_num[ix];
if (flag)
itemlist_iflag[ix] |= TILEI_FLAG_CURSOR;