[Scummvm-git-logs] scummvm master -> 73764581374c5aca488b60a668f2810691f89c39

dreammaster dreammaster at scummvm.org
Wed Aug 16 04:21:17 CEST 2017


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:
7376458137 TITANI: Fix auto-showing Call button outside music room Pellerator


Commit: 73764581374c5aca488b60a668f2810691f89c39
    https://github.com/scummvm/scummvm/commit/73764581374c5aca488b60a668f2810691f89c39
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-15T22:21:12-04:00

Commit Message:
TITANI: Fix auto-showing Call button outside music room Pellerator

Changed paths:
    engines/titanic/moves/call_pellerator.cpp
    engines/titanic/moves/call_pellerator.h


diff --git a/engines/titanic/moves/call_pellerator.cpp b/engines/titanic/moves/call_pellerator.cpp
index e894dd8..cc29f01 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 3a1ef38..e03150d 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;
 





More information about the Scummvm-git-logs mailing list