diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-18 00:31:16 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-18 00:31:16 +0000 |
commit | 2d552e655e12190228e8f737961ccf33875791a5 (patch) | |
tree | 77ed5e2f473edce1ec0660f9fb6e3cc66ab690d4 /crawl-ref/source/tile1.cc | |
parent | a64069c6cb00d8eee7655ee1b6162b9b6ab0dbf7 (diff) | |
download | crawl-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/tile1.cc')
-rw-r--r-- | crawl-ref/source/tile1.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/crawl-ref/source/tile1.cc b/crawl-ref/source/tile1.cc index a40883ef0e..374ad62cde 100644 --- a/crawl-ref/source/tile1.cc +++ b/crawl-ref/source/tile1.cc @@ -64,13 +64,17 @@ int tile_unseen_flag(const coord_def& gc) } } -int tileidx_monster_base(int mon_idx) +int tileidx_monster_base(int mon_idx, bool detected) { const monsters* mon = &menv[mon_idx]; int grid = grd[mon->x][mon->y]; bool in_water = (grid == DNGN_SHALLOW_WATER || grid == DNGN_DEEP_WATER); + + int type = mon->type; + if (detected) + type = mons_genus(type); - switch (mon->type) + switch (type) { case MONS_GIANT_ANT: return TILE_MONS_GIANT_ANT; @@ -788,9 +792,9 @@ int tileidx_monster_base(int mon_idx) return TILE_ERROR; } -int tileidx_monster(int mon_idx) +int tileidx_monster(int mon_idx, bool detected) { - int ch = tileidx_monster_base(mon_idx); + int ch = tileidx_monster_base(mon_idx, detected); if(mons_flies(&menv[mon_idx])) ch |= TILE_FLAG_FLYING; @@ -3605,7 +3609,7 @@ void tile_place_item_marker(int x, int y, int idx) } // Called from monster_grid() in view.cc -void tile_place_monster(int gx, int gy, int idx, bool foreground) +void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected) { if (idx == NON_MONSTER) { @@ -3615,7 +3619,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground) const coord_def gc(gx, gy); const coord_def ep = view2show(grid2view(gc)); - int t = tileidx_monster(idx); + int t = tileidx_monster(idx, detected); int t0 = t & TILE_FLAG_MASK; int flag = t & (~TILE_FLAG_MASK); int mon_wep = menv[idx].inv[MSLOT_WEAPON]; |