From 4b07a28aaab6e548371e9eae8ea5546afe6e4e54 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 23 Apr 2008 12:58:27 +0000 Subject: 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 --- crawl-ref/source/tile1.cc | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/tile1.cc') 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) -- cgit v1.2.3-54-g00ecf