[Scummvm-cvs-logs] scummvm master -> f16cc050e97de6339347a650b9a801153dc7ad91

DrMcCoy drmccoy at drmccoy.de
Fri Jun 15 01:15:35 CEST 2012


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:
59b2a84552 GOB: Add a proper GameType for Little Red
f16cc050e9 GOB: Add class Inter_LittleRed


Commit: 59b2a84552ae4f64e3e6ddc8b29ecda4f3dd524d
    https://github.com/scummvm/scummvm/commit/59b2a84552ae4f64e3e6ddc8b29ecda4f3dd524d
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2012-06-14T15:51:03-07:00

Commit Message:
GOB: Add a proper GameType for Little Red

Changed paths:
    engines/gob/detection_tables.h
    engines/gob/gob.cpp
    engines/gob/gob.h



diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h
index 77b54a1..bd35900 100644
--- a/engines/gob/detection_tables.h
+++ b/engines/gob/detection_tables.h
@@ -1615,7 +1615,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1629,7 +1629,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1643,7 +1643,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1657,7 +1657,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1671,7 +1671,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1689,7 +1689,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesNone,
 		0, 0, 0
 	},
@@ -1703,7 +1703,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1717,7 +1717,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1731,7 +1731,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1745,7 +1745,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1759,7 +1759,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1773,7 +1773,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1787,7 +1787,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1801,7 +1801,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1815,7 +1815,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
@@ -1829,7 +1829,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			ADGF_NO_FLAGS,
 			GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
 		},
