summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-05-09 14:31:43 -0600
committerJared Adams <jaxad0127@gmail.com>2010-05-09 15:09:56 -0600
commitf269d5a68e6a22676c49961c7529b9c00dc90649 (patch)
tree3ccce636203883c0009146099df9d4854cab2171 /src/client.cpp
parent9baedc27191c82bbf1fedee2a7e738bc5b267c0e (diff)
downloadmana-f269d5a68e6a22676c49961c7529b9c00dc90649.tar.gz
mana-f269d5a68e6a22676c49961c7529b9c00dc90649.tar.bz2
mana-f269d5a68e6a22676c49961c7529b9c00dc90649.tar.xz
mana-f269d5a68e6a22676c49961c7529b9c00dc90649.zip
Move target cursor management into ActorSprite
This simplifies handling of target cursors, centralizing their logic into a single class, instead of two. Also make them more flexible and move the image files outside of the theme so servers can can control them and give them better names. Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp
index afc1ae1d..137210b1 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -446,14 +446,6 @@ Client::~Client()
// Shutdown sound
sound.close();
- // Unload XML databases
- ColorDB::unload();
- EmoteDB::unload();
- ItemDB::unload();
- MonsterDB::unload();
- NPCDB::unload();
- StatusEffect::unload();
-
ResourceManager::deleteInstance();
SDL_FreeSurface(mIcon);
@@ -594,6 +586,19 @@ int Client::exec()
{
delete game;
game = 0;
+
+ if (mState != STATE_CHANGE_MAP)
+ {
+ // Unload XML databases
+ ColorDB::unload();
+ EmoteDB::unload();
+ ItemDB::unload();
+ MonsterDB::unload();
+ NPCDB::unload();
+ StatusEffect::unload();
+
+ ActorSprite::unload();
+ }
}
mOldState = mState;
@@ -748,6 +753,8 @@ int Client::exec()
StatusEffect::load();
Units::loadUnits();
+ ActorSprite::load();
+
mDesktop->reloadWallpaper();
mState = STATE_GET_CHARACTERS;