[Scummvm-git-logs] scummvm master -> 49bc276ea3e297c23098d4f0e6ab331f0b89f6ee

dreammaster dreammaster at scummvm.org
Sun Sep 11 15:28:05 CEST 2016


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8fed7e1620 TITANIC: Re-enable German detection entry
49bc276ea3 TTIANIC: Add CPlaceHolderItem, CVariableList classes


Commit: 8fed7e1620ecbfcbf08c8d47c4ab27c6ed1d8619
    https://github.com/scummvm/scummvm/commit/8fed7e1620ecbfcbf08c8d47c4ab27c6ed1d8619
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-11T09:26:54-04:00

Commit Message:
TITANIC: Re-enable German detection entry

Changed paths:
    engines/titanic/detection_tables.h



diff --git a/engines/titanic/detection_tables.h b/engines/titanic/detection_tables.h
index d4acebc..ba67942 100644
--- a/engines/titanic/detection_tables.h
+++ b/engines/titanic/detection_tables.h
@@ -35,7 +35,6 @@ static const TitanicGameDescription gameDescriptions[] = {
 		},
 	},
 
-#if 0
 	// German version currently disabled because it won't start up,
 	// even with the English generated titanic.dat file
 	{
@@ -49,7 +48,6 @@ static const TitanicGameDescription gameDescriptions[] = {
 			GUIO1(GUIO_NONE)
 		},
 	},
-#endif
 
 	{ AD_TABLE_END_MARKER }
 };


Commit: 49bc276ea3e297c23098d4f0e6ab331f0b89f6ee
    https://github.com/scummvm/scummvm/commit/49bc276ea3e297c23098d4f0e6ab331f0b89f6ee
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-11T09:27:51-04:00

Commit Message:
TTIANIC: Add CPlaceHolderItem, CVariableList classes

Changed paths:
  A engines/titanic/game/place_holder_item.cpp
  A engines/titanic/game/place_holder_item.h
  A engines/titanic/game/variable_list.cpp
  A engines/titanic/game/variable_list.h
    engines/titanic/core/saveable_object.cpp
    engines/titanic/module.mk



diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp
index db3249c..d74f9a2 100644
--- a/engines/titanic/core/saveable_object.cpp
+++ b/engines/titanic/core/saveable_object.cpp
@@ -175,6 +175,7 @@
 #include "titanic/game/pet_disabler.h"
 #include "titanic/game/phonograph.h"
 #include "titanic/game/phonograph_lid.h"
+#include "titanic/game/place_holder_item.h"
 #include "titanic/game/play_music_button.h"
 #include "titanic/game/play_on_act.h"
 #include "titanic/game/port_hole.h"
@@ -207,6 +208,7 @@
 #include "titanic/game/tow_parrot_nav.h"
 #include "titanic/game/up_lighter.h"
 #include "titanic/game/useless_lever.h"
+#include "titanic/game/variable_list.h"
 #include "titanic/game/volume_control.h"
 #include "titanic/game/wheel_button.h"
 #include "titanic/game/wheel_hotspot.h"
@@ -586,6 +588,7 @@ DEFFN(CNutReplacer);
 DEFFN(CPetDisabler);
 DEFFN(CPhonograph);
 DEFFN(CPhonographLid);
+DEFFN(CPlaceHolderItem);
 DEFFN(CPlayMusicButton);
 DEFFN(CPlayOnAct);
 DEFFN(CPortHole);
@@ -618,6 +621,7 @@ DEFFN(CTitaniaStillControl);
 DEFFN(CTOWParrotNav);
 DEFFN(CUpLighter);
 DEFFN(CUselessLever);
+DEFFN(CVariableListItem);
 DEFFN(CVolumeControl);
 DEFFN(CWheelButton);
 DEFFN(CWheelHotSpot);
