[Scummvm-git-logs] scummvm master -> a20e10105ed1ed8a6b6a19aaa8a02a4796ff3b6b
sev-
noreply at scummvm.org
Sat Apr 29 10:17:56 UTC 2023
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:
de7e342970 GOB: remove game type kGameTypeAJWorld, duplicated with kGameTypeAdibou1
a20e10105e GOB: automatically upgrade "ajworld" targets to "adibou1"
Commit: de7e342970f980b5add1539239a74c359e01268c
https://github.com/scummvm/scummvm/commit/de7e342970f980b5add1539239a74c359e01268c
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2023-04-29T12:17:53+02:00
Commit Message:
GOB: remove game type kGameTypeAJWorld, duplicated with kGameTypeAdibou1
A.J.'s World of Discovery is the name of the US localization of Adibou 1.
The only file listed in SaveLoad_AJWorld ("menu.inf") has been moved to SaveLoad_Adibou1.
Changed paths:
R engines/gob/save/saveload_ajworld.cpp
engines/gob/detection/detection.h
engines/gob/detection/tables.h
engines/gob/detection/tables_adibou1.h
engines/gob/gob.cpp
engines/gob/module.mk
engines/gob/save/saveload.h
engines/gob/save/saveload_adibou1.cpp
diff --git a/engines/gob/detection/detection.h b/engines/gob/detection/detection.h
index 81981b990b8..c628eb98831 100644
--- a/engines/gob/detection/detection.h
+++ b/engines/gob/detection/detection.h
@@ -52,8 +52,8 @@ enum GameType {
kGameTypeBabaYaga,
kGameTypeLittleRed,
kGameTypeOnceUponATime, // Need more inspection to see if Baba Yaga or Abracadabra
- kGameTypeAJWorld,
- kGameTypeCrousti,
+ //kGameTypeAJWorld -> Deprecated, duplicated with kGameTypeAdibou1
+ kGameTypeCrousti = 24, // Explicit value needed to not invalidate save games after removing kGameTypeAJWorld
kGameTypeDynastyWood
};
diff --git a/engines/gob/detection/tables.h b/engines/gob/detection/tables.h
index e547d0c5557..8d5ab200e5f 100644
--- a/engines/gob/detection/tables.h
+++ b/engines/gob/detection/tables.h
@@ -39,7 +39,6 @@ static const PlainGameDescriptor gobGames[] = {
{"abracadabra", "Once Upon A Time: Abracadabra"},
{"littlered", "Once Upon A Time: Little Red Riding Hood"},
{"onceupon", "Once Upon A Time"},
- {"ajworld", "A.J.'s World of Discovery"},
{"gob3", "Goblins Quest 3"},
{"gob3cd", "Goblins Quest 3 CD"},
{"crousti", "Croustibat"},
diff --git a/engines/gob/detection/tables_adibou1.h b/engines/gob/detection/tables_adibou1.h
index 3df4f6ecef3..740570ceb03 100644
--- a/engines/gob/detection/tables_adibou1.h
+++ b/engines/gob/detection/tables_adibou1.h
@@ -100,7 +100,7 @@
ADGF_UNSTABLE,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
- kGameTypeAJWorld,
+ kGameTypeAdibou1,
kFeaturesAdLib,
0, 0, 0
},
@@ -118,7 +118,7 @@
ADGF_UNSTABLE,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
- kGameTypeAJWorld,
+ kGameTypeAdibou1,
kFeaturesNone,
0, 0, 0
},
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 9a7275ac595..0fe5feba76c 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -511,18 +511,6 @@ Common::Error GobEngine::initGameParts() {
_resourceSizeWorkaround = true;
break;
- case kGameTypeAJWorld:
- _init = new Init_v2(this);
- _video = new Video_v2(this);
- _inter = new Inter_v2(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_AJWorld(this, _targetName.c_str());
- break;
-
case kGameTypeGob3:
_init = new Init_v3(this);
_video = new Video_v2(this);
diff --git a/engines/gob/module.mk b/engines/gob/module.mk
index 2cef76c3ca9..74ee8df0527 100644
--- a/engines/gob/module.mk
+++ b/engines/gob/module.mk
@@ -110,7 +110,6 @@ MODULE_OBJS := \
save/saveload_adibou1.o \
save/saveload_geisha.o \
save/saveload_fascin.o \
- save/saveload_ajworld.o \
save/saveload_inca2.o \
save/saveload_playtoons.o \
save/saveconverter.o \
diff --git a/engines/gob/save/saveload.h b/engines/gob/save/saveload.h
index 206b54bb50c..46ba7091595 100644
--- a/engines/gob/save/saveload.h
+++ b/engines/gob/save/saveload.h
@@ -262,33 +262,6 @@ protected:
SaveFile *getSaveFile(const char *fileName);
};
-/** Save/Load class for A.J.'s World of Discovery. */
-class SaveLoad_AJWorld : public SaveLoad {
-public:
- SaveLoad_AJWorld(GobEngine *vm, const char *targetName);
- ~SaveLoad_AJWorld() override;
-
- SaveMode getSaveMode(const char *fileName) const override;
-
-protected:
- struct SaveFile {
- const char *sourceName;
- SaveMode mode;
- SaveHandler *handler;
- const char *description;
- };
-
- static SaveFile _saveFiles[];
-
- TempSpriteHandler *_tempSpriteHandler;
-
- SaveHandler *getHandler(const char *fileName) const override;
- const char *getDescription(const char *fileName) const override;
-
- const SaveFile *getSaveFile(const char *fileName) const;
- SaveFile *getSaveFile(const char *fileName);
-};
-
/** Save/Load class for Adibou 1 */
class SaveLoad_Adibou1 : public SaveLoad {
public:
@@ -352,6 +325,7 @@ protected:
GameFileHandler *_bouHandler;
GameFileHandler *_constructionHandler;
SpriteHandler *_drawingHandler;
+ TempSpriteHandler *_menuHandler;
SaveHandler *getHandler(const char *fileName) const override;
const char *getDescription(const char *fileName) const override;
diff --git a/engines/gob/save/saveload_adibou1.cpp b/engines/gob/save/saveload_adibou1.cpp
index c2c20d03552..c36fd3f8db8 100644
--- a/engines/gob/save/saveload_adibou1.cpp
+++ b/engines/gob/save/saveload_adibou1.cpp
@@ -30,6 +30,7 @@ SaveLoad_Adibou1::SaveFile SaveLoad_Adibou1::_saveFiles[] = {
{ "bou.inf", kSaveModeSave, nullptr, "adibou1"},
{ "dessin.inf", kSaveModeSave, nullptr, "paint game drawing"},
{ "const.inf", kSaveModeSave, nullptr, "construction game"},
+ { "menu.inf", kSaveModeSave, nullptr, "temporary sprite"}
};
SaveLoad_Adibou1::SaveLoad_Adibou1(GobEngine *vm, const char *targetName) :
@@ -38,12 +39,14 @@ SaveLoad_Adibou1::SaveLoad_Adibou1(GobEngine *vm, const char *targetName) :
_saveFiles[0].handler = _bouHandler = new GameFileHandler(vm, targetName, "bouinf");
_saveFiles[1].handler = _drawingHandler = new SpriteHandler(vm, targetName, "drawing");
_saveFiles[2].handler = _constructionHandler = new GameFileHandler(vm, targetName, "construction");
+ _saveFiles[3].handler = _menuHandler = new TempSpriteHandler(vm);;
}
SaveLoad_Adibou1::~SaveLoad_Adibou1() {
delete _bouHandler;
delete _drawingHandler;
delete _constructionHandler;
+ delete _menuHandler;
}
SaveLoad_Adibou1::SpriteHandler::File::File(GobEngine *vm, const Common::String &base, const Common::String &ext) :
diff --git a/engines/gob/save/saveload_ajworld.cpp b/engines/gob/save/saveload_ajworld.cpp
deleted file mode 100644
index 5d6fdea33a3..00000000000
--- a/engines/gob/save/saveload_ajworld.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "gob/save/saveload.h"
-#include "gob/save/saveconverter.h"
-#include "gob/inter.h"
-#include "gob/variables.h"
-
-namespace Gob {
-
-SaveLoad_AJWorld::SaveFile SaveLoad_AJWorld::_saveFiles[] = {
- { "menu.inf", kSaveModeSave, nullptr, "temporary sprite"}
-};
-
-
-SaveLoad_AJWorld::SaveLoad_AJWorld(GobEngine *vm, const char *targetName) :
- SaveLoad(vm) {
-
- _tempSpriteHandler = new TempSpriteHandler(vm);
-
- _saveFiles[0].handler = _tempSpriteHandler;
-}
-
-SaveLoad_AJWorld::~SaveLoad_AJWorld() {
- delete _tempSpriteHandler;
-}
-
-const SaveLoad_AJWorld::SaveFile *SaveLoad_AJWorld::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 nullptr;
-}
-
-SaveLoad_AJWorld::SaveFile *SaveLoad_AJWorld::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 nullptr;
-}
-
-SaveHandler *SaveLoad_AJWorld::getHandler(const char *fileName) const {
- const SaveFile *saveFile = getSaveFile(fileName);
-
- if (saveFile)
- return saveFile->handler;
-
- return nullptr;
-}
-
-const char *SaveLoad_AJWorld::getDescription(const char *fileName) const {
- const SaveFile *saveFile = getSaveFile(fileName);
-
- if (saveFile)
- return saveFile->description;
-
- return nullptr;
-}
-
-SaveLoad::SaveMode SaveLoad_AJWorld::getSaveMode(const char *fileName) const {
- const SaveFile *saveFile = getSaveFile(fileName);
-
- if (saveFile)
- return saveFile->mode;
-
- return kSaveModeNone;
-}
-
-} // End of namespace Gob
Commit: a20e10105ed1ed8a6b6a19aaa8a02a4796ff3b6b
https://github.com/scummvm/scummvm/commit/a20e10105ed1ed8a6b6a19aaa8a02a4796ff3b6b
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2023-04-29T12:17:53+02:00
Commit Message:
GOB: automatically upgrade "ajworld" targets to "adibou1"
Changed paths:
A engines/gob/obsolete.h
engines/gob/detection/detection.cpp
engines/gob/detection/tables_adibou1.h
engines/gob/metaengine.cpp
diff --git a/engines/gob/detection/detection.cpp b/engines/gob/detection/detection.cpp
index 9b8a70f1490..644ba9fdc09 100644
--- a/engines/gob/detection/detection.cpp
+++ b/engines/gob/detection/detection.cpp
@@ -21,10 +21,12 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
+#include "engines/obsolete.h"
#include "gob/dataio.h"
#include "gob/detection/detection.h"
#include "gob/detection/tables.h"
+#include "gob/obsolete.h" // Obsolete ID table.
#include "gob/gob.h"
static const DebugChannelDef debugFlagList[] = {
@@ -47,6 +49,10 @@ class GobMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
GobMetaEngineDetection();
+ PlainGameDescriptor findGame(const char *gameId) const override {
+ return Engines::findGameID(gameId, _gameIds, obsoleteGameIDsTable);
+ }
+
const char *getName() const override {
return "gob";
}
diff --git a/engines/gob/detection/tables_adibou1.h b/engines/gob/detection/tables_adibou1.h
index 740570ceb03..8ff868a8d3d 100644
--- a/engines/gob/detection/tables_adibou1.h
+++ b/engines/gob/detection/tables_adibou1.h
@@ -92,7 +92,7 @@
{
{
- "ajworld",
+ "adibou1",
"",
AD_ENTRY1s("intro.stk", "e453bea7b28a67c930764d945f64d898", 3913628),
EN_ANY,
@@ -110,7 +110,7 @@
{
{
- "ajworld",
+ "adibou1",
"",
AD_ENTRY1s("intro.stk", "71e7db034890885ac96dd1be43a21c38", 556834),
EN_ANY,
diff --git a/engines/gob/metaengine.cpp b/engines/gob/metaengine.cpp
index ebfecbd380e..bd7b82d8c89 100644
--- a/engines/gob/metaengine.cpp
+++ b/engines/gob/metaengine.cpp
@@ -20,8 +20,10 @@
*/
#include "engines/advancedDetector.h"
+#include "engines/obsolete.h"
#include "gob/gob.h"
+#include "gob/obsolete.h"
// For struct GOBGameDescription.
#include "gob/detection/detection.h"
@@ -34,6 +36,11 @@ public:
bool hasFeature(MetaEngineFeature f) const override;
+ Common::Error createInstance(OSystem *syst, Engine **engine) override {
+ Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable);
+ return AdvancedMetaEngine::createInstance(syst, engine);
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
};
diff --git a/engines/gob/obsolete.h b/engines/gob/obsolete.h
new file mode 100644
index 00000000000..6a5e9efa7c9
--- /dev/null
+++ b/engines/gob/obsolete.h
@@ -0,0 +1,30 @@
+/* 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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef GOB_OBSOLETE_H
+#define GOB_OBSOLETE_H
+
+static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = {
+ {"ajworld", "adibou1", Common::kPlatformUnknown},
+ {0, 0, Common::kPlatformUnknown}
+};
+
+#endif // GOB_OBSOLETE_H
More information about the Scummvm-git-logs
mailing list