diff options
author | Paul Gilbert | 2016-08-28 14:39:59 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-28 14:39:59 -0400 |
commit | 4933b59e8e039ae346f650c044e5fe0ba6310ead (patch) | |
tree | 805e33ea6fa6109e42d8f8b267ed2b6e5c2a00e2 /engines/titanic/game/placeholder | |
parent | 1760fb3e0d25704685e9b44f0792536da962082d (diff) | |
download | scummvm-rg350-4933b59e8e039ae346f650c044e5fe0ba6310ead.tar.gz scummvm-rg350-4933b59e8e039ae346f650c044e5fe0ba6310ead.tar.bz2 scummvm-rg350-4933b59e8e039ae346f650c044e5fe0ba6310ead.zip |
TITANIC: Implemented remaining game classes
Diffstat (limited to 'engines/titanic/game/placeholder')
-rw-r--r-- | engines/titanic/game/placeholder/tv_on_bar.cpp | 18 | ||||
-rw-r--r-- | engines/titanic/game/placeholder/tv_on_bar.h | 4 |
2 files changed, 19 insertions, 3 deletions
diff --git a/engines/titanic/game/placeholder/tv_on_bar.cpp b/engines/titanic/game/placeholder/tv_on_bar.cpp index e17fb7833d..710b5a346e 100644 --- a/engines/titanic/game/placeholder/tv_on_bar.cpp +++ b/engines/titanic/game/placeholder/tv_on_bar.cpp @@ -24,16 +24,30 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CTVOnBar, CPlaceHolder) + ON_MESSAGE(VisibleMsg) +END_MESSAGE_MAP() + void CTVOnBar::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writePoint(_pos1, indent); + file->writePoint(_tvPos, indent); CPlaceHolder::save(file, indent); } void CTVOnBar::load(SimpleFile *file) { file->readNumber(); - _pos1 = file->readPoint(); + _tvPos = file->readPoint(); CPlaceHolder::load(file); } +bool CTVOnBar::VisibleMsg(CVisibleMsg *msg) { + setVisible(msg->_visible); + if (msg->_visible) + setPosition(_tvPos); + else + setPosition(Point(0, 0)); + + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/placeholder/tv_on_bar.h b/engines/titanic/game/placeholder/tv_on_bar.h index bb5381fb5d..0157bc8764 100644 --- a/engines/titanic/game/placeholder/tv_on_bar.h +++ b/engines/titanic/game/placeholder/tv_on_bar.h @@ -28,8 +28,10 @@ namespace Titanic { class CTVOnBar : public CPlaceHolder { + DECLARE_MESSAGE_MAP; + bool VisibleMsg(CVisibleMsg *msg); private: - Point _pos1; + Point _tvPos; public: CLASSDEF; |