From 5893e7732cde719d06f519ba558de2f83a201f84 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 2 Mar 2008 22:28:28 +0000 Subject: 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 --- crawl-ref/source/initfile.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/initfile.cc') 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 ) -- cgit v1.2.3-54-g00ecf