aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/carry
diff options
context:
space:
mode:
authorPaul Gilbert2016-02-28 22:16:02 -0500
committerPaul Gilbert2016-02-28 22:16:02 -0500
commit95ebd2394bd4bd84f7894a94baf9fa1423345fad (patch)
tree9287b2398e68018ab3547d2eadf1e47dcdad0697 /engines/titanic/carry
parent6eb777fe362d77189425c2ae137bedab0af5ee5f (diff)
downloadscummvm-rg350-95ebd2394bd4bd84f7894a94baf9fa1423345fad.tar.gz
scummvm-rg350-95ebd2394bd4bd84f7894a94baf9fa1423345fad.tar.bz2
scummvm-rg350-95ebd2394bd4bd84f7894a94baf9fa1423345fad.zip
TITANIC: Loading bugfixes and implemented CBrain descendents
Diffstat (limited to 'engines/titanic/carry')
-rw-r--r--engines/titanic/carry/auditory_centre.cpp37
-rw-r--r--engines/titanic/carry/auditory_centre.h50
-rw-r--r--engines/titanic/carry/brain.cpp7
-rw-r--r--engines/titanic/carry/brain.h3
-rw-r--r--engines/titanic/carry/central_core.cpp37
-rw-r--r--engines/titanic/carry/central_core.h50
-rw-r--r--engines/titanic/carry/speech_centre.cpp45
-rw-r--r--engines/titanic/carry/speech_centre.h57
-rw-r--r--engines/titanic/carry/vision_centre.cpp37
-rw-r--r--engines/titanic/carry/vision_centre.h50
10 files changed, 367 insertions, 6 deletions
diff --git a/engines/titanic/carry/auditory_centre.cpp b/engines/titanic/carry/auditory_centre.cpp
new file mode 100644
index 0000000000..e5dedcd654
--- /dev/null
+++ b/engines/titanic/carry/auditory_centre.cpp
@@ -0,0 +1,37 @@
+/* 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/carry/auditory_centre.h"
+
+namespace Titanic {
+
+void CAuditoryCentre::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ CBrain::save(file, indent);
+}
+
+void CAuditoryCentre::load(SimpleFile *file) {
+ file->readNumber();
+ CBrain::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/carry/auditory_centre.h b/engines/titanic/carry/auditory_centre.h
new file mode 100644
index 0000000000..9708b6fbfa
--- /dev/null
+++ b/engines/titanic/carry/auditory_centre.h
@@ -0,0 +1,50 @@
+/* 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_AUDITORY_CENTRE_H
+#define TITANIC_AUDITORY_CENTRE_H
+
+#include "titanic/carry/brain.h"
+
+namespace Titanic {
+
+class CAuditoryCentre : public CBrain {
+public:
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CAuditoryCentre"; }
+
+ /**
+ * 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_AUDITORY_CENTRE_H */
diff --git a/engines/titanic/carry/brain.cpp b/engines/titanic/carry/brain.cpp
index f37549c94c..0d1cdf7518 100644
--- a/engines/titanic/carry/brain.cpp
+++ b/engines/titanic/carry/brain.cpp
@@ -24,13 +24,12 @@
namespace Titanic {
-CBrain::CBrain() : CCarry(), _field12C(0),
- _field130(0), _field134(0), _field138(0) {
+CBrain::CBrain() : CCarry(), _field134(0), _field138(0) {
}
void CBrain::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_field12C, indent);
+ file->writePoint(_pos1, indent);
file->writeNumberLine(_field134, indent);
file->writeNumberLine(_field138, indent);
@@ -39,7 +38,7 @@ void CBrain::save(SimpleFile *file, int indent) const {
void CBrain::load(SimpleFile *file) {
file->readNumber();
- _field12C = file->readNumber();
+ _pos1 = file->readPoint();
_field134 = file->readNumber();
_field138 = file->readNumber();
diff --git a/engines/titanic/carry/brain.h b/engines/titanic/carry/brain.h
index 903723050c..b5ec70e836 100644
--- a/engines/titanic/carry/brain.h
+++ b/engines/titanic/carry/brain.h
@@ -29,8 +29,7 @@ namespace Titanic {
class CBrain : public CCarry {
private:
- int _field12C;
- int _field130;
+ Common::Point _pos1;
int _field134;
int _field138;
public:
diff --git a/engines/titanic/carry/central_core.cpp b/engines/titanic/carry/central_core.cpp
new file mode 100644
index 0000000000..97309e0a86
--- /dev/null
+++ b/engines/titanic/carry/central_core.cpp
@@ -0,0 +1,37 @@
+/* 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/carry/central_core.h"
+
+namespace Titanic {
+
+void CCentralCore::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ CBrain::save(file, indent);
+}
+
+void CCentralCore::load(SimpleFile *file) {
+ file->readNumber();
+ CBrain::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/carry/central_core.h b/engines/titanic/carry/central_core.h
new file mode 100644
index 0000000000..277b302e5b
--- /dev/null
+++ b/engines/titanic/carry/central_core.h
@@ -0,0 +1,50 @@
+/* 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_CENTRAL_CORE_H
+#define TITANIC_CENTRAL_CORE_H
+
+#include "titanic/carry/brain.h"
+
+namespace Titanic {
+
+class CCentralCore : public CBrain {
+public:
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CCentralCore"; }
+
+ /**
+ * 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_CENTRAL_CORE_H */
diff --git a/engines/titanic/carry/speech_centre.cpp b/engines/titanic/carry/speech_centre.cpp
new file mode 100644
index 0000000000..c5875bd22c
--- /dev/null
+++ b/engines/titanic/carry/speech_centre.cpp
@@ -0,0 +1,45 @@
+/* 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/carry/speech_centre.h"
+
+namespace Titanic {
+
+void CSpeechCentre::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_field13C, indent);
+ file->writeQuotedLine(_string1, indent);
+ file->writeNumberLine(_field14C, indent);
+
+ CCarry::save(file, indent);
+}
+
+void CSpeechCentre::load(SimpleFile *file) {
+ file->readNumber();
+ _field13C = file->readNumber();
+ _string1 = file->readString();
+ _field14C = file->readNumber();
+
+ CCarry::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/carry/speech_centre.h b/engines/titanic/carry/speech_centre.h
new file mode 100644
index 0000000000..4b5ced53a0
--- /dev/null
+++ b/engines/titanic/carry/speech_centre.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_SPEECH_CENTRE_H
+#define TITANIC_SPEECH_CENTRE_H
+
+#include "titanic/carry/brain.h"
+
+namespace Titanic {
+
+class CSpeechCentre : public CBrain {
+private:
+ int _field13C;
+ CString _string1;
+ int _field14C;
+public:
+ CSpeechCentre() : CBrain(), _string1("Summer"),
+ _field13C(1), _field14C(0) {}
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CSpeechCentre"; }
+
+ /**
+ * 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_SPEECH_CENTRE_H */
diff --git a/engines/titanic/carry/vision_centre.cpp b/engines/titanic/carry/vision_centre.cpp
new file mode 100644
index 0000000000..b85f99fbf1
--- /dev/null
+++ b/engines/titanic/carry/vision_centre.cpp
@@ -0,0 +1,37 @@
+/* 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/carry/vision_centre.h"
+
+namespace Titanic {
+
+void CVisionCentre::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ CBrain::save(file, indent);
+}
+
+void CVisionCentre::load(SimpleFile *file) {
+ file->readNumber();
+ CBrain::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/carry/vision_centre.h b/engines/titanic/carry/vision_centre.h
new file mode 100644
index 0000000000..ce21fe547c
--- /dev/null
+++ b/engines/titanic/carry/vision_centre.h
@@ -0,0 +1,50 @@
+/* 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_VISION_CENTRE_H
+#define TITANIC_VISION_CENTRE_H
+
+#include "titanic/carry/brain.h"
+
+namespace Titanic {
+
+class CVisionCentre : public CBrain {
+public:
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CVisionCentre"; }
+
+ /**
+ * 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_VISION_CENTRE_H */