diff options
author | Einar Johan Trøan Sømåen | 2013-10-29 02:28:25 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-10-29 02:59:53 +0100 |
commit | efb8031b3c38b8d7e2da73725eb60a35554d0508 (patch) | |
tree | 2e5c3ba892d0e72a1f9df37c38252fad86861eba /engines/wintermute/ui | |
parent | 3fb418390910cfb00d8b3dda8da33b8302615b6a (diff) | |
download | scummvm-rg350-efb8031b3c38b8d7e2da73725eb60a35554d0508.tar.gz scummvm-rg350-efb8031b3c38b8d7e2da73725eb60a35554d0508.tar.bz2 scummvm-rg350-efb8031b3c38b8d7e2da73725eb60a35554d0508.zip |
WINTERMUTE: Remove BasePlatform::isRectEmpty (replace with member-call).
Diffstat (limited to 'engines/wintermute/ui')
-rw-r--r-- | engines/wintermute/ui/ui_tiled_image.cpp | 18 | ||||
-rw-r--r-- | engines/wintermute/ui/ui_window.cpp | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/engines/wintermute/ui/ui_tiled_image.cpp b/engines/wintermute/ui/ui_tiled_image.cpp index b7bbbbbbe5..66fd3f50a7 100644 --- a/engines/wintermute/ui/ui_tiled_image.cpp +++ b/engines/wintermute/ui/ui_tiled_image.cpp @@ -287,33 +287,33 @@ bool UITiledImage::loadBuffer(char *buffer, bool complete) { int width = _image->_surface->getWidth() / 3; int height = _image->_surface->getHeight() / 3; - if (BasePlatform::isRectEmpty(&_upLeft)) { + if (_upLeft.isRectEmpty()) { BasePlatform::setRect(&_upLeft, 0, 0, width, height); } - if (BasePlatform::isRectEmpty(&_upMiddle)) { + if (_upMiddle.isRectEmpty()) { BasePlatform::setRect(&_upMiddle, width, 0, 2 * width, height); } - if (BasePlatform::isRectEmpty(&_upRight)) { + if (_upRight.isRectEmpty()) { BasePlatform::setRect(&_upRight, 2 * width, 0, 3 * width, height); } - if (BasePlatform::isRectEmpty(&_middleLeft)) { + if (_middleLeft.isRectEmpty()) { BasePlatform::setRect(&_middleLeft, 0, height, width, 2 * height); } - if (BasePlatform::isRectEmpty(&_middleMiddle)) { + if (_middleMiddle.isRectEmpty()) { BasePlatform::setRect(&_middleMiddle, width, height, 2 * width, 2 * height); } - if (BasePlatform::isRectEmpty(&_middleRight)) { + if (_middleRight.isRectEmpty()) { BasePlatform::setRect(&_middleRight, 2 * width, height, 3 * width, 2 * height); } - if (BasePlatform::isRectEmpty(&_downLeft)) { + if (_downLeft.isRectEmpty()) { BasePlatform::setRect(&_downLeft, 0, 2 * height, width, 3 * height); } - if (BasePlatform::isRectEmpty(&_downMiddle)) { + if (_downMiddle.isRectEmpty()) { BasePlatform::setRect(&_downMiddle, width, 2 * height, 2 * width, 3 * height); } - if (BasePlatform::isRectEmpty(&_downRight)) { + if (_downRight.isRectEmpty()) { BasePlatform::setRect(&_downRight, 2 * width, 2 * height, 3 * width, 3 * height); } } diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp index 5d863112c1..c9262198cf 100644 --- a/engines/wintermute/ui/ui_window.cpp +++ b/engines/wintermute/ui/ui_window.cpp @@ -213,7 +213,7 @@ bool UIWindow::display(int offsetX, int offsetY) { image->draw(_posX + offsetX, _posY + offsetY, _transparent ? nullptr : this); } - if (!BasePlatform::isRectEmpty(&_titleRect) && font && _text) { + if (!_titleRect.isRectEmpty() && font && _text) { font->drawText((byte *)_text, _posX + offsetX + _titleRect.left, _posY + offsetY + _titleRect.top, _titleRect.right - _titleRect.left, _titleAlign, _titleRect.bottom - _titleRect.top); } @@ -676,11 +676,11 @@ bool UIWindow::saveAsText(BaseDynamicBuffer *buffer, int indent) { error("UIWindow::SaveAsText - Unhandled enum-value NUM_TEXT_ALIGN"); } - if (!BasePlatform::isRectEmpty(&_titleRect)) { + if (!_titleRect.isRectEmpty()) { buffer->putTextIndent(indent + 2, "TITLE_RECT { %d, %d, %d, %d }\n", _titleRect.left, _titleRect.top, _titleRect.right, _titleRect.bottom); } - if (!BasePlatform::isRectEmpty(&_dragRect)) { + if (!_dragRect.isRectEmpty()) { buffer->putTextIndent(indent + 2, "DRAG_RECT { %d, %d, %d, %d }\n", _dragRect.left, _dragRect.top, _dragRect.right, _dragRect.bottom); } @@ -1227,7 +1227,7 @@ bool UIWindow::handleMouse(TMouseEvent event, TMouseButton button) { bool res = UIObject::handleMouse(event, button); // handle window dragging - if (!BasePlatform::isRectEmpty(&_dragRect)) { + if (!_dragRect.isRectEmpty()) { // start drag if (event == MOUSE_CLICK && button == MOUSE_BUTTON_LEFT) { Rect32 dragRect = _dragRect; |