diff options
author | Paul Gilbert | 2016-03-28 18:38:17 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-03-28 18:38:17 -0400 |
commit | 448cc158c7569e56f692294b97f4fc7a7ffc5baa (patch) | |
tree | d7aa24401f0857b22e59ac3af5e10290657ae2bd /engines/titanic/game/start_action.cpp | |
parent | 73204984098c96ecc28a1367a5da9613e7103a35 (diff) | |
download | scummvm-rg350-448cc158c7569e56f692294b97f4fc7a7ffc5baa.tar.gz scummvm-rg350-448cc158c7569e56f692294b97f4fc7a7ffc5baa.tar.bz2 scummvm-rg350-448cc158c7569e56f692294b97f4fc7a7ffc5baa.zip |
TITANIC: Fleshed out CStartAction class
Diffstat (limited to 'engines/titanic/game/start_action.cpp')
-rw-r--r-- | engines/titanic/game/start_action.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/engines/titanic/game/start_action.cpp b/engines/titanic/game/start_action.cpp index 9bafd01282..05ceb9d0b0 100644 --- a/engines/titanic/game/start_action.cpp +++ b/engines/titanic/game/start_action.cpp @@ -21,6 +21,7 @@ */ #include "titanic/game/start_action.h" +#include "titanic/messages/messages.h" namespace Titanic { @@ -29,18 +30,30 @@ CStartAction::CStartAction() : CBackground() { void CStartAction::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); - file->writeQuotedLine(_string3, indent); - file->writeQuotedLine(_string4, indent); + file->writeQuotedLine(_msgTarget, indent); + file->writeQuotedLine(_msgAction, indent); CBackground::save(file, indent); } void CStartAction::load(SimpleFile *file) { file->readNumber(); - _string3 = file->readString(); - _string4 = file->readString(); + _msgTarget = file->readString(); + _msgAction = file->readString(); CBackground::load(file); } +bool CStartAction::handleMessage(CMouseButtonDownMsg &msg) { + // Dispatch the desired action to the desired target + CActMsg actMsg(_msgAction); + actMsg.execute(_msgTarget); + + return true; +} + +bool CStartAction::handleMessage(CMouseButtonUpMsg &msg) { + return true; +} + } // End of namespace Titanic |