[Scummvm-git-logs] scummvm branch-2-6 -> 5ac3e22c0dc9e63496470e3f65d685973bbc3be8

athrxx noreply at scummvm.org
Sun Jul 17 16:48:42 UTC 2022


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

Summary:
f01511f2f8 SCUMM: (MM/V1) - fix walk code bug
e177d662e3 SCUMM: (iMuse) - instead of its own mutex, use the one from the mixer
887cfff87f KYRA: (HOF) - fix typo
d09cfe29eb KYRA: (HOF) - fix bug no. 13709 (Zanthia walks through a rock in Volcania)
5ac3e22c0d COMMON: fix bug no. 13703  (KYRA: Legend of Kyrandia 3: Problem with autosave)


Commit: f01511f2f815efac9bf5ef5e9f845bc834215d83
    https://github.com/scummvm/scummvm/commit/f01511f2f815efac9bf5ef5e9f845bc834215d83
Author: athrxx (athrxx at scummvm.org)
Date: 2022-07-17T18:46:19+02:00

Commit Message:
SCUMM: (MM/V1) - fix walk code bug

(in the bathroom with the mummy in the tub, applies to v1 only)

Changed paths:
    engines/scumm/actor.cpp


diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index dd25aafc114..284bf6bc8f8 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -3355,7 +3355,12 @@ bool Actor::isPlayer() {
 bool Actor_v2::isPlayer() {
 	// isPlayer() is not supported by v0
 	assert(_vm->_game.version != 0);
-	return _vm->VAR(42) <= _number && _number <= _vm->VAR(43);
+	// MM V1 PC uses VAR_EGO and not VARS 42 / 43. ZAK V1 does already have VARS 42 / 43 here.
+	// For MM NES I do not have a disasm and the room I used to test it (MM room 24) also has
+	// different box flags in the NES version, so it will not even call into this function.
+	// However, I could at least confirm that VARS 42 and 43 are both set to 0, so apparently
+	// not in use.
+	return (_vm->_game.id == GID_MANIAC && _vm->_game.version == 1) ? (_number == _vm->VAR(_vm->VAR_EGO)) : (_vm->VAR(42) <= _number && _number <= _vm->VAR(43));
 }
 
 void ActorHE::setHEFlag(int bit, int set) {


Commit: e177d662e3ccd23f5950e199e040b72fbd116412
    https://github.com/scummvm/scummvm/commit/e177d662e3ccd23f5950e199e040b72fbd116412
Author: athrxx (athrxx at scummvm.org)
Date: 2022-07-17T18:46:24+02:00

Commit Message:
SCUMM: (iMuse) - instead of its own mutex, use the one from the mixer

(avoid deadlocks in MI2/INDY4 FM-Towns and other possible targets with heavy mutex usage)

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


diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index 41e2fe8a44b..cb461a192f2 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -27,6 +27,8 @@
 #include "common/system.h"
 #include "common/endian.h"
 
+#include "audio/mixer.h"
+
 #include "scumm/imuse/imuse.h"
 #include "scumm/imuse/imuse_internal.h"
 #include "scumm/imuse/instrument.h"
@@ -41,7 +43,7 @@ namespace Scumm {
 //
 ////////////////////////////////////////
 
-IMuseInternal::IMuseInternal() :
+IMuseInternal::IMuseInternal(Common::Mutex &mutex) :
 	_native_mt32(false),
 	_enable_gs(false),
 	_isAmiga(false),
@@ -63,7 +65,8 @@ IMuseInternal::IMuseInternal() :
 	_music_volume(0),
 	_trigger_count(0),
 	_snm_trigger_index(0),
-	_pcSpeaker(false) {
+	_pcSpeaker(false),
+	_mutex(mutex) {
 	memset(_channel_volume, 0, sizeof(_channel_volume));
 	memset(_channel_volume_eff, 0, sizeof(_channel_volume_eff));
 	memset(_volchan_table, 0, sizeof(_volchan_table));
@@ -1429,7 +1432,7 @@ int IMuseInternal::get_volchan_entry(uint a) {
 }
 
 IMuseInternal *IMuseInternal::create(OSystem *syst, MidiDriver *nativeMidiDriver, MidiDriver *adlibMidiDriver) {
-	IMuseInternal *i = new IMuseInternal;
+	IMuseInternal *i = new IMuseInternal(syst->getMixer()->mutex());
 	i->initialize(syst, nativeMidiDriver, adlibMidiDriver);
 	return i;
 }
diff --git a/engines/scumm/imuse/imuse_internal.h b/engines/scumm/imuse/imuse_internal.h
index d5f2e9e51ab..9289cc546bb 100644
--- a/engines/scumm/imuse/imuse_internal.h
+++ b/engines/scumm/imuse/imuse_internal.h
@@ -418,7 +418,7 @@ protected:
 	sysexfunc _sysex;
 
 	OSystem *_system;
-	Common::Mutex _mutex;
+	Common::Mutex &_mutex;
 
 protected:
 	bool _paused;
@@ -454,7 +454,7 @@ protected:
 	DeferredCommand _deferredCommands[4];
 
 protected:
-	IMuseInternal();
+	IMuseInternal(Common::Mutex &mutex);
 	~IMuseInternal() override;
 
 	int initialize(OSystem *syst, MidiDriver *nativeMidiDriver, MidiDriver *adlibMidiDriver);


Commit: 887cfff87f832da40f6e25822116c7bd9c6ea146
    https://github.com/scummvm/scummvm/commit/887cfff87f832da40f6e25822116c7bd9c6ea146
Author: athrxx (athrxx at scummvm.org)
Date: 2022-07-17T18:46:28+02:00

Commit Message:
KYRA: (HOF) - fix typo

Changed paths:
    engines/kyra/gui/gui_hof.h


diff --git a/engines/kyra/gui/gui_hof.h b/engines/kyra/gui/gui_hof.h
index ec2d1071309..909f0a3ccd0 100644
--- a/engines/kyra/gui/gui_hof.h
+++ b/engines/kyra/gui/gui_hof.h
@@ -46,7 +46,7 @@ private:
 
 	uint8 defaultColor1() const override { return 0xCF; }
 	uint8 defaultColor2() const override { return 0xF8; }
-	uint8 menuItemLabelColor() const override { return 0xCF; }
+	uint8 menuItemLabelColor() const override { return 0xFC; }
 
 	uint8 textFieldColor1() const override { return 0xFD; }
 	uint8 textFieldColor2() const override { return 0xFA; }


Commit: d09cfe29eb86720884f80e0e3df8f8b564b97e67
    https://github.com/scummvm/scummvm/commit/d09cfe29eb86720884f80e0e3df8f8b564b97e67
Author: athrxx (athrxx at scummvm.org)
Date: 2022-07-17T18:46:31+02:00

Commit Message:
KYRA: (HOF) - fix bug no. 13709 (Zanthia walks through a rock in Volcania)

Changed paths:
    engines/kyra/graphics/screen.cpp


diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp
index 0a106d3e252..a65c6ec9f68 100644
--- a/engines/kyra/graphics/screen.cpp
+++ b/engines/kyra/graphics/screen.cpp
@@ -1728,14 +1728,14 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
 	const int ppc = (flags >> 8) & 0x3F;
 	_dsPlot = dsPlotFunc[ppc];
 	DsPlotFunc dsPlot2 = dsPlotFunc[ppc], dsPlot3 = dsPlotFunc[ppc];
-	if (flags & kDRAWSHP_PRIORITY)
-		dsPlot3 = dsPlotFunc[((flags >> 8) & 0xF7) & 0x3F];
+	if (_vm->gameFlags().gameID == GI_KYRA3 && (flags & kDRAWSHP_PRIORITY))
+		dsPlot3 = dsPlotFunc[ppc & ~8];
 
 	if (!_dsPlot || !dsPlot2 || !dsPlot3) {
 		if (!dsPlot2)
 			warning("Missing drawShape plotting method type %d", ppc);
 		if (dsPlot3 != dsPlot2 && !dsPlot3)
-			warning("Missing drawShape plotting method type %d", (((flags >> 8) & 0xF7) & 0x3F));
+			warning("Missing drawShape plotting method type %d", ppc & ~8);
 		return;
 	}
 


Commit: 5ac3e22c0dc9e63496470e3f65d685973bbc3be8
    https://github.com/scummvm/scummvm/commit/5ac3e22c0dc9e63496470e3f65d685973bbc3be8
Author: athrxx (athrxx at scummvm.org)
Date: 2022-07-17T18:46:36+02:00

Commit Message:
COMMON: fix bug no. 13703  (KYRA: Legend of Kyrandia 3: Problem with autosave)

The warning message was only based on the description of the autosave file. And that description depended on the GUI language setting, since it is a string that gets translated.

Now we also query the _saveType that is set by the metaengine...

Changed paths:
    engines/engine.cpp


diff --git a/engines/engine.cpp b/engines/engine.cpp
index a76b8e7e3e0..0975034033d 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -567,7 +567,7 @@ void Engine::handleAutoSave() {
 bool Engine::warnBeforeOverwritingAutosave() {
 	SaveStateDescriptor desc = getMetaEngine()->querySaveMetaInfos(
 		_targetName.c_str(), getAutosaveSlot());
-	if (!desc.isValid() || desc.hasAutosaveName())
+	if (!desc.isValid() || desc.isAutosave())
 		return true;
 	Common::U32StringArray altButtons;
 	altButtons.push_back(_("Overwrite"));




More information about the Scummvm-git-logs mailing list