[Scummvm-git-logs] scummvm master -> 85fcfb9a54505dd88a6b3d4354d54a04558e05ea
dreammaster
dreammaster at scummvm.org
Thu Nov 17 03:02:33 CET 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
85fcfb9a54 TITANIC: Fixes for TV and Bedhead open/close
Commit: 85fcfb9a54505dd88a6b3d4354d54a04558e05ea
https://github.com/scummvm/scummvm/commit/85fcfb9a54505dd88a6b3d4354d54a04558e05ea
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-11-16T21:02:25-05:00
Commit Message:
TITANIC: Fixes for TV and Bedhead open/close
Changed paths:
engines/titanic/game/sgt/bedhead.cpp
engines/titanic/game/sgt/sgt_tv.cpp
diff --git a/engines/titanic/game/sgt/bedhead.cpp b/engines/titanic/game/sgt/bedhead.cpp
index 028e8de..b42c1c1 100644
--- a/engines/titanic/game/sgt/bedhead.cpp
+++ b/engines/titanic/game/sgt/bedhead.cpp
@@ -87,34 +87,33 @@ void CBedhead::load(SimpleFile *file) {
}
bool CBedhead::TurnOn(CTurnOn *msg) {
- if (_statics->_bedfoot == "Closed" || _statics->_bedfoot == "RestingUnderTV")
- return true;
-
- const BedheadEntries *data = nullptr;
- if (_statics->_bedhead == "Closed")
- data = &_on._closed;
- else if (_statics->_bedhead == "RestingTV")
- data = &_on._restingTV;
- else if (_statics->_bedhead == "RestingUV")
- data = &_on._restingUV;
- else if (_statics->_bedhead == "ClosedWrong")
- data = &_on._closedWrong;
- else
- return true;
-
- for (uint idx = 0; idx < data->size(); ++idx) {
- const BedheadEntry &entry = (*data)[idx];
- if ((entry._name1 == _statics->_tv || entry._name1 == "Any")
- && (entry._name2 == _statics->_vase || entry._name2 == "Any")
- && (entry._name3 == _statics->_desk || entry._name3 == "Any")) {
- CVisibleMsg visibleMsg(false);
- visibleMsg.execute("Bedfoot");
- setVisible(true);
-
- _statics->_bedhead = entry._name4;
- playMovie(entry._startFrame, entry._endFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- playSound("b#6.wav");
- _isClosed = false;
+ if (_statics->_bedfoot != "Closed" && _statics->_bedfoot != "RestingUnderTV") {
+ const BedheadEntries *data = nullptr;
+ if (_statics->_bedhead == "Closed")
+ data = &_on._closed;
+ else if (_statics->_bedhead == "RestingTV")
+ data = &_on._restingTV;
+ else if (_statics->_bedhead == "RestingUV")
+ data = &_on._restingUV;
+ else if (_statics->_bedhead == "ClosedWrong")
+ data = &_on._closedWrong;
+ else
+ return true;
+
+ for (uint idx = 0; idx < data->size(); ++idx) {
+ const BedheadEntry &entry = (*data)[idx];
+ if ((entry._name1 == _statics->_tv || entry._name1 == "Any")
+ && (entry._name2 == _statics->_vase || entry._name2 == "Any")
+ && (entry._name3 == _statics->_desk || entry._name3 == "Any")) {
+ CVisibleMsg visibleMsg(false);
+ visibleMsg.execute("Bedfoot");
+ setVisible(true);
+
+ _statics->_bedhead = entry._name4;
+ playMovie(entry._startFrame, entry._endFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ playSound("b#6.wav");
+ _isClosed = false;
+ }
}
}
diff --git a/engines/titanic/game/sgt/sgt_tv.cpp b/engines/titanic/game/sgt/sgt_tv.cpp
index d2ed0da..ebec334 100644
--- a/engines/titanic/game/sgt/sgt_tv.cpp
+++ b/engines/titanic/game/sgt/sgt_tv.cpp
@@ -54,7 +54,7 @@ bool CSGTTV::TurnOff(CTurnOff *msg) {
bool CSGTTV::TurnOn(CTurnOn *msg) {
if (CSGTStateRoom::_statics->_tv == "Closed" &&
- CSGTStateRoom::_statics->_bedfoot == "Closed") {
+ CSGTStateRoom::_statics->_bedfoot != "Closed") {
CSGTStateRoom::_statics->_tv = "Open";
setVisible(true);
_isClosed = false;
More information about the Scummvm-git-logs
mailing list