From a4d5d1458102959bdc26fc73184e2cfc5f918894 Mon Sep 17 00:00:00 2001 From: Tobia Tesan Date: Wed, 15 Oct 2014 21:15:07 +0200 Subject: WINTERMUTE: Turn display() and update() into void functions. No idea why they were bools in the first place. --- engines/wintermute/video/video_subtitler.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'engines/wintermute/video/video_subtitler.cpp') diff --git a/engines/wintermute/video/video_subtitler.cpp b/engines/wintermute/video/video_subtitler.cpp index cc46ddf526..05c7b6c563 100644 --- a/engines/wintermute/video/video_subtitler.cpp +++ b/engines/wintermute/video/video_subtitler.cpp @@ -178,7 +178,7 @@ bool VideoSubtitler::loadSubtitles(const Common::String &filename, const Common: return true; } -bool VideoSubtitler::display() { +void VideoSubtitler::display() { if (_showSubtitle) { BaseFont *font; @@ -192,19 +192,19 @@ bool VideoSubtitler::display() { int textHeight = font->getTextHeight( (const byte *)_subtitles[_currentSubtitle]->getText().c_str(), _gameRef->_renderer->getWidth()); + font->drawText((const byte *)_subtitles[_currentSubtitle]->getText().c_str(), 0, (_gameRef->_renderer->getHeight() - textHeight - 5), (_gameRef->_renderer->getWidth()), TAL_CENTER); } - return false; } -bool VideoSubtitler::update(uint frame) { +void VideoSubtitler::update(uint frame) { if (_subtitles.size() == 0) { // Edge case: we have loaded subtitles early on... from a blank file. - return false; + return; } if (frame != _lastSample) { @@ -259,7 +259,6 @@ bool VideoSubtitler::update(uint frame) { _showSubtitle = true; } } - return false; } } // End of namespace Wintermute -- cgit v1.2.3