[Scummvm-git-logs] scummvm master -> 55a7484eab36e4bece4ba39780f4c3c6a15ca1cc
lolbot-iichan
lolbot_iichan at mail.ru
Sun Jun 7 16:02:05 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
55a7484eab WINTERMUTE: Fix double-notifications for 3D games (#2315)
Commit: 55a7484eab36e4bece4ba39780f4c3c6a15ca1cc
https://github.com/scummvm/scummvm/commit/55a7484eab36e4bece4ba39780f4c3c6a15ca1cc
Author: lolbot-iichan (lolbot_iichan at mail.ru)
Date: 2020-06-07T19:02:02+03:00
Commit Message:
WINTERMUTE: Fix double-notifications for 3D games (#2315)
Changed paths:
engines/wintermute/base/base_engine.h
engines/wintermute/wintermute.cpp
diff --git a/engines/wintermute/base/base_engine.h b/engines/wintermute/base/base_engine.h
index 4253782529..901a678ed1 100644
--- a/engines/wintermute/base/base_engine.h
+++ b/engines/wintermute/base/base_engine.h
@@ -174,6 +174,7 @@ public:
bool isFoxTail(WMETargetExecutable v1=FOXTAIL_OLDEST_VERSION, WMETargetExecutable v2=FOXTAIL_LATEST_VERSION) const {
return isFoxTailCheck(_targetExecutable, v1, v2);
}
+ void addFlags(uint32 flags) { _flags |= flags; }
};
} // End of namespace Wintermute
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 484573bd73..002f2af109 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -149,10 +149,20 @@ Common::Error WintermuteEngine::run() {
int WintermuteEngine::init() {
BaseEngine::createInstance(_targetName, _gameDescription->adDesc.gameId, _gameDescription->adDesc.language, _gameDescription->targetExecutable, _gameDescription->adDesc.flags);
+ BaseEngine &instance = BaseEngine::instance();
+
+ // check if unknown target is a 2.5D game
+ if (instance.getFlags() & ADGF_AUTOGENTARGET) {
+ Common::ArchiveMemberList actors3d;
+ if (instance.getFileManager()->listMatchingPackageMembers(actors3d, "*.act3d")) {
+ warning("Unknown 2.5D game detected");
+ instance.addFlags(GF_3D);
+ }
+ }
// check dependencies for games with high resolution assets
#if not defined(USE_PNG) || not defined(USE_JPEG) || not defined(USE_VORBIS)
- if (!(_gameDescription->adDesc.flags & GF_LOWSPEC_ASSETS)) {
+ if (!(instance.getFlags() & GF_LOWSPEC_ASSETS)) {
GUI::MessageDialog dialog(_("This game requires PNG, JPEG and Vorbis support."));
dialog.runModal();
delete _game;
@@ -163,7 +173,7 @@ int WintermuteEngine::init() {
// check dependencies for games with FoxTail subengine
#if not defined(ENABLE_FOXTAIL)
- if (BaseEngine::isFoxTailCheck(_gameDescription->targetExecutable)) {
+ if (BaseEngine::isFoxTailCheck(instance.getTargetExecutable())) {
GUI::MessageDialog dialog(_("This game requires the FoxTail subengine, which is not compiled in."));
dialog.runModal();
delete _game;
@@ -174,7 +184,7 @@ int WintermuteEngine::init() {
// check dependencies for games with HeroCraft subengine
#if not defined(ENABLE_HEROCRAFT)
- if (_gameDescription->targetExecutable == WME_HEROCRAFT) {
+ if (instance.getTargetExecutable() == WME_HEROCRAFT) {
GUI::MessageDialog dialog(_("This game requires the HeroCraft subengine, which is not compiled in."));
dialog.runModal();
delete _game;
@@ -184,7 +194,7 @@ int WintermuteEngine::init() {
#endif
// check if game require 3D capabilities
- if (_gameDescription->adDesc.flags & GF_3D) {
+ if (instance.getFlags() & GF_3D) {
GUI::MessageDialog dialog(_("This game requires 3D capabilities that are out ScummVM scope. As such, it"
" is likely to be unplayable totally or partially."), _("Start anyway"), _("Cancel"));
if (dialog.runModal() != GUI::kMessageOK) {
@@ -194,25 +204,11 @@ int WintermuteEngine::init() {
}
}
- Common::ArchiveMemberList actors3d;
- if (BaseEngine::instance().getFileManager()->listMatchingPackageMembers(actors3d, "*.act3d")) {
- GUI::MessageDialog dialog(
- _("This game requires 3D characters support, which is out of ScummVM's scope."),
- _("Start anyway"),
- _("Cancel")
- );
- if (dialog.runModal() != GUI::kMessageOK) {
- delete _game;
- _game = nullptr;
- return false;
- }
- }
-
_game = new AdGame(_targetName);
if (!_game) {
return 1;
}
- BaseEngine::instance().setGameRef(_game);
+ instance.setGameRef(_game);
BasePlatform::initialize(this, _game, 0, nullptr);
_game->initConfManSettings();
More information about the Scummvm-git-logs
mailing list