@@ -1174,6 +1178,7 @@ void CSaveableObject::initClassList() {
 	ADDFN(CPetDisabler, CGameObject);
 	ADDFN(CPhonograph, CMusicPlayer);
 	ADDFN(CPhonographLid, CGameObject);
+	ADDFN(CPlaceHolderItem, CNamedItem);
 	ADDFN(CPlayMusicButton, CBackground);
 	ADDFN(CPlayOnAct, CBackground);
 	ADDFN(CPortHole, CGameObject);
@@ -1206,6 +1211,7 @@ void CSaveableObject::initClassList() {
 	ADDFN(CTOWParrotNav, CGameObject);
 	ADDFN(CUpLighter, CDropTarget);
 	ADDFN(CUselessLever, CToggleButton);
+	ADDFN(CVariableListItem, ListItem);
 	ADDFN(CVolumeControl, CGameObject);
 	ADDFN(CWheelButton, CBackground);
 	ADDFN(CWheelHotSpot, CBackground);
diff --git a/engines/titanic/game/place_holder_item.cpp b/engines/titanic/game/place_holder_item.cpp
new file mode 100644
index 0000000..ecd9c9a
--- /dev/null
+++ b/engines/titanic/game/place_holder_item.cpp
@@ -0,0 +1,96 @@
+/* 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/place_holder_item.h"
+
+namespace Titanic {
+
+EMPTY_MESSAGE_MAP(CPlaceHolderItem, CNamedItem);
+
+CPlaceHolderItem::CPlaceHolderItem() :
+	_field4C(0), _field60(0), _field64(0), _field68(0), _field7C(0) {
+}
+
+void CPlaceHolderItem::save(SimpleFile *file, int indent) {
+	file->writeNumberLine(7, indent);
+	file->writeNumberLine(_field7C, indent);
+	file->writeQuotedLine("Movies", indent);
+	_clips.save(file, indent + 1);
+	file->writeNumberLine(_field68, indent);
+	file->writeNumberLine(_field64, indent);
+	file->writeNumberLine(_field60, indent);
+	_list.save(file, indent);
+	file->writeQuotedLine(_string2, indent);
+	file->writeNumberLine(_field4C, indent);
+	file->writePoint(_pos1, indent);
+	file->writePoint(_pos2, indent);
+	file->writeQuotedLine(_string1, indent);
+	
+	CNamedItem::save(file, indent);
+}
+
+void CPlaceHolderItem::load(SimpleFile *file) {
+	switch (file->readNumber()) {
+	case 7:
+		_field7C = file->readNumber();
+		// Deliberate fall-through
+
+	case 6:
+		file->readString();
+		_clips.load(file);
+		// Deliberate fall-through
+
+	case 5:
+		_field68 = file->readNumber();
+		// Deliberate fall-through
+
+	case 4:
+		_field64 = file->readNumber();
+		// Deliberate fall-through
+
+	case 3:
+		_field60 = file->readNumber();
+		// Deliberate fall-through
+
+	case 2:
+		_list.load(file);
+		// Deliberate fall-through
+
+	case 1:
+		_string2 = file->readString();
+		_field4C = file->readNumber();
+		_pos1 = file->readPoint();
+		_pos2 = file->readPoint();
+		// Deliberate fall-through
+
+	case 0:
+		_string1 = file->readString();
+		break;
+
+	default:
+		break;
+	}
+	
+	CNamedItem::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/game/place_holder_item.h b/engines/titanic/game/place_holder_item.h
new file mode 100644
index 0000000..c485037
--- /dev/null
+++ b/engines/titanic/game/place_holder_item.h
@@ -0,0 +1,63 @@
+/* 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_PLACE_HOLDER_ITEM_H
+#define TITANIC_PLACE_HOLDER_ITEM_H
+
+#include "titanic/core/named_item.h"
+#include "titanic/game/variable_list.h"
+#include "titanic/support/movie_clip.h"
+
+namespace Titanic {
+
+class CPlaceHolderItem : public CNamedItem {
+	DECLARE_MESSAGE_MAP;
+public:
+	CString _string1;
+	Point _pos1;
+	Point _pos2;
+	CString _string2;
+	int _field4C;
+	CVariableList _list;
+	int _field60;
+	int _field64;
+	int _field68;
+	CMovieClipList _clips;
+	int _field7C;
+public:
+	CLASSDEF;
+	CPlaceHolderItem();
+
+	/**
+	 * Save the data for the class to file
+	 */
+	virtual void save(SimpleFile *file, int indent);
+
+	/**
+	 * Load the data for the class from file
+	 */
+	virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_PLACE_HOLDER_ITEM_H */
diff --git a/engines/titanic/game/variable_list.cpp b/engines/titanic/game/variable_list.cpp
new file mode 100644
index 0000000..1ddf1bc
--- /dev/null
+++ b/engines/titanic/game/variable_list.cpp
@@ -0,0 +1,73 @@
+/* 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/variable_list.h"
+
+namespace Titanic {
+
+void CVariableListItem::save(SimpleFile *file, int indent) {
+	file->writeNumberLine(3, indent);
+	file->writeNumberLine(_field44, indent);
+	file->writeQuotedLine(_string1, indent);
+	file->writeNumberLine(_field18, indent);
+	file->writeNumberLine(_field40, indent);
+	file->writeQuotedLine(_string2, indent);
+	file->writeQuotedLine(_string3, indent);
+	file->writeQuotedLine(_string4, indent);
+	
+	ListItem::save(file, indent);
+}
+
+void CVariableListItem::load(SimpleFile *file) {
+	int field40 = 0, field44 = 0;
+
+	switch (file->readNumber()) {
+	case 3:
+		field44 = file->readNumber();
+		// Deliberate fall-through
+
+	case 2:
+		_string1 = file->readString();
+		_field18 = file->readNumber();
+		// Deliberate fall-through
+
+	case 1:
+		field40 = file->readNumber();
+		// Deliberate fall-through
+
+	case 0:
+		_string2 = file->readString();
+		_string3 = file->readString();
+		_string4 = file->readString();
+		break;
+
+	default:
+		break;
+	}
+
+	_field40 = field40;
+	_field44 = field44;
+	
+	ListItem::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/game/variable_list.h b/engines/titanic/game/variable_list.h
new file mode 100644
index 0000000..9309e19
--- /dev/null
+++ b/engines/titanic/game/variable_list.h
@@ -0,0 +1,63 @@
+/* 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_VARIABLE_LIST_H
+#define TITANIC_VARIABLE_LIST_H
+
+#include "titanic/core/list.h"
+
+namespace Titanic {
+
+class CVariableListItem : public ListItem {
+public:
+	CString _string1;
+	int _field18;
+	CString _string2;
+	CString _string3;
+	CString _string4;
+	int _field40;
+	int _field44;
+public:
+	CLASSDEF;
+	CVariableListItem() : ListItem(), _field18(0), _field40(0), _field44(0) {}
+
+	/**
+	 * Save the data for the class to file
+	 */
+	virtual void save(SimpleFile *file, int indent);
+
+	/**
+	 * Load the data for the class from file
+	 */
+	virtual void load(SimpleFile *file);
+};
+
+
+/**
+ * Movie clip list
+ */
+class CVariableList: public List<CVariableListItem> {
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_VARIABLE_LIST_H */
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index 87f4124..798d81d 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -167,6 +167,7 @@ MODULE_OBJS := \
 	game/pet_disabler.o \
 	game/phonograph.o \
 	game/phonograph_lid.o \
+	game/place_holder_item.o \
 	game/play_music_button.o \
 	game/play_on_act.o \
 	game/port_hole.o \
@@ -199,6 +200,7 @@ MODULE_OBJS := \
 	game/titania_still_control.o \
 	game/up_lighter.o \
 	game/useless_lever.o \
+	game/variable_list.o \
 	game/volume_control.o \
 	game/wheel_button.o \
 	game/wheel_hotspot.o \





More information about the Scummvm-git-logs mailing list