ASYLUM: fixed smacker video playing and added new debug level

This commit is contained in:
Alex Bevilacqua 2015-03-04 14:31:14 -05:00 committed by Eugene Sandulenko
parent 652e134c46
commit 926443d63f
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
2 changed files with 5 additions and 2 deletions

View File

@ -41,7 +41,8 @@ enum kDebugLevels {
kDebugLevelScene = 1 << 8,
kDebugLevelObjects = 1 << 9,
kDebugLevelActor = 1 << 10,
kDebugLevelEncounter = 1 << 11
kDebugLevelEncounter = 1 << 11,
kDebugLevelVideo = 1 << 12
};
class AsylumEngine;

View File

@ -152,6 +152,8 @@ void VideoPlayer::play(Common::String filename, bool showSubtitles) {
int32 frameEnd = 0;
int32 currentSubtitle = 0;
_smkDecoder->start();
while (!_done && !Engine::shouldQuit() && !_smkDecoder->endOfVideo()) {
_vm->handleEvents();
@ -168,7 +170,7 @@ void VideoPlayer::play(Common::String filename, bool showSubtitles) {
if (showSubtitles) {
int32 currentFrame = _smkDecoder->getCurFrame() + 1;
debugC(kDebugLevelVideo, "[Video] {%s} Playing Frame %d", filename.c_str(), currentFrame);
// Check for next frame
if (currentFrame > frameEnd) {
if (index < _subtitles.size()) {