summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libdos.cc
diff options
context:
space:
mode:
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();
}