diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-04 06:53:25 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-04 06:53:25 +0000 |
commit | a75a924ca5f67336d9e065ab307d976c4cd8fabc (patch) | |
tree | 052710fb2cac216521e398e8774426092426bf41 /crawl-ref/source/files.cc | |
parent | b53b7421dc0bda8dc3a4713cad64a6275132261c (diff) | |
download | crawl-ref-a75a924ca5f67336d9e065ab307d976c4cd8fabc.tar.gz crawl-ref-a75a924ca5f67336d9e065ab307d976c4cd8fabc.zip |
[1699948] Allow changing the viewport size if you're using a larger terminal
than 80x24. Also allow moving the PC around the viewport without scrolling the
viewport if the viewport is large enough.
This is not tested on DOS and Windows yet.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1524 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 4a3c39c44d..2e4ec6c9d9 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -810,8 +810,7 @@ static void place_player_on_stair(branch_type old_branch, int stair_taken) } const coord_def where_to_go = find_nearby_stair(stair_taken, find_first); - you.x_pos = where_to_go.x; - you.y_pos = where_to_go.y; + you.moveto(where_to_go); } static void close_level_gates() @@ -999,9 +998,9 @@ bool load( int stair_taken, load_mode_type load_mode, bool was_a_labyrinth, } else if (load_mode != LOAD_RESTART_GAME && you.level_type == LEVEL_ABYSS) { - you.x_pos = 45; - you.y_pos = 35; + you.moveto(45, 35); } + crawl_view.set_player_at(you.pos(), true); // This should fix the "monster occuring under the player" bug? if (mgrd[you.x_pos][you.y_pos] != NON_MONSTER) |