aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game
diff options
context:
space:
mode:
authorPaul Gilbert2016-02-26 22:36:59 -0500
committerPaul Gilbert2016-02-26 22:36:59 -0500
commit03f842f8ebe6413db2592785a5e69830f9a6e58b (patch)
treef32e7ce20c03c9d6c7de70d17336ad7ff744d09a /engines/titanic/game
parent405c1d97330a1f158bdc5c472ff1bf778542fb5a (diff)
downloadscummvm-rg350-03f842f8ebe6413db2592785a5e69830f9a6e58b.tar.gz
scummvm-rg350-03f842f8ebe6413db2592785a5e69830f9a6e58b.tar.bz2
scummvm-rg350-03f842f8ebe6413db2592785a5e69830f9a6e58b.zip
TITANIC: Implement computer and CDROM classes
Diffstat (limited to 'engines/titanic/game')
-rw-r--r--engines/titanic/game/cdrom.cpp42
-rw-r--r--engines/titanic/game/cdrom.h54
-rw-r--r--engines/titanic/game/cdrom_computer.cpp51
-rw-r--r--engines/titanic/game/cdrom_computer.h57
-rw-r--r--engines/titanic/game/cdrom_tray.cpp46
-rw-r--r--engines/titanic/game/cdrom_tray.h55
-rw-r--r--engines/titanic/game/computer_screen.cpp40
-rw-r--r--engines/titanic/game/computer_screen.h52
8 files changed, 397 insertions, 0 deletions
diff --git a/engines/titanic/game/cdrom.cpp b/engines/titanic/game/cdrom.cpp
new file mode 100644
index 0000000000..40e8ed05d8
--- /dev/null
+++ b/engines/titanic/game/cdrom.cpp
@@ -0,0 +1,42 @@
+/* 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/cdrom.h"
+
+namespace Titanic {
+
+CCDROM::CCDROM() : CGameObject() {
+}
+
+void CCDROM::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ file->writePoint(_pos1, indent);
+ CGameObject::save(file, indent);
+}
+
+void CCDROM::load(SimpleFile *file) {
+ file->readNumber();
+ _pos1 = file->readPoint();
+ CGameObject::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/game/cdrom.h b/engines/titanic/game/cdrom.h
new file mode 100644
index 0000000000..cd05c79d0a
--- /dev/null
+++ b/engines/titanic/game/cdrom.h
@@ -0,0 +1,54 @@
+/* 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_CDROM_H
+#define TITANIC_CDROM_H
+
+#include "titanic/core/game_object.h"
+
+namespace Titanic {
+
+class CCDROM : public CGameObject {
+private:
+ Common::Point _pos1;
+public:
+ CCDROM();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CCDROM"; }
+
+ /**
+ * 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_CDROM_H */
diff --git a/engines/titanic/game/cdrom_computer.cpp b/engines/titanic/game/cdrom_computer.cpp
new file mode 100644
index 0000000000..e67e4fb1d8
--- /dev/null
+++ b/engines/titanic/game/cdrom_computer.cpp
@@ -0,0 +1,51 @@
+/* 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/cdrom_computer.h"
+
+namespace Titanic {
+
+CCDROMComputer::CCDROMComputer() : CGameObject(),
+ _fieldBC(0), _fieldC0(3), _fieldC4(55), _fieldC8(32) {
+}
+
+void CCDROMComputer::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_fieldBC, indent);
+ file->writeNumberLine(_fieldC0, indent);
+ file->writeNumberLine(_fieldC4, indent);
+ file->writeNumberLine(_fieldC8, indent);
+
+ CGameObject::save(file, indent);
+}
+
+void CCDROMComputer::load(SimpleFile *file) {
+ file->readNumber();
+ _fieldBC = file->readNumber();
+ _fieldC0 = file->readNumber();
+ _fieldC4 = file->readNumber();
+ _fieldC8 = file->readNumber();
+
+ CGameObject::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/game/cdrom_computer.h b/engines/titanic/game/cdrom_computer.h
new file mode 100644
index 0000000000..368c45f266
--- /dev/null
+++ b/engines/titanic/game/cdrom_computer.h
@@ -0,0 +1,57 @@
+/* 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_CDROM_COMPUTER_H
+#define TITANIC_CDROM_COMPUTER_H
+
+#include "titanic/core/game_object.h"
+
+namespace Titanic {
+
+class CCDROMComputer : public CGameObject {
+private:
+ int _fieldBC;
+ int _fieldC0;
+ int _fieldC4;
+ int _fieldC8;
+public:
+ CCDROMComputer();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CCDROMComputer"; }
+
+ /**
+ * 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_CDROM_COMPUTER_H */
diff --git a/engines/titanic/game/cdrom_tray.cpp b/engines/titanic/game/cdrom_tray.cpp
new file mode 100644
index 0000000000..32eea0648b
--- /dev/null
+++ b/engines/titanic/game/cdrom_tray.cpp
@@ -0,0 +1,46 @@
+/* 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/cdrom_tray.h"
+
+namespace Titanic {
+
+CCDROMTray::CCDROMTray() : CGameObject(), _fieldBC(0) {
+}
+
+void CCDROMTray::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_fieldBC, indent);
+ file->writeQuotedLine(_string1, indent);
+
+ CGameObject::save(file, indent);
+}
+
+void CCDROMTray::load(SimpleFile *file) {
+ file->readNumber();
+ _fieldBC = file->readNumber();
+ _string1 = file->readString();
+
+ CGameObject::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/game/cdrom_tray.h b/engines/titanic/game/cdrom_tray.h
new file mode 100644
index 0000000000..371187e946
--- /dev/null
+++ b/engines/titanic/game/cdrom_tray.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_CDROM_TRAY_H
+#define TITANIC_CDROM_TRAY_H
+
+#include "titanic/core/game_object.h"
+
+namespace Titanic {
+
+class CCDROMTray : public CGameObject {
+private:
+ int _fieldBC;
+ CString _string1;
+public:
+ CCDROMTray();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CCDROMTray"; }
+
+ /**
+ * 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_CDROM_TRAY_H */
diff --git a/engines/titanic/game/computer_screen.cpp b/engines/titanic/game/computer_screen.cpp
new file mode 100644
index 0000000000..04de5e50d8
--- /dev/null
+++ b/engines/titanic/game/computer_screen.cpp
@@ -0,0 +1,40 @@
+/* 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/computer_screen.h"
+
+namespace Titanic {
+
+CComputerScreen::CComputerScreen() : CGameObject() {
+}
+
+void CComputerScreen::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ CGameObject::save(file, indent);
+}
+
+void CComputerScreen::load(SimpleFile *file) {
+ file->readNumber();
+ CGameObject::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/game/computer_screen.h b/engines/titanic/game/computer_screen.h
new file mode 100644
index 0000000000..adb8b99093
--- /dev/null
+++ b/engines/titanic/game/computer_screen.h
@@ -0,0 +1,52 @@
+/* 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_COMPUTER_SCREEN_H
+#define TITANIC_COMPUTER_SCREEN_H
+
+#include "titanic/core/game_object.h"
+
+namespace Titanic {
+
+class CComputerScreen : public CGameObject {
+public:
+ CComputerScreen();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CComputerScreen"; }
+
+ /**
+ * 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_COMPUTER_SCREEN_H */