WINTERMUTE: Show warning on running 2.5D games

This is shown for the 2 games added in
0d8834b561, as both of them use
ACTOR3DX entities, i.e. 3D models, which are not supported in ScummVM
This commit is contained in:
lolbot-iichan 2019-06-06 07:07:16 +03:00 committed by Filippos Karapetis
parent 5b06639a69
commit 8b929a584f
5 changed files with 23 additions and 1 deletions

View File

@ -1 +1,2 @@
engines/wintermute/detection.cpp
engines/wintermute/wintermute.cpp

View File

@ -337,6 +337,10 @@ bool BaseFileManager::hasFile(const Common::String &filename) {
return false;
}
int BaseFileManager::listMatchingMembers(Common::ArchiveMemberList &list, const Common::String &pattern) {
return _packages.listMatchingMembers(list, pattern);
}
//////////////////////////////////////////////////////////////////////////
Common::SeekableReadStream *BaseFileManager::openFile(const Common::String &filename, bool absPathWarning, bool keepTrackOf) {
if (strcmp(filename.c_str(), "") == 0) {

View File

@ -42,6 +42,7 @@ public:
bool closeFile(Common::SeekableReadStream *File);
bool hasFile(const Common::String &filename);
int listMatchingMembers(Common::ArchiveMemberList &list, const Common::String &pattern);
Common::SeekableReadStream *openFile(const Common::String &filename, bool absPathWarning = true, bool keepTrackOf = true);
byte *readWholeFile(const Common::String &filename, uint32 *size = nullptr, bool mustExist = true);

View File

@ -206,6 +206,7 @@ PackageSet::PackageSet(Common::FSNode file, const Common::String &filename, bool
fileEntry->_length = length;
fileEntry->_compressedLength = compLength;
fileEntry->_flags = flags;
fileEntry->_filename = upcName;
_files[upcName] = Common::ArchiveMemberPtr(fileEntry);
} else {

View File

@ -29,6 +29,7 @@
#include "common/file.h"
#include "common/fs.h"
#include "common/tokenizer.h"
#include "common/translation.h"
#include "engines/util.h"
#include "engines/wintermute/ad/ad_game.h"
@ -149,7 +150,7 @@ int WintermuteEngine::init() {
// 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)) {
GUI::MessageDialog dialog("This game requires PNG, JPEG and Vorbis support.");
GUI::MessageDialog dialog(_("This game requires PNG, JPEG and Vorbis support."));
dialog.runModal();
delete _game;
_game = nullptr;
@ -157,6 +158,20 @@ int WintermuteEngine::init() {
}
#endif
Common::ArchiveMemberList actors3d;
if (BaseEngine::instance().getFileManager()->listMatchingMembers(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;