aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-08-15 22:21:12 -0400
committerPaul Gilbert2017-08-15 22:21:12 -0400
commit73764581374c5aca488b60a668f2810691f89c39 (patch)
treec47d4d038510550d66f7db2d78b878357cb60bf2
parent83cd7780629d26fb3f37ad11a7dd8ae9bf93a022 (diff)
downloadscummvm-rg350-73764581374c5aca488b60a668f2810691f89c39.tar.gz
scummvm-rg350-73764581374c5aca488b60a668f2810691f89c39.tar.bz2
scummvm-rg350-73764581374c5aca488b60a668f2810691f89c39.zip
TITANI: Fix auto-showing Call button outside music room Pellerator
-rw-r--r--engines/titanic/moves/call_pellerator.cpp36
-rw-r--r--engines/titanic/moves/call_pellerator.h7
2 files changed, 36 insertions, 7 deletions
diff --git a/engines/titanic/moves/call_pellerator.cpp b/engines/titanic/moves/call_pellerator.cpp
index e894dd8d4f..cc29f01c1a 100644
--- a/engines/titanic/moves/call_pellerator.cpp
+++ b/engines/titanic/moves/call_pellerator.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/moves/call_pellerator.h"
+#include "titanic/pet_control/pet_control.h"
namespace Titanic {
@@ -29,6 +30,7 @@ BEGIN_MESSAGE_MAP(CCallPellerator, CGameObject)
ON_MESSAGE(LeaveViewMsg)
ON_MESSAGE(PETActivateMsg)
ON_MESSAGE(MouseButtonDownMsg)
+ ON_MESSAGE(TimerMsg)
END_MESSAGE_MAP()
void CCallPellerator::save(SimpleFile *file, int indent) {
@@ -42,15 +44,18 @@ void CCallPellerator::load(SimpleFile *file) {
}
bool CCallPellerator::EnterViewMsg(CEnterViewMsg *msg) {
- petSetArea(PET_REMOTE);
- petHighlightGlyph(1);
- CString name = getFullViewName();
-
- if (name == "TopOfWell.Node 6.S") {
- petDisplayMessage(2, STANDING_OUTSIDE_PELLERATOR);
+ CString viewName = msg->_newView->getFullViewName();
+ if (viewName == "MusicRoomLobby.Node 1.N") {
+ // WORKAROUND: In original, the Remote tab icons don't get loaded
+ // until after the EnterViewMsg call is made when entering a new
+ // room. So in the special case of the Music Room Lobby, since
+ // you're immediately at the Pellerator when you enter, set up a
+ // quick timer to not select the Call glyph until the remote is loaded
+ addTimer(10);
+ } else {
+ showCallPellerator();
}
- petSetRemoteTarget();
return true;
}
@@ -81,4 +86,21 @@ bool CCallPellerator::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
return true;
}
+bool CCallPellerator::TimerMsg(CTimerMsg *msg) {
+ showCallPellerator();
+ return true;
+}
+
+void CCallPellerator::showCallPellerator() {
+ petSetArea(PET_REMOTE);
+ petHighlightGlyph(1);
+ CString name = getFullViewName();
+
+ if (name == "TopOfWell.Node 6.S") {
+ petDisplayMessage(2, STANDING_OUTSIDE_PELLERATOR);
+ }
+
+ petSetRemoteTarget();
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/moves/call_pellerator.h b/engines/titanic/moves/call_pellerator.h
index 3a1ef3823a..e03150dbce 100644
--- a/engines/titanic/moves/call_pellerator.h
+++ b/engines/titanic/moves/call_pellerator.h
@@ -34,6 +34,13 @@ class CCallPellerator : public CGameObject {
bool LeaveViewMsg(CLeaveViewMsg *msg);
bool PETActivateMsg(CPETActivateMsg *msg);
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
+ bool TimerMsg(CTimerMsg *msg);
+private:
+ /**
+ * Switches to the PET Remote tab, and selects the 'Call Pellerator'
+ * glyph by default
+ */
+ void showCallPellerator();
public:
CLASSDEF;