summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libdos.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-04 06:53:25 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-04 06:53:25 +0000
commita75a924ca5f67336d9e065ab307d976c4cd8fabc (patch)
tree052710fb2cac216521e398e8774426092426bf41 /crawl-ref/source/libdos.cc
parentb53b7421dc0bda8dc3a4713cad64a6275132261c (diff)
downloadcrawl-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/libdos.cc')
-rw-r--r--crawl-ref/source/libdos.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/crawl-ref/source/libdos.cc b/crawl-ref/source/libdos.cc
index 2db3422868..8c197e1c8e 100644
--- a/crawl-ref/source/libdos.cc
+++ b/crawl-ref/source/libdos.cc
@@ -28,7 +28,8 @@ void init_libdos()
void clear_message_window()
{
- window(1, VIEW_EY + 1, get_number_of_cols(), get_number_of_lines());
+ window(crawl_view.msgp.x, crawl_view.msgp.y,
+ get_number_of_cols(), get_number_of_lines());
clrscr();
window(1, 1, get_number_of_cols(), get_number_of_lines());
}
@@ -38,8 +39,9 @@ static void scroll_message_window()
const int x = wherex(), y = wherey();
textcolor(LIGHTGREY);
- movetext(1, VIEW_EY + 2, get_number_of_cols(), get_number_of_lines(),
- 1, VIEW_EY + 1);
+ movetext(crawl_view.msgp.x, crawl_view.msgp.y + 1,
+ get_number_of_cols(), get_number_of_lines(),
+ crawl_view.msgp.x, crawl_view.msgp.y);
gotoxy(1, get_number_of_lines());
clreol();
@@ -48,19 +50,19 @@ static void scroll_message_window()
gotoxy(x, y - 1);
}
-extern int get_message_window_height();
void message_out(int which_line, int colour, const char *s, int firstcol,
bool newline)
{
if (!firstcol)
firstcol = Options.delay_message_clear? 2 : 1;
- gotoxy(firstcol, which_line + VIEW_EY + 1);
+ gotoxy(firstcol + crawl_view.msgp.x - 1,
+ which_line + crawl_view.msgp.y);
textcolor(colour);
cprintf("%s", s);
- if (newline && which_line == get_message_window_height() - 1)
+ if (newline && which_line == crawl_view.msgsz.y - 1)
scroll_message_window();
}