From 7a07c0abc080182f8f473ff853b69ed5953b82d2 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 10 Dec 2009 16:32:41 +0100 Subject: Remove unused GOTO_LAST. --- crawl-ref/source/cio.cc | 2 +- crawl-ref/source/defines.h | 3 +-- crawl-ref/source/tilesdl.cc | 21 ++++++++++----------- 3 files changed, 12 insertions(+), 14 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc index 87f37df0cd..9c7a705c57 100644 --- a/crawl-ref/source/cio.cc +++ b/crawl-ref/source/cio.cc @@ -401,7 +401,7 @@ void line_reader::cursorto(int ncx) { int x = (start_x + ncx - 1) % wrapcol + 1; int y = start_y + (start_x + ncx - 1) / wrapcol; - ::cgotoxy(x, y, GOTO_LAST); + ::cgotoxy(x, y); } int line_reader::read_line(bool clear_previous) diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index 70cb440334..20809e552d 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -282,8 +282,7 @@ enum GotoRegion GOTO_MSG, // cprintf > message GOTO_STAT, // cprintf > character status GOTO_DNGN, // cprintf > dungeon screen - GOTO_MLIST,// cprintf > monster list - GOTO_LAST // cprintf > last active region or CRT, if none + GOTO_MLIST // cprintf > monster list }; // Mouse modes (for tiles) diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc index 40e8702485..421204bb27 100644 --- a/crawl-ref/source/tilesdl.cc +++ b/crawl-ref/source/tilesdl.cc @@ -1252,24 +1252,23 @@ int TilesFramework::get_number_of_cols() void TilesFramework::cgotoxy(int x, int y, int region) { - if (region == GOTO_LAST) - { - // nothing - } - else if (region == GOTO_CRT) + switch (region) { + case GOTO_CRT: m_active_layer = LAYER_CRT; TextRegion::text_mode = m_region_crt; - } - else if (region == GOTO_MSG) - { + break; + case GOTO_MSG: m_active_layer = LAYER_NORMAL; TextRegion::text_mode = m_region_msg; - } - else if (region == GOTO_STAT) - { + break; + case GOTO_STAT: m_active_layer = LAYER_NORMAL; TextRegion::text_mode = m_region_stat; + break; + default: + DEBUGSTR("invalid cgotoxy region in tiles: %d", region); + break; } TextRegion::cgotoxy(x, y); -- cgit v1.2.3-54-g00ecf