[Scummvm-git-logs] scummvm master -> 5f525b144165421e908eb388ddbcca87cdd792ce
bluegr
noreply at scummvm.org
Fri Oct 25 20:10:59 UTC 2024
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:
cbd2d79430 AGI: Make predictive input dialogue on mouse click optional
d085ff82a4 AGI: Expose predictive dialog option for remaining game versions
5f525b1441 AGI: Make predictive dialog option disabled by default
Commit: cbd2d79430d2edd886edbb2aed5aad093743482a
https://github.com/scummvm/scummvm/commit/cbd2d79430d2edd886edbb2aed5aad093743482a
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-10-25T23:10:54+03:00
Commit Message:
AGI: Make predictive input dialogue on mouse click optional
This affects only showing the predictive input dialogue on mouse left click into an input field or prompt line
Changed paths:
engines/agi/agi.cpp
engines/agi/agi.h
engines/agi/detection.h
engines/agi/detection_tables.h
engines/agi/keyboard.cpp
engines/agi/metaengine.cpp
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 7e076bfecab..512de781334 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -418,6 +418,8 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
_game.mouseEnabled = true;
_game.mouseHidden = false;
+ _game.predictiveDlgOnMouseClick = true;
+
// don't check for Amiga, Amiga doesn't allow disabling mouse support. It's mandatory.
if (!ConfMan.getBool("mousesupport")) {
// we effectively disable the mouse for games, that explicitly do not want mouse support to be enabled
@@ -425,6 +427,13 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
_game.mouseHidden = true;
}
+ // Since this option is a late addition to the engine, assume its value to be true if it's not set in the config file
+ // This is done for consistency with the previous behavior (before making this feature optional)
+ ConfMan.registerDefault("predictivedlgonmouseclick", true);
+ if (!ConfMan.getBool("predictivedlgonmouseclick")) {
+ _game.predictiveDlgOnMouseClick = false;
+ }
+
_game._vm = this;
_game.gfxMode = true;
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index e342978c9c8..b8d18521251 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -433,6 +433,7 @@ struct AgiGame {
Common::Rect mouseFence; /**< rectangle set by fence.mouse command */
bool mouseEnabled; /**< if mouse is supposed to be active */
bool mouseHidden; /**< if mouse is currently hidden */
+ bool predictiveDlgOnMouseClick; /**< if predictive dialog is enabled for mouse clicks */
// IF condition handling
bool testResult;
@@ -521,6 +522,7 @@ struct AgiGame {
// mouseFence cleared by Common::Rect constructor
mouseEnabled = false;
mouseHidden = false;
+ predictiveDlgOnMouseClick = false;
testResult = false;
diff --git a/engines/agi/detection.h b/engines/agi/detection.h
index c6746ea49a0..d7f652bff2a 100644
--- a/engines/agi/detection.h
+++ b/engines/agi/detection.h
@@ -37,13 +37,14 @@ struct AGIGameDescription {
uint16 version;
};
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-#define GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE GUIO_GAMEOPTIONS2
-#define GAMEOPTION_DISABLE_MOUSE GUIO_GAMEOPTIONS3
-#define GAMEOPTION_USE_HERCULES_FONT GUIO_GAMEOPTIONS4
-#define GAMEOPTION_COMMAND_PROMPT_WINDOW GUIO_GAMEOPTIONS5
-#define GAMEOPTION_APPLE2GS_ADD_SPEED_MENU GUIO_GAMEOPTIONS6
-#define GAMEOPTION_COPY_PROTECTION GUIO_GAMEOPTIONS7
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+#define GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE GUIO_GAMEOPTIONS2
+#define GAMEOPTION_DISABLE_MOUSE GUIO_GAMEOPTIONS3
+#define GAMEOPTION_USE_HERCULES_FONT GUIO_GAMEOPTIONS4
+#define GAMEOPTION_COMMAND_PROMPT_WINDOW GUIO_GAMEOPTIONS5
+#define GAMEOPTION_APPLE2GS_ADD_SPEED_MENU GUIO_GAMEOPTIONS6
+#define GAMEOPTION_COPY_PROTECTION GUIO_GAMEOPTIONS7
+#define GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE GUIO_GAMEOPTIONS8
// TODO: properly implement GAMEOPTIONs
} // End of namespace Agi
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index c7971fd2f18..bcdd4c94b6c 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -23,13 +23,13 @@
namespace Agi {
-#define GAMEOPTIONS_DEFAULT GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
-#define GAMEOPTIONS_DEFAULT_CP GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GAMEOPTION_COPY_PROTECTION)
+#define GAMEOPTIONS_DEFAULT GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
+#define GAMEOPTIONS_DEFAULT_CP GUIO6(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GAMEOPTION_COPY_PROTECTION)
#define GAMEOPTIONS_AMIGA GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
#define GAMEOPTIONS_AMIGA_CP GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GAMEOPTION_COPY_PROTECTION)
-#define GAMEOPTIONS_APPLE2GS GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW, GAMEOPTION_APPLE2GS_ADD_SPEED_MENU)
-#define GAMEOPTIONS_APPLE2GS_CP GUIO6(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW, GAMEOPTION_APPLE2GS_ADD_SPEED_MENU, GAMEOPTION_COPY_PROTECTION)
-#define GAMEOPTIONS_VGA GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GUIO_RENDERVGA)
+#define GAMEOPTIONS_APPLE2GS GUIO6(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW, GAMEOPTION_APPLE2GS_ADD_SPEED_MENU)
+#define GAMEOPTIONS_APPLE2GS_CP GUIO7(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW, GAMEOPTION_APPLE2GS_ADD_SPEED_MENU, GAMEOPTION_COPY_PROTECTION)
+#define GAMEOPTIONS_VGA GUIO6(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GUIO_RENDERVGA)
#define GAMEOPTIONS_FANMADE_MOUSE GUIO3(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
#define GAMEOPTIONS_FANMADE_MOUSE_VGA GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GUIO_RENDERVGA)
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index a79b14b1fd9..3c19773ee8e 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -422,7 +422,9 @@ bool AgiEngine::handleMouseClicks(uint16 &key) {
if (displayLineRect.contains(_mouse.pos)) {
// and user clicked within the line of the prompt
- showPredictiveDialog();
+ if (_game.predictiveDlgOnMouseClick) {
+ showPredictiveDialog();
+ }
key = 0; // eat event
return true;
@@ -444,7 +446,9 @@ bool AgiEngine::handleMouseClicks(uint16 &key) {
Common::Rect displayRect = _gfx->getFontRectForDisplayScreen(stringColumn, stringRow, stringMaxLen, 1);
if (displayRect.contains(_mouse.pos)) {
// user clicked inside the input space
- showPredictiveDialog();
+ if (_game.predictiveDlgOnMouseClick) {
+ showPredictiveDialog();
+ }
key = 0; // eat event
return true;
diff --git a/engines/agi/metaengine.cpp b/engines/agi/metaengine.cpp
index 72dd0756884..5e91b8a142d 100644
--- a/engines/agi/metaengine.cpp
+++ b/engines/agi/metaengine.cpp
@@ -137,6 +137,18 @@ static const ADExtraGuiOptionsMap optionsList[] = {
"mousesupport",
true,
0,
+ 1
+ }
+ },
+
+ {
+ GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,
+ {
+ _s("Predictive Input Dialogue on mouse click"),
+ _s("Enables the assisitve Predictive Input Dialogue specifically for when clicking the left mouse button within text input fields.\nThe Predictive Input Dialogue can still be activated on demand if there's a specified key mapping for it"),
+ "predictivedlgonmouseclick",
+ true,
+ 1,
0
}
},
Commit: d085ff82a411acbaa77657368f5518f36dfb8469
https://github.com/scummvm/scummvm/commit/d085ff82a411acbaa77657368f5518f36dfb8469
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-10-25T23:10:54+03:00
Commit Message:
AGI: Expose predictive dialog option for remaining game versions
These remaining versions don't have the enable mouse support option exposed
In these versions, mouse support is enabled by default and cannot be turned off from the GUI. The user is now given the option
to enable or disable the predictive dialog popup on mouse click for these versions too.
Changed paths:
engines/agi/detection_tables.h
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index bcdd4c94b6c..0fa0197f824 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -25,13 +25,13 @@ namespace Agi {
#define GAMEOPTIONS_DEFAULT GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
#define GAMEOPTIONS_DEFAULT_CP GUIO6(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GAMEOPTION_COPY_PROTECTION)
-#define GAMEOPTIONS_AMIGA GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
-#define GAMEOPTIONS_AMIGA_CP GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GAMEOPTION_COPY_PROTECTION)
+#define GAMEOPTIONS_AMIGA GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
+#define GAMEOPTIONS_AMIGA_CP GUIO6(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GAMEOPTION_COPY_PROTECTION)
#define GAMEOPTIONS_APPLE2GS GUIO6(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW, GAMEOPTION_APPLE2GS_ADD_SPEED_MENU)
#define GAMEOPTIONS_APPLE2GS_CP GUIO7(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW, GAMEOPTION_APPLE2GS_ADD_SPEED_MENU, GAMEOPTION_COPY_PROTECTION)
#define GAMEOPTIONS_VGA GUIO6(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GUIO_RENDERVGA)
-#define GAMEOPTIONS_FANMADE_MOUSE GUIO3(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
-#define GAMEOPTIONS_FANMADE_MOUSE_VGA GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GUIO_RENDERVGA)
+#define GAMEOPTIONS_FANMADE_MOUSE GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
+#define GAMEOPTIONS_FANMADE_MOUSE_VGA GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GUIO_RENDERVGA)
#define GAME_LVFPN(id,extra,fname,md5,size,lang,ver,features,gid,platform,interp,guioptions) { \
{ \
Commit: 5f525b144165421e908eb388ddbcca87cdd792ce
https://github.com/scummvm/scummvm/commit/5f525b144165421e908eb388ddbcca87cdd792ce
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-10-25T23:10:54+03:00
Commit Message:
AGI: Make predictive dialog option disabled by default
Also make the predictive dialog option independent from the mouse support option.
Changed paths:
engines/agi/agi.cpp
engines/agi/metaengine.cpp
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 512de781334..abcc40af76a 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -418,7 +418,7 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
_game.mouseEnabled = true;
_game.mouseHidden = false;
- _game.predictiveDlgOnMouseClick = true;
+ _game.predictiveDlgOnMouseClick = false;
// don't check for Amiga, Amiga doesn't allow disabling mouse support. It's mandatory.
if (!ConfMan.getBool("mousesupport")) {
@@ -427,11 +427,9 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
_game.mouseHidden = true;
}
- // Since this option is a late addition to the engine, assume its value to be true if it's not set in the config file
- // This is done for consistency with the previous behavior (before making this feature optional)
- ConfMan.registerDefault("predictivedlgonmouseclick", true);
- if (!ConfMan.getBool("predictivedlgonmouseclick")) {
- _game.predictiveDlgOnMouseClick = false;
+ ConfMan.registerDefault("predictivedlgonmouseclick", false);
+ if (ConfMan.getBool("predictivedlgonmouseclick")) {
+ _game.predictiveDlgOnMouseClick = true;
}
_game._vm = this;
diff --git a/engines/agi/metaengine.cpp b/engines/agi/metaengine.cpp
index 5e91b8a142d..9cff4d49e56 100644
--- a/engines/agi/metaengine.cpp
+++ b/engines/agi/metaengine.cpp
@@ -137,7 +137,7 @@ static const ADExtraGuiOptionsMap optionsList[] = {
"mousesupport",
true,
0,
- 1
+ 0
}
},
@@ -145,10 +145,10 @@ static const ADExtraGuiOptionsMap optionsList[] = {
GAMEOPTION_ENABLE_PREDICTIVE_FOR_MOUSE,
{
_s("Predictive Input Dialogue on mouse click"),
- _s("Enables the assisitve Predictive Input Dialogue specifically for when clicking the left mouse button within text input fields.\nThe Predictive Input Dialogue can still be activated on demand if there's a specified key mapping for it"),
+ _s("Enables the assistive Predictive Input Dialogue specifically for when clicking the left mouse button within text input fields.\nThe Predictive Input Dialogue can still be activated on demand if there's a specified key mapping for it"),
"predictivedlgonmouseclick",
- true,
- 1,
+ false,
+ 0,
0
}
},
More information about the Scummvm-git-logs
mailing list