diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-17 17:38:36 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-17 17:38:36 +0000 |
commit | 23c5277317de657f8376d1b5f33144948a811a42 (patch) | |
tree | de39ce9e4c369e1f42ddf291695d25b1c5c44c55 /crawl-ref/source/acr.cc | |
parent | a9a5ce7479fc6358f96aadad9654d35f2a573782 (diff) | |
download | crawl-ref-23c5277317de657f8376d1b5f33144948a811a42.tar.gz crawl-ref-23c5277317de657f8376d1b5f33144948a811a42.zip |
[1738010] Stash-tracker now also tracks traps and other dungeon features.
Changed env.grid to dungeon_feature_type. (The special-level builder still
stores map characters directly into env.grid and then translates them to
features.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1592 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r-- | crawl-ref/source/acr.cc | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 940954b816..d121b1cef0 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -165,7 +165,6 @@ static void close_door(int move_x, int move_y); static void prep_input(); static void input(); -static void middle_input(); static void world_reacts(); static command_type get_next_cmd(); static keycode_type get_next_keycode(); @@ -678,7 +677,8 @@ static void handle_wizard_command( void ) get_input_line( specs, sizeof( specs ) ); if (specs[0] != '\0') - grd[you.x_pos][you.y_pos] = atoi(specs); + grd[you.x_pos][you.y_pos] = + static_cast<dungeon_feature_type>( atoi(specs) ); break; case ']': @@ -890,8 +890,6 @@ static void input() return; } - middle_input(); - if (need_to_autopickup()) autopickup(); @@ -2180,6 +2178,11 @@ static void check_banished() static void world_reacts() { + if (Options.stash_tracking) + stashes.update_visible_stashes( + Options.stash_tracking == STM_ALL? + StashTracker::ST_AGGRESSIVE : + StashTracker::ST_PASSIVE); bool its_quiet; //jmf: for silence messages @@ -2668,15 +2671,6 @@ keycode_type get_next_keycode() return (keyin); } -static void middle_input() -{ - if (Options.stash_tracking) - stashes.update_visible_stashes( - Options.stash_tracking == STM_ALL? - StashTracker::ST_AGGRESSIVE : - StashTracker::ST_PASSIVE); -} - /* Opens doors and handles some aspects of untrapping. If either move_x or move_y are non-zero, the pair carries a specific direction for the door @@ -3070,7 +3064,7 @@ static void move_player(int move_x, int move_y) const int targ_x = you.x_pos + move_x; const int targ_y = you.y_pos + move_y; - const unsigned char targ_grid = grd[ targ_x ][ targ_y ]; + const dungeon_feature_type targ_grid = grd[ targ_x ][ targ_y ]; const unsigned char targ_monst = mgrd[ targ_x ][ targ_y ]; const bool targ_solid = grid_is_solid(targ_grid); |