diff options
author | Ira Rice <irarice@gmail.com> | 2008-10-13 17:34:42 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-10-13 17:34:42 +0000 |
commit | 8003fcc9f42a42170a16bdf976bb73fdf34a761e (patch) | |
tree | abb550979c6eeacf1db7659df4aceb7d963d0590 /src/engine.cpp | |
parent | a4d2f2c0373848fa8a886c1dddc6247b81527df3 (diff) | |
download | mana-8003fcc9f42a42170a16bdf976bb73fdf34a761e.tar.gz mana-8003fcc9f42a42170a16bdf976bb73fdf34a761e.tar.bz2 mana-8003fcc9f42a42170a16bdf976bb73fdf34a761e.tar.xz mana-8003fcc9f42a42170a16bdf976bb73fdf34a761e.zip |
Changed minimap code so that it allows us to have larger minimaps, while
putting back in backwards compatibility with TMW style minimaps. While
this might seem like a big deal, it also allows us to make minimaps as
big as we'd like, which is a huge perk for really large maps or really
small ones.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 42054ffb..e4361f96 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -107,6 +107,12 @@ void Engine::changeMap(const std::string &mapPath) minimap->setCaption("Unknown"); logger->log("WARNING: Map file '%s' defines a minimap image but does not define a 'mapname' property", map_path.c_str()); } + // How many pixels equal one tile. .5 (which is the TMW default) is 2 tiles to a pixel, + // while 1 is 1 tile to 1 pixel + if (newMap->hasProperty("minimapproportion")) + { + minimap->setProportion(atof(newMap->getProperty("minimapproportion").c_str())); + } } minimap->setMapImage(mapImage); beingManager->setMap(newMap); |