diff options
author | Enne Walker <ennewalker@users.sourceforge.net> | 2009-11-03 22:34:28 -0500 |
---|---|---|
committer | Enne Walker <ennewalker@users.sourceforge.net> | 2009-11-03 22:36:12 -0500 |
commit | f251994ff016cc935e026fe0366d4384890b638a (patch) | |
tree | 4052f58b190797d0320167185bde06bae0e9db91 /crawl-ref/source/view.cc | |
parent | 1bf203aaf578284d268fdca67c9d334a79a53c0d (diff) | |
download | crawl-ref-f251994ff016cc935e026fe0366d4384890b638a.tar.gz crawl-ref-f251994ff016cc935e026fe0366d4384890b638a.zip |
Support for X map multi-level viewing on tiles.
Fixes seeing in-LOS squares on incorrect levels. Fixes the minimap not
updating. Fixes the player dot appearing on the minimap on wrong levels.
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r-- | crawl-ref/source/view.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index b7378efc18..f136e492b9 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -2405,13 +2405,28 @@ static void _reset_travel_colours(std::vector<coord_def> &features, arrange_features(features); } +class levelview_excursion : public level_excursion +{ +public: + void go_to(const level_id& next) + { +#ifdef USE_TILE + tiles.clear_minimap(); + level_excursion::go_to(next); + TileNewLevel(false); +#else + level_excursion::go_to(next); +#endif + } +}; + // show_map() now centers the known map along x or y. This prevents // the player from getting "artificial" location clues by using the // map to see how close to the end they are. They'll need to explore // to get that. This function is still a mess, though. -- bwr void show_map( level_pos &spec_place, bool travel_mode, bool allow_esc ) { - level_excursion le; + levelview_excursion le; level_id original(level_id::current()); cursor_control ccon(!Options.use_fake_cursor); |