mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 18:06:26 +00:00
VCRUISE: Remove subengines, throw warnings or errors when media codecs are missing.
This commit is contained in:
parent
2e9819ad4e
commit
1ca6b500c1
@ -1 +1,2 @@
|
||||
engines/vcruise/metaengine.cpp
|
||||
engines/vcruise/vcruise.cpp
|
||||
|
@ -1,4 +1,3 @@
|
||||
# This file is included from the main "configure" script
|
||||
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
|
||||
add_engine vcruise "V-Cruise" no "schizm" "" "16bit highres mad"
|
||||
add_engine schizm "Schizm" no "" "" "16bit highres mad jpeg"
|
||||
add_engine vcruise "V-Cruise" no "" "" "16bit highres"
|
||||
|
@ -33,6 +33,12 @@ enum VCruiseGameID {
|
||||
GID_SCHIZM = 2,
|
||||
};
|
||||
|
||||
enum VCruiseGameFlag {
|
||||
VCRUISE_GF_WANT_MP3 = (1 << 0),
|
||||
VCRUISE_GF_WANT_OGG_VORBIS = (1 << 1),
|
||||
VCRUISE_GF_NEED_JPEG = (1 << 2),
|
||||
};
|
||||
|
||||
struct VCruiseGameDescription {
|
||||
ADGameDescription desc;
|
||||
|
||||
|
@ -37,7 +37,7 @@ static const VCruiseGameDescription gameDescriptions[] = {
|
||||
AD_ENTRY1s("Reah.exe", "60ec19c53f1323cc7f0314f98d396283", 304128),
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformWindows,
|
||||
ADGF_UNSTABLE,
|
||||
ADGF_UNSTABLE | VCRUISE_GF_WANT_MP3,
|
||||
GUIO0()
|
||||
},
|
||||
GID_REAH,
|
||||
@ -61,7 +61,7 @@ static const VCruiseGameDescription gameDescriptions[] = {
|
||||
AD_ENTRY1s("Schizm.exe", "296edd26d951c3bdc4d303c4c88b27cd", 364544),
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformWindows,
|
||||
ADGF_UNSTABLE,
|
||||
ADGF_UNSTABLE | VCRUISE_GF_WANT_OGG_VORBIS | VCRUISE_GF_NEED_JPEG,
|
||||
GUIO0()
|
||||
},
|
||||
GID_SCHIZM,
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "common/events.h"
|
||||
#include "common/system.h"
|
||||
#include "common/algorithm.h"
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "vcruise/runtime.h"
|
||||
#include "vcruise/vcruise.h"
|
||||
@ -67,6 +68,24 @@ void VCruiseEngine::handleEvents() {
|
||||
Common::Error VCruiseEngine::run() {
|
||||
Common::List<Graphics::PixelFormat> pixelFormats = _system->getSupportedFormats();
|
||||
|
||||
#if !defined(USE_JPEG)
|
||||
if (_gameDescription->desc.flags & VCRUISE_GF_NEED_JPEG) {
|
||||
return Common::Error(Common::kUnknownError, _s("This game requires JPEG support, which was not compiled in."));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(USE_OGG) || !defined(USE_VORBIS)
|
||||
if (_gameDescription->desc.flags & VCRUISE_GF_WANT_OGG_VORBIS) {
|
||||
GUIErrorMessage(_("Music for this game requires Ogg Vorbis support, which was not compiled in. The game will still play, but will not have any music."));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(USE_MAD)
|
||||
if (_gameDescription->desc.flags & VCRUISE_GF_WANT_MP3) {
|
||||
GUIErrorMessage(_("Music for this game requires MP3 support, which was not compiled in. The game will still play, but will not have any music."));
|
||||
}
|
||||
#endif
|
||||
|
||||
const Graphics::PixelFormat *fmt16_565 = nullptr;
|
||||
const Graphics::PixelFormat *fmt16_555 = nullptr;
|
||||
const Graphics::PixelFormat *fmt32 = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user