[Scummvm-git-logs] scummvm master -> 31d7b1e189633940d026344b10ee9bd134680b47

AndywinXp noreply at scummvm.org
Sat Jun 1 07:42:18 UTC 2024


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:
6d4bcfe132 SWORD1: Implement GUI option for Windows audio mode
31d7b1e189 NEWS: Update Sword1 section


Commit: 6d4bcfe13285cf17edf1c621b62253d098608377
    https://github.com/scummvm/scummvm/commit/6d4bcfe13285cf17edf1c621b62253d098608377
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-06-01T09:41:45+02:00

Commit Message:
SWORD1: Implement GUI option for Windows audio mode

Changed paths:
  A engines/sword1/detection.h
    engines/sword1/detection.cpp
    engines/sword1/detection_tables.h
    engines/sword1/metaengine.cpp


diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 9b5e05e8bb3..24a2905ff15 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -26,6 +26,7 @@
 #include "engines/advancedDetector.h"
 #include "engines/obsolete.h"
 
+#include "sword1/detection.h"
 #include "sword1/obsolete.h" // Obsolete ID table.
 
 static const PlainGameDescriptor swordGames[] = {
diff --git a/engines/sword1/detection.h b/engines/sword1/detection.h
new file mode 100644
index 00000000000..7c1a63d60ed
--- /dev/null
+++ b/engines/sword1/detection.h
@@ -0,0 +1,35 @@
+/* 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.
+ *
+ * Additional copyright for this file:
+ * Copyright (C) 1994-1998 Revolution Software Ltd.
+ *
+ * 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 SWORD1_DETECTION_H
+#define SWORD1_DETECTION_H
+
+#include "engines/advancedDetector.h"
+
+namespace Sword1 {
+
+#define GAMEOPTION_WINDOWS_AUDIO_MODE GUIO_GAMEOPTIONS1
+
+} // End of namespace Sword1
+
+#endif // SWORD1_DETECTION_H
diff --git a/engines/sword1/detection_tables.h b/engines/sword1/detection_tables.h
index 5a666d5bc5d..d1169a2b22a 100644
--- a/engines/sword1/detection_tables.h
+++ b/engines/sword1/detection_tables.h
@@ -33,7 +33,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::EN_ANY,
 		Common::kPlatformWindows,
 		ADGF_DEMO,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -46,7 +46,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::ES_ESP,
 		Common::kPlatformWindows,
 		ADGF_DEMO,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -59,7 +59,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::PT_BRA,
 		Common::kPlatformWindows,
 		ADGF_DEMO,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -109,7 +109,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::EN_USA,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -122,7 +122,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::EN_GRB,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{ // 25th Anniversary rerelease / Steam DLC for Director's Cut
@@ -135,7 +135,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::EN_GRB,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -148,7 +148,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::EN_GRB,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -161,7 +161,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::EN_ANY,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{ // Bundled with ScummVM 0.8
@@ -175,7 +175,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::EN_ANY,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -188,7 +188,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::FR_FRA,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -201,7 +201,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::FR_FRA,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -214,7 +214,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::FR_FRA,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -227,7 +227,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::FR_FRA,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -240,7 +240,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::DE_DEU,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -253,7 +253,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::DE_DEU,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{ // German DVD Trilogy collection
@@ -266,7 +266,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::DE_DEU,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{ // GOG.com version + german translation
@@ -279,7 +279,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::DE_DEU,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{ // German version of "Revolution Classic Adventures"
@@ -292,7 +292,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::DE_DEU,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -305,7 +305,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::ES_ESP,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{ // Alternate version
@@ -318,7 +318,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::ES_ESP,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -331,7 +331,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::ES_ESP,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -344,7 +344,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::IT_ITA,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -357,7 +357,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::IT_ITA,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -370,7 +370,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::IT_ITA,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -383,7 +383,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::PT_PRT,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -396,7 +396,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::PT_BRA,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -409,7 +409,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::HE_ISR,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -422,7 +422,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::PL_POL,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -435,7 +435,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::PL_POL,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -448,7 +448,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::PL_POL,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -461,7 +461,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::PL_POL,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -474,7 +474,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::PL_POL,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -487,7 +487,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::HU_HUN,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -500,7 +500,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::CS_CZE,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -513,7 +513,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::CS_CZE,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -526,7 +526,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::RU_RUS,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -539,7 +539,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::RU_RUS,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{ // Alternate version, from a DVD collection containing both BS1 and BS2
@@ -552,7 +552,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::RU_RUS,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
@@ -565,7 +565,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::RU_RUS,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{ // Korean fan translation
@@ -580,7 +580,7 @@ static const ADGameDescription gameDescriptions[] = {
 		Common::KO_KOR,
 		Common::kPlatformWindows,
 		ADGF_NO_FLAGS,
-		GUIO0()
+		GUIO1(GAMEOPTION_WINDOWS_AUDIO_MODE)
 	},
 
 	{
diff --git a/engines/sword1/metaengine.cpp b/engines/sword1/metaengine.cpp
index 164fffa5d0a..e4572e2b83c 100644
--- a/engines/sword1/metaengine.cpp
+++ b/engines/sword1/metaengine.cpp
@@ -29,10 +29,33 @@
 
 #include "common/savefile.h"
 #include "common/system.h"
+#include "common/translation.h"
 
 #include "graphics/thumbnail.h"
 #include "graphics/surface.h"
 
+namespace Sword1 {
+		
+#define GAMEOPTION_WINDOWS_AUDIO_MODE GUIO_GAMEOPTIONS1
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+	{
+		GAMEOPTION_WINDOWS_AUDIO_MODE,
+		{
+			_s("Simulate the audio engine from the Windows executable"),
+			_s("Makes the game use softer (logarithmic) audio curves, but removes fade-in and fade-out for "
+			   "sound effects, fade-in for music, and automatic music volume attenuation for when speech is playing"),
+			"windows_audio_mode",
+			false,
+			0,
+			0
+		}
+	},
+	AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+} // End of namespace Sword1
+
 class SwordMetaEngine : public AdvancedMetaEngine {
 public:
 	const char *getName() const override {
@@ -45,6 +68,9 @@ public:
 	int getMaximumSaveSlot() const override;
 	void removeSaveState(const char *target, int slot) const override;
 	SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
+	const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+		return Sword1::optionsList;
+	}
 
 	Common::Error createInstance(OSystem *syst, Engine **engine) override {
 		Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable);


Commit: 31d7b1e189633940d026344b10ee9bd134680b47
    https://github.com/scummvm/scummvm/commit/31d7b1e189633940d026344b10ee9bd134680b47
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-06-01T09:42:03+02:00

Commit Message:
NEWS: Update Sword1 section

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index dd169789557..022110670b9 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -30,6 +30,16 @@ For a more comprehensive changelog of the latest experimental code, see:
  SCUMM:
    - Added map generator from Moonbase Console for Moonbase Commander.
 
+ Sword1:
+   - Added a "Windows audio engine" mode available within the ScummVM game 
+     options, in which we simulate the DirectSound audio drivers powering the 
+     Windows 95 executable.
+     This makes the game use softer (logarithmic) audio curves, but removes 
+     fade-in and fade-out for sound effects, fade-in for music, and automatic 
+     music volume attenuation for when speech is playing. By default the setting
+     is off, since the game was developed with DOS and AIL sound drivers in mind,
+     and it is also not available for Macintosh and PSX versions.
+
  Tony:
    - Fix crash with rapid cursor switching.
 




More information about the Scummvm-git-logs mailing list