-		kGameTypeGob2,
+		kGameTypeLittleRed,
 		kFeaturesAdLib | kFeaturesEGA,
 		0, 0, 0
 	},
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 4e7aa46..acd8fcb 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -438,6 +438,7 @@ bool GobEngine::initGameParts() {
 		break;
 
 	case kGameTypeWeen:
+	case kGameTypeLittleRed:
 	case kGameTypeGob2:
 		_init     = new Init_v2(this);
 		_video    = new Video_v2(this);
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index 6277585..165760e 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -127,7 +127,8 @@ enum GameType {
 	kGameTypeAdi2,
 	kGameTypeAdi4,
 	kGameTypeAdibou2,
-	kGameTypeAdibou1
+	kGameTypeAdibou1,
+	kGameTypeLittleRed
 };
 
 enum Features {


Commit: f16cc050e97de6339347a650b9a801153dc7ad91
    https://github.com/scummvm/scummvm/commit/f16cc050e97de6339347a650b9a801153dc7ad91
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2012-06-14T16:14:49-07:00

Commit Message:
GOB: Add class Inter_LittleRed

This fixes the crash when selecting an animal in the "Languages"
screen.

Interestingly, the German names of the animals are partially
wrong... And for "Das Schmetterling" (sic!), even the recorded
speech sample is wrong.

Changed paths:
  A engines/gob/inter_littlered.cpp
    engines/gob/gob.cpp
    engines/gob/inter.h
    engines/gob/inter_v2.cpp
    engines/gob/module.mk



diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index acd8fcb..a13f6a3 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -438,7 +438,6 @@ bool GobEngine::initGameParts() {
 		break;
 
 	case kGameTypeWeen:
-	case kGameTypeLittleRed:
 	case kGameTypeGob2:
 		_init     = new Init_v2(this);
 		_video    = new Video_v2(this);
@@ -463,6 +462,17 @@ bool GobEngine::initGameParts() {
 		_saveLoad = new SaveLoad_v2(this, _targetName.c_str());
 		break;
 
+	case kGameTypeLittleRed:
+		_init     = new Init_v2(this);
+		_video    = new Video_v2(this);
+		_inter    = new Inter_LittleRed(this);
+		_mult     = new Mult_v2(this);
+		_draw     = new Draw_v2(this);
+		_map      = new Map_v2(this);
+		_goblin   = new Goblin_v2(this);
+		_scenery  = new Scenery_v2(this);
+		break;
+
 	case kGameTypeGob3:
 		_init     = new Init_v3(this);
 		_video    = new Video_v2(this);
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 1e6f74d..907a275 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -513,6 +513,17 @@ protected:
 	void oFascin_setWinFlags();
 };
 
+class Inter_LittleRed : public Inter_v2 {
+public:
+	Inter_LittleRed(GobEngine *vm);
+	virtual ~Inter_LittleRed() {}
+
+protected:
+	virtual void setupOpcodesDraw();
+	virtual void setupOpcodesFunc();
+	virtual void setupOpcodesGob();
+};
+
 class Inter_v3 : public Inter_v2 {
 public:
 	Inter_v3(GobEngine *vm);
diff --git a/engines/gob/inter_littlered.cpp b/engines/gob/inter_littlered.cpp
new file mode 100644
index 0000000..6a63998
--- /dev/null
+++ b/engines/gob/inter_littlered.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 "gob/gob.h"
+#include "gob/inter.h"
+
+namespace Gob {
+
+#define OPCODEVER Inter_LittleRed
+#define OPCODEDRAW(i, x)  _opcodesDraw[i]._OPCODEDRAW(OPCODEVER, x)
+#define OPCODEFUNC(i, x)  _opcodesFunc[i]._OPCODEFUNC(OPCODEVER, x)
+#define OPCODEGOB(i, x)   _opcodesGob[i]._OPCODEGOB(OPCODEVER, x)
+
+Inter_LittleRed::Inter_LittleRed(GobEngine *vm) : Inter_v2(vm) {
+}
+
+void Inter_LittleRed::setupOpcodesDraw() {
+	Inter_v2::setupOpcodesDraw();
+}
+
+void Inter_LittleRed::setupOpcodesFunc() {
+	Inter_v2::setupOpcodesFunc();
+}
+
+void Inter_LittleRed::setupOpcodesGob() {
+	OPCODEGOB(500, o2_playProtracker);
+	OPCODEGOB(501, o2_stopProtracker);
+}
+
+} // End of namespace Gob
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 54f6a1a..cb58fe8 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -1248,7 +1248,7 @@ void Inter_v2::o2_checkData(OpFuncParams &params) {
 		file = "EMAP2011.TOT";
 
 	int32 size = -1;
-	SaveLoad::SaveMode mode = _vm->_saveLoad->getSaveMode(file.c_str());
+	SaveLoad::SaveMode mode = _vm->_saveLoad ? _vm->_saveLoad->getSaveMode(file.c_str()) : SaveLoad::kSaveModeNone;
 	if (mode == SaveLoad::kSaveModeNone) {
 
 		size = _vm->_dataIO->fileSize(file);
@@ -1277,7 +1277,7 @@ void Inter_v2::o2_readData(OpFuncParams &params) {
 	debugC(2, kDebugFileIO, "Read from file \"%s\" (%d, %d bytes at %d)",
 			file, dataVar, size, offset);
 
-	SaveLoad::SaveMode mode = _vm->_saveLoad->getSaveMode(file);
+	SaveLoad::SaveMode mode = _vm->_saveLoad ? _vm->_saveLoad->getSaveMode(file) : SaveLoad::kSaveModeNone;
 	if (mode == SaveLoad::kSaveModeSave) {
 
 		WRITE_VAR(1, 1);
@@ -1349,7 +1349,7 @@ void Inter_v2::o2_writeData(OpFuncParams &params) {
 
 	WRITE_VAR(1, 1);
 
-	SaveLoad::SaveMode mode = _vm->_saveLoad->getSaveMode(file);
+	SaveLoad::SaveMode mode = _vm->_saveLoad ? _vm->_saveLoad->getSaveMode(file) : SaveLoad::kSaveModeNone;
 	if (mode == SaveLoad::kSaveModeSave) {
 
 		if (!_vm->_saveLoad->save(file, dataVar, size, offset)) {
diff --git a/engines/gob/module.mk b/engines/gob/module.mk
index 7c5d7de..20214ea 100644
--- a/engines/gob/module.mk
+++ b/engines/gob/module.mk
@@ -44,6 +44,7 @@ MODULE_OBJS := \
 	inter_v2.o \
 	inter_bargon.o \
 	inter_fascin.o \
+	inter_littlered.o \
 	inter_inca2.o \
 	inter_playtoons.o \
 	inter_v3.o \






More information about the Scummvm-git-logs mailing list