aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-01 04:50:06 -0500
committerPaul Gilbert2017-01-01 04:50:06 -0500
commit19269bd7ebe02eac15fa4a946b3fb43010bd0172 (patch)
tree2e07c7046123bb8e1a96a14cdfaa90782ac0ca68
parente51b44d80c9c899ba035266d034aefc14a94bf5d (diff)
downloadscummvm-rg350-19269bd7ebe02eac15fa4a946b3fb43010bd0172.tar.gz
scummvm-rg350-19269bd7ebe02eac15fa4a946b3fb43010bd0172.tar.bz2
scummvm-rg350-19269bd7ebe02eac15fa4a946b3fb43010bd0172.zip
TITANIC: Fix MissiveOMat text scrolling calls
-rw-r--r--engines/titanic/core/game_object.h20
-rw-r--r--engines/titanic/game/missiveomat.cpp15
2 files changed, 18 insertions, 17 deletions
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index fe2eebfafb..6671cbf4be 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 56293c13a9..e3ce5d8502 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: