aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-02-26 07:36:51 -0500
committerPaul Gilbert2016-02-26 07:36:51 -0500
commitb08d0dd1304250143a5015db6dc1206d708bceca (patch)
tree92acc1d5c660934a81c18e13a0fad63e8bf499ed
parentc5847f5b8093833edc5dc4c26bf239d462b9f2f1 (diff)
downloadscummvm-rg350-b08d0dd1304250143a5015db6dc1206d708bceca.tar.gz
scummvm-rg350-b08d0dd1304250143a5015db6dc1206d708bceca.tar.bz2
scummvm-rg350-b08d0dd1304250143a5015db6dc1206d708bceca.zip
TITANIC: Added CTurnOnPlaySound and CTurnOnObject
-rw-r--r--engines/titanic/core/saveable_object.cpp7
-rw-r--r--engines/titanic/core/turn_on_object.cpp44
-rw-r--r--engines/titanic/core/turn_on_object.h54
-rw-r--r--engines/titanic/core/turn_on_play_sound.cpp49
-rw-r--r--engines/titanic/core/turn_on_play_sound.h56
-rw-r--r--engines/titanic/module.mk2
6 files changed, 212 insertions, 0 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp
index 296ee6a9fe..6b6b439a72 100644
--- a/engines/titanic/core/saveable_object.cpp
+++ b/engines/titanic/core/saveable_object.cpp
@@ -30,8 +30,11 @@
#include "titanic/core/node_item.h"
#include "titanic/core/project_item.h"
#include "titanic/core/saveable_object.h"
+#include "titanic/core/turn_on_object.h"
+#include "titanic/core/turn_on_play_sound.h"
#include "titanic/core/tree_item.h"
#include "titanic/core/view_item.h"
+
#include "titanic/game/announce.h"
#include "titanic/game/pet_position.h"
#include "titanic/game/room_item.h"
@@ -83,6 +86,8 @@ DEFFN(CMovieClip);
DEFFN(CMovieClipList);
DEFFN(CNodeItem);
DEFFN(CProjectItem);
+DEFFN(CTurnOnObject);
+DEFFN(CTurnOnPlaySound);
DEFFN(CTreeItem);
DEFFN(CViewItem);
@@ -132,6 +137,8 @@ void CSaveableObject::initClassList() {
ADDFN(CNodeItem);
ADDFN(CProjectItem);
ADDFN(CTreeItem);
+ ADDFN(CTurnOnObject);
+ ADDFN(CTurnOnPlaySound);
ADDFN(CViewItem);
ADDFN(CAnnounce);
diff --git a/engines/titanic/core/turn_on_object.cpp b/engines/titanic/core/turn_on_object.cpp
new file mode 100644
index 0000000000..b4ed2b4525
--- /dev/null
+++ b/engines/titanic/core/turn_on_object.cpp
@@ -0,0 +1,44 @@
+/* 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/core/turn_on_object.h"
+
+namespace Titanic {
+
+CTurnOnObject::CTurnOnObject() : CBackground(), _string3("NULL") {
+}
+
+void CTurnOnObject::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ file->writeQuotedLine(_string3, indent);
+
+ CBackground::save(file, indent);
+}
+
+void CTurnOnObject::load(SimpleFile *file) {
+ file->readNumber();
+ _string3 = file->readString();
+
+ CBackground::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/core/turn_on_object.h b/engines/titanic/core/turn_on_object.h
new file mode 100644
index 0000000000..a17d58e762
--- /dev/null
+++ b/engines/titanic/core/turn_on_object.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_TURN_ON_OBJECT_H
+#define TITANIC_TURN_ON_OBJECT_H
+
+#include "titanic/core/background.h"
+
+namespace Titanic {
+
+class CTurnOnObject : public CBackground {
+protected:
+ CString _string3;
+public:
+ CTurnOnObject();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CTurnOnObject"; }
+
+ /**
+ * 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_TURN_ON_OBJECT_H */
diff --git a/engines/titanic/core/turn_on_play_sound.cpp b/engines/titanic/core/turn_on_play_sound.cpp
new file mode 100644
index 0000000000..d56aef8bb7
--- /dev/null
+++ b/engines/titanic/core/turn_on_play_sound.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/core/turn_on_play_sound.h"
+
+namespace Titanic {
+
+CTurnOnPlaySound::CTurnOnPlaySound() : CTurnOnObject(),
+ _string3("NULL"), _fieldF8(80), _fieldFC(0) {
+}
+
+void CTurnOnPlaySound::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ file->writeQuotedLine(_string3, indent);
+ file->writeNumberLine(_fieldF8, indent);
+ file->writeNumberLine(_fieldFC, indent);
+
+ CTurnOnObject::save(file, indent);
+}
+
+void CTurnOnPlaySound::load(SimpleFile *file) {
+ file->readNumber();
+ _string3 = file->readString();
+ _fieldF8 = file->readNumber();
+ _fieldFC = file->readNumber();
+
+ CTurnOnObject::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/core/turn_on_play_sound.h b/engines/titanic/core/turn_on_play_sound.h
new file mode 100644
index 0000000000..a0fc8eedfb
--- /dev/null
+++ b/engines/titanic/core/turn_on_play_sound.h
@@ -0,0 +1,56 @@
+/* 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_TURN_ON_PLAY_SOUND_H
+#define TITANIC_TURN_ON_PLAY_SOUND_H
+
+#include "titanic/core/turn_on_object.h"
+
+namespace Titanic {
+
+class CTurnOnPlaySound : public CTurnOnObject {
+private:
+ CString _string3;
+ int _fieldF8;
+ int _fieldFC;
+public:
+ CTurnOnPlaySound();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CTurnOnPlaySound"; }
+
+ /**
+ * 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_TURN_ON_PLAY_SOUND_H */
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index c012fc2269..d4fcfd0300 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -29,6 +29,8 @@ MODULE_OBJS := \
core/project_item.o \
core/resource_key.o \
core/saveable_object.o \
+ core/turn_on_object.o \
+ core/turn_on_play_sound.o \
core/tree_item.o \
core/view_item.o \
game/announce.o \