summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-03-24 21:24:31 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-03-24 21:24:31 +0000
commitb5a9e699b9685e2a7d448171e282fd284754caf1 (patch)
tree4c8787fb30d28ec685bbcbb2ddca962b838a256d /src/resources/resourcemanager.cpp
parentadf5fb5d45c11a0506d199d2cc672535c8418ce1 (diff)
downloadmana-client-b5a9e699b9685e2a7d448171e282fd284754caf1.tar.gz
mana-client-b5a9e699b9685e2a7d448171e282fd284754caf1.tar.bz2
mana-client-b5a9e699b9685e2a7d448171e282fd284754caf1.tar.xz
mana-client-b5a9e699b9685e2a7d448171e282fd284754caf1.zip
Logger Implemented. (3/3)
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index eab6845e..e7b4eef3 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -21,6 +21,7 @@
* $Id$
*/
+#include "../main.h"
#include "resourcemanager.h"
#include "../log.h"
#include <iostream>
@@ -67,7 +68,7 @@ ResourceManager::~ResourceManager()
}
resources.clear();
- log("ResourceManager::~ResourceManager() cleaned up %d references to %d"
+ logger.log("ResourceManager::~ResourceManager() cleaned up %d references to %d"
" resources", danglingReferences, danglingResources);
}
@@ -96,10 +97,10 @@ Resource* ResourceManager::get(const E_RESOURCE_TYPE &type,
switch (type)
{
case MAP:
- log("Warning: Map resource not supported.");
+ logger.log("Warning: Map resource not supported.");
break;
case MUSIC:
- log("Warning: Music resource not supported.");
+ logger.log("Warning: Music resource not supported.");
break;
case IMAGE:
// Attempt to create and load our image object.
@@ -126,16 +127,16 @@ Resource* ResourceManager::get(const E_RESOURCE_TYPE &type,
break;
case SCRIPT:
- log("Warning: Script resource not supported.");
+ logger.log("Warning: Script resource not supported.");
break;
case TILESET:
- log("Warning: Tileset resource not supported.");
+ logger.log("Warning: Tileset resource not supported.");
break;
case SOUND_EFFECT:
- log("Warning: Sound FX resource not supported.");
+ logger.log("Warning: Sound FX resource not supported.");
break;
default:
- log("Warning: Unknown resource type");
+ logger.log("Warning: Unknown resource type");
break;
}
@@ -227,7 +228,7 @@ void ResourceManager::searchAndAddZipFiles()
std::string filePath = std::string(programPath) +
std::string("/") + std::string(direntry->d_name);
- log("Adding to PhysicsFS: %s", filePath.c_str());
+ logger.log("Adding to PhysicsFS: %s", filePath.c_str());
// Add the zip file to our PhysicsFS search path
PHYSFS_addToSearchPath(filePath.c_str(), 1);