aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/pet_disabler.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-27 07:50:19 -0400
committerPaul Gilbert2016-08-27 07:50:19 -0400
commit795cdb6365bcf01a92950e6fee8632a3a749d165 (patch)
treef0224d5f26f4f27da0413c04c22ff41e18334c1b /engines/titanic/game/pet_disabler.cpp
parent7acd288e365c352602feff3cd03b610ddbe76603 (diff)
downloadscummvm-rg350-795cdb6365bcf01a92950e6fee8632a3a749d165.tar.gz
scummvm-rg350-795cdb6365bcf01a92950e6fee8632a3a749d165.tar.bz2
scummvm-rg350-795cdb6365bcf01a92950e6fee8632a3a749d165.zip
TITANIC: Implemented PET game classes
Diffstat (limited to 'engines/titanic/game/pet_disabler.cpp')
-rw-r--r--engines/titanic/game/pet_disabler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/titanic/game/pet_disabler.cpp b/engines/titanic/game/pet_disabler.cpp
index 2275156503..c4946fe39f 100644
--- a/engines/titanic/game/pet_disabler.cpp
+++ b/engines/titanic/game/pet_disabler.cpp
@@ -24,6 +24,11 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CPetDisabler, CGameObject)
+ ON_MESSAGE(EnterViewMsg)
+ ON_MESSAGE(LeaveViewMsg)
+END_MESSAGE_MAP()
+
void CPetDisabler::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeQuotedLine(_value, indent);
@@ -36,4 +41,14 @@ void CPetDisabler::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CPetDisabler::EnterViewMsg(CEnterViewMsg *msg) {
+ petLockInput();
+ return true;
+}
+
+bool CPetDisabler::LeaveViewMsg(CLeaveViewMsg *msg) {
+ petUnlockInput();
+ return true;
+}
+
} // End of namespace Titanic