diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-02-23 16:02:00 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-02-23 16:02:00 +0000 |
commit | 05a12d5568111fa13759026442ed358605bf9a28 (patch) | |
tree | 9948a2351c846dee1b36f25a90d1429aa78dda23 /src/gui/minimap.cpp | |
parent | 3737fb9fd3ff6072f83bdc514f88ad0fdbf4da6c (diff) | |
download | mana-05a12d5568111fa13759026442ed358605bf9a28.tar.gz mana-05a12d5568111fa13759026442ed358605bf9a28.tar.bz2 mana-05a12d5568111fa13759026442ed358605bf9a28.tar.xz mana-05a12d5568111fa13759026442ed358605bf9a28.zip |
A bunch of mostly cosmetic cleanups.
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r-- | src/gui/minimap.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 1165d7bb..e19a8c62 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -26,10 +26,8 @@ #include "../being.h" #include "../beingmanager.h" #include "../graphics.h" -#include "../map.h" #include "../resources/image.h" -#include "../resources/resourcemanager.h" Minimap::Minimap(): Window("Map"), @@ -48,32 +46,23 @@ Minimap::~Minimap() } } -void Minimap::setMap(Map *map) +void Minimap::setMapImage(Image *img) { if (mMapImage) { mMapImage->decRef(); } - if (map->hasProperty("minimap")) - { - ResourceManager *resman = ResourceManager::getInstance(); - mMapImage = resman->getImage(map->getProperty("minimap")); + mMapImage = img; - if (mMapImage != NULL) - { - setVisible(true); - mMapImage->setAlpha(0.7); - } - else - { - setVisible(false); - } + if (mMapImage) + { + setVisible(true); + mMapImage->setAlpha(0.7); } else { setVisible(false); - mMapImage = NULL; } } |