aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/detection.cpp56
-rw-r--r--engines/gob/gob.cpp22
-rw-r--r--engines/gob/gob.h5
-rw-r--r--engines/gob/module.mk1
-rw-r--r--engines/gob/save/saveload.h26
-rw-r--r--engines/gob/save/saveload_playtoons.cpp88
6 files changed, 192 insertions, 6 deletions
diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp
index 9426c01ef2..3827c3635c 100644
--- a/engines/gob/detection.cpp
+++ b/engines/gob/detection.cpp
@@ -71,6 +71,7 @@ static const PlainGameDescriptor gobGames[] = {
{"bambou", "Playtoons Limited Edition - Bambou le sauveur de la jungle"},
{"fascination", "Fascination"},
{"geisha", "Geisha"},
+ {"magicstones", "The Land of the Magic Stones"},
{"adibou4", "Adibou v4"},
{"adibouunknown", "Adibou (not yet supported)"},
{0, 0}
@@ -3438,6 +3439,24 @@ static const GOBGameDescription gameDescriptions[] = {
"playtoons2",
"",
{
+ {"playtoon.stk", 0, "4772c96be88a57f0561519e4a1526c62", 24406262},
+ {"spirou.stk", 0, "5d9c7644d0c47840169b4d016765cc1a", 9816201},
+ {0, 0, 0, 0}
+ },
+ EN_ANY,
+ kPlatformPC,
+ ADGF_NO_FLAGS,
+ GUIO_NOSUBTITLES | GUIO_NOSPEECH
+ },
+ kGameTypePlaytoon,
+ kFeatures640,
+ "intro2.stk", 0, 0
+ },
+ {
+ {
+ "playtoons2",
+ "",
+ {
{"playtoon.stk", 0, "55a85036dd93cce93532d8f743d90074", 17467154},
{"spirou.stk", 0, "e3e1b6148dd72fafc3637f1a8e5764f5", 9812043},
{0, 0, 0, 0}
@@ -3634,6 +3653,24 @@ static const GOBGameDescription gameDescriptions[] = {
},
{
{
+ "magicstones",
+ "",
+ {
+ {"ed4.stk", 0, "98721a7cfdc5a358d7ac56b7c6d3ba3d", 541882},
+ {"ed4cd.itk", 0, "0627a91d9a6f4772c33747ce752024c2", 606993908},
+ {0, 0, 0, 0}
+ },
+ FR_FRA,
+ kPlatformPC,
+ ADGF_NO_FLAGS,
+ GUIO_NOSUBTITLES | GUIO_NOSPEECH
+ },
+ kGameTypeMagicStones,
+ kFeatures800x600,
+ "ed4.stk", "main.obc", 0
+ },
+ {
+ {
"adibou4",
"",
AD_ENTRY1s("intro.stk", "a3c35d19b2d28ea261d96321d208cb5a", 6021466),
@@ -4189,6 +4226,20 @@ static const GOBGameDescription fallbackDescs[] = {
},
{
{
+ "magicstones",
+ "unknown",
+ AD_ENTRY1(0, 0),
+ UNK_LANG,
+ kPlatformPC,
+ ADGF_NO_FLAGS,
+ GUIO_NOSUBTITLES | GUIO_NOSPEECH
+ },
+ kGameTypeMagicStones,
+ kFeatures800x600,
+ "ed4.stk", "main.obc", 0
+ },
+ {
+ {
"adibou4",
"",
AD_ENTRY1(0, 0),
@@ -4241,8 +4292,9 @@ static const ADFileBasedFallback fileBased[] = {
{ &fallbackDescs[19], { "intro.stk", "bambou.itk", 0 } },
{ &fallbackDescs[20], { "disk0.stk", "disk1.stk", "disk2.stk", "disk3.stk", 0 } },
{ &fallbackDescs[21], { "disk1.stk", "disk2.stk", "disk3.stk", 0 } },
- { &fallbackDescs[22], { "adif41.stk", "adim41.stk", 0 } },
- { &fallbackDescs[23], { "coktelplayer.scn", 0 } },
+ { &fallbackDescs[22], { "ed4.stk", 0 } },
+ { &fallbackDescs[23], { "adif41.stk", "adim41.stk", 0 } },
+ { &fallbackDescs[24], { "coktelplayer.scn", 0 } },
{ 0, { 0 } }
};
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 8605dfbd52..94255b1277 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -205,6 +205,10 @@ bool GobEngine::isBATDemo() const {
return (_features & kFeaturesBATDemo) != 0;
}
+bool GobEngine::is800x600() const {
+ return (_features & kFeatures800x600) != 0;
+}
+
bool GobEngine::isDemo() const {
return (isSCNDemo() || isBATDemo());
}
@@ -421,9 +425,6 @@ bool GobEngine::initGameParts() {
_saveLoad = new SaveLoad_v4(this, _targetName.c_str());
break;
- case kGameTypePlaytoon:
- case kGameTypePlaytnCk:
- case kGameTypeBambou:
case kGameTypeDynasty:
_init = new Init_v3(this);
_video = new Video_v2(this);
@@ -449,6 +450,21 @@ bool GobEngine::initGameParts() {
_saveLoad = new SaveLoad_v6(this, _targetName.c_str());
break;
+ case kGameTypePlaytoon:
+ case kGameTypePlaytnCk:
+ case kGameTypeBambou:
+ _init = new Init_v2(this);
+ _video = new Video_v2(this);
+// _inter = new Inter_Playtoons(this);
+ _inter = new Inter_v4(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);
+ _saveLoad = new SaveLoad_Playtoons(this);
+ break;
+
default:
deinitGameParts();
return false;
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index 5047382316..02f6af51bf 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -108,6 +108,7 @@ enum GameType {
kGameTypeBambou,
kGameTypeFascination,
kGameTypeGeisha,
+ kGameTypeMagicStones,
kGameTypeAdibou4,
kGameTypeAdibouUnknown
};
@@ -119,7 +120,8 @@ enum Features {
kFeaturesAdlib = 1 << 2,
kFeatures640 = 1 << 3,
kFeaturesSCNDemo = 1 << 4,
- kFeaturesBATDemo = 1 << 5
+ kFeaturesBATDemo = 1 << 5,
+ kFeatures800x600 = 1 << 6
};
enum {
@@ -216,6 +218,7 @@ public:
bool hasAdlib() const;
bool isSCNDemo() const;
bool isBATDemo() const;
+ bool is800x600() const;
bool isDemo() const;
GobEngine(OSystem *syst);
diff --git a/engines/gob/module.mk b/engines/gob/module.mk
index 66c1b0dbaf..611abb6038 100644
--- a/engines/gob/module.mk
+++ b/engines/gob/module.mk
@@ -64,6 +64,7 @@ MODULE_OBJS := \
save/saveload_v3.o \
save/saveload_v4.o \
save/saveload_v6.o \
+ save/saveload_playtoons.o \
save/saveconverter.o \
save/saveconverter_v2.o \
save/saveconverter_v3.o \
diff --git a/engines/gob/save/saveload.h b/engines/gob/save/saveload.h
index a74b64b883..8d785c7233 100644
--- a/engines/gob/save/saveload.h
+++ b/engines/gob/save/saveload.h
@@ -445,6 +445,32 @@ protected:
SaveFile *getSaveFile(const char *fileName);
};
+/** Save/Load class for Playtoons. */
+/** Only used for the moment to check file presence */
+
+class SaveLoad_Playtoons : public SaveLoad {
+public:
+ SaveLoad_Playtoons(GobEngine *vm);
+ virtual ~SaveLoad_Playtoons();
+
+protected:
+ struct SaveFile {
+ const char *sourceName;
+ SaveMode mode;
+ SaveHandler *handler;
+ const char *description;
+ };
+
+ static SaveFile _saveFiles[];
+
+ SaveMode getSaveMode(const char *fileName) const;
+
+ const SaveFile *getSaveFile(const char *fileName) const;
+
+ SaveFile *getSaveFile(const char *fileName);
+
+};
+
} // End of namespace Gob
#endif // GOB_SAVE_SAVELOAD_H
diff --git a/engines/gob/save/saveload_playtoons.cpp b/engines/gob/save/saveload_playtoons.cpp
new file mode 100644
index 0000000000..97da909e7c
--- /dev/null
+++ b/engines/gob/save/saveload_playtoons.cpp
@@ -0,0 +1,88 @@
+/* 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.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "gob/save/saveload.h"
+#include "gob/inter.h"
+#include "gob/variables.h"
+
+namespace Gob {
+
+SaveLoad_Playtoons::SaveFile SaveLoad_Playtoons::_saveFiles[] = {
+ { "disk.001", kSaveModeExists, 0, 0}, // Playtoons 1 identification file
+ { "disk.002", kSaveModeExists, 0, 0}, // Playtoons 2 identification file
+ { "disk.003", kSaveModeExists, 0, 0}, // Playtoons 3 identification file
+ { "disk.004", kSaveModeExists, 0, 0}, // Playtoons 4 identification file
+ { "disk.005", kSaveModeExists, 0, 0}, // Playtoons 5 identification file
+ { "disk.006", kSaveModeExists, 0, 0}, // Playtoons CK 1 identification file
+ { "disk.007", kSaveModeExists, 0, 0}, // Playtoons CK 2 identification file
+ { "disk.008", kSaveModeExists, 0, 0}, // Playtoons CK 3 identification file
+ { "titre.001", kSaveModeExists, 0, 0}, // Playtoons 1 titles
+ { "titre.002", kSaveModeExists, 0, 0}, // Playtoons 2 titles
+ { "titre.003", kSaveModeExists, 0, 0}, // Playtoons 3 titles
+ { "titre.004", kSaveModeExists, 0, 0}, // Playtoons 4 titles
+ { "titre.005", kSaveModeExists, 0, 0}, // Playtoons 5 titles
+ { "titre.006", kSaveModeExists, 0, 0}, // Playtoons CK 1 empty title (???)
+ { "titre.007", kSaveModeExists, 0, 0}, // Playtoons CK 2 empty title (???)
+ { "titre.008", kSaveModeExists, 0, 0}, // Playtoons CK 3 empty title (???)
+ { "mdo.def", kSaveModeExists, 0, 0},
+};
+
+SaveLoad::SaveMode SaveLoad_Playtoons::getSaveMode(const char *fileName) const {
+ const SaveFile *saveFile = getSaveFile(fileName);
+
+ if (saveFile)
+ return saveFile->mode;
+
+ return kSaveModeNone;
+}
+
+SaveLoad_Playtoons::SaveLoad_Playtoons(GobEngine *vm) :
+ SaveLoad(vm) {
+}
+
+SaveLoad_Playtoons::~SaveLoad_Playtoons() {
+}
+
+const SaveLoad_Playtoons::SaveFile *SaveLoad_Playtoons::getSaveFile(const char *fileName) const {
+ fileName = stripPath(fileName);
+
+ for (int i = 0; i < ARRAYSIZE(_saveFiles); i++)
+ if (!scumm_stricmp(fileName, _saveFiles[i].sourceName))
+ return &_saveFiles[i];
+
+ return 0;
+}
+
+SaveLoad_Playtoons::SaveFile *SaveLoad_Playtoons::getSaveFile(const char *fileName) {
+ fileName = stripPath(fileName);
+
+ for (int i = 0; i < ARRAYSIZE(_saveFiles); i++)
+ if (!scumm_stricmp(fileName, _saveFiles[i].sourceName))
+ return &_saveFiles[i];
+
+ return 0;
+}
+
+} // End of namespace Gob