aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/resource.cpp')
-rw-r--r--engines/sci/resource.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 7138a918a1..121def5949 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -570,7 +570,7 @@ ResourceManager::~ResourceManager() {
void ResourceManager::removeFromLRU(Resource *res) {
if (res->status != kResStatusEnqueued) {
- sciprintf("Resmgr: Oops: trying to remove resource that isn't enqueued\n");
+ warning("Resmgr: trying to remove resource that isn't enqueued");
return;
}
_LRU.remove(res);
@@ -580,16 +580,15 @@ void ResourceManager::removeFromLRU(Resource *res) {
void ResourceManager::addToLRU(Resource *res) {
if (res->status != kResStatusAllocated) {
- warning("Resmgr: Oops: trying to enqueue resource with state %d", res->status);
+ warning("Resmgr: trying to enqueue resource with state %d", res->status);
return;
}
_LRU.push_front(res);
_memoryLRU += res->size;
-#if (SCI_VERBOSE_RESMGR > 1)
+#if SCI_VERBOSE_RESMGR
debug("Adding %s.%03d (%d bytes) to lru control: %d bytes total",
getResourceTypeName(res->type), res->number, res->size,
mgr->_memoryLRU);
-
#endif
res->status = kResStatusEnqueued;
}
@@ -618,7 +617,7 @@ void ResourceManager::freeOldResources() {
removeFromLRU(goner);
goner->unalloc();
#ifdef SCI_VERBOSE_RESMGR
- sciprintf("Resmgr-debug: LRU: Freeing %s.%03d (%d bytes)\n", getResourceTypeName(goner->type), goner->number, goner->size);
+ printf("Resmgr-debug: LRU: Freeing %s.%03d (%d bytes)\n", getResourceTypeName(goner->type), goner->number, goner->size);
#endif
}
}
@@ -641,7 +640,7 @@ Resource *ResourceManager::findResource(ResourceId id, bool lock) {
if (id.number >= sci_max_resource_nr[_sciVersion]) {
ResourceId moddedId = ResourceId(id.type, id.number % sci_max_resource_nr[_sciVersion], id.tuple);
- sciprintf("[resmgr] Requested invalid resource %s, mapped to %s\n",
+ warning("[resmgr] Requested invalid resource %s, mapped to %s",
id.toString().c_str(), moddedId.toString().c_str());
id = moddedId;
}
@@ -675,7 +674,7 @@ Resource *ResourceManager::findResource(ResourceId id, bool lock) {
if (retval->data)
return retval;
else {
- sciprintf("Resmgr: Failed to read %s\n", retval->id.toString().c_str());
+ warning("Resmgr: Failed to read %s", retval->id.toString().c_str());
return NULL;
}
}