diff options
author | Paul Gilbert | 2016-11-05 11:02:39 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-11-05 11:02:39 -0400 |
commit | 6eac69f45a436535e6c56e27cb144eed8719317f (patch) | |
tree | b15cbc2aba460682e329ffb13fa9bc4c059fcb6e /engines/titanic/core | |
parent | 1c3ba9be1428b6344a2d7417aa9905cada6e6508 (diff) | |
download | scummvm-rg350-6eac69f45a436535e6c56e27cb144eed8719317f.tar.gz scummvm-rg350-6eac69f45a436535e6c56e27cb144eed8719317f.tar.bz2 scummvm-rg350-6eac69f45a436535e6c56e27cb144eed8719317f.zip |
TITANIC: Replaced int passenger class with PassengerClass enum
Diffstat (limited to 'engines/titanic/core')
-rw-r--r-- | engines/titanic/core/game_object.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/core/game_object.h | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 3738108c69..545868b582 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -1336,17 +1336,17 @@ CMusicRoom *CGameObject::getMusicRoom() const { return gameManager ? &gameManager->_musicRoom : nullptr; } -int CGameObject::getPassengerClass() const { +PassengerClass CGameObject::getPassengerClass() const { CGameManager *gameManager = getGameManager(); - return gameManager ? gameManager->_gameState._passengerClass : 3; + return gameManager ? gameManager->_gameState._passengerClass : THIRD_CLASS; } -int CGameObject::getPriorClass() const { +PassengerClass CGameObject::getPriorClass() const { CGameManager *gameManager = getGameManager(); - return gameManager ? gameManager->_gameState._priorClass : 3; + return gameManager ? gameManager->_gameState._priorClass : THIRD_CLASS; } -void CGameObject::setPassengerClass(int newClass) { +void CGameObject::setPassengerClass(PassengerClass newClass) { if (newClass >= 1 && newClass <= 4) { // Change the passenger class CGameManager *gameMan = getGameManager(); @@ -1581,7 +1581,7 @@ void CGameObject::petMoveToHiddenRoom() { } } -void CGameObject::petReassignRoom(int passClassNum) { +void CGameObject::petReassignRoom(PassengerClass passClassNum) { CPetControl *petControl = getPetControl(); if (petControl) petControl->reassignRoom(passClassNum); diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 066e51960d..ae35e2ba5b 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -452,7 +452,7 @@ protected: /** * Set's the player's passenger class */ - void setPassengerClass(int newClass); + void setPassengerClass(PassengerClass newClass); /** * Overrides whether the object's movie has audio timing @@ -712,12 +712,12 @@ public: /** * Return the player's passenger class */ - int getPassengerClass() const; + PassengerClass getPassengerClass() const; /** * Return the player's previous passenger class */ - int getPriorClass() const; + PassengerClass getPriorClass() const; /** * Sets the mail identifier for an object @@ -884,7 +884,7 @@ public: /** * Gives the player a new assigned room in the specified passenger class */ - void petReassignRoom(int passClassNum); + void petReassignRoom(PassengerClass passClassNum); /** * Sets a new area in the PET |