[Scummvm-cvs-logs] scummvm master -> 75f6d1fa5b4a413818457fd9d373054405dd7129
dreammaster
dreammaster at scummvm.org
Thu Aug 18 00:42:13 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
75f6d1fa5b TITANIC: Implemented CBridgeDoor class
Commit: 75f6d1fa5b4a413818457fd9d373054405dd7129
https://github.com/scummvm/scummvm/commit/75f6d1fa5b4a413818457fd9d373054405dd7129
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-08-17T18:42:03-04:00
Commit Message:
TITANIC: Implemented CBridgeDoor class
Changed paths:
engines/titanic/game/bridge_door.cpp
engines/titanic/game/bridge_door.h
diff --git a/engines/titanic/game/bridge_door.cpp b/engines/titanic/game/bridge_door.cpp
index 57cdbd2..bfa30fd 100644
--- a/engines/titanic/game/bridge_door.cpp
+++ b/engines/titanic/game/bridge_door.cpp
@@ -24,6 +24,12 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CBridgeDoor, CGameObject)
+ ON_MESSAGE(MouseButtonDownMsg)
+ ON_MESSAGE(StatusChangeMsg)
+ ON_MESSAGE(MovieEndMsg)
+END_MESSAGE_MAP()
+
void CBridgeDoor::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
@@ -34,4 +40,23 @@ void CBridgeDoor::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CBridgeDoor::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+ setVisible(true);
+ playMovie(0, 6, 0);
+ changeView("Titania.Node 12.N");
+
+ return true;
+}
+
+bool CBridgeDoor::StatusChangeMsg(CStatusChangeMsg *msg) {
+ setVisible(true);
+ playMovie(7, 0, MOVIE_NOTIFY_OBJECT);
+ return true;
+}
+
+bool CBridgeDoor::MovieEndMsg(CMovieEndMsg *msg) {
+ setVisible(false);
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/game/bridge_door.h b/engines/titanic/game/bridge_door.h
index c1872a2..010a8b8 100644
--- a/engines/titanic/game/bridge_door.h
+++ b/engines/titanic/game/bridge_door.h
@@ -28,6 +28,10 @@
namespace Titanic {
class CBridgeDoor : public CGameObject {
+ DECLARE_MESSAGE_MAP;
+ bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
+ bool StatusChangeMsg(CStatusChangeMsg *msg);
+ bool MovieEndMsg(CMovieEndMsg *msg);
public:
CLASSDEF;
More information about the Scummvm-git-logs
mailing list