summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-12-10 16:32:41 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-12-10 16:32:41 +0100
commit7a07c0abc080182f8f473ff853b69ed5953b82d2 (patch)
tree5c64dfed810b16e4517bac722d9ac47807169e0c /crawl-ref
parentf1ef80cc67b73ae63865564ece8032e9b2276234 (diff)
downloadcrawl-ref-7a07c0abc080182f8f473ff853b69ed5953b82d2.tar.gz
crawl-ref-7a07c0abc080182f8f473ff853b69ed5953b82d2.zip
Remove unused GOTO_LAST.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/cio.cc2
-rw-r--r--crawl-ref/source/defines.h3
-rw-r--r--crawl-ref/source/tilesdl.cc21
3 files changed, 12 insertions, 14 deletions
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);