diff options
Diffstat (limited to 'crawl-ref/source/species.cc')
-rw-r--r-- | crawl-ref/source/species.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/species.cc b/crawl-ref/source/species.cc index f5ceb28751..02cc3f4c38 100644 --- a/crawl-ref/source/species.cc +++ b/crawl-ref/source/species.cc @@ -69,7 +69,7 @@ species_type get_species(const int index) } static const char * Species_Abbrev_List[NUM_SPECIES] = - { "XX", "Hu", "HE", "DE", "SE", "MD", "Ha", + { "Hu", "HE", "DE", "SE", "MD", "Ha", "HO", "Ko", "Mu", "Na", "Og", "Tr", // the draconians "Dr", "Dr", "Dr", "Dr", "Dr", "Dr", "Dr", "Dr", "Dr", "Dr", @@ -129,7 +129,7 @@ int get_species_index_by_name( const char *name ) const char *get_species_abbrev(species_type which_species) { - ASSERT(which_species > 0 && which_species < NUM_SPECIES); + ASSERT(which_species >= 0 && which_species < NUM_SPECIES); return (Species_Abbrev_List[which_species]); } @@ -139,7 +139,7 @@ species_type get_species_by_abbrev(const char *abbrev) { int i; COMPILE_CHECK(ARRAYSZ(Species_Abbrev_List) == NUM_SPECIES, c1); - for (i = SP_HUMAN; i < NUM_SPECIES; i++) + for (i = 0; i < NUM_SPECIES; i++) { if (tolower(abbrev[0]) == tolower(Species_Abbrev_List[i][0]) && tolower(abbrev[1]) == tolower(Species_Abbrev_List[i][1])) @@ -168,7 +168,7 @@ species_type str_to_species(const std::string &species) return SP_UNKNOWN; // first look for full name (e.g. Green Draconian) - for (int i = SP_HUMAN; i < NUM_SPECIES; ++i) + for (int i = 0; i < NUM_SPECIES; ++i) { sp = static_cast<species_type>(i); if (species == species_name(sp, 10)) @@ -176,7 +176,7 @@ species_type str_to_species(const std::string &species) } // nothing found, try again with plain name - for (int i = SP_HUMAN; i < NUM_SPECIES; ++i) + for (int i = 0; i < NUM_SPECIES; ++i) { sp = static_cast<species_type>(i); if (species == species_name(sp, 1)) |