[Scummvm-git-logs] scummvm master -> d5331c3c2c4b1119c524c68b1dbb3a5760f25ceb

athrxx noreply at scummvm.org
Fri Sep 2 13:37:10 UTC 2022


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:
5ac8561a63 SCUMM: fix warning
d5331c3c2c AGOS: fix some warnings


Commit: 5ac8561a63d7a27d6e86b963802767c6152e2f4d
    https://github.com/scummvm/scummvm/commit/5ac8561a63d7a27d6e86b963802767c6152e2f4d
Author: athrxx (athrxx at scummvm.org)
Date: 2022-09-02T15:36:48+02:00

Commit Message:
SCUMM: fix warning

(Wshadow)

Changed paths:
    engines/scumm/scumm.cpp
    engines/scumm/sound.h


diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index e536cd9b50a..28408d4addd 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2454,7 +2454,7 @@ void ScummEngine::scummLoop(int delta) {
 	if (_game.features & GF_AUDIOTRACKS) {
 		VAR(VAR_MUSIC_TIMER) = _sound->getCDMusicTimer();
 	} else if (VAR_MUSIC_TIMER != 0xFF) {
-		if (_sound->useReplacementAudioTracks() && _sound->getCurrentCDSound()) {
+		if (_sound->useReplacementAudio() && _sound->getCurrentCDSound()) {
 			// The replacement music timer operates on real time, adjusted to
 			// the expected length of the Loom Overture (since there are so
 			// many different recordings of it). It's completely independent of
diff --git a/engines/scumm/sound.h b/engines/scumm/sound.h
index 70925d8e12b..ea44451a5e7 100644
--- a/engines/scumm/sound.h
+++ b/engines/scumm/sound.h
@@ -154,7 +154,7 @@ public:
 	int getCurrentCDSound() const { return _currentCDSound; }
 	int getCDTrackIdFromSoundId(int soundId, int &loops, int &start);
 	bool isRolandLoom() const;
-	bool useReplacementAudioTracks() const { return _useReplacementAudioTracks; }
+	bool useReplacementAudio() const { return _useReplacementAudioTracks; }
 	void updateMusicTimer();
 	int getMusicTimer() const { return _musicTimer; }
 	int getCDMusicTimer() const { return _cdMusicTimer; }


Commit: d5331c3c2c4b1119c524c68b1dbb3a5760f25ceb
    https://github.com/scummvm/scummvm/commit/d5331c3c2c4b1119c524c68b1dbb3a5760f25ceb
Author: athrxx (athrxx at scummvm.org)
Date: 2022-09-02T15:36:48+02:00

Commit Message:
AGOS: fix some warnings

(only the obvious ones, where nothing can be broken by the fix)

Changed paths:
    engines/agos/drivers/accolade/adlib.cpp
    engines/agos/sfxparser_accolade.cpp


diff --git a/engines/agos/drivers/accolade/adlib.cpp b/engines/agos/drivers/accolade/adlib.cpp
index 6ca7840bf50..bbc2b4817e3 100644
--- a/engines/agos/drivers/accolade/adlib.cpp
+++ b/engines/agos/drivers/accolade/adlib.cpp
@@ -401,18 +401,18 @@ uint8 MidiDriver_Accolade_AdLib::calculateUnscaledVolume(uint8 channel, uint8 so
 	}
 	// Note velocity and the volume adjustment are added, clipped to normal
 	// velocity range and divided by 2 to get an OPL volume value.
-	uint8 volume = CLIP(velocity + volumeAdjustment, 0, 0x7F);
+	uint8 vol = CLIP(velocity + volumeAdjustment, 0, 0x7F);
 
 	if (!_newVersion) {
 		// The Elvira 1 version raises the volume a bit and clips the highest
 		// values.
-		volume += 0x18;
-		if (volume > 0x78)
-			volume = 0x78;
+		vol += 0x18;
+		if (vol > 0x78)
+			vol = 0x78;
 	}
 
 	// Invert the volume.
-	return 0x3F - (volume >> 1);
+	return 0x3F - (vol >> 1);
 }
 
 void MidiDriver_Accolade_AdLib::writePanning(uint8 oplChannel, OplInstrumentRhythmType rhythmType) {
diff --git a/engines/agos/sfxparser_accolade.cpp b/engines/agos/sfxparser_accolade.cpp
index 1eb54862668..ef87c32efea 100644
--- a/engines/agos/sfxparser_accolade.cpp
+++ b/engines/agos/sfxparser_accolade.cpp
@@ -259,7 +259,7 @@ void SfxParser_Accolade::processOpCode(SfxSlot *sfxSlot, byte opCode) {
 		noteOff(sfxSlot);
 		int8 note;
 		note = sfxSlot->readScript(false) & 0xFF;
-		assert(note >= 0 && note <= 0x7F);
+		assert(note >= 0);
 		sfxSlot->currentNoteFraction = note << 8;
 		noteOn(sfxSlot);
 		break;




More information about the Scummvm-git-logs mailing list