diff options
author | Filippos Karapetis | 2015-01-07 11:39:02 +0200 |
---|---|---|
committer | Filippos Karapetis | 2015-01-07 11:42:27 +0200 |
commit | 4ffaf4df376e6d93c1b5c4c820c975fdee64ec8f (patch) | |
tree | 0126e506f204e70912cab6fa34c5bf94d9e7113f /engines | |
parent | e4969a98f82f151382106b89f170990cb7eed54b (diff) | |
download | scummvm-rg350-4ffaf4df376e6d93c1b5c4c820c975fdee64ec8f.tar.gz scummvm-rg350-4ffaf4df376e6d93c1b5c4c820c975fdee64ec8f.tar.bz2 scummvm-rg350-4ffaf4df376e6d93c1b5c4c820c975fdee64ec8f.zip |
ZVISION: Add stubs for the hires VOB MPEG2 videos of ZGI DVD
VOB file handling is based on clone2727's work. The lowres videos are
played for now, until AC3 sound handling is implemented
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/detection.cpp | 13 | ||||
-rw-r--r-- | engines/zvision/scripting/actions.cpp | 13 | ||||
-rw-r--r-- | engines/zvision/scripting/script_manager.h | 1 | ||||
-rw-r--r-- | engines/zvision/video/video.cpp | 11 | ||||
-rw-r--r-- | engines/zvision/zvision.cpp | 10 |
5 files changed, 45 insertions, 3 deletions
diff --git a/engines/zvision/detection.cpp b/engines/zvision/detection.cpp index 1eaff83413..5792377f8e 100644 --- a/engines/zvision/detection.cpp +++ b/engines/zvision/detection.cpp @@ -59,6 +59,7 @@ namespace ZVision { #define GAMEOPTION_DOUBLE_FPS GUIO_GAMEOPTIONS2 #define GAMEOPTION_ENABLE_VENUS GUIO_GAMEOPTIONS3 #define GAMEOPTION_DISABLE_ANIM_WHILE_TURNING GUIO_GAMEOPTIONS4 +#define GAMEOPTION_USE_HIRES_MPEG_MOVIES GUIO_GAMEOPTIONS5 static const ZVisionGameDescription gameDescriptions[] = { @@ -113,7 +114,7 @@ static const ZVisionGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformWindows, ADGF_NO_FLAGS, - GUIO3(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_DOUBLE_FPS, GAMEOPTION_DISABLE_ANIM_WHILE_TURNING) + GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_DOUBLE_FPS, GAMEOPTION_DISABLE_ANIM_WHILE_TURNING, GAMEOPTION_USE_HIRES_MPEG_MOVIES) }, GID_GRANDINQUISITOR }, @@ -186,6 +187,16 @@ static const ADExtraGuiOptionsMap optionsList[] = { } }, + { + GAMEOPTION_USE_HIRES_MPEG_MOVIES, + { + _s("Use the hires MPEG movies"), + _s("Use the hires MPEG movies of the DVD version, instead of the lowres AVI ones"), + "mpegmovies", + true + } + }, + AD_EXTRA_GUI_OPTIONS_TERMINATOR }; diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp index 4474a8801a..f60fdbb973 100644 --- a/engines/zvision/scripting/actions.cpp +++ b/engines/zvision/scripting/actions.cpp @@ -913,6 +913,19 @@ bool ActionStreamVideo::execute() { Video::VideoDecoder *decoder; Common::Rect destRect = Common::Rect(_x1, _y1, _x2 + 1, _y2 + 1); +#ifdef USE_MPEG2 + Common::String hiresFileName = _fileName; + hiresFileName.setChar('d', hiresFileName.size() - 8); + hiresFileName.setChar('v', hiresFileName.size() - 3); + hiresFileName.setChar('o', hiresFileName.size() - 2); + hiresFileName.setChar('b', hiresFileName.size() - 1); + + if (_engine->getScriptManager()->getStateValue(StateKey_MPEGMovies) == 1 &&_engine->getSearchManager()->hasFile(hiresFileName)) + // TODO: Enable once VOB + AC3 support is implemented + //_fileName = hiresFileName; + warning("The hires videos of the DVD version of ZGI aren't supported yet, using lowres"); +#endif + Common::String subname = _fileName; subname.setChar('s', subname.size() - 3); subname.setChar('u', subname.size() - 2); diff --git a/engines/zvision/scripting/script_manager.h b/engines/zvision/scripting/script_manager.h index 136b3427f7..a05c112a18 100644 --- a/engines/zvision/scripting/script_manager.h +++ b/engines/zvision/scripting/script_manager.h @@ -87,6 +87,7 @@ enum StateKey { StateKey_JapanFonts = 75, StateKey_ExecScopeStyle = 76, StateKey_Brightness = 77, + StateKey_MPEGMovies = 78, StateKey_EF9_R = 91, StateKey_EF9_G = 92, StateKey_EF9_B = 93, diff --git a/engines/zvision/video/video.cpp b/engines/zvision/video/video.cpp index 3edad7a193..66a567abb2 100644 --- a/engines/zvision/video/video.cpp +++ b/engines/zvision/video/video.cpp @@ -23,6 +23,11 @@ #include "common/scummsys.h" #include "common/system.h" #include "video/video_decoder.h" +// TODO: Enable once VOB + AC3 support is implemented +#if 0 +//#ifdef USE_MPEG2 +#include "video/mpegps_decoder.h" +#endif #include "engines/util.h" #include "graphics/surface.h" @@ -45,6 +50,12 @@ Video::VideoDecoder *ZVision::loadAnimation(const Common::String &fileName) { animation = new RLFDecoder(); else if (tmpFileName.hasSuffix(".avi")) animation = new ZorkAVIDecoder(); +// TODO: Enable once VOB + AC3 support is implemented +#if 0 +//#ifdef USE_MPEG2 + else if (tmpFileName.hasSuffix(".vob")) + animation = new Video::MPEGPSDecoder(); +#endif else error("Unknown suffix for animation %s", fileName.c_str()); diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp index b05c790109..1349aaa683 100644 --- a/engines/zvision/zvision.cpp +++ b/engines/zvision/zvision.cpp @@ -52,7 +52,7 @@ namespace ZVision { -#define ZVISION_SETTINGS_KEYS_COUNT 11 +#define ZVISION_SETTINGS_KEYS_COUNT 12 struct zvisionIniSettings { const char *name; @@ -73,7 +73,8 @@ struct zvisionIniSettings { {"panarotatespeed", StateKey_RotateSpeed, 540, false, true}, // checked by universe.scr {"noanimwhileturning", StateKey_NoTurnAnim, -1, false, true}, // toggle playing animations during pana rotation {"venusenabled", StateKey_VenusEnable, -1, true, true}, - {"subtitles", StateKey_Subtitles, -1, true, true} + {"subtitles", StateKey_Subtitles, -1, true, true}, + {"mpegmovies", StateKey_MPEGMovies, -1, true, true} // Zork: Grand Inquisitor DVD hi-res MPEG movies (0 = normal, 1 = hires, 2 = disable option) }; ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc) @@ -230,6 +231,11 @@ void ZVision::initialize() { loadSettings(); +#ifndef USE_MPEG2 + // libmpeg2 not loaded, disable the MPEG2 movies option + _scriptManager->setStateValue(StateKey_MPEGMovies, 2); +#endif + // Create debugger console. It requires GFX to be initialized _console = new Console(this); _doubleFPS = ConfMan.getBool("doublefps"); |