aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/movie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/toon/movie.cpp')
-rw-r--r--engines/toon/movie.cpp49
1 files changed, 25 insertions, 24 deletions
diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp
index f0463a52e1..498e4021e2 100644
--- a/engines/toon/movie.cpp
+++ b/engines/toon/movie.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
#include "common/events.h"
@@ -85,7 +85,8 @@ void Movie::play(const Common::String &video, int32 flags) {
_playing = true;
if (flags & 1)
_vm->getAudioManager()->setMusicVolume(0);
- _decoder->loadFile(video.c_str());
+ if (!_decoder->loadFile(video.c_str()))
+ error("Unable to play video %s", video.c_str());
playVideo(isFirstIntroVideo);
_vm->flushPalette(true);
if (flags & 1)
@@ -94,7 +95,7 @@ void Movie::play(const Common::String &video, int32 flags) {
_playing = false;
}
-bool Movie::playVideo(bool isFirstIntroVideo) {
+void Movie::playVideo(bool isFirstIntroVideo) {
debugC(1, kDebugMovie, "playVideo(isFirstIntroVideo: %d)", isFirstIntroVideo);
_decoder->start();
@@ -135,13 +136,13 @@ bool Movie::playVideo(bool isFirstIntroVideo) {
while (_vm->_system->getEventManager()->pollEvent(event))
if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
_vm->dirtyAllScreen();
- return false;
+ return;
}
_vm->_system->delayMillis(10);
}
_vm->dirtyAllScreen();
- return !_vm->shouldQuit();
+ return;
}
} // End of namespace Toon