diff options
| author | Paul Gilbert | 2016-08-25 22:13:04 -0400 |
|---|---|---|
| committer | Paul Gilbert | 2016-08-25 22:13:04 -0400 |
| commit | 9a71c9166b1ef8c7d0e57cfdfac6eb25f5332c69 (patch) | |
| tree | 60bea0262805a98f2cdaf5ea0a34f4e9e198e72e /engines/titanic/moves | |
| parent | 1f0b9cb68d02d956ec745bef16f0dbddaa743bec (diff) | |
| download | scummvm-rg350-9a71c9166b1ef8c7d0e57cfdfac6eb25f5332c69.tar.gz scummvm-rg350-9a71c9166b1ef8c7d0e57cfdfac6eb25f5332c69.tar.bz2 scummvm-rg350-9a71c9166b1ef8c7d0e57cfdfac6eb25f5332c69.zip | |
TITANIC: Implemented more game classes and music widget classes
Diffstat (limited to 'engines/titanic/moves')
| -rw-r--r-- | engines/titanic/moves/multi_move.cpp | 28 | ||||
| -rw-r--r-- | engines/titanic/moves/multi_move.h | 8 |
2 files changed, 21 insertions, 15 deletions
diff --git a/engines/titanic/moves/multi_move.cpp b/engines/titanic/moves/multi_move.cpp index fb5570df9b..4ca4fdb8f3 100644 --- a/engines/titanic/moves/multi_move.cpp +++ b/engines/titanic/moves/multi_move.cpp @@ -24,29 +24,37 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CMultiMove, CMovePlayerTo) + ON_MESSAGE(MouseButtonDownMsg) +END_MESSAGE_MAP() + CMultiMove::CMultiMove() : CMovePlayerTo() { } void CMultiMove::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeQuotedLine(_string1, indent); - file->writeQuotedLine(_string2, indent); - file->writeQuotedLine(_string3, indent); - file->writeQuotedLine(_string4, indent); - file->writeQuotedLine(_string5, indent); + for (int idx = 0; idx < 5; ++idx) + file->writeQuotedLine(_viewNames[idx], indent); CMovePlayerTo::save(file, indent); } void CMultiMove::load(SimpleFile *file) { file->readNumber(); - _string1 = file->readString(); - _string2 = file->readString(); - _string3 = file->readString(); - _string5 = file->readString(); - _string4 = file->readString(); + for (int idx = 0; idx < 5; ++idx) + _viewNames[idx] = file->readString(); CMovePlayerTo::load(file); } +bool CMultiMove::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { + lockMouse(); + + for (int idx = 0; idx < 5 && _viewNames[idx] != "NULL"; ++idx) + changeView(_viewNames[idx]); + + unlockMouse(); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/moves/multi_move.h b/engines/titanic/moves/multi_move.h index 977afc2a20..12dd246823 100644 --- a/engines/titanic/moves/multi_move.h +++ b/engines/titanic/moves/multi_move.h @@ -28,12 +28,10 @@ namespace Titanic { class CMultiMove : public CMovePlayerTo { + DECLARE_MESSAGE_MAP; + bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); private: - CString _string1; - CString _string2; - CString _string3; - CString _string4; - CString _string5; + CString _viewNames[5]; public: CLASSDEF; CMultiMove(); |
