summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tile1.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-23 12:58:27 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-23 12:58:27 +0000
commit4b07a28aaab6e548371e9eae8ea5546afe6e4e54 (patch)
tree40c2380d8fdc25f9f5d1b8cf62140f99cc430787 /crawl-ref/source/tile1.cc
parent4bb492c640354a968b77a3d4f9bf0ebfd3a31ba1 (diff)
downloadcrawl-ref-4b07a28aaab6e548371e9eae8ea5546afe6e4e54.tar.gz
crawl-ref-4b07a28aaab6e548371e9eae8ea5546afe6e4e54.zip
Replace cloak of Starlight tile with Eino's improved version.
Add background tiles for TSO halo. I've tried around with several versions, and this is the best of those I came up with. It might still be annoying, or distracting, or whatever. Also, the player doll's shadow hides part of the halo which is weird. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4529 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tile1.cc')
-rw-r--r--crawl-ref/source/tile1.cc34
1 files changed, 24 insertions, 10 deletions
diff --git a/crawl-ref/source/tile1.cc b/crawl-ref/source/tile1.cc
index 1d02b745d9..f713d9f726 100644
--- a/crawl-ref/source/tile1.cc
+++ b/crawl-ref/source/tile1.cc
@@ -20,6 +20,7 @@
#include "mon-util.h"
#include "player.h"
#include "randart.h"
+#include "spells3.h" // for the halo
#include "stuff.h"
#include "terrain.h"
#include "tiles.h"
@@ -63,8 +64,8 @@ void TileNewLevel(bool first_time)
const coord_def gc(x,y);
int object = grd(gc);
- if (!is_travelable_stair((dungeon_feature_type)object) ||
- travel_cache.know_stair(gc))
+ if (!is_travelable_stair((dungeon_feature_type)object)
+ || travel_cache.know_stair(gc))
{
env.tile_bk_bg[x][y] &= ~TILE_FLAG_NEW_STAIR;
}
@@ -3795,7 +3796,6 @@ void tile_draw_floor()
{
int cx, cy;
for (cy = 0; cy < env.tile_fg.height(); cy++)
- {
for (cx = 0; cx < env.tile_fg.width(); cx++)
{
const coord_def ep(cx+1, cy+1);
@@ -3821,7 +3821,6 @@ void tile_draw_floor()
env.tile_bg[ep.x-1][ep.y-1] = bg;
env.tile_fg[ep.x-1][ep.y-1] = 0;
}
- }
}
// Called from item() in view.cc
@@ -4062,7 +4061,6 @@ void tile_finish_dngn(unsigned int *tileb, int cx, int cy)
const unsigned short baz_col = get_bazaar_special_colour();
for (y = 0; y < crawl_view.viewsz.y; y++)
- {
for (x = 0; x < crawl_view.viewsz.x; x++)
{
// View coords are not centered on you, but on (cx,cy)
@@ -4096,20 +4094,36 @@ void tile_finish_dngn(unsigned int *tileb, int cx, int cy)
if (in_bounds)
{
- if (is_bloodcovered(gx, gy))
+ bool print_blood = true;
+ if (inside_halo(gx, gy))
{
- tileb[count+1] |= TILE_FLAG_BLOOD;
+ if (gx == you.x_pos && gy == you.y_pos)
+ {
+ tileb[count+1] |= TILE_FLAG_HALO_YOU;
+ print_blood = false;
+ }
+ else if (see_grid(gx, gy) && mgrd[gx][gy] != NON_MONSTER)
+ {
+ monsters* m = &menv[mgrd[gx][gy]];
+ if (!mons_class_flag(m->type, M_NO_EXP_GAIN)
+ && (!mons_is_mimic(m->type)
+ || testbits(m->flags, MF_KNOWN_MIMIC)))
+ {
+ tileb[count+1] |= TILE_FLAG_HALO;
+ print_blood = false;
+ }
+ }
}
+ if (print_blood && is_bloodcovered(gx, gy))
+ tileb[count+1] |= TILE_FLAG_BLOOD;
+
if (is_sanctuary(gx, gy))
- {
tileb[count+1] |= TILE_FLAG_SANCTUARY;
- }
}
count += 2;
}
- }
}
void tile_draw_dungeon(unsigned int *tileb)