summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-03 01:17:50 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-03 01:17:50 +0300
commit5334fecf60a7cbad1ada8268b122bbce4af9b0d5 (patch)
tree5a27b7e8fe972bc7fe1fd0916fe9f7fd32e253e3 /src/commands.cpp
parent60cce948bc8419c15a7fe8ab9669f4ae87c5ef76 (diff)
downloadplus-5334fecf60a7cbad1ada8268b122bbce4af9b0d5.tar.gz
plus-5334fecf60a7cbad1ada8268b122bbce4af9b0d5.tar.bz2
plus-5334fecf60a7cbad1ada8268b122bbce4af9b0d5.tar.xz
plus-5334fecf60a7cbad1ada8268b122bbce4af9b0d5.zip
Add chat command to clean graphics cache.
New chat command: /cleangraphics This command can be usefull for item or monster development.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index c86497f15..0850ba909 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -59,10 +59,11 @@
#ifdef DEBUG_DUMP_LEAKS1
#include "resources/image.h"
#include "resources/resource.h"
-#include "resources/resourcemanager.h"
#include "resources/subimage.h"
#endif
+#include "resources/resourcemanager.h"
+
#include "utils/gettext.h"
#include "utils/process.h"
@@ -344,6 +345,15 @@ impHandler0(clear)
chatWindow->clearTab();
}
+impHandler0(cleanGraphics)
+{
+ ResourceManager *const resman = ResourceManager::getInstance();
+ while(resman->cleanOrphans(true));
+
+ if (debugChatTab)
+ debugChatTab->chatLog("cache cleaned");
+}
+
impHandler(join)
{
if (!tab)