diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-03-24 21:24:31 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-03-24 21:24:31 +0000 |
commit | b5a9e699b9685e2a7d448171e282fd284754caf1 (patch) | |
tree | 4c8787fb30d28ec685bbcbb2ddca962b838a256d /src/resources/resourcemanager.cpp | |
parent | adf5fb5d45c11a0506d199d2cc672535c8418ce1 (diff) | |
download | mana-b5a9e699b9685e2a7d448171e282fd284754caf1.tar.gz mana-b5a9e699b9685e2a7d448171e282fd284754caf1.tar.bz2 mana-b5a9e699b9685e2a7d448171e282fd284754caf1.tar.xz mana-b5a9e699b9685e2a7d448171e282fd284754caf1.zip |
Logger Implemented. (3/3)
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r-- | src/resources/resourcemanager.cpp | 17 |
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); |