summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-04-08 23:36:01 +0300
committerAndrei Karas <akaras@inbox.ru>2019-04-08 23:36:01 +0300
commit010455ce5fc860f41448537e14f30a8453ce5150 (patch)
tree95dafb8e18fe3f8ce4a0656866187025695888f9 /src/resources/mapreader.cpp
parent226fea014e24ea69989c7ac2f7428926ec865663 (diff)
downloadmanaverse-010455ce5fc860f41448537e14f30a8453ce5150.tar.gz
manaverse-010455ce5fc860f41448537e14f30a8453ce5150.tar.bz2
manaverse-010455ce5fc860f41448537e14f30a8453ce5150.tar.xz
manaverse-010455ce5fc860f41448537e14f30a8453ce5150.zip
If map too small, clear screen before drawing map
Clear map not works on software renderer.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index c74521817..390fb9e3d 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -35,6 +35,8 @@
#include "fs/virtfs/fs.h"
+#include "render/graphics.h"
+
#include "resources/map/map.h"
#include "resources/map/mapheights.h"
#include "resources/map/maplayer.h"
@@ -360,6 +362,8 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
w, h,
tilew, tileh);
+ map->screenResized();
+
const std::string fileName = path.substr(path.rfind(dirSeparator) + 1);
map->setProperty("shortName", fileName);