aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/sgt
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-01 08:07:05 -0500
committerPaul Gilbert2016-03-01 08:07:05 -0500
commit32d84ed33d88e42bc521b3736b35bacdfa5c13e7 (patch)
tree2a1cf9782895e8b87d0107cd77948850f4b70fcc /engines/titanic/game/sgt
parent5dd3798ebf8177d9c21d79d4e36b173568c09a70 (diff)
downloadscummvm-rg350-32d84ed33d88e42bc521b3736b35bacdfa5c13e7.tar.gz
scummvm-rg350-32d84ed33d88e42bc521b3736b35bacdfa5c13e7.tar.bz2
scummvm-rg350-32d84ed33d88e42bc521b3736b35bacdfa5c13e7.zip
TITANIC: Added lots more miscellaneous classes
Diffstat (limited to 'engines/titanic/game/sgt')
-rw-r--r--engines/titanic/game/sgt/enter_exit_mini_lift.cpp43
-rw-r--r--engines/titanic/game/sgt/enter_exit_mini_lift.h55
-rw-r--r--engines/titanic/game/sgt/sgt_navigation.cpp18
-rw-r--r--engines/titanic/game/sgt/sgt_navigation.h11
-rw-r--r--engines/titanic/game/sgt/sgt_restaurant_doors.cpp2
-rw-r--r--engines/titanic/game/sgt/sgt_restaurant_doors.h4
6 files changed, 133 insertions, 0 deletions
diff --git a/engines/titanic/game/sgt/enter_exit_mini_lift.cpp b/engines/titanic/game/sgt/enter_exit_mini_lift.cpp
new file mode 100644
index 0000000000..a7f85b9952
--- /dev/null
+++ b/engines/titanic/game/sgt/enter_exit_mini_lift.cpp
@@ -0,0 +1,43 @@
+/* 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/sgt/enter_exit_mini_lift.h"
+
+namespace Titanic {
+
+void CEnterExitMiniLift::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_fieldBC, indent);
+ file->writeNumberLine(_fieldC0, indent);
+
+ CSGTNavigation::save(file, indent);
+}
+
+void CEnterExitMiniLift::load(SimpleFile *file) {
+ file->readNumber();
+ _fieldBC = file->readNumber();
+ _fieldC0 = file->readNumber();
+
+ CSGTNavigation::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/game/sgt/enter_exit_mini_lift.h b/engines/titanic/game/sgt/enter_exit_mini_lift.h
new file mode 100644
index 0000000000..417e25d13f
--- /dev/null
+++ b/engines/titanic/game/sgt/enter_exit_mini_lift.h
@@ -0,0 +1,55 @@
+/* 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.
+ *
+ */
+
+#ifndef TITANIC_ENTER_EXIT_MINI_LIFT_H
+#define TITANIC_ENTER_EXIT_MINI_LIFT_H
+
+#include "titanic/game/sgt/sgt_navigation.h"
+
+namespace Titanic {
+
+class CEnterExitMiniLift : public CSGTNavigation {
+private:
+ int _fieldBC;
+ int _fieldC0;
+public:
+ CEnterExitMiniLift() : CSGTNavigation(), _fieldBC(0), _fieldC0(1) {}
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CEnterExitMiniLift"; }
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent) const;
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_ENTER_EXIT_MINI_LIFT_H */
diff --git a/engines/titanic/game/sgt/sgt_navigation.cpp b/engines/titanic/game/sgt/sgt_navigation.cpp
index eba37fd4f3..666459bbf1 100644
--- a/engines/titanic/game/sgt/sgt_navigation.cpp
+++ b/engines/titanic/game/sgt/sgt_navigation.cpp
@@ -24,13 +24,31 @@
namespace Titanic {
+CSGTNavigationStatics *CSGTNavigation::_statics;
+
+void CSGTNavigation::init() {
+ _statics = new CSGTNavigationStatics();
+}
+
+void CSGTNavigation::deinit() {
+ delete _statics;
+}
+
void CSGTNavigation::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
+ file->writeNumberLine(_statics->_v1, indent);
+ file->writeQuotedLine(_statics->_v2, indent);
+ file->writeQuotedLine(_statics->_v3, indent);
+
CGameObject::save(file, indent);
}
void CSGTNavigation::load(SimpleFile *file) {
file->readNumber();
+ _statics->_v1 = file->readNumber();
+ _statics->_v2 = file->readString();
+ _statics->_v3 = file->readString();
+
CGameObject::load(file);
}
diff --git a/engines/titanic/game/sgt/sgt_navigation.h b/engines/titanic/game/sgt/sgt_navigation.h
index 15c903f35c..539a6073a8 100644
--- a/engines/titanic/game/sgt/sgt_navigation.h
+++ b/engines/titanic/game/sgt/sgt_navigation.h
@@ -27,8 +27,19 @@
namespace Titanic {
+struct CSGTNavigationStatics {
+ int _v1;
+ CString _v2;
+ CString _v3;
+};
+
class CSGTNavigation : public CGameObject {
+private:
+ static CSGTNavigationStatics *_statics;
public:
+ static void init();
+ static void deinit();
+
/**
* Return the class name
*/
diff --git a/engines/titanic/game/sgt/sgt_restaurant_doors.cpp b/engines/titanic/game/sgt/sgt_restaurant_doors.cpp
index e7d8f7bda1..1e4a167357 100644
--- a/engines/titanic/game/sgt/sgt_restaurant_doors.cpp
+++ b/engines/titanic/game/sgt/sgt_restaurant_doors.cpp
@@ -26,11 +26,13 @@ namespace Titanic {
void CSGTRestaurantDoors::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
+ file->writeNumberLine(_fieldBC, indent);
CGameObject::save(file, indent);
}
void CSGTRestaurantDoors::load(SimpleFile *file) {
file->readNumber();
+ _fieldBC = file->readNumber();
CGameObject::load(file);
}
diff --git a/engines/titanic/game/sgt/sgt_restaurant_doors.h b/engines/titanic/game/sgt/sgt_restaurant_doors.h
index 287452e074..904c0c6b60 100644
--- a/engines/titanic/game/sgt/sgt_restaurant_doors.h
+++ b/engines/titanic/game/sgt/sgt_restaurant_doors.h
@@ -28,7 +28,11 @@
namespace Titanic {
class CSGTRestaurantDoors : public CGameObject {
+private:
+ int _fieldBC;
public:
+ CSGTRestaurantDoors() : CGameObject(), _fieldBC(0) {}
+
/**
* Return the class name
*/