diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-07 08:42:21 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-07 09:11:50 +0100 |
commit | dc74095a578a338bb926cfea2db14c2b90c2a633 (patch) | |
tree | 68cbc05afed17107845b242ae937754bf836dc00 /crawl-ref | |
parent | 96944cb324ba858b8fd89175edf14c5a26bd58d6 (diff) | |
download | crawl-ref-dc74095a578a338bb926cfea2db14c2b90c2a633.tar.gz crawl-ref-dc74095a578a338bb926cfea2db14c2b90c2a633.zip |
Get rid of env.show_los.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/env.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/files.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/l_debug.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/los.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/stuff.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/tilepick.cc | 2 |
6 files changed, 3 insertions, 14 deletions
diff --git a/crawl-ref/source/env.h b/crawl-ref/source/env.h index fd9abf7720..ff51dbe2cb 100644 --- a/crawl-ref/source/env.h +++ b/crawl-ref/source/env.h @@ -27,7 +27,6 @@ public: // Objects that are in LOS, used for drawing. show_def show; - env_show_grid show_los; // Compatibility. TODO: remove. // What would be visible, if all of the translucent wall were // made opaque. env_show_grid no_trans_show; diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index af69e7597b..b9b9769e77 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -1223,10 +1223,6 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode, } #endif - // Clear the show grid, to prevent us noticing things - // which were within the old LOS by new coordinates. - env.show_los.init(0); - // Try to open level savefile. #ifdef DEBUG_LEVEL_LOAD mprf(MSGCH_DIAGNOSTICS, "Try to open file %s", cha_fil.c_str()); diff --git a/crawl-ref/source/l_debug.cc b/crawl-ref/source/l_debug.cc index 806b6e08ec..1e788c2478 100644 --- a/crawl-ref/source/l_debug.cc +++ b/crawl-ref/source/l_debug.cc @@ -45,7 +45,6 @@ LUAFN(debug_flush_map_memory) LUAFN(debug_generate_level) { no_messages mx; - env.show_los.init(0); env.map.init(map_cell()); #ifdef USE_TILE tile_init_default_flavour(); diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc index 1d68cef75c..7d692ca6be 100644 --- a/crawl-ref/source/los.cc +++ b/crawl-ref/source/los.cc @@ -1007,17 +1007,12 @@ void calc_show_los() { if (!crawl_state.arena && !crawl_state.arena_suspended) { - losight(env.show_los, you.pos()); you.update_los(); // What would be visible, if all of the translucent walls were // made opaque. // XXX: figure out what this should really do. losight(env.no_trans_show, you.pos(), opc_solid); } - else - { - losight_permissive(env.show_los, crawl_view.glosc()); - } } bool see_cell(const env_show_grid &show, @@ -1043,7 +1038,7 @@ bool observe_cell(const coord_def &p) { return (((crawl_state.arena || crawl_state.arena_suspended) && crawl_view.in_grid_los(p)) - || see_cell(env.show_los, you.pos(), p)); + || you.see_cell(p)); } // Answers the question: "Would a cell be within character's line of sight, diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 4efd5e7839..2eee5c8992 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -880,7 +880,7 @@ bool is_trap_square(dungeon_feature_type grid) // applied to new games. void zap_los_monsters() { - losight(env.show_los, you.pos()); + calc_show_los(); for (rectangle_iterator ri(crawl_view.vlos1, crawl_view.vlos2); ri; ++ri ) { diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 3d56449778..75606c854b 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -4535,7 +4535,7 @@ void tile_draw_floor() const coord_def gc = show2grid(ep); int bg = TILE_DNGN_UNSEEN | tile_unseen_flag(gc); - if (env.show_los(ep)) + if (observe_cell(ep)) { dungeon_feature_type feat = grid_appearance(gc); bg = tileidx_feature(feat, gc.x, gc.y); |