aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron Cawley2018-12-03 23:54:24 +0000
committerFilippos Karapetis2018-12-04 01:54:24 +0200
commiteea066b89b3279d8a754f3d3da1ac8a190904196 (patch)
treeef42637c858650c75d0043578b231740f46df4a9
parentb9c60558369f0c503e82ba029eb5c78583dc3e6b (diff)
downloadscummvm-rg350-eea066b89b3279d8a754f3d3da1ac8a190904196.tar.gz
scummvm-rg350-eea066b89b3279d8a754f3d3da1ac8a190904196.tar.bz2
scummvm-rg350-eea066b89b3279d8a754f3d3da1ac8a190904196.zip
ILLUSIONS: DUCKMAN: Add support for the demo version (#1413)
-rw-r--r--engines/illusions/detection.cpp13
-rw-r--r--engines/illusions/duckman/duckman_videoplayer.cpp2
2 files changed, 14 insertions, 1 deletions
diff --git a/engines/illusions/detection.cpp b/engines/illusions/detection.cpp
index cf771f81b8..3a9c77e845 100644
--- a/engines/illusions/detection.cpp
+++ b/engines/illusions/detection.cpp
@@ -70,6 +70,19 @@ static const IllusionsGameDescription gameDescriptions[] = {
{
{
"duckman",
+ "Demo",
+ AD_ENTRY1s("duckman.gam", "71d01e3f3d9d4e51cd69f71028745610", 7127040),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_DROPPLATFORM | ADGF_DEMO,
+ GUIO0()
+ },
+ kGameIdDuckman
+ },
+
+ {
+ {
+ "duckman",
0,
AD_ENTRY1s("duckman.gam", "64d16922ffb46b746fc2c12a14d75bcc", 29779968),
Common::DE_DEU,
diff --git a/engines/illusions/duckman/duckman_videoplayer.cpp b/engines/illusions/duckman/duckman_videoplayer.cpp
index ae17d32381..b2ccd630b9 100644
--- a/engines/illusions/duckman/duckman_videoplayer.cpp
+++ b/engines/illusions/duckman/duckman_videoplayer.cpp
@@ -69,7 +69,7 @@ void DuckmanVideoPlayer::update() {
} else if (_videoDecoder->needsUpdate()) {
const Graphics::Surface *frame = _videoDecoder->decodeNextFrame();
Graphics::Surface *backSurface = _vm->_screen->getBackSurface();
- if (frame->format.bytesPerPixel == g_system->getScreenFormat().bytesPerPixel) {
+ if (frame && frame->format.bytesPerPixel == g_system->getScreenFormat().bytesPerPixel) {
const int width = MIN(frame->w, backSurface->w);
const int height = MIN(frame->h, backSurface->h);
const byte *src = (const byte*)frame->getPixels();