[Scummvm-git-logs] scummvm master -> 19269bd7ebe02eac15fa4a946b3fb43010bd0172

dreammaster dreammaster at scummvm.org
Sun Jan 1 10:50:15 CET 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:
19269bd7eb TITANIC: Fix MissiveOMat text scrolling calls


Commit: 19269bd7ebe02eac15fa4a946b3fb43010bd0172
    https://github.com/scummvm/scummvm/commit/19269bd7ebe02eac15fa4a946b3fb43010bd0172
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-01T04:50:06-05:00

Commit Message:
TITANIC: Fix MissiveOMat text scrolling calls

Changed paths:
    engines/titanic/core/game_object.h
    engines/titanic/game/missiveomat.cpp


diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index fe2eebf..6671cbf 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -554,16 +554,6 @@ protected:
 	CTextCursor *getTextCursor() const;
 
 	/**
-	 * Scroll text up
-	 */
-	void scrollTextUp();
-
-	/**
-	 * Scroll text down
-	 */
-	void scrollTextDown();
-
-	/**
 	 * Gets a new random number
 	 */
 	int getRandomNumber(int max, int *oldVal = nullptr);
@@ -753,6 +743,16 @@ public:
 	void createCredits();
 
 	/**
+	 * Scroll text up
+	 */
+	void scrollTextUp();
+
+	/**
+	 * Scroll text down
+	 */
+	void scrollTextDown();
+
+	/**
 	 * Support function for drag moving
 	 */
 	void dragMove(const Point &pt);
diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp
index 56293c1..e3ce5d8 100644
--- a/engines/titanic/game/missiveomat.cpp
+++ b/engines/titanic/game/missiveomat.cpp
@@ -220,14 +220,15 @@ bool CMissiveOMat::TimerMsg(CTimerMsg *msg) {
 }
 
 bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) {
-	CTreeItem *welcome = findByName("MissiveOMat Welcome");
+	CGameObject *welcome = static_cast<CGameObject *>(findByName("MissiveOMat Welcome"));
 
 	switch (msg->_action) {
 	case MESSAGE_SHOW: {
-		CTreeItem *btnOk = findRoom()->findByName("MissiveOMat OK Button");
-		CTreeItem *btnNext = findRoom()->findByName("MissiveOMat Next Button");
-		CTreeItem *btnPrev = findRoom()->findByName("MissiveOMat Prev Button");
-		CTreeItem *btnLogout = findRoom()->findByName("MissiveOMat Logout Button");
+		CRoomItem *room = findRoom();
+		CTreeItem *btnOk = room->findByName("MissiveOMat OK Button");
+		CTreeItem *btnNext = room->findByName("MissiveOMat Next Button");
+		CTreeItem *btnPrev = room->findByName("MissiveOMat Prev Button");
+		CTreeItem *btnLogout = room->findByName("MissiveOMat Logout Button");
 
 		_mode = MMODE_5;
 		CVisibleMsg visibleMsg;
@@ -277,12 +278,12 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) {
 
 	case MESSAGE_DOWN:
 		if (welcome)
-			scrollTextDown();
+			welcome->scrollTextDown();
 		break;
 
 	case MESSAGE_UP:
 		if (welcome)
-			scrollTextUp();
+			welcome->scrollTextUp();
 		break;
 
 	case REDRAW_MESSAGE:





More information about the Scummvm-git-logs mailing list