diff options
author | Einar Johan Trøan Sømåen | 2013-10-29 02:19:00 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-10-29 02:59:53 +0100 |
commit | 3fb418390910cfb00d8b3dda8da33b8302615b6a (patch) | |
tree | 7e932ab55080c7a6c152874dd33b1cd2509ccfdc | |
parent | 211b8c9732bed65c29b8e48ad20d6c934a942e02 (diff) | |
download | scummvm-rg350-3fb418390910cfb00d8b3dda8da33b8302615b6a.tar.gz scummvm-rg350-3fb418390910cfb00d8b3dda8da33b8302615b6a.tar.bz2 scummvm-rg350-3fb418390910cfb00d8b3dda8da33b8302615b6a.zip |
WINTERMUTE: Remove BasePlatform::setRectEmpty (replace with member-call)
-rw-r--r-- | engines/wintermute/ad/ad_response_box.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/base_active_rect.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/base_frame.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/base/base_game.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/base_object.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/base_region.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/base/base_sprite.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/base_sub_frame.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/base/base_viewport.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/gfx/base_renderer.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/particles/part_emitter.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/particles/part_particle.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/platform_osystem.cpp | 10 | ||||
-rw-r--r-- | engines/wintermute/platform_osystem.h | 1 | ||||
-rw-r--r-- | engines/wintermute/ui/ui_tiled_image.cpp | 18 | ||||
-rw-r--r-- | engines/wintermute/ui/ui_window.cpp | 4 |
16 files changed, 31 insertions, 38 deletions
diff --git a/engines/wintermute/ad/ad_response_box.cpp b/engines/wintermute/ad/ad_response_box.cpp index 9058717c34..5c0efb547b 100644 --- a/engines/wintermute/ad/ad_response_box.cpp +++ b/engines/wintermute/ad/ad_response_box.cpp @@ -58,7 +58,7 @@ AdResponseBox::AdResponseBox(BaseGame *inGame) : BaseObject(inGame) { _shieldWindow = new UIWindow(_gameRef); _horizontal = false; - BasePlatform::setRectEmpty(&_responseArea); + _responseArea.setEmpty(); _scrollOffset = 0; _spacing = 0; diff --git a/engines/wintermute/base/base_active_rect.cpp b/engines/wintermute/base/base_active_rect.cpp index abeaa18d54..548b85b0c5 100644 --- a/engines/wintermute/base/base_active_rect.cpp +++ b/engines/wintermute/base/base_active_rect.cpp @@ -37,7 +37,7 @@ namespace Wintermute { ////////////////////////////////////////////////////////////////////// BaseActiveRect::BaseActiveRect(BaseGame *inGame) : BaseClass(inGame) { - BasePlatform::setRectEmpty(&_rect); + _rect.setEmpty(); _owner = nullptr; _frame = nullptr; _region = nullptr; diff --git a/engines/wintermute/base/base_frame.cpp b/engines/wintermute/base/base_frame.cpp index 0a17ee7ff0..b8c25b7465 100644 --- a/engines/wintermute/base/base_frame.cpp +++ b/engines/wintermute/base/base_frame.cpp @@ -181,7 +181,7 @@ bool BaseFrame::loadBuffer(char *buffer, int lifeTime, bool keepLoaded) { bool decoration = false; bool mirrorX = false; bool mirrorY = false; - BasePlatform::setRectEmpty(&rect); + rect.setEmpty(); char *surface_file = nullptr; while ((cmd = parser.getCommand(&buffer, commands, ¶ms)) > 0) { @@ -352,7 +352,7 @@ bool BaseFrame::getBoundingRect(Rect32 *rect, int x, int y, float scaleX, float if (!rect) { return false; } - BasePlatform::setRectEmpty(rect); + rect->setEmpty(); Rect32 subRect; diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp index f6ae3206f7..47a081eca4 100644 --- a/engines/wintermute/base/base_game.cpp +++ b/engines/wintermute/base/base_game.cpp @@ -185,7 +185,7 @@ BaseGame::BaseGame(const Common::String &targetName) : BaseObject(this), _target _lastCursor = nullptr; - BasePlatform::setRectEmpty(&_mouseLockRect); + _mouseLockRect.setEmpty(); _suppressScriptErrors = false; _lastMiniUpdate = 0; diff --git a/engines/wintermute/base/base_object.cpp b/engines/wintermute/base/base_object.cpp index ffc598471a..14e15b7161 100644 --- a/engines/wintermute/base/base_object.cpp +++ b/engines/wintermute/base/base_object.cpp @@ -63,7 +63,7 @@ BaseObject::BaseObject(BaseGame *inGame) : BaseScriptHolder(inGame) { _iD = _gameRef->getSequence(); - BasePlatform::setRectEmpty(&_rect); + _rect.setEmpty(); _rectSet = false; _cursor = nullptr; diff --git a/engines/wintermute/base/base_region.cpp b/engines/wintermute/base/base_region.cpp index e8d004dcb1..94f1c9a3a3 100644 --- a/engines/wintermute/base/base_region.cpp +++ b/engines/wintermute/base/base_region.cpp @@ -48,7 +48,7 @@ BaseRegion::BaseRegion(BaseGame *inGame) : BaseObject(inGame) { _lastMimicScale = -1; _lastMimicX = _lastMimicY = INT_MIN; - BasePlatform::setRectEmpty(&_rect); + _rect.setEmpty(); } @@ -65,7 +65,7 @@ void BaseRegion::cleanup() { } _points.clear(); - BasePlatform::setRectEmpty(&_rect); + _rect.setEmpty(); _editorSelectedPoint = -1; } @@ -491,7 +491,7 @@ bool BaseRegion::ptInPolygon(int32 x, int32 y) { ////////////////////////////////////////////////////////////////////////// bool BaseRegion::getBoundingRect(Rect32 *rect) { if (_points.size() == 0) { - BasePlatform::setRectEmpty(rect); + rect->setEmpty(); } else { int32 minX = INT_MAX, minY = INT_MAX, maxX = INT_MIN, maxY = INT_MIN; diff --git a/engines/wintermute/base/base_sprite.cpp b/engines/wintermute/base/base_sprite.cpp index 3b5cb0ac3d..df696f21a2 100644 --- a/engines/wintermute/base/base_sprite.cpp +++ b/engines/wintermute/base/base_sprite.cpp @@ -462,7 +462,7 @@ bool BaseSprite::getBoundingRect(Rect32 *rect, int x, int y, float scaleX, float return false; } - BasePlatform::setRectEmpty(rect); + rect->setEmpty(); for (uint32 i = 0; i < _frames.size(); i++) { Rect32 frame; Rect32 temp; diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp index 72af5fb076..5629962d68 100644 --- a/engines/wintermute/base/base_sub_frame.cpp +++ b/engines/wintermute/base/base_sub_frame.cpp @@ -54,7 +54,7 @@ BaseSubFrame::BaseSubFrame(BaseGame *inGame) : BaseScriptable(inGame, true) { _transparent = 0xFFFF00FF; _wantsDefaultRect = false; - BasePlatform::setRectEmpty(&_rect); + _rect.setEmpty(); _editorSelected = false; @@ -121,7 +121,7 @@ bool BaseSubFrame::loadBuffer(char *buffer, int lifeTime, bool keepLoaded) { int r = 255, g = 255, b = 255; int ar = 255, ag = 255, ab = 255, alpha = 255; bool custoTrans = false; - BasePlatform::setRectEmpty(&rect); + rect.setEmpty(); char *surfaceFile = nullptr; delete _surface; @@ -318,7 +318,7 @@ bool BaseSubFrame::saveAsText(BaseDynamicBuffer *buffer, int indent, bool comple } Rect32 rect; - BasePlatform::setRectEmpty(&rect); + rect.setEmpty(); if (_surface) { BasePlatform::setRect(&rect, 0, 0, _surface->getWidth(), _surface->getHeight()); } @@ -376,7 +376,7 @@ void BaseSubFrame::setDefaultRect() { _wantsDefaultRect = true; } else { _wantsDefaultRect = false; - BasePlatform::setRectEmpty(&_rect); + _rect.setEmpty(); } } diff --git a/engines/wintermute/base/base_viewport.cpp b/engines/wintermute/base/base_viewport.cpp index 7e531e839a..a420585168 100644 --- a/engines/wintermute/base/base_viewport.cpp +++ b/engines/wintermute/base/base_viewport.cpp @@ -38,7 +38,7 @@ IMPLEMENT_PERSISTENT(BaseViewport, false) ////////////////////////////////////////////////////////////////////////// BaseViewport::BaseViewport(BaseGame *inGame) : BaseClass(inGame) { - BasePlatform::setRectEmpty(&_rect); + _rect.setEmpty(); _mainObject = nullptr; _offsetX = _offsetY = 0; } diff --git a/engines/wintermute/base/gfx/base_renderer.cpp b/engines/wintermute/base/gfx/base_renderer.cpp index 1f171209d7..93364c4042 100644 --- a/engines/wintermute/base/gfx/base_renderer.cpp +++ b/engines/wintermute/base/gfx/base_renderer.cpp @@ -65,7 +65,7 @@ BaseRenderer::BaseRenderer(BaseGame *inGame) : BaseClass(inGame) { _loadImageX = _loadImageY = 0; _width = _height = _bPP = 0; - BasePlatform::setRectEmpty(&_monitorRect); + _monitorRect.setEmpty(); _realWidth = _realHeight = 0; _drawOffsetX = _drawOffsetY = 0; diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp index 4a1095c5c1..dc48815715 100644 --- a/engines/wintermute/base/particles/part_emitter.cpp +++ b/engines/wintermute/base/particles/part_emitter.cpp @@ -50,7 +50,7 @@ IMPLEMENT_PERSISTENT(PartEmitter, false) PartEmitter::PartEmitter(BaseGame *inGame, BaseScriptHolder *owner) : BaseObject(inGame) { _width = _height = 0; - BasePlatform::setRectEmpty(&_border); + _border.setEmpty(); _borderThicknessLeft = _borderThicknessRight = _borderThicknessTop = _borderThicknessBottom = 0; _angle1 = _angle2 = 0; diff --git a/engines/wintermute/base/particles/part_particle.cpp b/engines/wintermute/base/particles/part_particle.cpp index f4cd61c078..ccef554d9b 100644 --- a/engines/wintermute/base/particles/part_particle.cpp +++ b/engines/wintermute/base/particles/part_particle.cpp @@ -45,7 +45,7 @@ PartParticle::PartParticle(BaseGame *inGame) : BaseClass(inGame) { _creationTime = 0; _lifeTime = 0; _isDead = true; - BasePlatform::setRectEmpty(&_border); + _border.setEmpty(); _state = PARTICLE_NORMAL; _fadeStart = 0; diff --git a/engines/wintermute/platform_osystem.cpp b/engines/wintermute/platform_osystem.cpp index 3602585f59..d8967bcf9d 100644 --- a/engines/wintermute/platform_osystem.cpp +++ b/engines/wintermute/platform_osystem.cpp @@ -169,12 +169,6 @@ bool BasePlatform::setCursorPos(int x, int y) { } ////////////////////////////////////////////////////////////////////////// -bool BasePlatform::setRectEmpty(Rect32 *lprc) { - lprc->left = lprc->right = lprc->top = lprc->bottom = 0; - return true; -} - -////////////////////////////////////////////////////////////////////////// bool BasePlatform::isRectEmpty(const Rect32 *lprc) { return (lprc->left >= lprc->right) || (lprc->top >= lprc->bottom); } @@ -199,7 +193,7 @@ bool BasePlatform::intersectRect(Rect32 *lprcDst, const Rect32 *lprcSrc1, const if (isRectEmpty(lprcSrc1) || isRectEmpty(lprcSrc2) || lprcSrc1->left >= lprcSrc2->right || lprcSrc2->left >= lprcSrc1->right || lprcSrc1->top >= lprcSrc2->bottom || lprcSrc2->top >= lprcSrc1->bottom) { - setRectEmpty(lprcDst); + lprcDst->setEmpty(); return false; } lprcDst->left = MAX(lprcSrc1->left, lprcSrc2->left); @@ -214,7 +208,7 @@ bool BasePlatform::intersectRect(Rect32 *lprcDst, const Rect32 *lprcSrc1, const bool BasePlatform::unionRect(Rect32 *lprcDst, Rect32 *lprcSrc1, Rect32 *lprcSrc2) { if (isRectEmpty(lprcSrc1)) { if (isRectEmpty(lprcSrc2)) { - setRectEmpty(lprcDst); + lprcDst->setEmpty(); return false; } else { *lprcDst = *lprcSrc2; diff --git a/engines/wintermute/platform_osystem.h b/engines/wintermute/platform_osystem.h index 057c6860a5..edf9d35555 100644 --- a/engines/wintermute/platform_osystem.h +++ b/engines/wintermute/platform_osystem.h @@ -49,7 +49,6 @@ public: static bool getCursorPos(Point32 *lpPoint); static bool setCursorPos(int x, int y); - static bool setRectEmpty(Rect32 *lprc); static bool isRectEmpty(const Rect32 *lprc); static bool ptInRect(Rect32 *lprc, Point32 p); static bool setRect(Rect32 *lprc, int left, int top, int right, int bottom); diff --git a/engines/wintermute/ui/ui_tiled_image.cpp b/engines/wintermute/ui/ui_tiled_image.cpp index 29b99f71fc..b7bbbbbbe5 100644 --- a/engines/wintermute/ui/ui_tiled_image.cpp +++ b/engines/wintermute/ui/ui_tiled_image.cpp @@ -44,15 +44,15 @@ IMPLEMENT_PERSISTENT(UITiledImage, false) UITiledImage::UITiledImage(BaseGame *inGame) : BaseObject(inGame) { _image = nullptr; - BasePlatform::setRectEmpty(&_upLeft); - BasePlatform::setRectEmpty(&_upMiddle); - BasePlatform::setRectEmpty(&_upRight); - BasePlatform::setRectEmpty(&_middleLeft); - BasePlatform::setRectEmpty(&_middleMiddle); - BasePlatform::setRectEmpty(&_middleRight); - BasePlatform::setRectEmpty(&_downLeft); - BasePlatform::setRectEmpty(&_downMiddle); - BasePlatform::setRectEmpty(&_downRight); + _upLeft.setEmpty(); + _upMiddle.setEmpty(); + _upRight.setEmpty(); + _middleLeft.setEmpty(); + _middleMiddle.setEmpty(); + _middleRight.setEmpty(); + _downLeft.setEmpty(); + _downMiddle.setEmpty(); + _downRight.setEmpty(); } diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp index 8101dfd62d..5d863112c1 100644 --- a/engines/wintermute/ui/ui_window.cpp +++ b/engines/wintermute/ui/ui_window.cpp @@ -54,8 +54,8 @@ IMPLEMENT_PERSISTENT(UIWindow, false) ////////////////////////////////////////////////////////////////////////// UIWindow::UIWindow(BaseGame *inGame) : UIObject(inGame) { - BasePlatform::setRectEmpty(&_titleRect); - BasePlatform::setRectEmpty(&_dragRect); + _titleRect.setEmpty(); + _dragRect.setEmpty(); _titleAlign = TAL_LEFT; _transparent = false; |