diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-03 01:17:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-03 01:17:50 +0300 |
commit | 5334fecf60a7cbad1ada8268b122bbce4af9b0d5 (patch) | |
tree | 5a27b7e8fe972bc7fe1fd0916fe9f7fd32e253e3 /src/commands.cpp | |
parent | 60cce948bc8419c15a7fe8ab9669f4ae87c5ef76 (diff) | |
download | plus-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.cpp | 12 |
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) |