diff options
author | Borja Lorente | 2016-07-12 11:49:05 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-14 18:53:51 +0200 |
commit | 19d732186760bb13be49fb8d5ca4c45de0f77d86 (patch) | |
tree | 0fce7a60f6bb0dc9a7dd550053c09b46e263321c /engines/macventure/gui.cpp | |
parent | a5a094b6bdf1dd61f270e60068c42d9f62b8c447 (diff) | |
download | scummvm-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.cpp | 15 |
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) { |