From 6f6e49f4cf183d9cbdf75060f4c271a538c6d1d1 Mon Sep 17 00:00:00 2001 From: Tobia Tesan Date: Tue, 14 Oct 2014 23:00:34 +0200 Subject: WINTERMUTE: Display subtitles in console --- engines/wintermute/video/video_subtitler.cpp | 1 + engines/wintermute/video/video_theora_player.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/wintermute/video') diff --git a/engines/wintermute/video/video_subtitler.cpp b/engines/wintermute/video/video_subtitler.cpp index 6d65adea74..965f7f1979 100644 --- a/engines/wintermute/video/video_subtitler.cpp +++ b/engines/wintermute/video/video_subtitler.cpp @@ -177,6 +177,7 @@ bool CVidSubtitler::LoadSubtitles(const char *Filename, const char *SubtitleFile ////////////////////////////////////////////////////////////////////////// bool CVidSubtitler::Display() { + warning((const char *)m_Subtitles[m_CurrentSubtitle]->m_Text); #if 0 if (m_ShowSubtitle) { CBFont *font = Game->m_VideoFont ? Game->m_VideoFont : Game->m_SystemFont; diff --git a/engines/wintermute/video/video_theora_player.cpp b/engines/wintermute/video/video_theora_player.cpp index 205ebe5035..232c4847b1 100644 --- a/engines/wintermute/video/video_theora_player.cpp +++ b/engines/wintermute/video/video_theora_player.cpp @@ -217,7 +217,8 @@ bool VideoTheoraPlayer::play(TVideoPlayback type, int x, int y, bool freezeGame, _state = THEORA_STATE_PLAYING; _looping = looping; _playbackType = type; - + _subtitler->Update(_theoraDecoder->getFrameCount()); + _subtitler->Display(); _startTime = startTime; _volume = volume; _posX = x; @@ -292,6 +293,9 @@ bool VideoTheoraPlayer::update() { } if (_theoraDecoder) { + + _subtitler->Update(_theoraDecoder->getCurFrame()); + if (_theoraDecoder->endOfVideo() && _looping) { warning("Should loop movie %s, hacked for now", _filename.c_str()); _theoraDecoder->rewind(); @@ -419,6 +423,7 @@ bool VideoTheoraPlayer::display(uint32 alpha) { /* if (m_Subtitler && _gameRef->m_VideoSubtitles) { m_Subtitler->display(); }*/ + _subtitler->Display(); return res; } -- cgit v1.2.3