From 32a6373c7a8072bfcb4567417f82f700084b6ab8 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 25 Jan 2008 18:11:54 +0000 Subject: Fix collision between gotoxy(int,int,int) and DOS djgpp gotoxy(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3337 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/libgui.cc | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'crawl-ref/source/libgui.cc') diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc index d78607a955..ba8f295192 100644 --- a/crawl-ref/source/libgui.cc +++ b/crawl-ref/source/libgui.cc @@ -821,7 +821,7 @@ static void libgui_save_prefs() static void draw_hgauge(int x, int y, int ofs, int region, int len, int col) { int i; - gotoxy(x, y, region); + cgotoxy(x, y, region); textcolor(col); for (i=0; i < len; i++) { @@ -841,7 +841,7 @@ static void draw_vgauge(int x, int y, int ofs, int region, int len, int col) textcolor(col); for (i=0; i < len; i++) { - gotoxy(x, y+i, region); + cgotoxy(x, y+i, region); cprintf("%02d", ofs+i); } } @@ -876,11 +876,11 @@ void edit_prefs() region_msg->clear(); textcolor(WHITE); - gotoxy (4, 4, GOTO_MSG); + cgotoxy (4, 4, GOTO_MSG); cprintf("j, k, up, down : Select pref"); - gotoxy (4, 5, GOTO_MSG); + cgotoxy (4, 5, GOTO_MSG); cprintf("h, l, left, right : Decrease/Increase"); - gotoxy (4, 6, GOTO_MSG); + cgotoxy (4, 6, GOTO_MSG); cprintf("H, L : Dec/Inc by 10"); need_draw_msg = false; } @@ -891,7 +891,7 @@ void edit_prefs() for(i=0; igotoxy(x, y); + r->cgotoxy(x, y); putch('_'); /* Process input */ @@ -2065,7 +2065,7 @@ void get_input_line_gui(char *const buff, int len) buff[k] = '\0'; /* Update the entry */ - r->gotoxy(x, y); + r->cgotoxy(x, y); int i; //addstr(buff); @@ -2089,7 +2089,7 @@ void get_input_line_gui(char *const buff, int len) putch(c); } r->addstr((char *)"_ "); - r->gotoxy(x+k, y); + r->cgotoxy(x+k, y); }/* while */ } @@ -2115,7 +2115,7 @@ void textbackground(int bg) TextRegionClass::textbackground(bg); } -void gotoxy(int x, int y, int region) +void cgotoxy(int x, int y, int region) { if (region == GOTO_LAST) { @@ -2129,7 +2129,7 @@ void gotoxy(int x, int y, int region) TextRegionClass::text_mode = region_stat; TextRegionClass::text_mode->flag = true; - TextRegionClass::gotoxy(x, y); + TextRegionClass::cgotoxy(x, y); } void _setcursortype(int curstype) @@ -2192,7 +2192,7 @@ void message_out(int which_line, int colour, const char *s, int firstcol, if (!firstcol) firstcol = Options.delay_message_clear ? 2 : 1; - gotoxy(firstcol, which_line + 1, GOTO_MSG); + cgotoxy(firstcol, which_line + 1, GOTO_MSG); textcolor(colour); cprintf("%s", s); @@ -2221,7 +2221,7 @@ void puttext(int sx, int sy, int ex, int ey, unsigned char *buf, bool mono, int xx, yy; unsigned char *ptr = buf; - //gotoxy(1, 1, GOTO_CRT); + //cgotoxy(1, 1, GOTO_CRT); for(yy= sy-1; yy<= ey-1; yy++) { unsigned char *c = &(r->cbuf[yy*(r->mx)+sx-1]); @@ -2286,7 +2286,7 @@ void ViewTextFile(const char *name) while(1) { - gotoxy(1, 1); + cgotoxy(1, 1); if (cline == 0) cprintf(DELIMITER_END); else @@ -2294,14 +2294,14 @@ void ViewTextFile(const char *name) puttext(1, 2, 80, max, &buf[cline*80], true, 1); - gotoxy(1, max); + cgotoxy(1, max); if (cline + max-2 >= nlines) cprintf(DELIMITER_END); else cprintf(DELIMITER_MORE); - gotoxy(14, max); + cgotoxy(14, max); cprintf("[j/k/+/-/SPACE/b: scroll q/ESC/RETURN: exit]"); mouse_set_mode(MOUSE_MODE_MORE); int key = getch(); -- cgit v1.2.3-54-g00ecf