summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-04 19:20:28 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-04 19:20:28 +0000
commitc68ef2df6780db4bd3b16a50de06f7f528a31336 (patch)
tree1afdaad186f5db466de1c7555e8e2b301883e280 /crawl-ref/source/view.cc
parent6945b9d587b894371ba4d6d99f9ee1b8ee3beb86 (diff)
downloadcrawl-ref-c68ef2df6780db4bd3b16a50de06f7f528a31336.tar.gz
crawl-ref-c68ef2df6780db4bd3b16a50de06f7f528a31336.zip
* Some more tweaks to the spellcasting interface.
* Colour items out of range darkgrey, like we do for floor/monsters. * Fix berserk monsters choosing one of the nearest monsters randomly. (Seriously, I must have been half asleep when I wrote that.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9733 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 3e4b047e75..e5b31c63ab 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -1462,7 +1462,7 @@ static int _get_item_dngn_code(const item_def &item)
inline static void _update_item_grid(const coord_def &gp, const coord_def &ep)
{
const item_def &eitem = mitm[igrd(gp)];
- unsigned short &ecol = env.show_col(ep);
+ unsigned short &ecol = env.show_col(ep);
const dungeon_feature_type grid = grd(gp);
if (Options.feature_item_brand && is_critical_feature(grid))
@@ -1491,11 +1491,12 @@ inline static void _update_item_grid(const coord_def &gp, const coord_def &ep)
void item_grid()
{
const coord_def c(crawl_view.glosc());
+ const coord_def offset(ENV_SHOW_OFFSET, ENV_SHOW_OFFSET);
for (radius_iterator ri(c, LOS_RADIUS, true, false); ri; ++ri)
{
if (igrd(*ri) != NON_ITEM)
{
- const coord_def ep = *ri - c + coord_def(9, 9);
+ const coord_def ep = *ri - c + offset;
if (env.show(ep))
_update_item_grid(*ri, ep);
}