aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorTravis Howell2009-07-07 23:24:34 +0000
committerTravis Howell2009-07-07 23:24:34 +0000
commit3e47aaa151ff751af867c57344b063c30f5f75f3 (patch)
tree84101b9c9d7eb333063c43a076ae3645a95ab703 /engines/gob
parentbd87b653aca29c593cadcdedfc2208cec51456aa (diff)
parenta62b26ea8026666fd658337bcc061c1c4e2ab3f9 (diff)
downloadscummvm-rg350-3e47aaa151ff751af867c57344b063c30f5f75f3.tar.gz
scummvm-rg350-3e47aaa151ff751af867c57344b063c30f5f75f3.tar.bz2
scummvm-rg350-3e47aaa151ff751af867c57344b063c30f5f75f3.zip
Merged revisions 42205-42206,42208-42209,42211-42212,42214-42217,42219,42221-42222,42229-42235,42238-42240 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk ........ r42205 | dreammaster | 2009-07-07 17:41:02 +1000 (Tue, 07 Jul 2009) | 1 line Removed the shooting workaround delay - the overlay number can vary, so it isn't a reliable way of identifying the specific message ........ r42206 | thebluegr | 2009-07-07 17:44:25 +1000 (Tue, 07 Jul 2009) | 4 lines - Added auto-detection for EGA graphics. As a result of this, GF_SCI1_EGA has been removed and versions SCI_VERSION_01_EGA and SCI_VERSION_01_VGA have been merged into SCI_VERSION_01 - Simplified the checks for EGA and VGA graphics - Fixed a bug in script_adjust_opcode_formats() - Simplified the code in GfxResManager::getView() a bit ........ r42208 | strangerke | 2009-07-07 17:51:18 +1000 (Tue, 07 Jul 2009) | 1 line Add detection of Playtoons 2 En ........ r42209 | thebluegr | 2009-07-07 17:51:26 +1000 (Tue, 07 Jul 2009) | 1 line Added a SCI1.1 case in the lofss opcode, like in the lofsa opcode (essentially, lofss and lofsa both load an offset, with lofsa loading it in the accumulator and lofss in the stack). lofss is rarely used in SCI1.1 games, which explains why no lofss-related crashes have been observed in SCI1.1 ........ r42211 | thebluegr | 2009-07-07 20:28:05 +1000 (Tue, 07 Jul 2009) | 1 line Added auto-detection for games with older headers for script blocks, and removed game flag GF_SCI0_OLD ........ r42212 | thebluegr | 2009-07-07 21:14:18 +1000 (Tue, 07 Jul 2009) | 1 line Cleanup: added an enum for the auto-detected features, removed the selectors which are only used for auto-detection from the convenience selector map and placed feature auto-detection in a separate function. Also, now the automatically detected graphics resources are shown in the console. ........ r42214 | strangerke | 2009-07-07 21:58:22 +1000 (Tue, 07 Jul 2009) | 2 lines - Separate Playtoons gametypes from in GobEngine::initGameParts() - Add a specific save/load class for Playtoons as some specific files need to be tested ........ r42215 | strangerke | 2009-07-07 22:03:27 +1000 (Tue, 07 Jul 2009) | 3 lines - Add a new gametype for 'The Land of the Magic Stones' - Add detection of the french version - Add a new game feature for 800*600 ........ r42216 | thebluegr | 2009-07-07 22:29:55 +1000 (Tue, 07 Jul 2009) | 1 line Removed the superfluous sci_version_types array (it's essentially the same as the versionNames array) ........ r42217 | strangerke | 2009-07-07 22:51:21 +1000 (Tue, 07 Jul 2009) | 1 line Change SaveLoad_Playtoons case ........ r42219 | thebluegr | 2009-07-07 23:39:24 +1000 (Tue, 07 Jul 2009) | 1 line Removed the weird checks for a maximum resource number (the sci_max_resource_nr array), as it doesn't serve any real purpose and leads to strange errors: if a resource is found which is bigger than the maximum number, it will be remapped to an incorrect number from this check. This makes KQ5CD work properly again (resources would be remapped to incorrect resource numbers from this code as a result of not updating this array with the latest SCI version merges). ........ r42221 | lordhoto | 2009-07-08 00:22:23 +1000 (Wed, 08 Jul 2009) | 1 line Add generic functionallity to draw FM-Towns ROM. (To be used by KYRA and SCI) ........ r42222 | lordhoto | 2009-07-08 00:22:39 +1000 (Wed, 08 Jul 2009) | 1 line Adapt KYRA to use the new Graphics::FontSJIS code. ........ r42229 | sev | 2009-07-08 03:11:29 +1000 (Wed, 08 Jul 2009) | 2 lines kFeatures800 -> kFeatures800x600 in order to have more meaningful name ........ r42230 | lordhoto | 2009-07-08 04:10:35 +1000 (Wed, 08 Jul 2009) | 2 lines - Added support for outlined FM-Towns ROM drawing - Adapted KYRA to use that ........ r42231 | lordhoto | 2009-07-08 04:17:30 +1000 (Wed, 08 Jul 2009) | 2 lines - Rename FontSJIS::enableShadow to enableOutline. - Initialize outline to false by default in FontTowns. ........ r42232 | lordhoto | 2009-07-08 05:00:39 +1000 (Wed, 08 Jul 2009) | 1 line Change "FM-Towns" to "FM-TOWNS" for consistency. ........ r42233 | lordhoto | 2009-07-08 05:00:51 +1000 (Wed, 08 Jul 2009) | 1 line Add guards to only include SJIS font code, when KYRA or SCI is enabled. ........ r42234 | lordhoto | 2009-07-08 05:18:32 +1000 (Wed, 08 Jul 2009) | 1 line Simply compile guard of SJIS code and fix comment. ........ r42235 | lordhoto | 2009-07-08 05:18:53 +1000 (Wed, 08 Jul 2009) | 1 line Change all uses of FM-Towns/fm-towns to FM-TOWNS. ........ r42238 | thebluegr | 2009-07-08 06:01:15 +1000 (Wed, 08 Jul 2009) | 1 line Added a workaround for incorrect font references in LSL1VGA (which was the original purpose of the code removed in rev. 42219) ........ r42239 | thebluegr | 2009-07-08 06:17:07 +1000 (Wed, 08 Jul 2009) | 1 line Improved the LSL1VGA workaround after talking with waltervn ........ r42240 | thebluegr | 2009-07-08 06:43:27 +1000 (Wed, 08 Jul 2009) | 1 line Silenced the very chatty song iterator console messages by converting them to appropriate debug messages ........ svn-id: r42248
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