[Scummvm-git-logs] scummvm master -> 32981785fd2a0fbd3566bd4e3fdfd91abd1bd060

dreammaster dreammaster at scummvm.org
Sun Feb 7 23:02:25 UTC 2021


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:
5f0faa1a2a AGS: Al Emmo detection entry, beginnings of AGSSteam plugin
32981785fd AGS: Don't show interface_click error dialog on exit


Commit: 5f0faa1a2aad53806cba78a339e4f9ba49363e6b
    https://github.com/scummvm/scummvm/commit/5f0faa1a2aad53806cba78a339e4f9ba49363e6b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-07T15:02:07-08:00

Commit Message:
AGS: Al Emmo detection entry, beginnings of AGSSteam plugin

Changed paths:
  A engines/ags/plugins/ags_steam/ags_steam.cpp
  A engines/ags/plugins/ags_steam/ags_steam.h
    engines/ags/detection_tables.h
    engines/ags/module.mk
    engines/ags/plugins/dll.cpp
    engines/ags/shared/util/filestream.cpp


diff --git a/engines/ags/detection_tables.h b/engines/ags/detection_tables.h
index edb24b8569..4e99220f0c 100644
--- a/engines/ags/detection_tables.h
+++ b/engines/ags/detection_tables.h
@@ -140,7 +140,8 @@ const PlainGameDescriptor GAME_NAMES[] = {
 	{ "qfg2agdi", "Quest for Glory II: Trial By Fire" },
 	{ "mage", "Mage's Initiation: Reign of the Elements" },
 
-	// Comercial games
+	// Commercial games
+	{ "alemmo", "Al Emmo And The Lost Dutchman's Mine" },
 	{ "blackwell1", "The Blackwell Legacy" },
 	{ "blackwell2", "Blackwell Unbound" },
 	{ "blackwell3", "The Blackwell Convergence" },
@@ -1437,7 +1438,8 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
 	ENGLISH_ENTRY("qfg2agdi", "qfg2vga.exe", "582e26533cf784011c7565e89905d3c4", 18224373),
 	ENGLISH_ENTRY("qfg2agdi", "Game.exe", "3b7cceb3e4bdb031dc5d8f290936e94b", 5408433),
 
-	// Comercial games
+	// Commercial games
+	ENGLISH_ENTRY("alemmo", "al-emmo.exe", "ff22fd118f18eca884dc7ed2a5be3877", 19045178), // Steam
 	ENGLISH_ENTRY("blackwell1", "blackwell1.exe", "605e124cb7e0b56841c471e2d641c224", 18822697), // GOG
 	ENGLISH_ENTRY("blackwell2", "unbound.exe", "5c3a940514d91431e8e1c372018851ca", 14493753), // GOG
 	ENGLISH_ENTRY("blackwell3", "convergence.exe", "2260c1a21aba7ac00baf0100d4ca54f1", 172575801), // GOG
diff --git a/engines/ags/module.mk b/engines/ags/module.mk
index 6fc4cf43a2..a51a8ad285 100644
--- a/engines/ags/module.mk
+++ b/engines/ags/module.mk
@@ -304,7 +304,8 @@ MODULE_OBJS = \
 	plugins/ags_sprite_font/sprite_font.o \
 	plugins/ags_sprite_font/sprite_font_renderer.o \
 	plugins/ags_sprite_font/variable_width_font.o \
-	plugins/ags_sprite_font/variable_width_sprite_font.o
+	plugins/ags_sprite_font/variable_width_sprite_font.o \
+	plugins/ags_steam/ags_steam.o
 
 ifdef ENABLE_AGS_SCANNER
 MODULE_OBJS += \
diff --git a/engines/ags/plugins/ags_steam/ags_steam.cpp b/engines/ags/plugins/ags_steam/ags_steam.cpp
new file mode 100644
index 0000000000..aa4a38aef9
--- /dev/null
+++ b/engines/ags/plugins/ags_steam/ags_steam.cpp
@@ -0,0 +1,43 @@
+/* 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_steam/ags_steam.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSSteam {
+
+AGSSteam::AGSSteam() {
+	DLL_METHOD(AGS_GetPluginName);
+	DLL_METHOD(AGS_EngineStartup);
+}
+
+const char *AGSSteam::AGS_GetPluginName() {
+	return "";
+}
+
+void AGSSteam::AGS_EngineStartup(IAGSEngine *engine) {
+}
+
+} // namespace AGSSteam
+} // namespace Plugins
+} // namespace AGS3
diff --git a/engines/ags/plugins/ags_steam/ags_steam.h b/engines/ags/plugins/ags_steam/ags_steam.h
new file mode 100644
index 0000000000..41c447dc72
--- /dev/null
+++ b/engines/ags/plugins/ags_steam/ags_steam.h
@@ -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.
+ *
+ */
+
+#ifndef AGS_PLUGINS_AGSSTEAM_AGSSTEAM_H
+#define AGS_PLUGINS_AGSSTEAM_AGSSTEAM_H
+
+#include "ags/plugins/dll.h"
+#include "common/array.h"
+#include "common/rect.h"
+#include "common/str.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSSteam {
+
+class AGSSteam : public DLL {
+private:
+	static const char *AGS_GetPluginName();
+	static void AGS_EngineStartup(IAGSEngine *engine);
+
+public:
+	AGSSteam();
+};
+
+
+} // namespace AGSSteam
+} // namespace Plugins
+} // namespace AGS3
+
+#endif
diff --git a/engines/ags/plugins/dll.cpp b/engines/ags/plugins/dll.cpp
index e629c2a438..87cadef04e 100644
--- a/engines/ags/plugins/dll.cpp
+++ b/engines/ags/plugins/dll.cpp
@@ -28,6 +28,7 @@
 #include "ags/plugins/ags_pal_render/ags_pal_render.h"
 #include "ags/plugins/ags_snow_rain/ags_snow_rain.h"
 #include "ags/plugins/ags_sprite_font/ags_sprite_font.h"
