diff options
author | Tobia Tesan | 2014-10-15 21:15:07 +0200 |
---|---|---|
committer | Tobia Tesan | 2014-10-15 21:36:45 +0200 |
commit | a4d5d1458102959bdc26fc73184e2cfc5f918894 (patch) | |
tree | 159a23bd18b3599bb3a21cce23a55732bb371a70 | |
parent | 2acb2f558c4ee018ad30ce6fb6e8412d175b6c46 (diff) | |
download | scummvm-rg350-a4d5d1458102959bdc26fc73184e2cfc5f918894.tar.gz scummvm-rg350-a4d5d1458102959bdc26fc73184e2cfc5f918894.tar.bz2 scummvm-rg350-a4d5d1458102959bdc26fc73184e2cfc5f918894.zip |
WINTERMUTE: Turn display() and update() into void functions.
No idea why they were bools in the first place.
-rw-r--r-- | engines/wintermute/video/video_subtitler.cpp | 9 | ||||
-rw-r--r-- | engines/wintermute/video/video_subtitler.h | 4 |
2 files changed, 6 insertions, 7 deletions
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 diff --git a/engines/wintermute/video/video_subtitler.h b/engines/wintermute/video/video_subtitler.h index 2940d69785..8c57fd290f 100644 --- a/engines/wintermute/video/video_subtitler.h +++ b/engines/wintermute/video/video_subtitler.h @@ -43,8 +43,8 @@ public: bool _showSubtitle; uint _currentSubtitle; bool loadSubtitles(const Common::String &filename, const Common::String &subtitleFile); - bool display(); - bool update(uint frame); + void display(); + void update(uint frame); private: Common::Array<VideoSubtitle *> _subtitles; long _lastSample; |