From f269d5a68e6a22676c49961c7529b9c00dc90649 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 9 May 2010 14:31:43 -0600 Subject: Move target cursor management into ActorSprite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/client.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/client.cpp') 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; -- cgit v1.2.3-70-g09d2