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

lordhoto lordhoto at gmail.com
Sun Aug 21 22:04:34 CEST 2011


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:
7ed005716c SCUMM: Disable setShadowPalette for Indy4 Amiga.
a07908a001 SCUMM: Fix typo in PC Speaker output.


Commit: 7ed005716cafe36bb6801e71ff43e70a05d8c002
    https://github.com/scummvm/scummvm/commit/7ed005716cafe36bb6801e71ff43e70a05d8c002
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-08-21T12:52:49-07:00

Commit Message:
SCUMM: Disable setShadowPalette for Indy4 Amiga.

Like palManipulateInit the setShadowPalette function is a nullsub in the
original Amiga executable of Indy4.

Changed paths:
    engines/scumm/palette.cpp



diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index bf5f20f..c730512 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -650,6 +650,12 @@ void ScummEngine::setShadowPalette(int slot, int redScale, int greenScale, int b
 	int i;
 	byte *curpal;
 
+	// This function is actually a nullsub in Indy4 Amiga.
+	// It might very well be a nullsub in other Amiga games, but for now I
+	// limit this to Indy4 Amiga, since that is the only game I can check.
+	if (_game.platform == Common::kPlatformAmiga && _game.id == GID_INDY4)
+		return;
+
 	if (slot < 0 || slot >= NUM_SHADOW_PALETTE)
 		error("setShadowPalette: invalid slot %d", slot);
 


Commit: a07908a00104386f7c2df44142630d556a97e8fe
    https://github.com/scummvm/scummvm/commit/a07908a00104386f7c2df44142630d556a97e8fe
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-08-21T13:00:22-07:00

Commit Message:
SCUMM: Fix typo in PC Speaker output.

Changed paths:
    engines/scumm/imuse/pcspk.cpp
    engines/scumm/imuse/pcspk.h



diff --git a/engines/scumm/imuse/pcspk.cpp b/engines/scumm/imuse/pcspk.cpp
index 668defe..cbf3446 100644
--- a/engines/scumm/imuse/pcspk.cpp
+++ b/engines/scumm/imuse/pcspk.cpp
@@ -380,7 +380,7 @@ int16 PcSpkDriver::getEffectModLevel(int16 level, int8 mod) {
 	}
 }
 
-int16 PcSpkDriver::getRandMultipy(int16 input) {
+int16 PcSpkDriver::getRandScale(int16 input) {
 	if (_randBase & 1)
 		_randBase = (_randBase >> 1) ^ 0xB8;
 	else
@@ -470,7 +470,7 @@ void PcSpkDriver::initNextEnvelopeState(EffectEnvelope &env) {
 
 	uint16 stepCount = _effectEnvStepTable[getEffectModifier(((env.stateTargetLevels[lastState] & 0x7F) << 5) + env.modWheelSensitivity)];
 	if (env.stateTargetLevels[lastState] & 0x80)
-		stepCount = getRandMultipy(stepCount);
+		stepCount = getRandScale(stepCount);
 	if (!stepCount)
 		stepCount = 1;
 
@@ -480,7 +480,7 @@ void PcSpkDriver::initNextEnvelopeState(EffectEnvelope &env) {
 	if (lastState != 2) {
 		totalChange = getEffectModLevel(env.maxLevel, (env.stateModWheelLevels[lastState] & 0x7F) - 31);
 		if (env.stateModWheelLevels[lastState] & 0x80)
-			totalChange = getRandMultipy(totalChange);
+			totalChange = getRandScale(totalChange);
 
 		if (totalChange + env.startLevel > env.maxLevel)
 			totalChange = env.maxLevel - env.startLevel;
diff --git a/engines/scumm/imuse/pcspk.h b/engines/scumm/imuse/pcspk.h
index b87110c..195bd34 100644
--- a/engines/scumm/imuse/pcspk.h
+++ b/engines/scumm/imuse/pcspk.h
@@ -57,7 +57,7 @@ private:
 
 	static uint8 getEffectModifier(uint16 level);
 	int16 getEffectModLevel(int16 level, int8 mod);
-	int16 getRandMultipy(int16 input);
+	int16 getRandScale(int16 input);
 
 	struct EffectEnvelope {
 		uint8 state;






More information about the Scummvm-git-logs mailing list