[Scummvm-git-logs] scummvm master -> 48def9a5809e0e1ca694590ac6c4f80e7cd040d7

Die4Ever noreply at scummvm.org
Mon Dec 6 10:28:02 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
48def9a580 GROOVIE: T11H option for updated credits music


Commit: 48def9a5809e0e1ca694590ac6c4f80e7cd040d7
    https://github.com/scummvm/scummvm/commit/48def9a5809e0e1ca694590ac6c4f80e7cd040d7
Author: Die4Ever (die4ever2005 at gmail.com)
Date: 2021-12-06T04:27:23-06:00

Commit Message:
GROOVIE: T11H option for updated credits music

Play the song The Final Hour during the credits instead of reusing midi songs that have already been heard during the game.

Changed paths:
    engines/groovie/detection.cpp
    engines/groovie/script.cpp


diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index d098b23cd9..8609c93e83 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -32,6 +32,7 @@ namespace Groovie {
 #define GAMEOPTION_T7G_FAST_MOVIE_SPEED  GUIO_GAMEOPTIONS1
 #define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS2
 #define GAMEOPTION_EASIER_AI GUIO_GAMEOPTIONS3
+#define GAMEOPTION_FINAL_HOUR GUIO_GAMEOPTIONS4
 
 static const DebugChannelDef debugFlagList[] = {
 	{Groovie::kDebugVideo, "Video", "Debug video and audio playback"},
@@ -127,7 +128,7 @@ static const GroovieGameDescription gameDescriptions[] = {
 			AD_ENTRY2s("script.grv", "bdb9a783d4debe477ac3856adc454c17", 62447,
 						"introd1.gjd", nullptr, -1),
 			Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE,
-			GUIO6(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI)
+			GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI, GAMEOPTION_FINAL_HOUR)
 		},
 		kGroovieT11H
 	},
@@ -139,7 +140,7 @@ static const GroovieGameDescription gameDescriptions[] = {
 			AD_ENTRY2s("script.grv", "bdb9a783d4debe477ac3856adc454c17", 62447,
 					"The 11th Hour Installer", "bcdb4040b27f15b18f39fb9e496d384a", 1002987),
 			Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
-			GUIO6(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI)
+			GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI, GAMEOPTION_FINAL_HOUR)
 		},
 		kGroovieT11H
 	},
@@ -151,7 +152,7 @@ static const GroovieGameDescription gameDescriptions[] = {
 			AD_ENTRY2s("script.grv", "bdb9a783d4debe477ac3856adc454c17", 62447,
 					"el01.mov", "70f42dfc25b1488a08011dc45bb5145d", 6039),
 			Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
-			GUIO6(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI)
+			GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_EASIER_AI, GAMEOPTION_FINAL_HOUR)
 		},
 		kGroovieT11H
 	},
@@ -401,6 +402,16 @@ static const ADExtraGuiOptionsMap optionsList[] = {
 		}
 	},
 
+	{
+		GAMEOPTION_FINAL_HOUR,
+		{
+			_s("Updated Credits Music"),
+			_s("Play the song The Final Hour during the credits instead of reusing MIDI songs"),
+			"credits_music",
+			false
+		}
+	},
+
 	AD_EXTRA_GUI_OPTIONS_TERMINATOR
 };
 // clang-format on
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 407ed083e6..a6aaeaa9be 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -212,7 +212,7 @@ bool Script::loadScript(Common::String filename) {
 		// when the skulls ask you to adjust your brightness, play the song Mr Death
 		memset(_code + 0x25, 1, 0x2F - 0x25);// set nop
 		_code[0x25] = 0x56;// o2_playsound
-		// o2_playsound resource id 851, 32bit uint
+		// o2_playsound resource id 851, uint32
 		_code[0x26] = 0x53;
 		_code[0x27] = 0x03;
 		_code[0x28] = 0;
@@ -221,6 +221,24 @@ bool Script::loadScript(Common::String filename) {
 		_code[0x2A] = 0;
 		// o2_playsound val3
 		_code[0x2B] = 0;
+	} else if (_version == kGroovieT11H && filename.equals("itsawrap.grv") && _codeSize == 517 && ConfMan.getBool("credits_music")) {
+		// write nops to get rid of MIDI Control Stop and PlaySong
+		memset(_code + 0x000, 1, 5);// this one is only a PlaySong
+		memset(_code + 0x0B4, 1, 10);
+		memset(_code + 0x0136, 1, 10);
+		memset(_code + 0x019A, 1, 10);
+		memset(_code + 0x1FE, 1, 5);// this one is only a MIDI Control Stop
+		// play The Final Hour instead
+		_code[0x00] = 0x56; // o2_playsound
+		// o2_playsound resource id 845, uint32
+		_code[0x01] = 0x4D;
+		_code[0x02] = 0x03;
+		_code[0x03] = 0;
+		_code[0x04] = 0;
+		// o2_playsound loops
+		_code[0x05] = 1;
+		// o2_playsound val3
+		_code[0x06] = 0;
 	}
 
 	// Initialize the script




More information about the Scummvm-git-logs mailing list