summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 9419233d..e7323b58 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -112,6 +112,12 @@ Map::~Map()
Map *Map::load(const std::string &mapFile)
{
+ if (mapFile.find(".tmx", 0) != std::string::npos)
+ {
+ // New map file format assumed
+ return MapReader::readMap(mapFile);
+ }
+
FILE *file = fopen(mapFile.c_str(), "r");
if (!file) {