[Scummvm-git-logs] scummvm master -> 4e0cb6e3b530d04d8722ec1f0924dda7a117dd0f
dreammaster
dreammaster at scummvm.org
Fri Feb 12 03:30:19 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
359e3ec6e7 AGS: Allow quiting game when a dialog is open
50eeb1b07d AGS: Add variation of Steam plugin for Blackwell Epiphany
4e0cb6e3b5 AGS: Allow fallback detection to match on exact md5 but different filename
Commit: 359e3ec6e7f81f0ae406f13973abed79d3336b2d
https://github.com/scummvm/scummvm/commit/359e3ec6e7f81f0ae406f13973abed79d3336b2d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-11T18:51:31-08:00
Commit Message:
AGS: Allow quiting game when a dialog is open
Changed paths:
engines/ags/engine/ac/dialog.cpp
diff --git a/engines/ags/engine/ac/dialog.cpp b/engines/ags/engine/ac/dialog.cpp
index 70d568525e..aa7fd563c5 100644
--- a/engines/ags/engine/ac/dialog.cpp
+++ b/engines/ags/engine/ac/dialog.cpp
@@ -64,6 +64,7 @@
#include "ags/engine/script/script_runtime.h"
#include "ags/engine/ac/dynobj/scriptstring.h"
#include "ags/engine/globals.h"
+#include "ags/ags.h"
namespace AGS3 {
@@ -613,7 +614,8 @@ void DialogOptions::Show() {
update_polled_stuff_if_runtime();
Redraw();
- while (Run());
+ while (Run() && !SHOULD_QUIT) {
+ }
if (!play.mouse_cursor_hidden)
ags_domouse(DOMOUSE_DISABLE);
@@ -1105,6 +1107,8 @@ void do_conversation(int dlgnum) {
}
int chose = show_dialog_options(dlgnum, SAYCHOSEN_USEFLAG, (game.options[OPT_RUNGAMEDLGOPTS] != 0));
+ if (SHOULD_QUIT)
+ return;
if (chose == CHOSE_TEXTPARSER) {
said_speech_line = 0;
Commit: 50eeb1b07da0eec4e7b54c165c6bfbe315a1958d
https://github.com/scummvm/scummvm/commit/50eeb1b07da0eec4e7b54c165c6bfbe315a1958d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-11T18:51:31-08:00
Commit Message:
AGS: Add variation of Steam plugin for Blackwell Epiphany
Changed paths:
A engines/ags/plugins/ags_galaxy_steam/ags_blackwell_steam.cpp
A engines/ags/plugins/ags_galaxy_steam/ags_blackwell_steam.h
engines/ags/ags.cpp
engines/ags/ags.h
engines/ags/module.mk
engines/ags/plugins/ags_galaxy_steam/ags_galaxy_steam.h
engines/ags/plugins/dll.cpp
diff --git a/engines/ags/ags.cpp b/engines/ags/ags.cpp
index 9d53c5939e..88c0592f87 100644
--- a/engines/ags/ags.cpp
+++ b/engines/ags/ags.cpp
@@ -308,6 +308,10 @@ const PluginVersion *AGSEngine::getNeededPlugins() const {
return _gameDescription->_plugins;
}
+Common::String AGSEngine::getGameId() const {
+ return _gameDescription->desc.gameId;
+}
+
Common::Error AGSEngine::run() {
if (debugChannelSet(-1, kDebugScan)) {
// Scan the given folder and subfolders for unknown games
diff --git a/engines/ags/ags.h b/engines/ags/ags.h
index a78501cd3a..28363d3f42 100644
--- a/engines/ags/ags.h
+++ b/engines/ags/ags.h
@@ -87,6 +87,11 @@ public:
const PluginVersion *getNeededPlugins() const;
+ /**
+ * Returns the game Id
+ */
+ Common::String getGameId() const;
+
/**
* Returns the current list of savegames
*/
diff --git a/engines/ags/module.mk b/engines/ags/module.mk
index a102e56a6b..c7bcc5f528 100644
--- a/engines/ags/module.mk
+++ b/engines/ags/module.mk
@@ -292,6 +292,7 @@ MODULE_OBJS = \
plugins/ags_creditz/ags_creditz1.o \
plugins/ags_creditz/ags_creditz2.o \
plugins/ags_flashlight/ags_flashlight.o \
+ plugins/ags_galaxy_steam/ags_blackwell_steam.o \
plugins/ags_galaxy_steam/ags_galaxy_steam.o \
plugins/ags_pal_render/ags_pal_render.o \
plugins/ags_pal_render/raycast.o \
diff --git a/engines/ags/plugins/ags_galaxy_steam/ags_blackwell_steam.cpp b/engines/ags/plugins/ags_galaxy_steam/ags_blackwell_steam.cpp
new file mode 100644
index 0000000000..fdc8f0a1c2
--- /dev/null
+++ b/engines/ags/plugins/ags_galaxy_steam/ags_blackwell_steam.cpp
@@ -0,0 +1,61 @@
+/* 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 "ags/plugins/ags_galaxy_steam/ags_blackwell_steam.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSGalaxySteam {
+
+AGSBlackwellSteam::AGSBlackwellSteam() : AGSSteam() {
+ DLL_METHOD(AGS_EngineStartup);
+}
+
+void AGSBlackwellSteam::AGS_EngineStartup(IAGSEngine *engine) {
+ AGSSteam::AGS_EngineStartup(engine);
+
+ SCRIPT_METHOD_EXT(Steam::IsAchievementAchieved^1, IsAchievementAchieved);
+ SCRIPT_METHOD_EXT(Steam::SetAchievementAchieved^1, SetAchievementAchieved);
+ SCRIPT_METHOD_EXT(Steam::ResetAchievement^1, ResetAchievement);
+ SCRIPT_METHOD_EXT(Steam::GetIntStat^1, GetIntStat);
+ SCRIPT_METHOD_EXT(Steam::GetFloatStat^1, GetFloatStat);
+ SCRIPT_METHOD_EXT(Steam::GetAverageRateStat^1, GetAverageRateStat);
+ SCRIPT_METHOD_EXT(Steam::SetIntStat^2, SetIntStat);
+ SCRIPT_METHOD_EXT(Steam::SetFloatStat^2, SetFloatStat);
+ SCRIPT_METHOD_EXT(Steam::UpdateAverageRateStat^3, UpdateAverageRateStat);
+ SCRIPT_METHOD_EXT(Steam::ResetStatsAndAchievements^0, ResetStatsAndAchievements);
+ SCRIPT_METHOD_EXT(Steam::get_Initialized, get_Initialized);
+ SCRIPT_METHOD_EXT(Steam::get_CurrentLeaderboardName, get_CurrentLeaderboardName);
+ SCRIPT_METHOD_EXT(Steam::RequestLeaderboard^3, RequestLeaderboard);
+ SCRIPT_METHOD_EXT(Steam::UploadScore^1, UploadScore);
+ SCRIPT_METHOD_EXT(Steam::geti_LeaderboardNames, geti_LeaderboardNames);
+ SCRIPT_METHOD_EXT(Steam::geti_LeaderboardScores, geti_LeaderboardScores);
+ SCRIPT_METHOD_EXT(Steam::get_LeaderboardCount, get_LeaderboardCount);
+ SCRIPT_METHOD_EXT(Steam::GetUserName^0, GetUserName);
+ SCRIPT_METHOD_EXT(Steam::GetCurrentGameLanguage^0, GetCurrentGameLanguage);
+ SCRIPT_METHOD_EXT(Steam::FindLeaderboard^1, FindLeaderboard);
+ SCRIPT_METHOD_EXT(Steam::Initialize^2, Initialize);
+}
+
+} // namespace AGSGalaxySteam
+} // namespace Plugins
+} // namespace AGS3
diff --git a/engines/ags/plugins/ags_galaxy_steam/ags_blackwell_steam.h b/engines/ags/plugins/ags_galaxy_steam/ags_blackwell_steam.h
new file mode 100644
index 0000000000..26c9e7a85e
--- /dev/null
+++ b/engines/ags/plugins/ags_galaxy_steam/ags_blackwell_steam.h
@@ -0,0 +1,44 @@
+/* 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 AGS_PLUGINS_AGS_GALAXY_STEAM_AGS_BLACKWELL_STEAM_H
+#define AGS_PLUGINS_AGS_GALAXY_STEAM_AGS_BLACKWELL_STEAM_H
+
+#include "ags/plugins/ags_galaxy_steam/ags_galaxy_steam.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSGalaxySteam {
+
+class AGSBlackwellSteam : public AGSSteam {
+private:
+ static void AGS_EngineStartup(IAGSEngine *engine);
+
+public:
+ AGSBlackwellSteam();
+};
+
+} // namespace AGSGalaxySteam
+} // namespace Plugins
+} // namespace AGS3
+
+#endif
diff --git a/engines/ags/plugins/ags_galaxy_steam/ags_galaxy_steam.h b/engines/ags/plugins/ags_galaxy_steam/ags_galaxy_steam.h
index e966c54a22..0341aed78c 100644
--- a/engines/ags/plugins/ags_galaxy_steam/ags_galaxy_steam.h
+++ b/engines/ags/plugins/ags_galaxy_steam/ags_galaxy_steam.h
@@ -33,7 +33,7 @@ namespace Plugins {
namespace AGSGalaxySteam {
class AGS2Client : public DLL {
-private:
+protected:
static int IsAchievementAchieved(const ScriptMethodParams ¶ms);
static int SetAchievementAchieved(const ScriptMethodParams ¶ms);
static int ResetAchievement(const ScriptMethodParams ¶ms);
@@ -96,6 +96,8 @@ public:
class AGSSteam : public AGS2Client {
private:
static const char *AGS_GetPluginName();
+
+protected:
static void AGS_EngineStartup(IAGSEngine *engine);
static int IsAchievementAchieved(const ScriptMethodParams ¶ms);
diff --git a/engines/ags/plugins/dll.cpp b/engines/ags/plugins/dll.cpp
index ebdec1f73a..ec8b6a3b8b 100644
--- a/engines/ags/plugins/dll.cpp
+++ b/engines/ags/plugins/dll.cpp
@@ -26,6 +26,7 @@
#include "ags/plugins/ags_creditz/ags_creditz1.h"
#include "ags/plugins/ags_creditz/ags_creditz2.h"
#include "ags/plugins/ags_flashlight/ags_flashlight.h"
+#include "ags/plugins/ags_galaxy_steam/ags_blackwell_steam.h"
#include "ags/plugins/ags_galaxy_steam/ags_galaxy_steam.h"
#include "ags/plugins/ags_pal_render/ags_pal_render.h"
#include "ags/plugins/ags_snow_rain/ags_snow_rain.h"
@@ -79,6 +80,9 @@ void *pluginOpen(const char *filename) {
fname.equalsIgnoreCase("agsgalaxy-disjoint"))
return new AGSGalaxySteam::AGSGalaxy();
+ if (fname.equalsIgnoreCase("agsteam") && ::AGS::g_vm->getGameId() == "blackwell5")
+ return new AGSGalaxySteam::AGSBlackwellSteam();
+
if (fname.equalsIgnoreCase("agsteam") || fname.equalsIgnoreCase("agsteam-unified") ||
fname.equalsIgnoreCase("agsteam-disjoint"))
return new AGSGalaxySteam::AGSSteam();
Commit: 4e0cb6e3b530d04d8722ec1f0924dda7a117dd0f
https://github.com/scummvm/scummvm/commit/4e0cb6e3b530d04d8722ec1f0924dda7a117dd0f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-11T19:29:56-08:00
Commit Message:
AGS: Allow fallback detection to match on exact md5 but different filename
Changed paths:
engines/ags/detection.cpp
diff --git a/engines/ags/detection.cpp b/engines/ags/detection.cpp
index 8e0c3a16ca..8f88109caa 100644
--- a/engines/ags/detection.cpp
+++ b/engines/ags/detection.cpp
@@ -81,8 +81,7 @@ ADDetectedGame AGSMetaEngineDetection::fallbackDetect(const FileMap &allFiles, c
// Set the defaults for gameid and extra
_gameid = "ags";
_extra.clear();
- AGS::g_fallbackDesc.desc.gameId = _gameid.c_str();
- AGS::g_fallbackDesc.desc.extra = _extra.c_str();
+ bool hasUnknownFiles = true;
// Scan for AGS games
for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
@@ -105,6 +104,19 @@ ADDetectedGame AGSMetaEngineDetection::fallbackDetect(const FileMap &allFiles, c
f.seek(0);
_md5 = Common::computeStreamMD5AsString(f, 5000);
+ // Check whether the game is in the detection list with a different filename
+ for (const ::AGS::AGSGameDescription *gameP = ::AGS::GAME_DESCRIPTIONS;
+ gameP->desc.gameId; ++gameP) {
+ if (_md5 == gameP->desc.filesDescriptions[0].md5 &&
+ f.size() == gameP->desc.filesDescriptions[0].fileSize) {
+ hasUnknownFiles = false;
+ _gameid = gameP->desc.gameId;
+ break;
+ }
+ }
+
+ AGS::g_fallbackDesc.desc.gameId = _gameid.c_str();
+ AGS::g_fallbackDesc.desc.extra = _extra.c_str();
AGS::g_fallbackDesc.desc.filesDescriptions[0].fileName = _filename.c_str();
AGS::g_fallbackDesc.desc.filesDescriptions[0].fileSize = f.size();
AGS::g_fallbackDesc.desc.filesDescriptions[0].md5 = _md5.c_str();
@@ -113,7 +125,7 @@ ADDetectedGame AGSMetaEngineDetection::fallbackDetect(const FileMap &allFiles, c
game.matchedFiles[_filename].md5 = _md5;
game.matchedFiles[_filename].size = f.size();
- game.hasUnknownFiles = true;
+ game.hasUnknownFiles = hasUnknownFiles;
return game;
}
}
More information about the Scummvm-git-logs
mailing list