aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/nav_helmet_off.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-25 22:55:34 -0400
committerPaul Gilbert2016-08-25 22:55:34 -0400
commitfde400c33267fcb7b48ba1508e6191008a1de4de (patch)
treec90201fa8eb41437f60219e6187acbcf2484fda7 /engines/titanic/game/nav_helmet_off.cpp
parent9a71c9166b1ef8c7d0e57cfdfac6eb25f5332c69 (diff)
downloadscummvm-rg350-fde400c33267fcb7b48ba1508e6191008a1de4de.tar.gz
scummvm-rg350-fde400c33267fcb7b48ba1508e6191008a1de4de.tar.bz2
scummvm-rg350-fde400c33267fcb7b48ba1508e6191008a1de4de.zip
TITANIC: Implemented nav helmet classes
Diffstat (limited to 'engines/titanic/game/nav_helmet_off.cpp')
-rw-r--r--engines/titanic/game/nav_helmet_off.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/engines/titanic/game/nav_helmet_off.cpp b/engines/titanic/game/nav_helmet_off.cpp
new file mode 100644
index 0000000000..289e9e3f55
--- /dev/null
+++ b/engines/titanic/game/nav_helmet_off.cpp
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "titanic/game/nav_helmet_off.h"
+#include "titanic/pet_control/pet_control.h"
+#include "titanic/messages/pet_messages.h"
+
+namespace Titanic {
+
+BEGIN_MESSAGE_MAP(CNavHelmetOff, CNavHelmet)
+ ON_MESSAGE(MouseButtonUpMsg)
+END_MESSAGE_MAP()
+
+void CNavHelmetOff::save(SimpleFile *file, int indent) {
+ file->writeNumberLine(1, indent);
+ file->writeQuotedLine(_target, indent);
+}
+
+void CNavHelmetOff::load(SimpleFile *file) {
+ file->readNumber();
+ _target = file->readString();
+}
+
+bool CNavHelmetOff::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
+ CDoffNavHelmet doffMsg;
+ doffMsg.execute(_target);
+ return true;
+}
+
+} // End of namespace Titanic