mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 07:23:05 +00:00
SCUMM: setOffHeap uses resource status in HE90+ games.
This commit is contained in:
parent
b3457144ed
commit
fb41b96e96
@ -939,18 +939,6 @@ void ResourceManager::unlock(ResType type, ResId idx) {
|
||||
_types[type][idx].unlock();
|
||||
}
|
||||
|
||||
void ResourceManager::setOffHeap(ResType type, ResId idx) {
|
||||
if (!validateResource("setOffHeap", type, idx))
|
||||
return;
|
||||
_types[type][idx].setOffHeap();
|
||||
}
|
||||
|
||||
void ResourceManager::setOnHeap(ResType type, ResId idx) {
|
||||
if (!validateResource("setOnHeap", type, idx))
|
||||
return;
|
||||
_types[type][idx].setOnHeap();
|
||||
}
|
||||
|
||||
bool ResourceManager::isLocked(ResType type, ResId idx) const {
|
||||
if (!validateResource("isLocked", type, idx))
|
||||
return false;
|
||||
@ -969,18 +957,6 @@ bool ResourceManager::Resource::isLocked() const {
|
||||
return (_flags & RF_LOCK) != 0;
|
||||
}
|
||||
|
||||
void ResourceManager::Resource::setOffHeap() {
|
||||
_flags |= RF_OFFHEAP;
|
||||
}
|
||||
|
||||
void ResourceManager::Resource::setOnHeap() {
|
||||
_flags &= ~RF_OFFHEAP;
|
||||
}
|
||||
|
||||
bool ResourceManager::Resource::isOffHeap() const {
|
||||
return (_flags & RF_OFFHEAP) != 0;
|
||||
}
|
||||
|
||||
bool ScummEngine::isResourceInUse(ResType type, ResId idx) const {
|
||||
if (!_res->validateResource("isResourceInUse", type, idx))
|
||||
return false;
|
||||
@ -1018,18 +994,42 @@ void ResourceManager::setModified(ResType type, ResId idx) {
|
||||
_types[type][idx].setModified();
|
||||
}
|
||||
|
||||
void ResourceManager::setOffHeap(ResType type, ResId idx) {
|
||||
if (!validateResource("setOffHeap", type, idx))
|
||||
return;
|
||||
_types[type][idx].setOffHeap();
|
||||
}
|
||||
|
||||
void ResourceManager::setOnHeap(ResType type, ResId idx) {
|
||||
if (!validateResource("setOnHeap", type, idx))
|
||||
return;
|
||||
_types[type][idx].setOnHeap();
|
||||
}
|
||||
|
||||
bool ResourceManager::isModified(ResType type, ResId idx) const {
|
||||
if (!validateResource("isModified", type, idx))
|
||||
return false;
|
||||
return _types[type][idx].isModified();
|
||||
}
|
||||
|
||||
bool ResourceManager::Resource::isModified() const {
|
||||
return (_status & RS_MODIFIED) != 0;
|
||||
}
|
||||
|
||||
bool ResourceManager::Resource::isOffHeap() const {
|
||||
return (_status & RF_OFFHEAP) != 0;
|
||||
}
|
||||
|
||||
void ResourceManager::Resource::setModified() {
|
||||
_status |= RS_MODIFIED;
|
||||
}
|
||||
|
||||
bool ResourceManager::Resource::isModified() const {
|
||||
return (_status & RS_MODIFIED) != 0;
|
||||
void ResourceManager::Resource::setOffHeap() {
|
||||
_status |= RF_OFFHEAP;
|
||||
}
|
||||
|
||||
void ResourceManager::Resource::setOnHeap() {
|
||||
_status &= ~RF_OFFHEAP;
|
||||
}
|
||||
|
||||
void ResourceManager::expireResources(uint32 size) {
|
||||
|
@ -134,10 +134,11 @@ public:
|
||||
inline void setResourceCounter(byte counter);
|
||||
inline byte getResourceCounter() const;
|
||||
|
||||
// HE specific
|
||||
void lock();
|
||||
void unlock();
|
||||
bool isLocked() const;
|
||||
|
||||
// HE specific
|
||||
void setModified();
|
||||
bool isModified() const;
|
||||
void setOffHeap();
|
||||
@ -191,10 +192,11 @@ public:
|
||||
|
||||
bool isResourceLoaded(ResType type, ResId idx) const;
|
||||
|
||||
// HE Specific
|
||||
void lock(ResType type, ResId idx);
|
||||
void unlock(ResType type, ResId idx);
|
||||
bool isLocked(ResType type, ResId idx) const;
|
||||
|
||||
// HE Specific
|
||||
void setModified(ResType type, ResId idx);
|
||||
bool isModified(ResType type, ResId idx) const;
|
||||
void setOffHeap(ResType type, ResId idx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user