summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-14 00:41:48 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-14 00:41:48 +0000
commit06111415b117fc47b5b8bf6396d855616778f3b0 (patch)
tree54d21336701541b77750554e248b9a92dcba95c6 /src/engine.cpp
parent4ecc89dcc6516b10c6dab8b79dcaa435ec9e1435 (diff)
downloadmana-client-06111415b117fc47b5b8bf6396d855616778f3b0.tar.gz
mana-client-06111415b117fc47b5b8bf6396d855616778f3b0.tar.bz2
mana-client-06111415b117fc47b5b8bf6396d855616778f3b0.tar.xz
mana-client-06111415b117fc47b5b8bf6396d855616778f3b0.zip
Committed resource manager cleanup patch by Doener, and properly implemented
the custom mouse cursor option, which is now also dynamically changeable through the setup window.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 11e653b7..2ee6406f 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -282,11 +282,14 @@ Map *Engine::getCurrentMap()
void Engine::setCurrentMap(Map *newMap)
{
std::string oldMusic = "";
+
if (mCurrentMap) {
oldMusic = mCurrentMap->getProperty("music");
}
+
std::string newMusic = newMap->getProperty("music");
- if(newMusic!=oldMusic) {
+
+ if (newMusic != oldMusic) {
newMusic = std::string(TMW_DATADIR) + "data/music/" + newMusic;
sound.playMusic(newMusic.c_str(), -1);
}
@@ -542,8 +545,6 @@ void Engine::draw()
statusWindow->update();
}
- gui->draw();
-
std::stringstream debugStream;
debugStream << "[" << fps << " fps] " << mouseTileX << ", " << mouseTileY;
@@ -556,4 +557,6 @@ void Engine::draw()
debugInfo->setCaption(debugStream.str());
debugInfo->adjustSize();
+
+ gui->draw();
}