From 3156b39e958b466c424a27e888861e029ddb0602 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 1 Apr 2008 19:42:19 +0000 Subject: Yet Another Code Cleanup, this time concentrating on libx11.cc and view.cc. (Yes, this is semi-random.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4032 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tutorial.cc | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'crawl-ref/source/tutorial.cc') diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 40e9382be7..2d9ba0518d 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -123,7 +123,7 @@ bool pick_tutorial() EOL "* - Random tutorial" "" EOL).display(); - while (1) + while (true) { char keyn = c_getch(); @@ -402,7 +402,7 @@ static formatted_string _tutorial_debug() result += "" EOL EOL; result += ""; - for (i=0; i < TUT_EVENTS_NUM; i++) + for (i = 0; i < TUT_EVENTS_NUM; i++) { snprintf(info, INFO_SIZE, "%d: %d (%s)", i, Options.tutorial_events[i], _tut_debug_list(i).c_str()); @@ -469,7 +469,7 @@ static formatted_string _tutorial_stats_intro() "basic one is your health, measured as \n" "HP: " << you.hp << "/" << you.hp_max << ". "; - if (Options.tutorial_type==TUT_MAGIC_CHAR) + if (Options.tutorial_type == TUT_MAGIC_CHAR) istr << " "; istr << @@ -547,11 +547,12 @@ void tut_starting_screen() { #ifndef USE_TILE // map window (starts at 1) or message window (starts at 18) - y_pos = (i==1 || i==3 ? 18 : 1); + // FIXME: This should be done more cleanly using the crawl_view settings + y_pos = (i == 1 || i == 3) ? 18 : 1; - cgotoxy(1,y_pos); + cgotoxy(1, y_pos); #endif - if (i==0) + if (i == 0) clrscr(); int width = _get_tutorial_cols(); @@ -562,20 +563,20 @@ void tut_starting_screen() if (width > 80) width = 80; #endif - if (i==0) + if (i == 0) _tut_starting_info(width).display(); #ifdef USE_TILE else if (i > 0 && i < 3) continue; #else - else if (i==1) + else if (i == 1) _tutorial_map_intro().display(); - else if (i==2) + else if (i == 2) _tutorial_stats_intro().display(); #endif - else if (i==3) + else if (i == 3) _tutorial_message_intro(); - else if (i==4) + else if (i == 4) _tutorial_movement_info(); else { @@ -2722,7 +2723,7 @@ void tutorial_describe_monster(const monsters *mons) "possess skills that normal monster wouldn't, so be " "careful.\n\n"; } - else if(mons->type == MONS_PLAYER_GHOST) + else if (mons->type == MONS_PLAYER_GHOST) { ostr << "The ghost of a deceased adventurer, it would like nothing " "better than to send you the same way.\n\n"; -- cgit v1.2.3-54-g00ecf