aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_gfx_element.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/pet_control/pet_gfx_element.cpp')
-rw-r--r--engines/titanic/pet_control/pet_gfx_element.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/engines/titanic/pet_control/pet_gfx_element.cpp b/engines/titanic/pet_control/pet_gfx_element.cpp
index 491930f46f..2686bd9ace 100644
--- a/engines/titanic/pet_control/pet_gfx_element.cpp
+++ b/engines/titanic/pet_control/pet_gfx_element.cpp
@@ -76,17 +76,15 @@ void CPetGfxElement::draw(CScreenManager *screenManager, const Common::Point &de
obj->draw(screenManager, destPos);
}
-void CPetGfxElement::getBounds(Rect *rect) {
- if (rect) {
- CGameObject *obj = getObject();
- if (!obj)
- obj = _object0;
+Rect CPetGfxElement::getBounds() const {
+ CGameObject *obj = getObject();
+ if (!obj)
+ obj = _object0;
- if (obj && obj->getSurface45())
- *rect = _bounds;
- else
- rect->clear();
- }
+ if (obj && obj->getSurface45())
+ return _bounds;
+ else
+ return Rect();
}
CGameObject *CPetGfxElement::getObject() const {