diff options
author | Einar Johan Trøan Sømåen | 2013-04-17 21:02:40 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-04-17 21:21:17 +0200 |
commit | 3597f7596d4e8d44e098387ad3b2975e09d9f6d2 (patch) | |
tree | 414242946c06977bd69dabb6b190d5343449d939 /engines/wintermute/ad/ad_object.cpp | |
parent | 5f5b415289d80e6e0dacfc15000bb6ae3e45d824 (diff) | |
download | scummvm-rg350-3597f7596d4e8d44e098387ad3b2975e09d9f6d2.tar.gz scummvm-rg350-3597f7596d4e8d44e098387ad3b2975e09d9f6d2.tar.bz2 scummvm-rg350-3597f7596d4e8d44e098387ad3b2975e09d9f6d2.zip |
WINTERMUTE: Constify _width and _height in BaseRenderer.
Diffstat (limited to 'engines/wintermute/ad/ad_object.cpp')
-rw-r--r-- | engines/wintermute/ad/ad_object.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/wintermute/ad/ad_object.cpp b/engines/wintermute/ad/ad_object.cpp index f2cf90a075..5a61184179 100644 --- a/engines/wintermute/ad/ad_object.cpp +++ b/engines/wintermute/ad/ad_object.cpp @@ -959,10 +959,10 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const if (_subtitlesWidth > 0) { width = _subtitlesWidth; } else { - if ((x < _gameRef->_renderer->_width / 4 || x > _gameRef->_renderer->_width * 0.75) && !_gameRef->_touchInterface) { - width = MAX(_gameRef->_renderer->_width / 4, MIN(x * 2, (_gameRef->_renderer->_width - x) * 2)); + if ((x < _gameRef->_renderer->getWidth() / 4 || x > _gameRef->_renderer->getWidth() * 0.75) && !_gameRef->_touchInterface) { + width = MAX(_gameRef->_renderer->getWidth() / 4, MIN(x * 2, (_gameRef->_renderer->getWidth() - x) * 2)); } else { - width = _gameRef->_renderer->_width / 2; + width = _gameRef->_renderer->getWidth() / 2; } } @@ -981,8 +981,8 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const } - x = MIN(MAX(0, x), _gameRef->_renderer->_width - width); - y = MIN(MAX(0, y), _gameRef->_renderer->_height - height); + x = MIN(MAX(0, x), _gameRef->_renderer->getWidth() - width); + y = MIN(MAX(0, y), _gameRef->_renderer->getHeight() - height); _sentence->_width = width; |