diff options
author | Paul Gilbert | 2018-04-03 19:31:32 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-04-03 19:31:32 -0400 |
commit | 326533ab9b3d725afd7fec10d852fa0c2261f8a9 (patch) | |
tree | 1754d96dc1bc2637c78d91f78f3c2d0c667d6fd4 /engines | |
parent | d3648232fdce6a851470ce57b135b38e66bfe0bc (diff) | |
download | scummvm-rg350-326533ab9b3d725afd7fec10d852fa0c2261f8a9.tar.gz scummvm-rg350-326533ab9b3d725afd7fec10d852fa0c2261f8a9.tar.bz2 scummvm-rg350-326533ab9b3d725afd7fec10d852fa0c2261f8a9.zip |
XEEN: Cleanup of class hates switch
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/character.h | 6 | ||||
-rw-r--r-- | engines/xeen/combat.cpp | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/xeen/character.h b/engines/xeen/character.h index 77e3360748..6639d837f3 100644 --- a/engines/xeen/character.h +++ b/engines/xeen/character.h @@ -51,7 +51,11 @@ enum Race { HUMAN = 0, ELF = 1, DWARF = 2, GNOME = 3, HALF_ORC = 4 }; enum CharacterClass { CLASS_KNIGHT = 0, CLASS_PALADIN = 1, CLASS_ARCHER = 2, CLASS_CLERIC = 3, CLASS_SORCERER = 4, CLASS_ROBBER = 5, CLASS_NINJA = 6, CLASS_BARBARIAN = 7, - CLASS_DRUID = 8, CLASS_RANGER = 9, TOTAL_CLASSES = 10, CLASS_12 = 12, CLASS_15 = 15, CLASS_16 = 16 + CLASS_DRUID = 8, CLASS_RANGER = 9, TOTAL_CLASSES = 10 +}; + +enum HatesClass { + HATES_DWARF = 12, HATES_ALL_CLASSES = 15, HATES_NO_CLASSES = 16 }; enum Attribute { diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index baff2f1f34..5f9d7610a7 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -821,7 +821,7 @@ void Combat::doMonsterTurn(int monsterId) { bool isHated = false; if (monsterData._hatesClass != -1) { - if (monsterData._hatesClass == 15) + if (monsterData._hatesClass == HATES_ALL_CLASSES) // Monster hates all classes goto loop; @@ -845,7 +845,7 @@ void Combat::doMonsterTurn(int monsterId) { case CLASS_RANGER: isHated = c._class == monsterData._hatesClass; break; - case 12: + case HATES_DWARF: isHated = c._race == DWARF; break; default: |