summaryrefslogtreecommitdiff
path: root/src/gui/minimap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r--src/gui/minimap.cpp23
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;
}
}