diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-10 00:33:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-10 00:33:27 +0300 |
commit | a0c7a0e2d34a13f2c3e86f662e352977ebe2ae73 (patch) | |
tree | 15996308da765b18751048c6bdaeb81926959328 /src/resources/resource.h | |
parent | c5ff42706d5ff540b5f557fa1a2b1924a6cdf07b (diff) | |
download | manaverse-a0c7a0e2d34a13f2c3e86f662e352977ebe2ae73.tar.gz manaverse-a0c7a0e2d34a13f2c3e86f662e352977ebe2ae73.tar.bz2 manaverse-a0c7a0e2d34a13f2c3e86f662e352977ebe2ae73.tar.xz manaverse-a0c7a0e2d34a13f2c3e86f662e352977ebe2ae73.zip |
Add option to left all per map sprites in memory if once was loaded.
This can prevent random lags and also can use more memory.
Diffstat (limited to 'src/resources/resource.h')
-rw-r--r-- | src/resources/resource.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/resources/resource.h b/src/resources/resource.h index 2e73cd3f0..0577a3569 100644 --- a/src/resources/resource.h +++ b/src/resources/resource.h @@ -43,6 +43,7 @@ class Resource */ Resource() : mTimeStamp(0), + mProtected(false), #ifdef DEBUG_DUMP_LEAKS mRefCount(0), mDumped(false) @@ -86,6 +87,12 @@ class Resource std::string getSource() const A_WARN_UNUSED { return mSource; } + void setProtected(bool b) + { mProtected = b; } + + bool isProtected() const + { return mProtected; } + #ifdef DEBUG_DUMP_LEAKS bool getDumped() const A_WARN_UNUSED { return mDumped; } @@ -105,6 +112,7 @@ class Resource private: time_t mTimeStamp; /**< Time at which the resource was orphaned. */ + bool mProtected; unsigned mRefCount; /**< Reference count. */ #ifdef DEBUG_DUMP_LEAKS bool mDumped; |