aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/inventory.cpp
diff options
context:
space:
mode:
authorColin Snover2017-11-12 13:43:42 -0600
committerEugene Sandulenko2017-11-18 22:35:12 +0100
commit88a2eaba93a454562b99bd59f797533b9f6b4848 (patch)
treefb3211337eab804ec349add0783193d42b52123f /engines/fullpipe/inventory.cpp
parent136223026ecb4569bbd425ed586eb7de42979c9f (diff)
downloadscummvm-rg350-88a2eaba93a454562b99bd59f797533b9f6b4848.tar.gz
scummvm-rg350-88a2eaba93a454562b99bd59f797533b9f6b4848.tar.bz2
scummvm-rg350-88a2eaba93a454562b99bd59f797533b9f6b4848.zip
FULLPIPE: Make dimensions/coordinate getters pure functions
Diffstat (limited to 'engines/fullpipe/inventory.cpp')
-rw-r--r--engines/fullpipe/inventory.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index 345a02c83e..9d6152d5a0 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -256,8 +256,6 @@ void Inventory2::rebuildItemRects() {
}
for (uint i = 0; i < _inventoryItems.size(); i++) {
- Common::Point point;
-
int idx = getInventoryPoolItemIndexById(_inventoryItems[i]->itemId);
InventoryIcon *icn = new InventoryIcon();
@@ -268,19 +266,19 @@ void Inventory2::rebuildItemRects() {
icn->pictureObjectHover = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectHover, 0);
icn->pictureObjectSelected = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectSelected, 0);
- icn->pictureObjectNormal->getDimensions(&point);
+ const Dims dims = icn->pictureObjectNormal->getDimensions();
if (_itemsPool[idx]->flags & 0x10000) {
icn->x1 = 730;
icn->y1 = itemY;
- icn->x2 = point.x + 730;
- icn->y2 = point.y + itemY + 10;
+ icn->x2 = dims.x + 730;
+ icn->y2 = dims.y + itemY + 10;
} else {
icn->x1 = itemX;
icn->y1 = itemY;
- icn->x2 = itemX + point.x;
+ icn->x2 = itemX + dims.x;
itemX = icn->x2 + 1;
- icn->y2 = point.y + itemY + 10;
+ icn->y2 = dims.y + itemY + 10;
}
_inventoryIcons.push_back(icn);