aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/video/video_subtitler.cpp
diff options
context:
space:
mode:
authorTobia Tesan2014-10-15 21:15:07 +0200
committerTobia Tesan2014-10-15 21:36:45 +0200
commita4d5d1458102959bdc26fc73184e2cfc5f918894 (patch)
tree159a23bd18b3599bb3a21cce23a55732bb371a70 /engines/wintermute/video/video_subtitler.cpp
parent2acb2f558c4ee018ad30ce6fb6e8412d175b6c46 (diff)
downloadscummvm-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.
Diffstat (limited to 'engines/wintermute/video/video_subtitler.cpp')
-rw-r--r--engines/wintermute/video/video_subtitler.cpp9
1 files changed, 4 insertions, 5 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