diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-02 22:28:28 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-02 22:28:28 +0000 |
commit | 5893e7732cde719d06f519ba558de2f83a201f84 (patch) | |
tree | 28783d742ce55b614d8a19a6ab65133c5fe1220d /crawl-ref/source/initfile.cc | |
parent | e3f71724819986ab6f4999cf728590bb7224ad61 (diff) | |
download | crawl-ref-5893e7732cde719d06f519ba558de2f83a201f84.tar.gz crawl-ref-5893e7732cde719d06f519ba558de2f83a201f84.zip |
Make Options.race and Options.class translate correctly, no matter whether
the old or new species/classes order is used.
Entails some more unborking of newgame.cc.
Also: make Esc leave the species selection screen (synonym for 'X', quit the
game), and use it to jump back to species selection from all other
selection possibilities (class, book, weapon, god) as a synonym for Bksp.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3505 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r-- | crawl-ref/source/initfile.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index c69350eed8..0e6e1f2d85 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -38,6 +38,7 @@ #include "libutil.h" #include "message.h" #include "mon-util.h" +#include "newgame.h" #include "player.h" #include "religion.h" #include "stash.h" @@ -331,12 +332,7 @@ static char str_to_race( const std::string &str ) if (index == -1) index = get_species_index_by_name( str.c_str() ); - // skip over the extra draconians here - if (index > SP_RED_DRACONIAN) - index -= (SP_CENTAUR - SP_RED_DRACONIAN - 1); - - // SP_HUMAN is at 1, therefore we must subtract one. - return ((index != -1) ? index_to_letter( index - 1 ) : 0); + return ((index != -1) ? index_to_letter( index ) : 0); } static int str_to_class( const std::string &str ) |