From 6a9923ec07d019cbbf8c35e36030391dac256e79 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 12 Aug 2016 23:53:18 -0400 Subject: TITANIC: Implemented some game object classes --- engines/titanic/carry/auditory_centre.cpp | 10 ++++++++++ engines/titanic/carry/auditory_centre.h | 2 ++ 2 files changed, 12 insertions(+) (limited to 'engines/titanic/carry') diff --git a/engines/titanic/carry/auditory_centre.cpp b/engines/titanic/carry/auditory_centre.cpp index d88989a801..0bda975a36 100644 --- a/engines/titanic/carry/auditory_centre.cpp +++ b/engines/titanic/carry/auditory_centre.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CAuditoryCentre, CBrain) + ON_MESSAGE(PuzzleSolvedMsg) +END_MESSAGE_MAP() + void CAuditoryCentre::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); CBrain::save(file, indent); @@ -34,4 +38,10 @@ void CAuditoryCentre::load(SimpleFile *file) { CBrain::load(file); } +bool CAuditoryCentre::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) { + _fieldE0 = 1; + setVisible(true); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/carry/auditory_centre.h b/engines/titanic/carry/auditory_centre.h index 743f8f2498..6f24e86208 100644 --- a/engines/titanic/carry/auditory_centre.h +++ b/engines/titanic/carry/auditory_centre.h @@ -28,6 +28,8 @@ namespace Titanic { class CAuditoryCentre : public CBrain { + DECLARE_MESSAGE_MAP; + bool PuzzleSolvedMsg(CPuzzleSolvedMsg *msg); public: CLASSDEF; -- cgit v1.2.3