From a75a924ca5f67336d9e065ab307d976c4cd8fabc Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 4 Jun 2007 06:53:25 +0000 Subject: [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 --- crawl-ref/source/libdos.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/libdos.cc') 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(); } -- cgit v1.2.3-54-g00ecf