diff options
| author | Paul Gilbert | 2017-01-16 11:50:42 -0500 | 
|---|---|---|
| committer | Paul Gilbert | 2017-01-16 11:50:42 -0500 | 
| commit | efb43d9621d42e8da40d1db5dda40d889e362d8a (patch) | |
| tree | 0e3fd353f90d991c95120e29ab59f82df047bda0 /engines | |
| parent | 3e2f084b412f178c884d0b4cfc81fce29beaf007 (diff) | |
| download | scummvm-rg350-efb43d9621d42e8da40d1db5dda40d889e362d8a.tar.gz scummvm-rg350-efb43d9621d42e8da40d1db5dda40d889e362d8a.tar.bz2 scummvm-rg350-efb43d9621d42e8da40d1db5dda40d889e362d8a.zip | |
TITANIC: Renaming checks for player's first class suite
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/titanic/game/light.cpp | 12 | ||||
| -rw-r--r-- | engines/titanic/game/light_switch.cpp | 2 | ||||
| -rw-r--r-- | engines/titanic/game/television.cpp | 6 | ||||
| -rw-r--r-- | engines/titanic/npcs/bellbot.cpp | 4 | ||||
| -rw-r--r-- | engines/titanic/pet_control/pet_control.h | 7 | ||||
| -rw-r--r-- | engines/titanic/room_flags.h | 7 | 
6 files changed, 23 insertions, 15 deletions
| diff --git a/engines/titanic/game/light.cpp b/engines/titanic/game/light.cpp index 5bfb2c31f9..3e52a4c6f9 100644 --- a/engines/titanic/game/light.cpp +++ b/engines/titanic/game/light.cpp @@ -98,9 +98,9 @@ bool CLight::TurnOn(CTurnOn *msg) {  bool CLight::StatusChangeMsg(CStatusChangeMsg *msg) {  	CPetControl *pet = getPetControl(); -	bool flag = pet ? pet->isRoom59706() : false; +	bool isYourStateroom = pet ? pet->isFirstClassSuite() : false; -	if (_eyePresent && flag) { +	if (_eyePresent && isYourStateroom) {  		petDisplayMessage(1, LIGHT_IS_LOOSE);  		playSound("z#144.wav", 70);  	} else { @@ -113,9 +113,9 @@ bool CLight::StatusChangeMsg(CStatusChangeMsg *msg) {  bool CLight::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {  	CPetControl *pet = getPetControl(); -	bool flag = pet ? pet->isRoom59706() : false; +	bool isYourStateroom = pet ? pet->isFirstClassSuite() : false; -	if (_eyePresent && flag) { +	if (_eyePresent && isYourStateroom) {  		petDisplayMessage(1, LIGHT_IS_LOOSE);  		playSound("z#144.wav", 70);  	} else { @@ -141,8 +141,8 @@ bool CLight::EnterRoomMsg(CEnterRoomMsg *msg) {  		CLightsMsg lightsMsg(true, true, true, true);  		lightsMsg.execute("1stClassState", CLight::_type, MSGFLAG_SCAN); -		bool flag = pet ? pet->isRoom59706() : false; -		if (flag) +		bool isYourStateroom = pet ? pet->isFirstClassSuite() : false; +		if (isYourStateroom)  			CTelevision::_turnOn = true;  	} diff --git a/engines/titanic/game/light_switch.cpp b/engines/titanic/game/light_switch.cpp index 0137ff9965..a5b44d2351 100644 --- a/engines/titanic/game/light_switch.cpp +++ b/engines/titanic/game/light_switch.cpp @@ -144,7 +144,7 @@ bool CLightSwitch::EnterRoomMsg(CEnterRoomMsg *msg) {  	_flag = true;  	CPetControl *pet = getPetControl();  	if (pet) -		_turnOnTV = pet->isRoom59706(); +		_turnOnTV = pet->isFirstClassSuite();  	return true;  } diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp index 9dce393061..dbef81151c 100644 --- a/engines/titanic/game/television.cpp +++ b/engines/titanic/game/television.cpp @@ -283,12 +283,12 @@ bool CTelevision::TurnOn(CTurnOn *msg) {  bool CTelevision::LightsMsg(CLightsMsg *msg) {  	CPetControl *pet = getPetControl(); -	bool flag = false; +	bool isYourStateroom = false;  	if (pet) -		flag = pet->isRoom59706(); +		isYourStateroom = pet->isFirstClassSuite(); -	if (msg->_topLeft || !flag) +	if (msg->_topLeft || !isYourStateroom)  		_turnOn = true;  	return true; diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp index 1326655299..7fc8bfa9fb 100644 --- a/engines/titanic/npcs/bellbot.cpp +++ b/engines/titanic/npcs/bellbot.cpp @@ -256,10 +256,10 @@ bool CBellBot::TimerMsg(CTimerMsg *msg) {  bool CBellBot::TrueTalkGetStateValueMsg(CTrueTalkGetStateValueMsg *msg) {  	CPetControl *pet = getPetControl(); -	bool flag = pet ? pet->isRoom59706() : false; +	bool isYourStateroom = pet ? pet->isFirstClassSuite() : false;  	if (msg->_stateNum == 7) -		msg->_stateVal = flag ? 1 : 0; +		msg->_stateVal = isYourStateroom ? 1 : 0;  	return true;  } diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index a63c29d6b3..a60e386525 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -561,8 +561,11 @@ public:  		_rooms.setElevatorBroken(flag);  	} -	bool isRoom59706() const { -		return CRoomFlags(getRoomFlags()).is59706(); +	/** +	 * Returns true if the player is in their 1st class stateroom +	 */ +	bool isFirstClassSuite() const { +		return CRoomFlags(getRoomFlags()).isFirstClassSuite();  	}  	/** diff --git a/engines/titanic/room_flags.h b/engines/titanic/room_flags.h index e2fb91015a..79b673b7da 100644 --- a/engines/titanic/room_flags.h +++ b/engines/titanic/room_flags.h @@ -225,7 +225,12 @@ public:  	bool not5() const { return getConditionally() != 5; } -	bool is59706() const { return _data == 0x59706; } +	/** +	 * Returns true if the player is in their 1st class stateroom +	 */ +	bool isFirstClassSuite() const { +		return _data == 0x59706; +	}  };  } // End of namespace Titanic | 
