[Scummvm-git-logs] scummvm master -> edc170c63d2e71db992bc3e2ce75bb5cb9cd8600
sev-
noreply at scummvm.org
Thu Feb 23 13:39:38 UTC 2023
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:
31c22852fd DIRECTOR: Added more debug output
c7d0594834 COMMON: Renumerated GIOs and added clarification comments
c138d170a5 COMMON: Check GUIO constants for duplicates
d80de9511e ENGNES: Reduced MASSIVE and unneeded dependency from gui_options.h header
edc170c63d AGI: Reduce header dependency
Commit: 31c22852fdedd90aa78636562cb46361ae6015b9
https://github.com/scummvm/scummvm/commit/31c22852fdedd90aa78636562cb46361ae6015b9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-23T13:26:49+01:00
Commit Message:
DIRECTOR: Added more debug output
Changed paths:
engines/director/window.cpp
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 5345bb9cdde..aec10bee2ca 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -297,6 +297,8 @@ void Window::loadNewSharedCast(Cast *previousSharedCast) {
// Clear those previous widget pointers
previousSharedCast->releaseCastMemberWidget();
_currentMovie->_sharedCast = previousSharedCast;
+
+ debugC(1, kDebugLoading, "Skipping loading already loaded shared cast, path: %s", previousSharedCastPath.c_str());
return;
}
Commit: c7d05948340b09e7b84cf0e26d99ee45aa54f570
https://github.com/scummvm/scummvm/commit/c7d05948340b09e7b84cf0e26d99ee45aa54f570
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-23T13:37:00+01:00
Commit Message:
COMMON: Renumerated GIOs and added clarification comments
Changed paths:
common/gui_options.h
diff --git a/common/gui_options.h b/common/gui_options.h
index eda1c48689f..be0c6577975 100644
--- a/common/gui_options.h
+++ b/common/gui_options.h
@@ -22,6 +22,11 @@
#ifndef COMMON_GUI_OPTIONS_H
#define COMMON_GUI_OPTIONS_H
+// This is an equivalent of an enum. Feel free to renumerate them
+// They are used only internally for making lookups cheaper and for
+// possibility to concatenate them as codes to the detection tables
+// See the GUIOnn() macros below
+
#define GUIO_NONE "\x00"
#define GUIO_NOSUBTITLES "\x01"
#define GUIO_NOMUSIC "\x02"
@@ -58,50 +63,51 @@
#define GUIO_RENDERAPPLE2GS "\x21"
#define GUIO_RENDERATARIST "\x22"
#define GUIO_RENDERMACINTOSH "\x23"
-#define GUIO_RENDERMACINTOSHBW "\x28" // Setting this to 0x28 is not ideal, but there is no free slot left. Maybe we need to migrate to 3-digit numbers...
-#define GUIO_RENDERCGACOMP "\x29"
-#define GUIO_RENDERCGABW "\x2a"
+#define GUIO_RENDERMACINTOSHBW "\x24"
+#define GUIO_RENDERCGACOMP "\x25"
+#define GUIO_RENDERCGABW "\x26"
-#define GUIO_LINKSPEECHTOSFX "\x24"
-#define GUIO_LINKMUSICTOSFX "\x25"
-#define GUIO_NOSPEECHVOLUME "\x26"
+#define GUIO_LINKSPEECHTOSFX "\x30"
+#define GUIO_LINKMUSICTOSFX "\x31"
+#define GUIO_NOSPEECHVOLUME "\x32"
-#define GUIO_NOLANG "\x27"
+#define GUIO_NOLANG "\x33"
// Special GUIO flags for the AdvancedDetector's caching of game specific
// options.
-#define GUIO_GAMEOPTIONS1 "\x30"
-#define GUIO_GAMEOPTIONS2 "\x31"
-#define GUIO_GAMEOPTIONS3 "\x32"
-#define GUIO_GAMEOPTIONS4 "\x33"
-#define GUIO_GAMEOPTIONS5 "\x34"
-#define GUIO_GAMEOPTIONS6 "\x35"
-#define GUIO_GAMEOPTIONS7 "\x36"
-#define GUIO_GAMEOPTIONS8 "\x37"
-#define GUIO_GAMEOPTIONS9 "\x38"
-#define GUIO_GAMEOPTIONS10 "\x39"
-#define GUIO_GAMEOPTIONS11 "\x3a"
-#define GUIO_GAMEOPTIONS12 "\x3b"
-#define GUIO_GAMEOPTIONS13 "\x3c"
-#define GUIO_GAMEOPTIONS14 "\x3d"
-#define GUIO_GAMEOPTIONS15 "\x3e"
-#define GUIO_GAMEOPTIONS16 "\x3f"
-#define GUIO_GAMEOPTIONS17 "\x40"
-#define GUIO_GAMEOPTIONS18 "\x41"
-#define GUIO_GAMEOPTIONS19 "\x42"
-#define GUIO_GAMEOPTIONS20 "\x43"
-#define GUIO_GAMEOPTIONS21 "\x44"
-#define GUIO_GAMEOPTIONS22 "\x45"
-#define GUIO_GAMEOPTIONS23 "\x46"
-#define GUIO_GAMEOPTIONS24 "\x47"
-#define GUIO_GAMEOPTIONS25 "\x48"
-#define GUIO_GAMEOPTIONS26 "\x49"
-#define GUIO_GAMEOPTIONS27 "\x4a"
-#define GUIO_GAMEOPTIONS28 "\x4b"
-#define GUIO_GAMEOPTIONS29 "\x4c"
-#define GUIO_GAMEOPTIONS30 "\x4d"
-#define GUIO_GAMEOPTIONS31 "\x4e"
-#define GUIO_GAMEOPTIONS32 "\x4f"
+// Putting them to the end of the range so less renumerations required
+#define GUIO_GAMEOPTIONS1 "\xe0"
+#define GUIO_GAMEOPTIONS2 "\xe1"
+#define GUIO_GAMEOPTIONS3 "\xe2"
+#define GUIO_GAMEOPTIONS4 "\xe3"
+#define GUIO_GAMEOPTIONS5 "\xe4"
+#define GUIO_GAMEOPTIONS6 "\xe5"
+#define GUIO_GAMEOPTIONS7 "\xe6"
+#define GUIO_GAMEOPTIONS8 "\xe7"
+#define GUIO_GAMEOPTIONS9 "\xe8"
+#define GUIO_GAMEOPTIONS10 "\xe9"
+#define GUIO_GAMEOPTIONS11 "\xea"
+#define GUIO_GAMEOPTIONS12 "\xeb"
+#define GUIO_GAMEOPTIONS13 "\xec"
+#define GUIO_GAMEOPTIONS14 "\xed"
+#define GUIO_GAMEOPTIONS15 "\xee"
+#define GUIO_GAMEOPTIONS16 "\xef"
+#define GUIO_GAMEOPTIONS17 "\xf0"
+#define GUIO_GAMEOPTIONS18 "\xf1"
+#define GUIO_GAMEOPTIONS19 "\xf2"
+#define GUIO_GAMEOPTIONS20 "\xf3"
+#define GUIO_GAMEOPTIONS21 "\xf4"
+#define GUIO_GAMEOPTIONS22 "\xf5"
+#define GUIO_GAMEOPTIONS23 "\xf6"
+#define GUIO_GAMEOPTIONS24 "\xf7"
+#define GUIO_GAMEOPTIONS25 "\xf8"
+#define GUIO_GAMEOPTIONS26 "\xf9"
+#define GUIO_GAMEOPTIONS27 "\xfa"
+#define GUIO_GAMEOPTIONS28 "\xfb"
+#define GUIO_GAMEOPTIONS29 "\xfc"
+#define GUIO_GAMEOPTIONS30 "\xfd"
+#define GUIO_GAMEOPTIONS31 "\xfe"
+#define GUIO_GAMEOPTIONS32 "\xff"
#define GUIO0() (GUIO_NONE)
#define GUIO1(a) (a)
Commit: c138d170a5e7659d0ccdb66323bbf1c83c133fc9
https://github.com/scummvm/scummvm/commit/c138d170a5e7659d0ccdb66323bbf1c83c133fc9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-23T13:52:20+01:00
Commit Message:
COMMON: Check GUIO constants for duplicates
Changed paths:
common/gui_options.cpp
diff --git a/common/gui_options.cpp b/common/gui_options.cpp
index 6191adb7e1b..16d92d05f3f 100644
--- a/common/gui_options.cpp
+++ b/common/gui_options.cpp
@@ -115,6 +115,25 @@ const struct GameOpt {
};
bool checkGameGUIOption(const String &option, const String &str) {
+#ifndef RELEASE_BUILD
+ static bool firstRun = true;
+
+ // Check GUIO constants for duplicates
+ if (firstRun) {
+ HashMap<String, bool, CaseSensitiveString_Hash, CaseSensitiveString_EqualTo> allOptions;
+
+ for (int i = 0; g_gameOptions[i].desc; i++) {
+ if (allOptions.contains(g_gameOptions[i].option)) {
+ error("Duplicate GUIO constant, id: \\x%02x, renumerate them", g_gameOptions[i].option[0]);
+ }
+
+ allOptions[g_gameOptions[i].option] = true;
+ }
+
+ firstRun = false;
+ }
+#endif
+
for (int i = 0; g_gameOptions[i].desc; i++) {
if (option.contains(g_gameOptions[i].option)) {
if (str.contains(g_gameOptions[i].desc))
@@ -147,7 +166,7 @@ const String getGameGUIOptionsDescription(const String &options) {
String res;
for (int i = 0; g_gameOptions[i].desc; i++)
- if (options.contains(g_gameOptions[i].option[0]))
+ if (options.contains(g_gameOptions[i].option[0]))
res += String(g_gameOptions[i].desc) + " ";
res.trim();
Commit: d80de9511e4f84d4f8755f9187b0216742c1383d
https://github.com/scummvm/scummvm/commit/d80de9511e4f84d4f8755f9187b0216742c1383d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-23T14:03:08+01:00
Commit Message:
ENGNES: Reduced MASSIVE and unneeded dependency from gui_options.h header
Changed paths:
engines/advancedDetector.h
engines/metaengine.cpp
engines/metaengine.h
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 7deb5a1a20f..721b53cc22e 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -27,7 +27,7 @@
#include "common/hash-str.h"
-#include "common/gui_options.h" // FIXME: Temporary hack?
+#include "common/gui_options.h" // Keep it here, so detection tables can refer to them
namespace Common {
class Error;
diff --git a/engines/metaengine.cpp b/engines/metaengine.cpp
index 32755ea4625..b1a8b05eacb 100644
--- a/engines/metaengine.cpp
+++ b/engines/metaengine.cpp
@@ -25,6 +25,7 @@
#include "backends/keymapper/keymap.h"
#include "backends/keymapper/standard-actions.h"
+#include "common/gui_options.h"
#include "common/savefile.h"
#include "common/system.h"
#include "common/translation.h"
@@ -36,6 +37,10 @@
#include "graphics/managed_surface.h"
#include "graphics/thumbnail.h"
+Common::String MetaEngineDetection::parseAndCustomizeGuiOptions(const Common::String &optionsString, const Common::String &domain) const {
+ return parseGameGUIOptions(optionsString);
+}
+
Common::String MetaEngine::getSavegameFile(int saveGameIdx, const char *target) const {
if (!target)
target = getName();
@@ -180,6 +185,10 @@ bool MetaEngine::hasFeature(MetaEngineFeature f) const {
(f == kSavesUseExtendedFormat);
}
+/////////////////////////////////////////
+//// Extended Saves
+/////////////////////////////////////////
+
void MetaEngine::appendExtendedSave(Common::OutSaveFile *saveFile, uint32 playtime,
Common::String desc, bool isAutosave) {
appendExtendedSaveToStream(saveFile, playtime, desc, isAutosave);
@@ -221,8 +230,7 @@ void MetaEngine::appendExtendedSaveToStream(Common::WriteStream *saveFile, uint3
saveFile->writeUint32LE(headerPos); // Store where the header starts
}
-bool MetaEngine::copySaveFileToFreeSlot(const char *target, int slot)
-{
+bool MetaEngine::copySaveFileToFreeSlot(const char *target, int slot) {
const int emptySlot = findEmptySaveSlot(target);
if (emptySlot == -1)
return false;
diff --git a/engines/metaengine.h b/engines/metaengine.h
index cf935828a2c..445b2fd4115 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -25,7 +25,6 @@
#include "common/scummsys.h"
#include "common/error.h"
#include "common/array.h"
-#include "common/gui_options.h"
#include "engines/achievements.h"
#include "engines/game.h"
@@ -177,9 +176,7 @@ public:
* @return The fully processed options string that is usable by the GUI.
*
*/
- virtual Common::String parseAndCustomizeGuiOptions(const Common::String &optionsString, const Common::String &domain) const {
- return parseGameGUIOptions(optionsString);
- }
+ virtual Common::String parseAndCustomizeGuiOptions(const Common::String &optionsString, const Common::String &domain) const;
/**
* Return a list of engine specified debug channels
Commit: edc170c63d2e71db992bc3e2ce75bb5cb9cd8600
https://github.com/scummvm/scummvm/commit/edc170c63d2e71db992bc3e2ce75bb5cb9cd8600
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-23T14:39:10+01:00
Commit Message:
AGI: Reduce header dependency
Changed paths:
engines/agi/agi.cpp
engines/agi/agi.h
engines/agi/detection.h
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index feca9b44354..fc34349f9ef 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -38,6 +38,7 @@
#include "audio/mididrv.h"
#include "agi/agi.h"
+#include "agi/detection.h"
#include "agi/font.h"
#include "agi/graphics.h"
#include "agi/inv.h"
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 9b033e7feeb..3fe4c988b6a 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -43,7 +43,6 @@
#include "agi/picture.h"
#include "agi/logic.h"
#include "agi/sound.h"
-#include "agi/detection.h"
namespace Common {
class RandomSource;
@@ -109,6 +108,56 @@ enum {
GAMEDIR
};
+enum AgiGameType {
+ GType_PreAGI = 0,
+ GType_V1 = 1,
+ GType_V2 = 2,
+ GType_V3 = 3
+};
+
+//
+// GF_OLDAMIGAV20 means that the interpreter is an old Amiga AGI interpreter that
+// uses value 20 for the computer type (v20 i.e. vComputer) rather than the usual value 5.
+//
+enum AgiGameFeatures {
+ GF_AGIMOUSE = (1 << 0), // this disables "Click-to-walk mouse interface"
+ GF_AGDS = (1 << 1),
+ GF_AGI256 = (1 << 2), // marks fanmade AGI-256 games
+ GF_FANMADE = (1 << 3), // marks fanmade games
+ GF_OLDAMIGAV20 = (1 << 4),
+ GF_2GSOLDSOUND = (1 << 5),
+ GF_EXTCHAR = (1 << 6) // use WORDS.TOK.EXTENDED
+};
+
+enum BooterDisks {
+ BooterDisk1 = 0,
+ BooterDisk2 = 1
+};
+
+enum AgiGameID {
+ GID_AGIDEMO,
+ GID_BC,
+ GID_DDP,
+ GID_GOLDRUSH, // V3
+ GID_KQ1,
+ GID_KQ2,
+ GID_KQ3,
+ GID_KQ4,
+ GID_LSL1,
+ GID_MH1, // V3
+ GID_MH2, // V3
+ GID_MIXEDUP,
+ GID_PQ1,
+ GID_SQ1,
+ GID_SQ2,
+ GID_XMASCARD,
+ GID_FANMADE,
+ GID_GETOUTTASQ, // Fanmade
+ GID_MICKEY, // PreAGI
+ GID_WINNIE, // PreAGI
+ GID_TROLL // PreAGI
+};
+
enum AGIErrors {
errOK = 0,
errDoNothing,
@@ -639,6 +688,7 @@ class TextMgr;
class GfxMenu;
class SystemUI;
class Words;
+struct AGIGameDescription;
// Image stack support
struct ImageStackElement {
diff --git a/engines/agi/detection.h b/engines/agi/detection.h
index 63101e67e58..9c126b2cce0 100644
--- a/engines/agi/detection.h
+++ b/engines/agi/detection.h
@@ -26,56 +26,6 @@
namespace Agi {
-enum AgiGameType {
- GType_PreAGI = 0,
- GType_V1 = 1,
- GType_V2 = 2,
- GType_V3 = 3
-};
-
-enum AgiGameID {
- GID_AGIDEMO,
- GID_BC,
- GID_DDP,
- GID_GOLDRUSH, // V3
- GID_KQ1,
- GID_KQ2,
- GID_KQ3,
- GID_KQ4,
- GID_LSL1,
- GID_MH1, // V3
- GID_MH2, // V3
- GID_MIXEDUP,
- GID_PQ1,
- GID_SQ1,
- GID_SQ2,
- GID_XMASCARD,
- GID_FANMADE,
- GID_GETOUTTASQ, // Fanmade
- GID_MICKEY, // PreAGI
- GID_WINNIE, // PreAGI
- GID_TROLL // PreAGI
-};
-
-//
-// GF_OLDAMIGAV20 means that the interpreter is an old Amiga AGI interpreter that
-// uses value 20 for the computer type (v20 i.e. vComputer) rather than the usual value 5.
-//
-enum AgiGameFeatures {
- GF_AGIMOUSE = (1 << 0), // this disables "Click-to-walk mouse interface"
- GF_AGDS = (1 << 1),
- GF_AGI256 = (1 << 2), // marks fanmade AGI-256 games
- GF_FANMADE = (1 << 3), // marks fanmade games
- GF_OLDAMIGAV20 = (1 << 4),
- GF_2GSOLDSOUND = (1 << 5),
- GF_EXTCHAR = (1 << 6) // use WORDS.TOK.EXTENDED
-};
-
-enum BooterDisks {
- BooterDisk1 = 0,
- BooterDisk2 = 1
-};
-
struct AGIGameDescription {
ADGameDescription desc;
More information about the Scummvm-git-logs
mailing list