[Scummvm-git-logs] scummvm master -> 9d7100d4f4daff924774729fda27a5aba0cf54be

athrxx mail at floriankagerer.de
Wed Jan 23 20:42:03 CET 2019


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:
e8ee079b86 KYRA: (EOB) - allow swapping L/R buttons via GMM
9d7100d4f4 KYRA: silence warning


Commit: e8ee079b86f683f5faa4cb54f5f358ff7a684081
    https://github.com/scummvm/scummvm/commit/e8ee079b86f683f5faa4cb54f5f358ff7a684081
Author: athrxx (athrxx at scummvm.org)
Date: 2019-01-23T20:36:05+01:00

Commit Message:
KYRA: (EOB) - allow swapping L/R buttons via GMM

This adds an engine specific GMM option that allows to swap L/R mouse button actions when clicking on the character weapon slots (which might improve the game experience for tablet users).

Changed paths:
    engines/kyra/detection.cpp
    engines/kyra/detection_tables.h
    engines/kyra/eobcommon.cpp
    engines/kyra/eobcommon.h
    engines/kyra/gui_eob.cpp


diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 9f1b694..0c345cc 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -130,6 +130,18 @@ const ADExtraGuiOptionsMap gameGuiOptions[] = {
 			true
 		}
 	},
+
+	{
+		GAMEOPTION_EOB_MOUSESWAP,
+		{
+			// I18N: L/R stands for Left/Right
+			_s("Fight Button L/R Swap"),
+			_s("Left button to attack, right button to pick up items"),
+			"mousebtswap",
+			false
+		}
+	},
+
 #endif
 
 	AD_EXTRA_GUI_OPTIONS_TERMINATOR
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 81dd56f..da0a2de 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -71,6 +71,7 @@ namespace {
 #define GAMEOPTION_LOL_CURSORS    GUIO_GAMEOPTIONS5
 
 #define GAMEOPTION_EOB_HPGRAPHS   GUIO_GAMEOPTIONS6
+#define GAMEOPTION_EOB_MOUSESWAP  GUIO_GAMEOPTIONS7
 
 const KYRAGameDescription adGameDescs[] = {
 	/* disable these targets until they get supported
@@ -1616,7 +1617,7 @@ const KYRAGameDescription adGameDescs[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_NO_FLAGS,
-			GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS)
+			GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS, GAMEOPTION_EOB_MOUSESWAP)
 		},
 		EOB_FLAGS
 	},
@@ -1632,7 +1633,7 @@ const KYRAGameDescription adGameDescs[] = {
 			Common::DE_DEU,
 			Common::kPlatformDOS,
 			ADGF_NO_FLAGS,
-			GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS)
+			GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS, GAMEOPTION_EOB_MOUSESWAP)
 		},
 		EOB_FLAGS
 	},
@@ -1648,7 +1649,7 @@ const KYRAGameDescription adGameDescs[] = {
 			Common::IT_ITA,
 			Common::kPlatformDOS,
 			ADGF_NO_FLAGS,
-			GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS)
+			GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS, GAMEOPTION_EOB_MOUSESWAP)
 		},
 		EOB_FLAGS
 	},
@@ -1664,7 +1665,7 @@ const KYRAGameDescription adGameDescs[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_NO_FLAGS,
-			GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GAMEOPTION_EOB_HPGRAPHS)
+			GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GAMEOPTION_EOB_HPGRAPHS, GAMEOPTION_EOB_MOUSESWAP)
 		},
 		EOB2_FLAGS
 	},
@@ -1680,7 +1681,7 @@ const KYRAGameDescription adGameDescs[] = {
 			Common::DE_DEU,
 			Common::kPlatformDOS,
 			ADGF_NO_FLAGS,
-			GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GAMEOPTION_EOB_HPGRAPHS)
+			GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GAMEOPTION_EOB_HPGRAPHS, GAMEOPTION_EOB_MOUSESWAP)
 		},
 		EOB2_FLAGS
 	},
@@ -1696,7 +1697,7 @@ const KYRAGameDescription adGameDescs[] = {
 				Common::JA_JPN,
 				Common::kPlatformFMTowns,
 				ADGF_NO_FLAGS,
-				GUIO4(GUIO_NOSPEECH, GUIO_MIDITOWNS, GUIO_RENDERFMTOWNS, GAMEOPTION_EOB_HPGRAPHS)
+				GUIO5(GUIO_NOSPEECH, GUIO_MIDITOWNS, GUIO_RENDERFMTOWNS, GAMEOPTION_EOB_HPGRAPHS, GAMEOPTION_EOB_MOUSESWAP)
 		},
 		EOB2_FMTOWNS_FLAGS
 	},
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index 11bdafa..9f7715b 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -121,6 +121,7 @@ EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags)
 	_exchangeCharacterId = -1;
 	_charExchangeSwap = 0;
 	_configHpBarGraphs = true;
+	_configMouseBtSwap = false;
 
 	memset(_dialogueLastBitmap, 0, 13);
 	_npcSequenceSub = 0;
@@ -595,11 +596,13 @@ Common::Error EoBCoreEngine::go() {
 void EoBCoreEngine::registerDefaultSettings() {
 	KyraEngine_v1::registerDefaultSettings();
 	ConfMan.registerDefault("hpbargraphs", true);
+	ConfMan.registerDefault("mousebtswap", false);
 	ConfMan.registerDefault("importOrigSaves", true);
 }
 
 void EoBCoreEngine::readSettings() {
 	_configHpBarGraphs = ConfMan.getBool("hpbargraphs");
+	_configMouseBtSwap = ConfMan.getBool("mousebtswap");
 	_configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1;
 	_configMusic = _configSounds ? 1 : 0;
 
@@ -609,6 +612,7 @@ void EoBCoreEngine::readSettings() {
 
 void EoBCoreEngine::writeSettings() {
 	ConfMan.setBool("hpbargraphs", _configHpBarGraphs);
+	ConfMan.setBool("mousebtswap", _configMouseBtSwap);
 	ConfMan.setBool("sfx_mute", _configSounds == 0);
 
 	if (_sound) {
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index e7b0f0d..02627bf 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -767,6 +767,7 @@ protected:
 	const uint8 **_compassShapes;
 	uint8 _charExchangeSwap;
 	bool _configHpBarGraphs;
+	bool _configMouseBtSwap;
 
 	Graphics::Surface _thumbNail;
 
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index 4b10021..c942f67 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -873,7 +873,9 @@ int EoBCoreEngine::clickedWeaponSlot(Button *button) {
 	static const uint8 sY[] = { 27, 27, 79, 79, 131, 131 };
 	int slot = sY[button->arg] > _mouseY ? 0 : 1;
 
-	if ((_gui->_flagsMouseLeft & 0x7F) == 1)
+	uint16 flags = _configMouseBtSwap ? _gui->_flagsMouseRight : _gui->_flagsMouseLeft;
+
+	if ((flags & 0x7F) == 1)
 		gui_processWeaponSlotClickLeft(button->arg, slot);
 	else
 		gui_processWeaponSlotClickRight(button->arg, slot);


Commit: 9d7100d4f4daff924774729fda27a5aba0cf54be
    https://github.com/scummvm/scummvm/commit/9d7100d4f4daff924774729fda27a5aba0cf54be
Author: athrxx (athrxx at scummvm.org)
Date: 2019-01-23T20:37:21+01:00

Commit Message:
KYRA: silence warning

Changed paths:
    engines/kyra/debugger.cpp


diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 054a752..d87106c 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -642,7 +642,7 @@ bool Debugger_EoB::cmdPrintMap(int, const char **) {
 		if (s == 3 || s == 4)
 			c = '/';
 		else if (s == 2 || s == 8)
-			c = '°';
+			c = (uint8)'°';
 		else if (f & 8)
 			c = 216;
 		else if (f & 1)





More information about the Scummvm-git-logs mailing list