summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-25 18:11:54 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-25 18:11:54 +0000
commit32a6373c7a8072bfcb4567417f82f700084b6ab8 (patch)
tree248900b93f0f79c36123dc92364ccf9b0db3bcee
parent0136740f19467e681f934718d109748458fa49c6 (diff)
downloadcrawl-ref-32a6373c7a8072bfcb4567417f82f700084b6ab8.tar.gz
crawl-ref-32a6373c7a8072bfcb4567417f82f700084b6ab8.zip
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
-rw-r--r--crawl-ref/source/acr.cc2
-rw-r--r--crawl-ref/source/beam.cc6
-rw-r--r--crawl-ref/source/chardump.cc2
-rw-r--r--crawl-ref/source/cio.cc10
-rw-r--r--crawl-ref/source/command.cc2
-rw-r--r--crawl-ref/source/decks.cc10
-rw-r--r--crawl-ref/source/defines.h2
-rw-r--r--crawl-ref/source/describe.cc10
-rw-r--r--crawl-ref/source/direct.cc2
-rw-r--r--crawl-ref/source/files.cc3
-rw-r--r--crawl-ref/source/format.cc6
-rw-r--r--crawl-ref/source/format.h2
-rw-r--r--crawl-ref/source/guic.cc4
-rw-r--r--crawl-ref/source/guic.h2
-rw-r--r--crawl-ref/source/libdos.cc6
-rw-r--r--crawl-ref/source/libdos.h1
-rw-r--r--crawl-ref/source/libgui.cc42
-rw-r--r--crawl-ref/source/libgui.h2
-rw-r--r--crawl-ref/source/libunix.cc2
-rw-r--r--crawl-ref/source/libutil.cc2
-rw-r--r--crawl-ref/source/libutil.h2
-rw-r--r--crawl-ref/source/libw32c.cc12
-rw-r--r--crawl-ref/source/libx11.cc4
-rw-r--r--crawl-ref/source/menu.cc26
-rw-r--r--crawl-ref/source/message.cc4
-rw-r--r--crawl-ref/source/misc.cc2
-rw-r--r--crawl-ref/source/mutation.cc2
-rw-r--r--crawl-ref/source/newgame.cc14
-rw-r--r--crawl-ref/source/output.cc48
-rw-r--r--crawl-ref/source/player.cc2
-rw-r--r--crawl-ref/source/shopping.cc10
-rw-r--r--crawl-ref/source/skills2.cc10
-rw-r--r--crawl-ref/source/spl-book.cc4
-rw-r--r--crawl-ref/source/stash.cc4
-rw-r--r--crawl-ref/source/tile2.cc22
-rw-r--r--crawl-ref/source/tutorial.cc8
-rw-r--r--crawl-ref/source/view.cc32
37 files changed, 163 insertions, 161 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 47712a1c81..f5ad7402b4 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1341,7 +1341,7 @@ static void input()
handle_delay();
const coord_def cwhere = grid2view(you.pos());
- gotoxy(cwhere.x, cwhere.y);
+ cgotoxy(cwhere.x, cwhere.y);
if ( you_are_delayed() )
{
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 9fc297f3d3..d5f18dd275 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -187,7 +187,7 @@ void zap_animation( int colour, const monsters *mon, bool force )
TileDrawBolt(drawx-1, drawy-1, tileidx_zap(colour));
#else
view_update();
- gotoxy( drawx, drawy , GOTO_DNGN );
+ cgotoxy( drawx, drawy , GOTO_DNGN );
put_colour_ch( colour, dchar_glyph( DCHAR_FIRED_ZAP ) );
#endif
@@ -1518,7 +1518,7 @@ void fire_beam( bolt &pbolt, item_def *item, bool drop_item )
// bounds check
if (in_los_bounds(drawx, drawy))
{
- gotoxy(drawx, drawy);
+ cgotoxy(drawx, drawy);
put_colour_ch(
pbolt.colour == BLACK? random_colour() : pbolt.colour,
pbolt.type );
@@ -4811,7 +4811,7 @@ static void explosion_cell(bolt &beam, int x, int y, bool drawOnly)
// bounds check
if (in_los_bounds(drawx, drawy))
{
- gotoxy(drawx, drawy, GOTO_DNGN);
+ cgotoxy(drawx, drawy, GOTO_DNGN);
put_colour_ch(
beam.colour == BLACK ? random_colour() : beam.colour,
dchar_glyph( DCHAR_EXPLOSION ) );
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 3577e7e82e..986cc5a2d8 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -1246,7 +1246,7 @@ void resists_screen()
std::vector<formatted_string> vfs = get_full_detail(false);
clrscr();
- gotoxy(1,1);
+ cgotoxy(1,1);
textcolor(LIGHTGREY);
formatted_scroller scr;
diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc
index fcaaa7adc1..f51b3a49bd 100644
--- a/crawl-ref/source/cio.cc
+++ b/crawl-ref/source/cio.cc
@@ -167,7 +167,7 @@ int c_getch()
#endif
}
-// Wrapper around gotoxy that can draw a fake cursor for Unix terms where
+// Wrapper around cgotoxy that can draw a fake cursor for Unix terms where
// cursoring over darkgray or black causes problems.
void cursorxy(int x, int y)
{
@@ -177,9 +177,9 @@ void cursorxy(int x, int y)
if (Options.use_fake_cursor)
fakecursorxy(x, y);
else
- gotoxy(x, y, GOTO_DNGN);
+ cgotoxy(x, y, GOTO_DNGN);
#else
- gotoxy(x, y, GOTO_DNGN);
+ cgotoxy(x, y, GOTO_DNGN);
#endif
}
@@ -216,7 +216,7 @@ int wrapcprintf( int wrapcol, const char *s, ... )
run[avail] = c;
if ((len -= avail) > 0)
- gotoxy(1, y + 1);
+ cgotoxy(1, y + 1);
run += avail;
}
return (olen);
@@ -321,7 +321,7 @@ void line_reader::cursorto(int ncx)
{
int x = (start_x + ncx - 1) % wrapcol + 1;
int y = start_y + (start_x + ncx - 1) / wrapcol;
- ::gotoxy(x, y, GOTO_LAST);
+ ::cgotoxy(x, y, GOTO_LAST);
}
int line_reader::read_line(bool clear_previous)
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index d94af8de8d..426e5c7d5d 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -1014,7 +1014,7 @@ static bool do_description(std::string key, std::string footer = "")
int num_lines = linebreak_string2(footer, numcols);
num_lines++;
- gotoxy(1, get_number_of_lines() - num_lines);
+ cgotoxy(1, get_number_of_lines() - num_lines);
cprintf(footer.c_str());
}
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 0dfec01396..7442c46ba4 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -928,7 +928,7 @@ static void redraw_stacked_cards(const std::vector<card_type>& draws,
{
for (unsigned int i = 0; i < draws.size(); ++i)
{
- gotoxy(1,i+2);
+ cgotoxy(1,i+2);
textcolor(selected == i ? WHITE : LIGHTGREY);
cprintf("%u - %s", i+1, card_name(draws[i]) );
clear_to_end_of_line();
@@ -994,11 +994,11 @@ bool deck_stack()
{
unsigned int selected = draws.size();
clrscr();
- gotoxy(1,1);
+ cgotoxy(1,1);
textcolor(WHITE);
cprintf("Press a digit to select a card, "
"then another digit to swap it.");
- gotoxy(1,10);
+ cgotoxy(1,10);
cprintf("Press Enter to accept.");
redraw_stacked_cards(draws, selected);
@@ -1008,12 +1008,12 @@ bool deck_stack()
const int c = getch();
if ( c == CK_ENTER )
{
- gotoxy(1,11);
+ cgotoxy(1,11);
textcolor(LIGHTGREY);
cprintf("Are you sure? (press y or Y to confirm)");
if ( toupper(getch()) == 'Y' )
break;
- gotoxy(1,11);
+ cgotoxy(1,11);
clear_to_end_of_line();
continue;
}
diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h
index c7b994134d..acdaab337a 100644
--- a/crawl-ref/source/defines.h
+++ b/crawl-ref/source/defines.h
@@ -310,7 +310,7 @@ const int LABYRINTH_BORDER = 4;
#define KEY_MACRO_ENABLE_MORE -2
#define KEY_REPEAT_KEYS -3
-// gotoxy regions
+// cgotoxy regions
enum GotoRegion
{
GOTO_CRT, // cprintf > crt
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 0f2141a89d..e824f87ca4 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -104,7 +104,7 @@ void print_description( const std::string &d )
while(currentPos < d.length())
{
if (currentPos != 0)
- gotoxy(1, wherey() + 1);
+ cgotoxy(1, wherey() + 1);
// see if $ sign is within one lineWidth
nextLine = d.find('$', currentPos);
@@ -1720,7 +1720,7 @@ void describe_item( item_def &item, bool allow_inscribe )
show_item_description(item);
if (item.has_spells())
{
- gotoxy(1, wherey());
+ cgotoxy(1, wherey());
textcolor(LIGHTGREY);
cprintf("Select a spell to read its description.");
if (describe_spells(item))
@@ -1734,7 +1734,7 @@ void describe_item( item_def &item, bool allow_inscribe )
if (!Options.tutorial_left && allow_inscribe
&& wherey() <= get_number_of_lines() - 3)
{
- gotoxy(1, wherey() + 2);
+ cgotoxy(1, wherey() + 2);
std::string ainscrip;
@@ -2564,9 +2564,9 @@ void describe_god( god_type which_god, bool give_title )
if ( which_god == you.religion )
{
if (you.religion == GOD_ZIN || you.religion == GOD_SHINING_ONE)
- gotoxy(1, get_number_of_lines(), GOTO_CRT);
+ cgotoxy(1, get_number_of_lines(), GOTO_CRT);
else
- gotoxy(1, get_number_of_lines() - 2, GOTO_CRT);
+ cgotoxy(1, get_number_of_lines() - 2, GOTO_CRT);
textcolor(LIGHTGRAY);
cprintf(get_linebreak_string(religion_help(which_god),
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc
index 7080b81dbe..4c6f298417 100644
--- a/crawl-ref/source/direct.cc
+++ b/crawl-ref/source/direct.cc
@@ -238,7 +238,7 @@ static void draw_ray_glyph(const coord_def &pos, int colour,
}
}
const coord_def vp = grid2view(pos);
- gotoxy(vp.x, vp.y, GOTO_DNGN);
+ cgotoxy(vp.x, vp.y, GOTO_DNGN);
textcolor( real_colour(colour) );
putch(glych);
#endif
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 8de0fc3b40..eed436232c 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -348,7 +348,6 @@ static bool create_dirs(const std::string &dir)
for (int i = 0, size = segments.size(); i < size; ++i)
{
path += segments[i];
- path += FILE_SEPARATOR;
// Handle absolute paths correctly.
if (i == 0 && dir.size() && dir[0] == FILE_SEPARATOR)
@@ -356,6 +355,8 @@ static bool create_dirs(const std::string &dir)
if (!dir_exists(path) && create_directory(path.c_str()))
return (false);
+
+ path += FILE_SEPARATOR;
}
return (true);
}
diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc
index 7d529315a3..9ac2cc71d2 100644
--- a/crawl-ref/source/format.cc
+++ b/crawl-ref/source/format.cc
@@ -51,7 +51,7 @@ formatted_string formatted_string::parse_block(
{
// Artificial newline - some terms erase to eol when printing a
// newline.
- fs.gotoxy(1, -1); // CR
+ fs.cgotoxy(1, -1); // CR
fs.movexy(0, 1); // LF
}
fs += parse_string(lines[i], eol_ends_format, process);
@@ -275,7 +275,7 @@ void formatted_string::display(int s, int e) const
ops[i].display();
}
-void formatted_string::gotoxy(int x, int y)
+void formatted_string::cgotoxy(int x, int y)
{
ops.push_back( fs_op(x, y) );
}
@@ -368,7 +368,7 @@ void formatted_string::fs_op::display() const
if (cy == -1)
cy = wherey();
}
- ::gotoxy(cx, cy);
+ ::cgotoxy(cx, cy);
break;
}
case FSOP_COLOUR:
diff --git a/crawl-ref/source/format.h b/crawl-ref/source/format.h
index 700f958af6..cc479fef5c 100644
--- a/crawl-ref/source/format.h
+++ b/crawl-ref/source/format.h
@@ -27,7 +27,7 @@ public:
void cprintf(const char *s, ...);
void cprintf(const std::string &s);
- void gotoxy(int x, int y);
+ void cgotoxy(int x, int y);
void movexy(int delta_x, int delta_y);
void add_glyph(const monsters *mons);
void add_glyph(const item_def *item);
diff --git a/crawl-ref/source/guic.cc b/crawl-ref/source/guic.cc
index dd20268723..9baec91cfb 100644
--- a/crawl-ref/source/guic.cc
+++ b/crawl-ref/source/guic.cc
@@ -557,7 +557,7 @@ void TextRegionClass::addstr(char *buffer)
}
}
}
- if (cursor_flag) gotoxy(print_x+1, print_y+1);
+ if (cursor_flag) cgotoxy(print_x+1, print_y+1);
}
void TextRegionClass::addstr_aux(char *buffer, int len)
@@ -677,7 +677,7 @@ void TextRegionClass::textbackground(int col)
textcolor(col*16 + (text_col & 0xf));
}
-void TextRegionClass::gotoxy(int x, int y)
+void TextRegionClass::cgotoxy(int x, int y)
{
print_x = x-1;
print_y = y-1;
diff --git a/crawl-ref/source/guic.h b/crawl-ref/source/guic.h
index c99f7b1ec8..72cf843769 100644
--- a/crawl-ref/source/guic.h
+++ b/crawl-ref/source/guic.h
@@ -274,7 +274,7 @@ class TextRegionClass :public RegionClass
static int cursor_y;
// class methods
- static void gotoxy(int x, int y);
+ static void cgotoxy(int x, int y);
static int wherex();
static int wherey();
//static int get_number_of_lines(void);
diff --git a/crawl-ref/source/libdos.cc b/crawl-ref/source/libdos.cc
index ab04e12784..3af36077bc 100644
--- a/crawl-ref/source/libdos.cc
+++ b/crawl-ref/source/libdos.cc
@@ -43,12 +43,12 @@ static void scroll_message_window()
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());
+ cgotoxy(1, get_number_of_lines());
clreol();
// Cursor also scrolls up so prompts don't look brain-damaged.
if (y == get_number_of_lines())
- gotoxy(x, y - 1);
+ cgotoxy(x, y - 1);
}
void message_out(int which_line, int colour, const char *s, int firstcol,
@@ -57,7 +57,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 + crawl_view.msgp.x - 1,
+ cgotoxy(firstcol + crawl_view.msgp.x - 1,
which_line + crawl_view.msgp.y);
textcolor(colour);
diff --git a/crawl-ref/source/libdos.h b/crawl-ref/source/libdos.h
index e5df42f779..2f182fe055 100644
--- a/crawl-ref/source/libdos.h
+++ b/crawl-ref/source/libdos.h
@@ -10,6 +10,7 @@ void init_libdos();
int get_number_of_lines();
int get_number_of_cols();
+inline void gotoxy_sys(int x, int y) { gotoxy(x, y); }
inline void enable_smart_cursor(bool ) { }
inline bool is_smart_cursor_enabled() { return (false); }
void set_cursor_enabled(bool enabled);
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; i<MAX_EDIT_PREFS;i++)
{
struct prefs *p = &pref_data[i];
- gotoxy(2, i+2, GOTO_STAT);
+ cgotoxy(2, i+2, GOTO_STAT);
if (i == cur_pos)
{
textcolor(0xf0);
@@ -910,15 +910,15 @@ void edit_prefs()
textcolor(LIGHTGREY);
#ifdef WIN32TILES
- gotoxy(4, MAX_EDIT_PREFS+3, GOTO_STAT);
+ cgotoxy(4, MAX_EDIT_PREFS+3, GOTO_STAT);
cprintf("FONT: %s %d",font_name, font_size);
if (UseDosChar)
{
- gotoxy(4, MAX_EDIT_PREFS+4, GOTO_STAT);
+ cgotoxy(4, MAX_EDIT_PREFS+4, GOTO_STAT);
cprintf("DOSFONT: %s %d", dos_font_name, dos_font_size);
}
#else
- gotoxy(4, MAX_EDIT_PREFS+3, GOTO_STAT);
+ cgotoxy(4, MAX_EDIT_PREFS+3, GOTO_STAT);
cprintf("FONT: %s",font_name);
#endif
@@ -1446,7 +1446,7 @@ static int handle_mouse_motion(int mouse_x, int mouse_y, bool init)
if(mode==REGION_TDNGN)
{
- gotoxy(cx+2, cy+1, GOTO_DNGN);
+ cgotoxy(cx+2, cy+1, GOTO_DNGN);
}
const int gx = view2gridX(cx) + 1;
@@ -1942,7 +1942,7 @@ void clrscr()
}
}
- gotoxy(1, 1);
+ cgotoxy(1, 1);
}
void putch(unsigned char chr)
@@ -2004,7 +2004,7 @@ void get_input_line_gui(char *const buff, int len)
buff[len] = '\0';
buff[0] = '\0';
- r->gotoxy(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();
diff --git a/crawl-ref/source/libgui.h b/crawl-ref/source/libgui.h
index ed820fde24..dde45f18dc 100644
--- a/crawl-ref/source/libgui.h
+++ b/crawl-ref/source/libgui.h
@@ -108,7 +108,7 @@ enum ScreenRegion
/* text display */
void clrscr(void);
void textcolor(int color);
-void gotoxy(int x, int y, int region = GOTO_CRT);
+void cgotoxy(int x, int y, int region = GOTO_CRT);
void message_out(int mline, int colour, const char *str, int firstcol = 0,
bool newline = true);
void clear_message_window();
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index 5b3bac84bc..25d73917c2 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -636,7 +636,7 @@ void puttext(int x1, int y1, int x2, int y2, const screen_buffer_t *buf)
for (int y = y1; y <= y2; ++y)
{
- gotoxy(x1, y);
+ cgotoxy(x1, y);
for (int x = x1; x <= x2; ++x)
{
const screen_buffer_t ch = cset_adjust( *buf );
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index 62d7d9374e..9b492329cd 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -568,7 +568,7 @@ int snprintf( char *str, size_t size, const char *format, ... )
#endif
#ifndef USE_TILE
-void gotoxy(int x, int y, int region)
+void cgotoxy(int x, int y, int region)
{
switch(region)
{
diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h
index 11087ffd11..c7bfbeab01 100644
--- a/crawl-ref/source/libutil.h
+++ b/crawl-ref/source/libutil.h
@@ -164,7 +164,7 @@ int snprintf( char *str, size_t size, const char *format, ... );
#endif
#ifndef USE_TILE
-void gotoxy(int x, int y, int region = GOTO_CRT);
+void cgotoxy(int x, int y, int region = GOTO_CRT);
#endif
template <typename T>
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc
index 786d50f17d..db758eee12 100644
--- a/crawl-ref/source/libw32c.cc
+++ b/crawl-ref/source/libw32c.cc
@@ -151,7 +151,7 @@ void writeChar(char c)
bFlush();
// reposition
- gotoxy(1, cy+2);
+ cgotoxy(1, cy+2);
return;
}
@@ -458,7 +458,7 @@ void _setcursortype_internal(bool curstype)
// now, if we just changed from NOCURSOR to CURSOR,
// actually move screen cursor
if (cursor_is_enabled)
- gotoxy(cx+1, cy+1);
+ cgotoxy(cx+1, cy+1);
}
// This will force the cursor down to the next line.
@@ -498,7 +498,7 @@ void clrscr(void)
WriteConsoleOutput(outbuf, screen, screensize, source, &target);
// reset cursor to 1,1 for convenience
- gotoxy(1,1);
+ cgotoxy(1,1);
}
void gotoxy_sys(int x, int y)
@@ -603,7 +603,7 @@ static void scroll_message_window()
// Cursor also scrolls up so prompts don't look brain-damaged.
if (wherey() == screensize.Y)
- gotoxy(wherex(), wherey() - 1);
+ cgotoxy(wherex(), wherey() - 1);
}
void message_out(int which_line, int colour, const char *s, int firstcol,
@@ -612,7 +612,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 - 1 + crawl_view.msgp.x,
+ cgotoxy(firstcol - 1 + crawl_view.msgp.x,
which_line + crawl_view.msgp.y);
textcolor(colour);
@@ -998,7 +998,7 @@ void puttext(int x1, int y1, int x2, int y2, const screen_buffer_t *buf)
{
for (int y = y1; y <= y2; ++y)
{
- gotoxy(x1, y);
+ cgotoxy(x1, y);
for (int x = x1; x <= x2; x++)
{
textattr( buf[1] );
diff --git a/crawl-ref/source/libx11.cc b/crawl-ref/source/libx11.cc
index 2bc75e3ac6..f01018a6aa 100644
--- a/crawl-ref/source/libx11.cc
+++ b/crawl-ref/source/libx11.cc
@@ -189,7 +189,7 @@ void update_tip_text(const char *tip)
if (is_main_screen)
{
- region_tip->gotoxy(1, 1 + i);
+ region_tip->cgotoxy(1, 1 + i);
region_tip->addstr(this_tip);
region_tip->make_active();
}
@@ -197,7 +197,7 @@ void update_tip_text(const char *tip)
{
ASSERT(i == 0);
textattr(WHITE);
- gotoxy(1, get_number_of_lines() + 1);
+ cgotoxy(1, get_number_of_lines() + 1);
cprintf("%s", this_tip);
clear_to_end_of_line();
}
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index 58a3b1d450..ab8f493432 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -297,7 +297,7 @@ bool Menu::process_key( int keyin )
if ( !( flags & MF_ALLOW_FILTER ) )
break;
char linebuf[80];
- gotoxy(1,1);
+ cgotoxy(1,1);
clear_to_end_of_line();
textcolor(WHITE);
cprintf("Select what? (regex) ");
@@ -408,7 +408,7 @@ bool Menu::draw_title_suffix( const std::string &s, bool titlefirst )
int x = wherex();
if (x > get_number_of_cols() || x < 1)
{
- gotoxy(oldx, oldy);
+ cgotoxy(oldx, oldy);
return false;
}
@@ -420,7 +420,7 @@ bool Menu::draw_title_suffix( const std::string &s, bool titlefirst )
cprintf("%s", towrite.c_str());
- gotoxy( oldx, oldy );
+ cgotoxy( oldx, oldy );
return true;
}
@@ -540,7 +540,7 @@ void Menu::select_items( int key, int qty )
}
}
}
- gotoxy( x, y );
+ cgotoxy( x, y );
}
bool Menu::is_selectable(int item) const
@@ -633,7 +633,7 @@ void Menu::draw_menu()
}
if (end < (int) items.size() || is_set(MF_ALWAYS_SHOW_MORE))
{
- gotoxy( 1, y_offset + pagesize - count_linebreaks(more) );
+ cgotoxy( 1, y_offset + pagesize - count_linebreaks(more) );
more.display();
}
@@ -646,7 +646,7 @@ void Menu::update_title()
{
int x = wherex(), y = wherey();
draw_title();
- gotoxy(x, y);
+ cgotoxy(x, y);
}
int Menu::item_colour(int, const MenuEntry *entry) const
@@ -662,7 +662,7 @@ void Menu::draw_title()
{
if (title)
{
- gotoxy(1, 1);
+ cgotoxy(1, 1);
write_title();
}
}
@@ -686,7 +686,7 @@ void Menu::write_title()
const int x = wherex(), y = wherey();
cprintf("%-*s", get_number_of_cols() - x, "");
- gotoxy(x, y);
+ cgotoxy(x, y);
}
bool Menu::in_page(int index) const
@@ -698,7 +698,7 @@ void Menu::draw_item( int index ) const
{
if (!in_page(index))
return;
- gotoxy( 1, y_offset + index - first_entry );
+ cgotoxy( 1, y_offset + index - first_entry );
draw_index_item(index, items[index]);
}
@@ -964,7 +964,7 @@ void slider_menu::show_more()
if (!need_more)
return ;
const int end = entry_end();
- gotoxy( 1, y_offset + pagesize );
+ cgotoxy( 1, y_offset + pagesize );
if (end < (int) items.size() || is_set(MF_ALWAYS_SHOW_MORE))
more.display();
else
@@ -986,7 +986,7 @@ int slider_menu::entry_end() const
void slider_menu::draw_menu()
{
- gotoxy(1, starty);
+ cgotoxy(1, starty);
write_title();
calc_y_offset();
@@ -995,7 +995,7 @@ void slider_menu::draw_menu()
// We're using get_number_of_cols() - 1 because we want to avoid line wrap
// on DOS (the conio.h functions go batshit if that happens).
- gotoxy(1, y_offset - 1);
+ cgotoxy(1, y_offset - 1);
show_less();
@@ -1005,7 +1005,7 @@ void slider_menu::draw_menu()
textattr(LIGHTGREY);
for (int i = end; i < first_entry + pagesize; ++i)
{
- gotoxy(1, y_offset + i - first_entry);
+ cgotoxy(1, y_offset + i - first_entry);
cprintf("%-*s", get_number_of_cols() - 2, "");
}
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index 9c919f1fe5..75e1a46df1 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -849,7 +849,7 @@ void replay_messages(void)
{
clrscr();
- gotoxy(1, 1, GOTO_CRT);
+ cgotoxy(1, 1, GOTO_CRT);
for (int i = 0; i < num_lines - 2; i++)
{
@@ -885,7 +885,7 @@ void replay_messages(void)
break;
case FSOP_TEXT:
textcolor( colour );
- gotoxy(curcol, wherey(), GOTO_CRT);
+ cgotoxy(curcol, wherey(), GOTO_CRT);
cprintf(fs.ops[j].text.c_str());
curcol += multibyte_strlen(fs.ops[j].text);
break;
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 61d11eb2e4..161bb3bfde 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1439,7 +1439,7 @@ void new_level(void)
{
textcolor(LIGHTGREY);
- gotoxy(7, 12, GOTO_STAT);
+ cgotoxy(7, 12, GOTO_STAT);
#if DEBUG_DIAGNOSTICS
cprintf( "(%d) ", you.your_level + 1 );
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 57b8549a9e..2615e8661e 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -1333,7 +1333,7 @@ formatted_string describe_mutations()
void display_mutations()
{
clrscr();
- gotoxy(1,1);
+ cgotoxy(1,1);
const formatted_string mutation_fs = describe_mutations();
Menu mutation_menu(mutation_fs);
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 1286dbbc26..c92c220046 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -2093,7 +2093,7 @@ static void show_name_prompt(int where, bool blankOK,
const std::vector<player_save_info> &existing_chars,
slider_menu &menu)
{
- gotoxy(1, where);
+ cgotoxy(1, where);
textcolor( CYAN );
if (blankOK)
{
@@ -2115,7 +2115,7 @@ static void show_name_prompt(int where, bool blankOK,
const int name_x = wherex(), name_y = wherey();
menu.set_limits(name_y + 3, get_number_of_lines());
menu.display();
- gotoxy(name_x, name_y);
+ cgotoxy(name_x, name_y);
}
textcolor( LIGHTGREY );
@@ -2193,11 +2193,11 @@ static bool read_player_name(
for (;;)
{
- gotoxy(name_x, name_y);
+ cgotoxy(name_x, name_y);
if (name_x <= 80)
cprintf("%-*s", 80 - name_x + 1, "");
- gotoxy(name_x, name_y);
+ cgotoxy(name_x, name_y);
int ret = reader.read_line(false);
if (!ret)
return (true);
@@ -2240,7 +2240,7 @@ static void enter_player_name(bool blankOK)
existing_chars = find_saved_characters();
if (existing_chars.empty())
{
- gotoxy(1,12);
+ cgotoxy(1,12);
formatted_string::parse_string(
" If you've never been here before, you might want to try "
"out" EOL " the Dungeon Crawl tutorial. To do this, press "
@@ -2276,7 +2276,7 @@ static void enter_player_name(bool blankOK)
#ifdef USE_TILE
clrscr();
- gotoxy(1, 1);
+ cgotoxy(1, 1);
#endif
// Laboriously trim the damn thing.
@@ -3071,7 +3071,7 @@ job_query:
if (j % 2)
cprintf(EOL);
else
- gotoxy(31, wherey());
+ cgotoxy(31, wherey());
j++;
}
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index be59b14ad6..d0c04879f1 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -76,7 +76,7 @@ void update_message_status()
{
textcolor(LIGHTBLUE);
- gotoxy(36, 2, GOTO_STAT);
+ cgotoxy(36, 2, GOTO_STAT);
if (SysEnv.have_messages)
cprintf("(msg)");
else
@@ -99,7 +99,7 @@ void update_turn_count()
// FIXME: Create some kind of layout manager class so we can
// templatise the heads-up display layout and stop hardcoding
// these coords.
- gotoxy(22, 10, GOTO_STAT);
+ cgotoxy(22, 10, GOTO_STAT);
textcolor(LIGHTGREY);
// Show the turn count starting from 1. You can still quit on turn 0.
@@ -125,7 +125,7 @@ int draw_colour_bar(int val, int max_val, int old_val, int old_disp,
const int width = crawl_view.hudsz.x - ox - 1;
int disp = width * val / max_val;
- gotoxy(ox, oy, GOTO_STAT);
+ cgotoxy(ox, oy, GOTO_STAT);
for (int cx=0; cx < width; cx++)
{
@@ -220,7 +220,7 @@ void print_stats(void)
}
}
- gotoxy(5, 3, GOTO_STAT);
+ cgotoxy(5, 3, GOTO_STAT);
cprintf( "%d", you.hp );
@@ -260,7 +260,7 @@ void print_stats(void)
break;
}
}
- gotoxy(8, 4, GOTO_STAT);
+ cgotoxy(8, 4, GOTO_STAT);
cprintf( "%d", you.magic_points);
@@ -290,7 +290,7 @@ void print_stats(void)
if (you.max_strength > 72)
you.max_strength = 72;
- gotoxy(6, 7, GOTO_STAT);
+ cgotoxy(6, 7, GOTO_STAT);
if (you.duration[DUR_MIGHT])
textcolor(LIGHTBLUE); // no end of effect warning
@@ -320,7 +320,7 @@ void print_stats(void)
if (you.max_intel > 72)
you.max_intel = 72;
- gotoxy(6, 8, GOTO_STAT);
+ cgotoxy(6, 8, GOTO_STAT);
if (you.intel < you.max_intel)
textcolor(YELLOW);
@@ -346,7 +346,7 @@ void print_stats(void)
if (you.max_dex > 72)
you.max_dex = 72;
- gotoxy(6, 9, GOTO_STAT);
+ cgotoxy(6, 9, GOTO_STAT);
if (you.dex < you.max_dex)
textcolor(YELLOW);
@@ -364,7 +364,7 @@ void print_stats(void)
if (you.redraw_armour_class)
{
- gotoxy(5, 5, GOTO_STAT);
+ cgotoxy(5, 5, GOTO_STAT);
if (you.duration[DUR_STONEMAIL])
dur_colour( BLUE, (you.duration[DUR_STONEMAIL] <= 6) );
@@ -374,7 +374,7 @@ void print_stats(void)
cprintf( "%d ", player_AC() );
textcolor( LIGHTGREY );
- gotoxy(11, 5, GOTO_STAT);
+ cgotoxy(11, 5, GOTO_STAT);
if (you.duration[DUR_CONDENSATION_SHIELD]
|| you.duration[DUR_DIVINE_SHIELD])
@@ -389,7 +389,7 @@ void print_stats(void)
if (you.redraw_evasion)
{
- gotoxy(5, 6, GOTO_STAT);
+ cgotoxy(5, 6, GOTO_STAT);
if (you.duration[DUR_FORESCRY])
textcolor(LIGHTBLUE); // no end of effect warning
@@ -402,14 +402,14 @@ void print_stats(void)
if (you.redraw_gold)
{
- gotoxy(7, 10, GOTO_STAT);
+ cgotoxy(7, 10, GOTO_STAT);
cprintf( "%-8d", you.gold );
you.redraw_gold = 0;
}
if (you.redraw_experience)
{
- gotoxy(13, 11, GOTO_STAT);
+ cgotoxy(13, 11, GOTO_STAT);
#if DEBUG_DIAGNOSTICS
cprintf( "%d/%lu (%d/%d)",
@@ -426,9 +426,9 @@ void print_stats(void)
if (you.wield_change)
{
- gotoxy(1, 13, GOTO_STAT);
+ cgotoxy(1, 13, GOTO_STAT);
clear_to_end_of_line();
- gotoxy(1, 13, GOTO_STAT);
+ cgotoxy(1, 13, GOTO_STAT);
if (you.weapon())
{
@@ -462,9 +462,9 @@ void print_stats(void)
if (you.quiver_change)
{
- gotoxy(1, 14, GOTO_STAT);
+ cgotoxy(1, 14, GOTO_STAT);
clear_to_end_of_line();
- gotoxy(1, 14, GOTO_STAT);
+ cgotoxy(1, 14, GOTO_STAT);
int q = you.quiver[get_quiver_type()] = get_fire_item_index();
@@ -496,9 +496,9 @@ void print_stats(void)
if (you.redraw_status_flags & REDRAW_LINE_1_MASK)
{
- gotoxy(1, 15, GOTO_STAT);
+ cgotoxy(1, 15, GOTO_STAT);
clear_to_end_of_line();
- gotoxy(1, 15, GOTO_STAT);
+ cgotoxy(1, 15, GOTO_STAT);
switch (you.burden_state)
{
@@ -567,9 +567,9 @@ void print_stats(void)
if (you.redraw_status_flags & REDRAW_LINE_2_MASK)
{
- gotoxy(1, 16, GOTO_STAT);
+ cgotoxy(1, 16, GOTO_STAT);
clear_to_end_of_line();
- gotoxy(1, 16, GOTO_STAT);
+ cgotoxy(1, 16, GOTO_STAT);
// Max length of this line = 8 * 5 - 1 = 39
if (you.duration[DUR_PRAYER])
@@ -670,9 +670,9 @@ void print_stats(void)
if (you.redraw_status_flags & REDRAW_LINE_3_MASK)
{
- gotoxy(1, 17, GOTO_STAT);
+ cgotoxy(1, 17, GOTO_STAT);
clear_to_end_of_line();
- gotoxy(1, 17, GOTO_STAT);
+ cgotoxy(1, 17, GOTO_STAT);
// Max length of this line = 7 * 5 + 3 - 1 = 37
// Note the usage of bad_ench_colour() correspond to levels that
@@ -758,7 +758,7 @@ void print_stats(void)
#if DEBUG_DIAGNOSTICS
// debug mode GPS
- gotoxy(1, 18, GOTO_STAT);
+ cgotoxy(1, 18, GOTO_STAT);
cprintf( "Position (%2d,%2d)", you.x_pos, you.y_pos );
#endif
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 5b598a1c24..02e6358443 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -3772,7 +3772,7 @@ void redraw_skill(const std::string &your_name, const std::string &class_name)
title = trimmed_name + ", " + class_name;
}
- gotoxy(1, 1, GOTO_STAT);
+ cgotoxy(1, 1, GOTO_STAT);
textcolor( LIGHTGREY );
cprintf( "%-41s", title.c_str() );
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index b6c5002d3c..2d1985664f 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -86,7 +86,7 @@ static void list_shop_keys(const std::string &purchasable)
{
char buf[200];
const int numlines = get_number_of_lines();
- gotoxy(1, numlines - 1);
+ cgotoxy(1, numlines - 1);
std::string pkeys = purchase_keys(purchasable);
if (!pkeys.empty())
@@ -99,7 +99,7 @@ static void list_shop_keys(const std::string &purchasable)
formatted_string fs = formatted_string::parse_string(buf);
fs.cprintf("%*s", get_number_of_cols() - fs.length() - 1, "");
fs.display();
- gotoxy(1, numlines);
+ cgotoxy(1, numlines);
fs = formatted_string::parse_string(
"[<w>?</w>/<w>*</w>] Inventory "
@@ -148,7 +148,7 @@ static std::string shop_print_stock( const std::vector<int>& stock,
const int gp_value = shop_item_value(mitm[stock[i]], shop.greed, id);
const bool can_afford = (you.gold >= gp_value);
- gotoxy(1, i+1);
+ cgotoxy(1, i+1);
const char c = i + 'a';
if (can_afford)
purchasable += c;
@@ -310,14 +310,14 @@ bool shoptype_identifies_stock(shop_type type)
static void shop_print( const char *shoppy, int sh_lines )
{
- gotoxy(1, sh_lines, GOTO_CRT);
+ cgotoxy(1, sh_lines, GOTO_CRT);
cprintf("%s", shoppy);
clear_to_end_of_line();
}
static void more3()
{
- gotoxy(70, 20, GOTO_CRT);
+ cgotoxy(70, 20, GOTO_CRT);
cprintf("-more-");
get_ch();
return;
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index 8bd47b1f91..edc9605ce7 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -1795,7 +1795,7 @@ static void display_skill_table(bool show_aptitudes)
menu_letter lcount = 'a';
const int num_lines = get_number_of_lines();
- gotoxy(1, 1);
+ cgotoxy(1, 1);
textcolor(LIGHTGREY);
#if DEBUG_DIAGNOSTICS
@@ -1836,7 +1836,7 @@ static void display_skill_table(bool show_aptitudes)
continue;
}
- gotoxy(scrcol, scrln);
+ cgotoxy(scrcol, scrln);
#ifndef DEBUG_DIAGNOSTICS
if (you.skills[x] > 0)
@@ -1916,7 +1916,7 @@ static void display_skill_table(bool show_aptitudes)
if (Options.tutorial_left)
{
textcolor(MAGENTA);
- gotoxy(1, bottom_line-5);
+ cgotoxy(1, bottom_line-5);
formatted_string::parse_block(
"This screen shows the skill set of your character. You can pick up new" EOL
"skills by performing the corresponding actions. The number next to the" EOL
@@ -1929,13 +1929,13 @@ static void display_skill_table(bool show_aptitudes)
else
{
// if any more skills added, must adapt letters to go into caps
- gotoxy(1, bottom_line-1);
+ cgotoxy(1, bottom_line-1);
textcolor(LIGHTGREY);
cprintf("Press the letter of a skill to choose "
"whether you want to practise it.");
if (player_knows_aptitudes())
{
- gotoxy(1, bottom_line);
+ cgotoxy(1, bottom_line);
formatted_string::parse_string("Press '!' to toggle between "
"<cyan>progress</cyan> and "
"<red>aptitude</red> "
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index be9bf4069d..7625aab042 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -786,7 +786,7 @@ int spellbook_contents( item_def &book, read_book_action_type action,
out.cprintf(" - ");
out.cprintf( "%s", spell_title(stype) );
- out.gotoxy( 35, -1 );
+ out.cgotoxy( 35, -1 );
if (action == RBOOK_USE_STAFF)
@@ -808,7 +808,7 @@ int spellbook_contents( item_def &book, read_book_action_type action,
}
}
- out.gotoxy( 65, -1 );
+ out.cgotoxy( 65, -1 );
char sval[3];
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index 428fef0520..815146bb95 100644
--- a/crawl-ref/source/stash.cc
+++ b/crawl-ref/source/stash.cc
@@ -388,7 +388,7 @@ void StashMenu::draw_title()
{
if (title)
{
- gotoxy(1, 1);
+ cgotoxy(1, 1);
textcolor(title->colour);
cprintf( "%s", title->text.c_str());
if (title->quantity)
@@ -1488,7 +1488,7 @@ void StashSearchMenu::draw_title()
{
if (title)
{
- gotoxy(1, 1);
+ cgotoxy(1, 1);
textcolor(title->colour);
cprintf("%d %s%s", title->quantity, title->text.c_str(),
title->quantity > 1? "es" : "");
diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc
index 7d294688f1..52ef5accd6 100644
--- a/crawl-ref/source/tile2.cc
+++ b/crawl-ref/source/tile2.cc
@@ -1618,7 +1618,7 @@ void TilePlayerEdit()
#define display_parts_idx(part) \
{ \
- gotoxy(10 , part + 1, GOTO_STAT); \
+ cgotoxy(10 , part + 1, GOTO_STAT); \
tilep_part_to_str(dolls[cur_doll].parts[ p_lines[part] ], ibuf);\
cprintf(ibuf);\
}
@@ -1664,7 +1664,7 @@ void TilePlayerEdit()
undo_dolls[j] = dolls[j];
}
clrscr();
- gotoxy(1,1, GOTO_MSG);
+ cgotoxy(1,1, GOTO_MSG);
mpr("Select Part : [j][k]or[up][down]");
mpr("Change Part/Page : [h][l]or[left][right]/[H][L]");
mpr("Class-Default : [CTRL]+[D]");
@@ -1673,12 +1673,12 @@ void TilePlayerEdit()
mpr("Copy/Paste/Undo : [CTRL]+[C]/[CTRL]+[V]/[CTRL]+[Z]");
mpr("Randomize : [CTRL]+[R]");
- gotoxy(1, 8, GOTO_MSG);
+ cgotoxy(1, 8, GOTO_MSG);
cprintf("Toggle Startup mode : [m] (Current mode:%s)",
( (mode == TILEP_M_LOADING) ? "Load User's Settings":"Class Default" ));
for (j=0; j < PARTS_ITEMS; j++)
{
- gotoxy(1, 1+j, GOTO_STAT);
+ cgotoxy(1, 1+j, GOTO_STAT);
cprintf(p_names[j]);
}
@@ -1730,15 +1730,15 @@ void TilePlayerEdit()
if (cur_part == 0)
{
// now selecting doll index
- gotoxy(10 , 1, GOTO_STAT);
+ cgotoxy(10 , 1, GOTO_STAT);
cprintf("%02d", cur_doll);
- gotoxy(10 , 2, GOTO_STAT);
+ cgotoxy(10 , 2, GOTO_STAT);
current_gender = dolls[cur_doll].parts[TILEP_PART_BASE] % 2;
cprintf("%s", gender_name[ current_gender ]);
for (i = 2; i<PARTS_ITEMS; i++)
{
- gotoxy(10 , i + 1, GOTO_STAT);
+ cgotoxy(10 , i + 1, GOTO_STAT);
tilep_part_to_str(dolls[cur_doll].parts[ p_lines[i] ], ibuf);
cprintf("%s / %03d", ibuf, tilep_parts_total[ p_lines[i] ]);
}
@@ -1780,7 +1780,7 @@ void TilePlayerEdit()
(3 + cur_doll) * TILE_X, PARTS_Y, 0);
region_tile->redraw();
- gotoxy(10 , cur_part + 1, GOTO_STAT);
+ cgotoxy(10 , cur_part + 1, GOTO_STAT);
if (cur_part == 1)
{
@@ -1793,8 +1793,8 @@ void TilePlayerEdit()
cprintf("%s", ibuf);
}
- gotoxy(1, pre_part + 1, GOTO_STAT);cprintf(" ");
- gotoxy(1, cur_part + 1, GOTO_STAT);cprintf("->");
+ cgotoxy(1, pre_part + 1, GOTO_STAT);cprintf(" ");
+ cgotoxy(1, cur_part + 1, GOTO_STAT);cprintf("->");
pre_part = cur_part;
/* Get a key */
@@ -1844,7 +1844,7 @@ void TilePlayerEdit()
else
mode = TILEP_M_LOADING;
- gotoxy(1, 8, GOTO_MSG);
+ cgotoxy(1, 8, GOTO_MSG);
cprintf("Toggle Startup mode : [m] (Current mode:%s)",
( (mode == TILEP_M_LOADING) ? "Load User's Settings":"Class Default" ));
break;
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index d99dd0b2f6..53e8c0f96d 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -91,7 +91,7 @@ bool pick_tutorial()
{
clrscr();
- gotoxy(1,1);
+ cgotoxy(1,1);
formatted_string::parse_string(
"<white>You must be new here indeed!</white>"
EOL EOL
@@ -522,7 +522,7 @@ void tut_starting_screen()
// map window (starts at 1) or message window (starts at 18)
y_pos = (i==1 || i==3 ? 18 : 1);
- gotoxy(1,y_pos);
+ cgotoxy(1,y_pos);
#endif
if (i==0)
clrscr();
@@ -547,7 +547,7 @@ void tut_starting_screen()
#ifdef TUTORIAL_DEBUG
clrscr();
#ifndef USE_TILE
- gotoxy(1,y_pos);
+ cgotoxy(1,y_pos);
#endif
tutorial_debug().display();
#else
@@ -2062,7 +2062,7 @@ void tutorial_describe_item(const item_def &item)
ostr << "</magenta>";
std::string broken = ostr.str();
linebreak_string2(broken, get_tutorial_cols());
- gotoxy(1, wherey() + 2);
+ cgotoxy(1, wherey() + 2);
formatted_string::parse_block(broken, false).display();
} // tutorial_describe_item
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 3a26d599d4..67755afb61 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -2466,26 +2466,26 @@ void draw_border(void)
clrscr();
redraw_skill( you.your_name, player_title() );
- gotoxy(1, 2, GOTO_STAT);
+ cgotoxy(1, 2, GOTO_STAT);
cprintf( "%s %s",
species_name( you.species, you.experience_level ).c_str(),
(you.wizard ? "*WIZARD*" : "" ) );
- gotoxy(1, 3, GOTO_STAT); cprintf("HP:");
- gotoxy(1, 4, GOTO_STAT); cprintf("Magic:");
- gotoxy(1, 5, GOTO_STAT); cprintf("AC:");
- gotoxy(1, 6, GOTO_STAT); cprintf("EV:");
- gotoxy(1, 7, GOTO_STAT); cprintf("Str:");
- gotoxy(1, 8, GOTO_STAT); cprintf("Int:");
- gotoxy(1, 9, GOTO_STAT); cprintf("Dex:");
- gotoxy(1, 10, GOTO_STAT); cprintf("Gold:");
+ cgotoxy(1, 3, GOTO_STAT); cprintf("HP:");
+ cgotoxy(1, 4, GOTO_STAT); cprintf("Magic:");
+ cgotoxy(1, 5, GOTO_STAT); cprintf("AC:");
+ cgotoxy(1, 6, GOTO_STAT); cprintf("EV:");
+ cgotoxy(1, 7, GOTO_STAT); cprintf("Str:");
+ cgotoxy(1, 8, GOTO_STAT); cprintf("Int:");
+ cgotoxy(1, 9, GOTO_STAT); cprintf("Dex:");
+ cgotoxy(1, 10, GOTO_STAT); cprintf("Gold:");
if (Options.show_turns)
{
- gotoxy(1 + 15, 10, GOTO_STAT);
+ cgotoxy(1 + 15, 10, GOTO_STAT);
cprintf("Turn:");
}
- gotoxy(1, 11, GOTO_STAT); cprintf("Experience:");
- gotoxy(1, 12, GOTO_STAT); cprintf("Level");
+ cgotoxy(1, 11, GOTO_STAT); cprintf("Experience:");
+ cgotoxy(1, 12, GOTO_STAT); cprintf("Level");
} // end draw_border()
// Determines if the given feature is present at (x, y) in _grid_ coordinates.
@@ -2768,18 +2768,18 @@ static void draw_level_map(int start_x, int start_y, bool travel_mode)
formatted_string::parse_string("(Press <w>?</w> for help)");
const int helplen = std::string(help).length();
- gotoxy(1, 1);
+ cgotoxy(1, 1);
textcolor(WHITE);
cprintf("%-*s",
get_number_of_cols() - helplen,
("Level " + level_description_string()).c_str());
textcolor(LIGHTGREY);
- gotoxy(get_number_of_cols() - helplen + 1, 1);
+ cgotoxy(get_number_of_cols() - helplen + 1, 1);
help.display();
}
- gotoxy(1, top);
+ cgotoxy(1, top);
for (int screen_y = 0; screen_y < num_lines; screen_y++)
{
@@ -4343,7 +4343,7 @@ void view_update_at(const coord_def &pos)
flash_colour = viewmap_flash_colour();
#ifndef USE_TILE
- gotoxy(vp.x, vp.y);
+ cgotoxy(vp.x, vp.y);
put_colour_ch(flash_colour? real_colour(flash_colour) : colour, ch);
// Force colour back to normal, else clrscr() will flood screen