[Scummvm-git-logs] scummvm master -> 76ca773ff1ceb64298b2da4885b4e291fc459f6c

yuv422 yuv422 at users.noreply.github.com
Wed Aug 26 13:52:30 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:
ef8b909fea DRAGONS: Fixed unsupported color mode when using openGL. Use RGB555 instead of ARGB1555 #11580
70a191ae0a DRAGONS: Quit game after playing end credits. #11611
76ca773ff1 DRAGONS: Update engine volumes after returning from options menu #11585


Commit: ef8b909feaecc4f429ef106b45ec163534ffddb7
    https://github.com/scummvm/scummvm/commit/ef8b909feaecc4f429ef106b45ec163534ffddb7
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-08-26T22:46:19+10:00

Commit Message:
DRAGONS: Fixed unsupported color mode when using openGL. Use RGB555 instead of ARGB1555 #11580

Changed paths:
    engines/dragons/screen.cpp


diff --git a/engines/dragons/screen.cpp b/engines/dragons/screen.cpp
index c3ce18aeaf..3c3eb4487d 100644
--- a/engines/dragons/screen.cpp
+++ b/engines/dragons/screen.cpp
@@ -30,7 +30,8 @@
 namespace Dragons {
 
 Screen::Screen() {
-	_pixelFormat = Graphics::PixelFormat(2, 5, 5, 5, 1, 10, 5, 0, 15);
+	//TODO add support for more video modes like RGB565 and RGBA555
+	_pixelFormat = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
 	initGraphics(320, 200, &_pixelFormat);
 	_backSurface = new Graphics::Surface();
 	_backSurface->create(320, 200, _pixelFormat);


Commit: 70a191ae0acf613390d457afe4f276cb6659b420
    https://github.com/scummvm/scummvm/commit/70a191ae0acf613390d457afe4f276cb6659b420
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-08-26T23:19:00+10:00

Commit Message:
DRAGONS: Quit game after playing end credits. #11611

Changed paths:
    engines/dragons/credits.cpp
    engines/dragons/specialopcodes.cpp


diff --git a/engines/dragons/credits.cpp b/engines/dragons/credits.cpp
index 361b2170c0..e97b3a490f 100644
--- a/engines/dragons/credits.cpp
+++ b/engines/dragons/credits.cpp
@@ -79,7 +79,7 @@ void Credits::update() {
 		_updateCounter = 2;
 		_yOffset = (_yOffset + 1) % 208;
 		if (_yOffset % 8 == 0) {
-			if (_curPosition <= _dataLength) {
+			if (_curPosition < _dataLength) {
 				uint32 length = strlen(_curPtr);
 				debug(3, "Credit line: %s", _curPtr);
 				convertToWideChar(line, (byte *)_curPtr, 40);
diff --git a/engines/dragons/specialopcodes.cpp b/engines/dragons/specialopcodes.cpp
index 0e766b9f72..7404cd6722 100644
--- a/engines/dragons/specialopcodes.cpp
+++ b/engines/dragons/specialopcodes.cpp
@@ -1179,7 +1179,10 @@ void SpecialOpcodes::spcEndCreditsAndRestartGame() {
 	}
 //	ReloadGameFlag = 2;
 //	Exec_FMV_RELOADTT();
-//TODO need to return to main menu here.
+
+	_vm->waitForFrames(100);
+
+	Dragons::DragonsEngine::quitGame();
 }
 
 void SpecialOpcodes::spcLoadLadyOfTheLakeActor() {


Commit: 76ca773ff1ceb64298b2da4885b4e291fc459f6c
    https://github.com/scummvm/scummvm/commit/76ca773ff1ceb64298b2da4885b4e291fc459f6c
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-08-26T23:50:57+10:00

Commit Message:
DRAGONS: Update engine volumes after returning from options menu #11585

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


diff --git a/engines/dragons/dragons.cpp b/engines/dragons/dragons.cpp
index bc7dedf0cf..fe254dcdcc 100644
--- a/engines/dragons/dragons.cpp
+++ b/engines/dragons/dragons.cpp
@@ -1797,6 +1797,11 @@ void DragonsEngine::clearAllText() {
 	_fontManager->clearText();
 }
 
+void DragonsEngine::syncSoundSettings() {
+	Engine::syncSoundSettings();
+	_sound->syncSoundSettings();
+}
+
 void (*DragonsEngine::getSceneUpdateFunction())() {
 	return _sceneUpdateFunction;
 }
diff --git a/engines/dragons/dragons.h b/engines/dragons/dragons.h
index 8ba7f5da6b..2e5d59c808 100644
--- a/engines/dragons/dragons.h
+++ b/engines/dragons/dragons.h
@@ -245,6 +245,7 @@ public:
 	bool canLoadGameStateCurrently() override;
 	Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave) override;
 	bool canSaveGameStateCurrently() override;
+	void syncSoundSettings() override;
 
 	void updateActorSequences();
 	void setFlags(uint32 flags);
diff --git a/engines/dragons/sound.cpp b/engines/dragons/sound.cpp
index 958269c47a..d8fa99af34 100644
--- a/engines/dragons/sound.cpp
+++ b/engines/dragons/sound.cpp
@@ -538,4 +538,12 @@ void SoundManager::playMusic(int16 song) {
 	delete seq;
 }
 
+void SoundManager::syncSoundSettings() {
+	_musicVolume = CLIP<int>(ConfMan.getInt("music_volume"), 0, 255);
+	_sfxVolume = CLIP<int>(ConfMan.getInt("sfx_volume"), 0, 255);
+	_speechVolume = CLIP<int>(ConfMan.getInt("speech_volume"), 0, 255);
+
+	_midiPlayer->setVolume(_musicVolume);
+}
+
 } // End of namespace Dragons
diff --git a/engines/dragons/sound.h b/engines/dragons/sound.h
index b01ad87387..3c6b242f2b 100644
--- a/engines/dragons/sound.h
+++ b/engines/dragons/sound.h
@@ -59,6 +59,7 @@ public:
 	void playSpeech(uint32 textIndex);
 	bool isSpeechPlaying();
 	void resumeMusic();
+	void syncSoundSettings();
 
 public:
 	uint16 _dat_8006bb60_sound_related;




More information about the Scummvm-git-logs mailing list