[Scummvm-git-logs] scummvm master -> 23f15cfb2d1e072cc9a9d9131724af75f391f963

criezy noreply at scummvm.org
Mon Oct 3 17:44:39 UTC 2022


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:
88c56f912d AGS: Fix access to uninitialized memory in base SpriteFont plugin
23f15cfb2d AGS: Fix detection for The Excavation of Hob's Barrow


Commit: 88c56f912d14376c0b8cd4294c20e606cafd4900
    https://github.com/scummvm/scummvm/commit/88c56f912d14376c0b8cd4294c20e606cafd4900
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2022-10-03T18:44:22+01:00

Commit Message:
AGS: Fix access to uninitialized memory in base SpriteFont plugin

When using the base SpriteFont plugin and not the ClifftopGames variant,
the renderers pointer were not initialized in the constructor, which
could lead to them not being instantiated, and then causing a crash.

Changed paths:
    engines/ags/plugins/ags_sprite_font/ags_sprite_font.h


diff --git a/engines/ags/plugins/ags_sprite_font/ags_sprite_font.h b/engines/ags/plugins/ags_sprite_font/ags_sprite_font.h
index 2c03a9f482b..40a1dcd60ba 100644
--- a/engines/ags/plugins/ags_sprite_font/ags_sprite_font.h
+++ b/engines/ags/plugins/ags_sprite_font/ags_sprite_font.h
@@ -48,7 +48,7 @@ private:
 	void SetLineHeightAdjust(ScriptMethodParams &params);
 
 public:
-	AGSSpriteFont() : PluginBase() {}
+	AGSSpriteFont() : PluginBase(), _fontRenderer(nullptr), _vWidthRenderer(nullptr) {}
 	virtual ~AGSSpriteFont() {}
 
 	const char *AGS_GetPluginName() override;


Commit: 23f15cfb2d1e072cc9a9d9131724af75f391f963
    https://github.com/scummvm/scummvm/commit/23f15cfb2d1e072cc9a9d9131724af75f391f963
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2022-10-03T18:44:22+01:00

Commit Message:
AGS: Fix detection for The Excavation of Hob's Barrow

This game needs to use the Clifftop Games variant of the AGSSpriteFont
plugin. Also it uses an alternate name for the plugin. That name
was already supported when loading builtin plugins, but not for the
Clifftop Games variant.

This commit also adds detection for the Mac version from Steam.

Changed paths:
    engines/ags/detection_tables.h
    engines/ags/plugins/plugin_base.cpp


diff --git a/engines/ags/detection_tables.h b/engines/ags/detection_tables.h
index 382a78f011c..f4cfa755355 100644
--- a/engines/ags/detection_tables.h
+++ b/engines/ags/detection_tables.h
@@ -3174,7 +3174,7 @@ STABLE_ENTRY_PLUGIN_GUIO(ID, FILENAME, MD5, SIZE, Common::UNK_LANG, "GOG", GUIO2
 
 static const PluginVersion AGSTEAM_WADJETEYE[] = { { "agsteam", kWadjetEye }, { nullptr, 0 } };
 static const PluginVersion AGS_FLASHLIGHT[] = { { "agsflashlight", 0 }, { nullptr, 0 } };
-static const PluginVersion AGSSPRITEFONT_CLIFFTOP[] = { { "agsspritefont", kClifftopGames }, { nullptr, 0 } };
+static const PluginVersion AGSSPRITEFONT_CLIFFTOP[] = { { "agsspritefont", kClifftopGames }, { "agsplugin.spritefont", kClifftopGames }, { nullptr, 0 } };
 
 
 const AGSGameDescription GAME_DESCRIPTIONS[] = {
@@ -3556,7 +3556,8 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
 	GAME_ENTRY_STEAM("downfall2016", "Downfall.ags", "7c87b99ce309a46085e40ac1a2b20e75", 224024207), // Linux
 	GAME_ENTRY_EN_STEAM("dustbowl", "dustbowl.exe", "aa349d52fd620cf9642935cd5bdec5d8", 63365026),
 	GAME_ENTRY_EN("dustbowl", "dustbowl.exe", "aa349d52fd620cf9642935cd5bdec5d8", 82185295),
-	GAME_ENTRY_EN_GOG("excavationhb", "TEOHB.exe", "f176b46bc89e227f745dae9878171676", 566320586),
+	GAME_ENTRY_PLUGIN_STEAM_NOLAUNCHLOAD("excavationhb", "ac2game.dat", "e5553f7c45d26d5fbc8b376a859bb87c", 563281442, AGSSPRITEFONT_CLIFFTOP), // Mac
+	GAME_ENTRY_PLUGIN_GOG_NOLAUNCHLOAD("excavationhb", "TEOHB.exe", "f176b46bc89e227f745dae9878171676", 566320586, AGSSPRITEFONT_CLIFFTOP),
 	GAME_ENTRY_STEAM("falconcity", "game.exe", "e816b31cfe3512c2ec24ac0bc6cfc605", 584191058),
 	GAME_ENTRY_EN_STEAM("feriadarles", "feria d'arles.exe", "6a3291595263debd129e1e2064baeea5", 275649462),
 	GAME_ENTRY_EN_STEAM("feriadarles", "ac2game.dat", "6a3291595263debd129e1e2064baeea5", 275640157), // Mac
diff --git a/engines/ags/plugins/plugin_base.cpp b/engines/ags/plugins/plugin_base.cpp
index 9424fbb8e43..4729f8a2325 100644
--- a/engines/ags/plugins/plugin_base.cpp
+++ b/engines/ags/plugins/plugin_base.cpp
@@ -110,11 +110,11 @@ Plugins::PluginBase *pluginOpen(const char *filename) {
 	if (fname.equalsIgnoreCase("AGSSock"))
 		return new AGSSock::AGSSock();
 
-	if ((fname.equalsIgnoreCase("AGSSpriteFont") && version == ::AGS::kClifftopGames))
-		return new AGSSpriteFont::AGSSpriteFontClifftopGames();
-
-	if (fname.equalsIgnoreCase("AGSSpriteFont") || fname.equalsIgnoreCase("agsplugin.spritefont"))
+	if (fname.equalsIgnoreCase("AGSSpriteFont") || fname.equalsIgnoreCase("agsplugin.spritefont")) {
+		if (version == ::AGS::kClifftopGames)
+			return new AGSSpriteFont::AGSSpriteFontClifftopGames();
 		return new AGSSpriteFont::AGSSpriteFont();
+	}
 
 	if (fname.equalsIgnoreCase("agsgalaxy") || fname.equalsIgnoreCase("agsgalaxy-unified") ||
 	        fname.equalsIgnoreCase("agsgalaxy-disjoint"))




More information about the Scummvm-git-logs mailing list