[Scummvm-cvs-logs] scummvm master -> eeafe230b9c23cb8a42ec9b2338ff61cc933b01a

m-kiewitz m_kiewitz at users.sourceforge.net
Mon Jul 11 00:23:15 CEST 2016


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:
eeafe230b9 SCI32: Fix an issue with the KQ7 subtitles script patch


Commit: eeafe230b9c23cb8a42ec9b2338ff61cc933b01a
    https://github.com/scummvm/scummvm/commit/eeafe230b9c23cb8a42ec9b2338ff61cc933b01a
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-07-11T00:26:05+02:00

Commit Message:
SCI32: Fix an issue with the KQ7 subtitles script patch

Volume was lowered, but not raised afterwards for certain cases
Original script patch was commited in
b676530528349842ad178d02a2cbe49a0facd68e

Changed paths:
    engines/sci/engine/script_patches.cpp



diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 1662c97..88bb975 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -1515,16 +1515,45 @@ static const uint16 kq7SignatureSubtitleFix2[] = {
 	0x35, 0x02,                         // ldi 02
 	0x12,                               // and
 	0x31, 0x1e,                         // bnt [skip audio volume code]
-	0x38, SIG_ADDTOOFFSET(2),           // pushi masterVolume (0212h for 2.00, 0219h for 1.51)
+	0x38, SIG_ADDTOOFFSET(+2),          // pushi masterVolume (0212h for 2.00, 0219h for 1.51)
 	0x76,                               // push0
 	0x81, 0x01,                         // lag global[1]
+	0x4a, 0x04, 0x00,                   // send 04
+	0x65, 0x32,                         // aTop curVolume
+	0x38, SIG_ADDTOOFFSET(+2),          // pushi masterVolume (0212h for 2.00, 0219h for 1.51)
+	0x78,                               // push1
+	0x67, 0x32,                         // pTos curVolume
+	0x35, 0x02,                         // ldi 02
+	0x06,                               // mul
+	0x36,                               // push
+	0x35, 0x03,                         // ldi 03
+	0x08,                               // div
+	0x36,                               // push
+	0x81, 0x01,                         // lag global[1]
+	0x4a, 0x06, 0x00,                   // send 06
+	// end of volume code
+	0x35, 0x01,                         // ldi 01
+	0x65, 0x28,                         // aTop initialized
 	SIG_END
 };
 
 static const uint16 kq7PatchSubtitleFix2[] = {
-	0x34, PATCH_UINT16(118),            // ldi 118d
+	PATCH_ADDTOOFFSET(+5),              // skip to bnt
+	0x31, 0x1b,                         // bnt [skip audio volume code]
+	PATCH_ADDTOOFFSET(+15),             // right after "aTop curVolume / pushi masterVolume / push1"
+	0x7a,                               // push2
+	0x06,                               // mul (saves 3 bytes in total)
+	0x36,                               // push
+	0x35, 0x03,                         // ldi 03
+	0x08,                               // div
+	0x36,                               // push
+	0x81, 0x01,                         // lag global[1]
+	0x4a, 0x06, 0x00,                   // send 06
+	// end of volume code
+	0x35, 118,                          // ldi 118d
 	0x65, 0x16,                         // aTop y
-	0x35, 0x00,                         // -waste 2 bytes-
+	0x78,                               // push1 (saves 1 byte)
+	0x69, 0x28,                         // sTop initialized
 	PATCH_END
 };
 






More information about the Scummvm-git-logs mailing list