diff options
author | Paul Gilbert | 2016-11-05 23:26:22 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-11-05 23:26:22 -0400 |
commit | 2202d32816192032bc6b883fdb4940d560e19f5e (patch) | |
tree | 804154ab0cbec47d421d1853ea9b3c2b5d9e6273 /engines/titanic/pet_control | |
parent | d8d11ba17bf9bc6f48b3b861f4ec78d62d8ef117 (diff) | |
download | scummvm-rg350-2202d32816192032bc6b883fdb4940d560e19f5e.tar.gz scummvm-rg350-2202d32816192032bc6b883fdb4940d560e19f5e.tar.bz2 scummvm-rg350-2202d32816192032bc6b883fdb4940d560e19f5e.zip |
TITANIC: Further changes to use PassengerClass enum
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r-- | engines/titanic/pet_control/pet_gfx_element.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms.cpp | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/titanic/pet_control/pet_gfx_element.cpp b/engines/titanic/pet_control/pet_gfx_element.cpp index e43c847bb1..3fdfd02f3a 100644 --- a/engines/titanic/pet_control/pet_gfx_element.cpp +++ b/engines/titanic/pet_control/pet_gfx_element.cpp @@ -49,11 +49,11 @@ void CPetGfxElement::reset(const CString &name, CPetControl *petControl, PetElem return; CString numString(3); - int classNum = petControl->getPassengerClass(); + PassengerClass classNum = petControl->getPassengerClass(); - if (classNum >= 1 && classNum <= 3) { + if (classNum >= FIRST_CLASS && classNum <= THIRD_CLASS) { numString = CString(classNum); - } else if (classNum == 4) { + } else if (classNum == UNCHECKED) { int stateC = petControl->getPriorClass(); if (stateC == 1) numString = CString(stateC); diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp index fb3b7d1c17..076c56968c 100644 --- a/engines/titanic/pet_control/pet_rooms.cpp +++ b/engines/titanic/pet_control/pet_rooms.cpp @@ -241,17 +241,17 @@ uint CPetRooms::getRoomFlags() const { if (flags) return flags; - int classNum = roomFlags.whatPassengerClass(_floorNum); + PassengerClass classNum = roomFlags.whatPassengerClass(_floorNum); roomFlags.setPassengerClassBits(classNum); roomFlags.setFloorNum(_floorNum); switch (classNum) { - case 1: + case FIRST_CLASS: roomFlags.setElevatorNum(_elevatorNum); roomFlags.setRoomBits(_roomNum); break; - case 2: + case SECOND_CLASS: if (_roomNum > 0) { if (_roomNum >= 3) { roomFlags.setElevatorNum(_elevatorNum == 1 || _elevatorNum == 2 ? 1 : 3); @@ -265,7 +265,7 @@ uint CPetRooms::getRoomFlags() const { } break; - case 3: + case THIRD_CLASS: roomFlags.setElevatorNum(_elevatorNum); roomFlags.setRoomBits(_roomNum + _field1CC * 6 - 6); break; |