diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-20 19:32:32 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-20 19:32:32 +0000 |
commit | c93f9d8acd4b01b41afe095bc8391ef498c55eba (patch) | |
tree | 2e580486ad1cb6077478964f6a81ca9c8ea9628b /src/map.cpp | |
parent | 90e5ce7e958418f0d39d38112d33d3190a78baea (diff) | |
download | mana-c93f9d8acd4b01b41afe095bc8391ef498c55eba.tar.gz mana-c93f9d8acd4b01b41afe095bc8391ef498c55eba.tar.bz2 mana-c93f9d8acd4b01b41afe095bc8391ef498c55eba.tar.xz mana-c93f9d8acd4b01b41afe095bc8391ef498c55eba.zip |
Auto-detect map files in new map format.
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 6 |
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) { |