summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-15 12:45:17 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-15 12:45:17 +0000
commit09aab0eab6826524b5edc4cb63e7ad151d16a25a (patch)
treee82b5f3a785c496fa52f03acc590f418bf61d5e5 /crawl-ref
parentafaae93d272eb3a6b09fde538c8d85005cad91e3 (diff)
downloadcrawl-ref-09aab0eab6826524b5edc4cb63e7ad151d16a25a.tar.gz
crawl-ref-09aab0eab6826524b5edc4cb63e7ad151d16a25a.zip
Shift-run doesn't distinguish between wall types to make it more useful in labyrinths.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2473 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/externs.h6
-rw-r--r--crawl-ref/source/travel.cc7
2 files changed, 7 insertions, 6 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index bcae117be2..e5d72f412e 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -324,9 +324,9 @@ struct dice_def
struct run_check_dir
{
- unsigned char grid;
- char dx;
- char dy;
+ dungeon_feature_type grid;
+ int dx;
+ int dy;
};
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 9648200892..e9c0876d99 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -3589,7 +3589,7 @@ const runrest &runrest::operator = (int newrunmode)
return (*this);
}
-static char base_grid_type( char grid )
+static dungeon_feature_type base_grid_type( dungeon_feature_type grid )
{
// Don't stop for undiscovered traps:
if (grid == DNGN_UNDISCOVERED_TRAP)
@@ -3599,7 +3599,7 @@ static char base_grid_type( char grid )
return (DNGN_FLOOR);
// Or secret doors (which currently always look like rock walls):
- if (grid == DNGN_SECRET_DOOR)
+ if (grid_is_wall(grid))
return (DNGN_ROCK_WALL);
return (grid);
@@ -3640,7 +3640,8 @@ bool runrest::run_grids_changed() const
{
const int targ_x = you.x_pos + run_check[i].dx;
const int targ_y = you.y_pos + run_check[i].dy;
- const int targ_grid = base_grid_type( grd[ targ_x ][ targ_y ] );
+ const dungeon_feature_type targ_grid =
+ base_grid_type( grd[ targ_x ][ targ_y ] );
if (run_check[i].grid != targ_grid)
return (true);