summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-03-24 20:59:33 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-03-24 20:59:33 +0000
commit91c154d9ed3fa307ea5566f62b003c38cdacf2ad (patch)
treef2f334d090ff115ae0c3573455da42e1dca09c47
parentb58164b2ba3ea6a3f6a87db38038f69d961fda11 (diff)
downloadmana-client-91c154d9ed3fa307ea5566f62b003c38cdacf2ad.tar.gz
mana-client-91c154d9ed3fa307ea5566f62b003c38cdacf2ad.tar.bz2
mana-client-91c154d9ed3fa307ea5566f62b003c38cdacf2ad.tar.xz
mana-client-91c154d9ed3fa307ea5566f62b003c38cdacf2ad.zip
logger...
-rw-r--r--src/configuration.cpp5
-rw-r--r--src/gui/equipment.cpp3
-rw-r--r--src/gui/itemcontainer.cpp3
-rw-r--r--src/map.cpp4
4 files changed, 9 insertions, 6 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index d843f793..2167aae2 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -24,6 +24,7 @@
#include "configuration.h"
#include "log.h"
+#include "main.h"
#include <math.h>
#include <iostream>
@@ -49,7 +50,7 @@ void Configuration::init(std::string filename)
xmlNodePtr node = xmlDocGetRootElement(doc);
if (!node || !xmlStrEqual(node->name, BAD_CAST "configuration")) {
- log("Warning: No configuration file (%s)", filename.c_str());
+ logger.log("Warning: No configuration file (%s)", filename.c_str());
return;
}
@@ -87,7 +88,7 @@ bool Configuration::write(std::string filename)
for (iter = options.begin(); iter != options.end(); iter++)
{
- log("Configuration::write(%s, \"%s\")",
+ logger.log("Configuration::write(%s, \"%s\")",
iter->first.c_str(), iter->second.c_str());
xmlTextWriterStartElement(writer, BAD_CAST "option");
diff --git a/src/gui/equipment.cpp b/src/gui/equipment.cpp
index 450d985b..7d0ec083 100644
--- a/src/gui/equipment.cpp
+++ b/src/gui/equipment.cpp
@@ -21,6 +21,7 @@
* $Id$
*/
+#include "../main.h"
#include "../graphics.h"
#include "equipment.h"
#include "../resources/resourcemanager.h"
@@ -34,7 +35,7 @@ EquipmentWindow::EquipmentWindow():
ResourceManager *resman = ResourceManager::getInstance();
Image *itemImg = resman->getImage("core/graphics/sprites/items.png", IMG_ALPHA);
- if (!itemImg) error("Unable to load items.png");
+ if (!itemImg) logger.error("Unable to load items.png");
itemset = new Spriteset(itemImg, 20, 20);
for (int i = 0; i < 10; i++ ) {
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 0debd3b3..1b000127 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -21,6 +21,7 @@
* $Id$
*/
+#include "../main.h"
#include "itemcontainer.h"
#include "../graphics.h"
#include "../resources/resourcemanager.h"
@@ -30,7 +31,7 @@ ItemContainer::ItemContainer()
{
ResourceManager *resman = ResourceManager::getInstance();
Image *itemImg = resman->getImage("core/graphics/sprites/items.png", IMG_ALPHA);
- if (!itemImg) error("Unable to load items.png");
+ if (!itemImg) logger.error("Unable to load items.png");
itemset = new Spriteset(itemImg, 20, 20);
selectedItem = -1; /**< No item selected */
diff --git a/src/map.cpp b/src/map.cpp
index e7323b58..c51b479e 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -121,7 +121,7 @@ Map *Map::load(const std::string &mapFile)
FILE *file = fopen(mapFile.c_str(), "r");
if (!file) {
- log("Warning: %s", mapFile.c_str());
+ logger.log("Warning: %s", mapFile.c_str());
return NULL;
}
@@ -134,7 +134,7 @@ Map *Map::load(const std::string &mapFile)
// Load the default tileset
ResourceManager *resman = ResourceManager::getInstance();
Image *tilesetbmp = resman->getImage("core/graphics/tiles/desert.png");
- if (!tilesetbmp) error("Unable to load desert.png");
+ if (!tilesetbmp) logger.error("Unable to load desert.png");
Spriteset *tileset = new Spriteset(tilesetbmp, 32, 32);
// Transfer tile data