SCI32: Fix broken sliders in Shivers settings

This problem is caused by the same invalid super call that broke
the CCTV joystick.
This commit is contained in:
Colin Snover 2017-01-18 11:41:16 -06:00
parent bd7a62e996
commit fa9523933f

View file

@ -4871,7 +4871,9 @@ static const SciScriptPatcherEntry sq5Signatures[] = {
// In SSCI, this happens to work because the uninitialized value on the stack // In SSCI, this happens to work because the uninitialized value on the stack
// happens to be 1. Disabling the super call avoids the bad doVerb call without // happens to be 1. Disabling the super call avoids the bad doVerb call without
// any apparent ill effect. // any apparent ill effect.
static const uint16 shiversSignatureJoystickFix[] = { // The same problem exists when trying to drag the volume & brightness sliders
// in the main menu. These controls are also fixed by this patch.
static const uint16 shiversSignatureSuperCall[] = {
SIG_MAGICDWORD, SIG_MAGICDWORD,
0x38, SIG_UINT16(0xa5), // pushi handleEvent 0x38, SIG_UINT16(0xa5), // pushi handleEvent
0x78, // push1 0x78, // push1
@ -4881,14 +4883,15 @@ static const uint16 shiversSignatureJoystickFix[] = {
SIG_END SIG_END
}; };
static const uint16 shiversPatchJoystickFix[] = { static const uint16 shiversPatchSuperCall[] = {
0x48, // ret 0x48, // ret
PATCH_END PATCH_END
}; };
// script, description, signature patch // script, description, signature patch
static const SciScriptPatcherEntry shiversSignatures[] = { static const SciScriptPatcherEntry shiversSignatures[] = {
{ true, 35170, "fix CCTV joystick interaction", 1, shiversSignatureJoystickFix, shiversPatchJoystickFix }, { true, 35170, "fix CCTV joystick interaction", 1, shiversSignatureSuperCall, shiversPatchSuperCall },
{ true, 990, "fix volume & brightness sliders", 2, shiversSignatureSuperCall, shiversPatchSuperCall },
SCI_SIGNATUREENTRY_TERMINATOR SCI_SIGNATUREENTRY_TERMINATOR
}; };