diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-20 05:33:07 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-20 05:33:07 +0000 |
commit | f2972cf05bb68980e8b6a02fc41ea279988f5129 (patch) | |
tree | 5351f9bd54f3affe430f604f950e26a7591eb92e | |
parent | a7eaf9dc5ed07e066b9ec33eacc1fce15b817cff (diff) | |
download | crawl-ref-f2972cf05bb68980e8b6a02fc41ea279988f5129.tar.gz crawl-ref-f2972cf05bb68980e8b6a02fc41ea279988f5129.zip |
Add miscellaneous minor cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8617 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/initfile.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/newgame.cc | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index cf02e7b457..70730c3e08 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -247,7 +247,7 @@ static int _str_to_book( const std::string& str ) if (str == "random") return SBT_RANDOM; - return SBT_NO_SELECTION; + return (SBT_NO_SELECTION); } static int _str_to_weapon( const std::string &str ) @@ -272,7 +272,7 @@ static int _str_to_weapon( const std::string &str ) return (WPN_UNKNOWN); } -std::string weapon_to_str( int weapon ) +static std::string _weapon_to_str( int weapon ) { switch (weapon) { @@ -1263,7 +1263,7 @@ static void write_newgame_options(FILE *f) fprintf(f, "class = %c\n", Options.prev_cls); if (Options.prev_weapon != WPN_UNKNOWN) - fprintf(f, "weapon = %s\n", weapon_to_str(Options.prev_weapon).c_str()); + fprintf(f, "weapon = %s\n", _weapon_to_str(Options.prev_weapon).c_str()); if (Options.prev_ck != GOD_NO_GOD) { diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index d747723d30..0bb41a2220 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -2028,9 +2028,11 @@ static bool _choose_book( item_def& book, int firstbook, int numbooks ) if (Options.prev_book) { - const int opt_prev_book = _start_to_book(firstbook, Options.prev_book); - if (opt_prev_book == NUM_BOOKS && Options.prev_book != SBT_RANDOM) + if (_start_to_book(firstbook, Options.prev_book) == NUM_BOOKS + && Options.prev_book != SBT_RANDOM) + { Options.prev_book = SBT_NO_SELECTION; + } } if (!Options.random_pick && Options.book != SBT_RANDOM) @@ -4246,7 +4248,7 @@ static bool _choose_wand() do { textcolor( CYAN ); - cprintf(EOL "Which wand or rod? "); + cprintf(EOL "Which tool? "); textcolor( LIGHTGREY ); keyin = c_getch(); |