[Scummvm-git-logs] scummvm branch-2-2 -> 7ceaa5d4f70cff319f3df8a7311bf1f69294afa6

yuv422 yuv422 at users.noreply.github.com
Mon Sep 7 12:23:00 UTC 2020


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

Summary:
eb879e695f DRAGONS: Fixed dialog clearing in dance mini game
1cc951d18f DRAGONS: Allow quitting while talking to actors
7ceaa5d4f7 DRAGONS: Fixed coverity warning about negative indexing


Commit: eb879e695fffcbb90afd6bf8c918a5a6ba5abff0
    https://github.com/scummvm/scummvm/commit/eb879e695fffcbb90afd6bf8c918a5a6ba5abff0
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-09-07T22:21:59+10:00

Commit Message:
DRAGONS: Fixed dialog clearing in dance mini game

Changed paths:
    engines/dragons/minigame4.cpp


diff --git a/engines/dragons/minigame4.cpp b/engines/dragons/minigame4.cpp
index 3329d97b35..e246e55a75 100644
--- a/engines/dragons/minigame4.cpp
+++ b/engines/dragons/minigame4.cpp
@@ -23,6 +23,7 @@
 #include "dragons/actor.h"
 #include "dragons/dragons.h"
 #include "dragons/dragonini.h"
+#include "dragons/font.h"
 #include "dragons/talk.h"
 #include "dragons/inventory.h"
 #include "dragons/scene.h"
@@ -207,11 +208,7 @@ uint16 Minigame4::runDanceBattle() {
 			_vm->_talk->displayDialogAroundPoint(auStack2192, 0x27, 0xc, 0x3321, 0, 0x4C0C);
 			_vm->waitForFrames(0x10a);
 			_bruteActor->updateSequence(8);
-			//TODO
-//			if ((((DAT_8008e7e8 != 0) || (DAT_8008e848 != 0)) || (DAT_8008e844 != 0)) ||
-//				(DAT_8008e874 != 0)) {
-//				clearTextDialog((uint)DAT_8008e7e8, (uint)DAT_8008e844, (uint)DAT_8008e848, (uint)DAT_8008e874);
-//			}
+			_vm->_fontManager->clearText();
 			_flickerActor->waitUntilFlag8SetThenSet1000AndWaitFor4();
 			_flickerActor->updateSequence(7);
 			actorTalk(_flickerActor, 0, 0x4CC8);


Commit: 1cc951d18f6c0ba1bd9994585c2f8b3f72c5115a
    https://github.com/scummvm/scummvm/commit/1cc951d18f6c0ba1bd9994585c2f8b3f72c5115a
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-09-07T22:22:08+10:00

Commit Message:
DRAGONS: Allow quitting while talking to actors

Changed paths:
    engines/dragons/talk.cpp


diff --git a/engines/dragons/talk.cpp b/engines/dragons/talk.cpp
index 02e55f79aa..dc9e234fa5 100644
--- a/engines/dragons/talk.cpp
+++ b/engines/dragons/talk.cpp
@@ -713,6 +713,11 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
 	LAB_800317a4:
 //		CheckIfCdShellIsOpen();
 	_vm->waitForFrames(1);
+
+	if (Engine::shouldQuit()) {
+		return nullptr;
+	}
+
 	y = 0;
 	x = 0;
 	if (hasDialogEntries) {


Commit: 7ceaa5d4f70cff319f3df8a7311bf1f69294afa6
    https://github.com/scummvm/scummvm/commit/7ceaa5d4f70cff319f3df8a7311bf1f69294afa6
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-09-07T22:22:16+10:00

Commit Message:
DRAGONS: Fixed coverity warning about negative indexing

Changed paths:
    engines/dragons/sound.cpp
    engines/dragons/vabsound.cpp


diff --git a/engines/dragons/sound.cpp b/engines/dragons/sound.cpp
index 57cd47c1c8..8d0b2cf13b 100644
--- a/engines/dragons/sound.cpp
+++ b/engines/dragons/sound.cpp
@@ -434,7 +434,10 @@ void SoundManager::playSound(uint16 soundId, uint16 volumeId) {
 		if (handle) {
 			uint8 adjustedVolume = (uint8)((float)_sfxVolume * ((float)volume / 31));
 			debug(3, "Playing SFX: Master Volume %d  Adjusted Volume %d diff %f%%", _sfxVolume, adjustedVolume, 100 * ((float)volume / 31));
-			_vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, handle, vabSound->getAudioStream(program, key), -1, adjustedVolume);
+			Audio::AudioStream *audioStream = vabSound->getAudioStream(program, key);
+			if (audioStream) {
+				_vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, handle, audioStream, -1, adjustedVolume);
+			}
 		}
 	} else {
 		warning("Sound not found Program: %d, key %d", program, key);
diff --git a/engines/dragons/vabsound.cpp b/engines/dragons/vabsound.cpp
index 3f6cb63c4c..64313857e7 100644
--- a/engines/dragons/vabsound.cpp
+++ b/engines/dragons/vabsound.cpp
@@ -104,6 +104,9 @@ VabSound::~VabSound() {
 
 Audio::AudioStream *VabSound::getAudioStream(uint16 program, uint16 key) {
 	int16 vagID = getVagID(program, key);
+	if (vagID < 0) {
+		return nullptr;
+	}
 	int16 baseKey = getBaseToneKey(program, key);
 	int sampleRate = getAdjustedSampleRate(key, baseKey);
 	debug(3, "Playing program %d, Key %d, numTones: %d, vagID %d, vagOffset: %x, size: %x adjustedSampleRate: %d",




More information about the Scummvm-git-logs mailing list