+#include "ags/plugins/ags_steam/ags_steam.h"
 #include "ags/ags.h"
 #include "ags/detection.h"
 #include "common/str.h"
@@ -41,7 +42,7 @@ void *dlopen(const char *filename) {
 	// Check for if the game specifies a specific plugin version for this game
 	int version = 0;
 	for (const ::AGS::PluginVersion *v = ::AGS::g_vm->getNeededPlugins();
-	        v->_plugin; ++v) {
+	        v && v->_plugin; ++v) {
 		if (Common::String::format("lib%s.so", v->_plugin).equalsIgnoreCase(filename)) {
 			version = v->_version;
 			break;
@@ -70,6 +71,9 @@ void *dlopen(const char *filename) {
 	if (fname.equalsIgnoreCase("libAGSSpriteFont.so"))
 		return new AGSSpriteFont::AGSSpriteFont();
 
+	if (fname.equalsIgnoreCase("libagsteam.so"))
+		return new AGSSteam::AGSSteam();
+
 	return nullptr;
 }
 
diff --git a/engines/ags/shared/util/filestream.cpp b/engines/ags/shared/util/filestream.cpp
index d90c228a40..bec535f6a6 100644
--- a/engines/ags/shared/util/filestream.cpp
+++ b/engines/ags/shared/util/filestream.cpp
@@ -194,8 +194,14 @@ void FileStream::Open(const String &file_name, FileOpenMode open_mode, FileWorkM
 		if (!file_name.CompareLeftNoCase(SAVE_FOLDER_PREFIX)) {
 			_outSave = g_system->getSavefileManager()->openForSaving(
 				file_name + strlen(SAVE_FOLDER_PREFIX), false);
-		} else if (file_name == "warnings.log") {
-			_outSave = g_system->getSavefileManager()->openForSaving(file_name, false);
+		} else if (!file_name.CompareRightNoCase(".log")) {
+			Common::String fname = file_name;
+			if (fname.hasPrefix("./"))
+				fname = fname.substr(2);
+			else if (fname.hasPrefix("/"))
+				fname.deleteChar(0);
+
+			_outSave = g_system->getSavefileManager()->openForSaving(fname, false);
 		} else {
 			error("Creating files is only supported for savegames");
 		}


Commit: 32981785fd2a0fbd3566bd4e3fdfd91abd1bd060
    https://github.com/scummvm/scummvm/commit/32981785fd2a0fbd3566bd4e3fdfd91abd1bd060
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-07T15:02:07-08:00

Commit Message:
AGS: Don't show interface_click error dialog on exit

Changed paths:
    engines/ags/engine/main/quit.cpp


diff --git a/engines/ags/engine/main/quit.cpp b/engines/ags/engine/main/quit.cpp
index 6d83fb3338..bfb18c5471 100644
--- a/engines/ags/engine/main/quit.cpp
+++ b/engines/ags/engine/main/quit.cpp
@@ -226,8 +226,10 @@ void allegro_bitmap_test_release() {
 // error.
 // "!|" is a special code used to mean that the player has aborted (Alt+X)
 void quit(const char *quitmsg) {
-	strncpy(_G(quit_message), quitmsg, 256);
-	_G(abort_engine) = true;
+	if (!_G(abort_engine)) {
+		strncpy(_G(quit_message), quitmsg, 256);
+		_G(abort_engine) = true;
+	}
 }
 
 void quit_free() {




More information about the Scummvm-git-logs mailing list