aboutsummaryrefslogtreecommitdiff
path: root/engines/macventure/gui.cpp
diff options
context:
space:
mode:
authorBorja Lorente2016-07-12 11:49:05 +0200
committerBorja Lorente2016-08-14 18:53:51 +0200
commit19d732186760bb13be49fb8d5ca4c45de0f77d86 (patch)
tree0fce7a60f6bb0dc9a7dd550053c09b46e263321c /engines/macventure/gui.cpp
parenta5a094b6bdf1dd61f270e60068c42d9f62b8c447 (diff)
downloadscummvm-rg350-19d732186760bb13be49fb8d5ca4c45de0f77d86.tar.gz
scummvm-rg350-19d732186760bb13be49fb8d5ca4c45de0f77d86.tar.bz2
scummvm-rg350-19d732186760bb13be49fb8d5ca4c45de0f77d86.zip
MACVENTURE: Fix torch drawing problem
Diffstat (limited to 'engines/macventure/gui.cpp')
-rw-r--r--engines/macventure/gui.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 1f07e7c7c4..b4fada64b8 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -1116,14 +1116,13 @@ bool Gui::tryCloseWindow(WindowReference winID) {
return true;
}
-uint Gui::getObjWidth(ObjID obj) {
- if (!_assets.contains(obj)) return 0;
- return _assets[obj]->getWidth();
-}
-
-uint Gui::getObjHeight(ObjID obj) {
- if (!_assets.contains(obj)) return 0;
- return _assets[obj]->getHeight();
+Common::Point Gui::getObjMeasures(ObjID obj) {
+ if (!_assets.contains(obj)) {
+ _assets[obj] = new ImageAsset(obj, _graphics);
+ }
+ uint w = _assets[obj]->getWidth();
+ uint h = _assets[obj]->getHeight();
+ return Common::Point(w, h);
}
bool Gui::processEvent(Common::Event &event) {