diff options
author | Paul Gilbert | 2016-08-14 22:19:06 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-14 22:19:06 -0400 |
commit | 440f0927570d30ab61fb640df22394296efbb265 (patch) | |
tree | 5ae2fa3d16228a79b995c8ebb21e5e20b4ff040d /engines/titanic/game/placeholder | |
parent | 3dfd4ba296f407cec7533afee941be42ca5f61f1 (diff) | |
download | scummvm-rg350-440f0927570d30ab61fb640df22394296efbb265.tar.gz scummvm-rg350-440f0927570d30ab61fb640df22394296efbb265.tar.bz2 scummvm-rg350-440f0927570d30ab61fb640df22394296efbb265.zip |
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/placeholder')
-rw-r--r-- | engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp | 32 | ||||
-rw-r--r-- | engines/titanic/game/placeholder/bar_shelf_vis_centre.h | 8 |
2 files changed, 36 insertions, 4 deletions
diff --git a/engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp b/engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp index a8a33fe1b1..fc5d680f0c 100644 --- a/engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp +++ b/engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp @@ -24,16 +24,44 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CBarShelfVisCentre, CPlaceHolderItem) + ON_MESSAGE(MouseButtonDownMsg) + ON_MESSAGE(TimerMsg) + ON_MESSAGE(EnterViewMsg) +END_MESSAGE_MAP() + void CBarShelfVisCentre::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_value, indent); + file->writeNumberLine(_flag, indent); CPlaceHolderItem::save(file, indent); } void CBarShelfVisCentre::load(SimpleFile *file) { file->readNumber(); - _value = file->readNumber(); + _flag = file->readNumber(); CPlaceHolderItem::load(file); } +bool CBarShelfVisCentre::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { + if (!_flag) { + CActMsg actMsg("ClickOnVision"); + actMsg.execute("Barbot"); + addTimer(3000); + _flag = true; + } + + return true; +} + +bool CBarShelfVisCentre::TimerMsg(CTimerMsg *msg) { + _flag = false; + return true; +} + +bool CBarShelfVisCentre::EnterViewMsg(CEnterViewMsg *msg) { + _flag = false; + return true; +} + + } // End of namespace Titanic diff --git a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h index a53ef2633f..672655d368 100644 --- a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h +++ b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h @@ -28,11 +28,15 @@ namespace Titanic { class CBarShelfVisCentre : public CPlaceHolderItem { + DECLARE_MESSAGE_MAP; + bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); + bool TimerMsg(CTimerMsg *msg); + bool EnterViewMsg(CEnterViewMsg *msg); private: - int _value; + bool _flag; public: CLASSDEF; - CBarShelfVisCentre() : CPlaceHolderItem(), _value(0) {} + CBarShelfVisCentre() : CPlaceHolderItem(), _flag(false) {} /** * Save the data for the class to file |