diff options
author | Paul Gilbert | 2016-04-07 22:03:35 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-04-07 22:03:35 -0400 |
commit | 9f1bab55972b8a6f88b83c2391c40a038ffb509d (patch) | |
tree | f56c6af8d5606cba208b1663662597ff3861a356 /engines/titanic/game/cdrom.cpp | |
parent | 41c08d186adc91111e9beccfeef80efb3fcc0fd6 (diff) | |
download | scummvm-rg350-9f1bab55972b8a6f88b83c2391c40a038ffb509d.tar.gz scummvm-rg350-9f1bab55972b8a6f88b83c2391c40a038ffb509d.tar.bz2 scummvm-rg350-9f1bab55972b8a6f88b83c2391c40a038ffb509d.zip |
TITANIC: Converting other message stubs to new format
Diffstat (limited to 'engines/titanic/game/cdrom.cpp')
-rw-r--r-- | engines/titanic/game/cdrom.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/engines/titanic/game/cdrom.cpp b/engines/titanic/game/cdrom.cpp index 4f4089de73..0d89319a86 100644 --- a/engines/titanic/game/cdrom.cpp +++ b/engines/titanic/game/cdrom.cpp @@ -26,6 +26,13 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CCDROM, CGameObject) + ON_MESSAGE(MouseDragStartMsg) + ON_MESSAGE(MouseDragEndMsg) + ON_MESSAGE(MouseDragMoveMsg) + ON_MESSAGE(ActMsg) +END_MESSAGE_MAP() + CCDROM::CCDROM() : CGameObject() { } @@ -41,18 +48,18 @@ void CCDROM::load(SimpleFile *file) { CGameObject::load(file); } -bool CCDROM::handleMessage(CMouseDragStartMsg &msg) { - if (checkStartDragging(&msg)) { - _tempPos = msg._mousePos - _bounds; - setPosition(msg._mousePos - _tempPos); +bool CCDROM::MouseDragStartMsg(CMouseDragStartMsg *msg) { + if (checkStartDragging(msg)) { + _tempPos = msg->_mousePos - _bounds; + setPosition(msg->_mousePos - _tempPos); return true; } else { return false; } } -bool CCDROM::handleMessage(CMouseDragEndMsg &msg) { - if (msg._dropTarget && msg._dropTarget->getName() == "newComputer") { +bool CCDROM::MouseDragEndMsg(CMouseDragEndMsg *msg) { + if (msg->_dropTarget && msg->_dropTarget->getName() == "newComputer") { CCDROMTray *newTray = dynamic_cast<CCDROMTray *>(getRoom()->findByName("newTray")); if (newTray->_state && newTray->_insertedCD == "None") { @@ -65,13 +72,13 @@ bool CCDROM::handleMessage(CMouseDragEndMsg &msg) { return true; } -bool CCDROM::handleMessage(CMouseDragMoveMsg &msg) { - setPosition(msg._mousePos - _tempPos); +bool CCDROM::MouseDragMoveMsg(CMouseDragMoveMsg *msg) { + setPosition(msg->_mousePos - _tempPos); return true; } -bool CCDROM::handleMessage(CActMsg &msg) { - if (msg._action == "Ejected") +bool CCDROM::ActMsg(CActMsg *msg) { + if (msg->_action == "Ejected") setVisible(true); return true; |