summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-09-25 03:15:26 +0200
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-09-25 03:15:26 +0200
commit661d16e98c62dfff40f481177bf3f1a0c58c2124 (patch)
treea415866c4c94a0a0c53045a47220ca413ae9c5c9 /src/resources
parent758d80263b1647c712c0e0cdd3dfca9945a1bb7e (diff)
parent7d0738df0d139af3175fcc1fec5b9be4a467f4f4 (diff)
downloadmana-661d16e98c62dfff40f481177bf3f1a0c58c2124.tar.gz
mana-661d16e98c62dfff40f481177bf3f1a0c58c2124.tar.bz2
mana-661d16e98c62dfff40f481177bf3f1a0c58c2124.tar.xz
mana-661d16e98c62dfff40f481177bf3f1a0c58c2124.zip
Merge branch '1.0'
Conflicts: src/actorspritemanager.h src/beingmanager.cpp src/game.cpp src/gui/beingpopup.cpp src/gui/chat.cpp src/gui/chat.h src/gui/inventorywindow.h src/gui/itempopup.cpp src/gui/socialwindow.cpp src/gui/statuswindow.cpp src/gui/widgets/chattab.cpp src/gui/widgets/chattab.h src/net/tmwa/inventoryhandler.cpp src/net/tmwa/partyhandler.cpp src/party.cpp src/sound.cpp src/utils/stringutils.cpp src/utils/stringutils.h
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/itemdb.cpp1
-rw-r--r--src/resources/theme.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 8a703bc7..b167e956 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -322,6 +322,7 @@ void ItemDB::unload()
delete_all(mItemInfos);
mItemInfos.clear();
+ mNamedItemInfos.clear();
mLoaded = false;
}
diff --git a/src/resources/theme.cpp b/src/resources/theme.cpp
index 6633f1e0..0316b0bf 100644
--- a/src/resources/theme.cpp
+++ b/src/resources/theme.cpp
@@ -326,6 +326,7 @@ bool Theme::tryThemePath(std::string themePath)
if (!themePath.empty())
{
themePath = defaultThemePath + themePath;
+
if (PHYSFS_exists(themePath.c_str()))
{
mThemePath = themePath;
@@ -338,6 +339,9 @@ bool Theme::tryThemePath(std::string themePath)
void Theme::prepareThemePath()
{
+ // Ensure the Theme object has been created
+ instance();
+
// Try theme from settings
if (!tryThemePath(config.getStringValue("theme")))
// Try theme from branding