aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/pet/pet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/game/pet/pet.cpp')
-rw-r--r--engines/titanic/game/pet/pet.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/titanic/game/pet/pet.cpp b/engines/titanic/game/pet/pet.cpp
index cd4e16d38c..99c9e01eb3 100644
--- a/engines/titanic/game/pet/pet.cpp
+++ b/engines/titanic/game/pet/pet.cpp
@@ -21,9 +21,14 @@
*/
#include "titanic/game/pet/pet.h"
+#include "titanic/pet_control/pet_control.h"
namespace Titanic {
+BEGIN_MESSAGE_MAP(CPET, CGameObject)
+ ON_MESSAGE(ShowTextMsg)
+END_MESSAGE_MAP()
+
CPET::CPET() : CGameObject(), _fieldBC(0), _fieldC0(3),
_fieldC4(0), _fieldC8(0), _fieldD8(0), _fieldDC(0) {
}
@@ -54,4 +59,11 @@ void CPET::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CPET::ShowTextMsg(CShowTextMsg *msg) {
+ CPetControl *pet = getPetControl();
+ if (pet)
+ pet->petDisplayMessage(1, msg->_value);
+ return true;
+}
+
} // End of namespace Titanic