aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2011-01-24 00:03:09 +0000
committerFilippos Karapetis2011-01-24 00:03:09 +0000
commit1f1cb1f1402206b3b120a50fe759a36388b1be4d (patch)
treebb678a6764c1a2944d6538ef19ef5fa2b10db887
parenta7f7b90aee9569817da161f1673584da2495b61e (diff)
downloadscummvm-rg350-1f1cb1f1402206b3b120a50fe759a36388b1be4d.tar.gz
scummvm-rg350-1f1cb1f1402206b3b120a50fe759a36388b1be4d.tar.bz2
scummvm-rg350-1f1cb1f1402206b3b120a50fe759a36388b1be4d.zip
SWORD25: Removed the logErrorLn and logWarningLn wrappers
svn-id: r55488
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.cpp8
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.h4
-rw-r--r--engines/sword25/gfx/renderobjectregistry.cpp49
-rw-r--r--engines/sword25/gfx/renderobjectregistry.h5
-rw-r--r--engines/sword25/kernel/objectregistry.h15
-rw-r--r--engines/sword25/math/regionregistry.cpp8
-rw-r--r--engines/sword25/math/regionregistry.h4
-rw-r--r--engines/sword25/module.mk1
8 files changed, 8 insertions, 86 deletions
diff --git a/engines/sword25/gfx/animationtemplateregistry.cpp b/engines/sword25/gfx/animationtemplateregistry.cpp
index ee58003455..c41a7cde55 100644
--- a/engines/sword25/gfx/animationtemplateregistry.cpp
+++ b/engines/sword25/gfx/animationtemplateregistry.cpp
@@ -41,14 +41,6 @@ DECLARE_SINGLETON(Sword25::AnimationTemplateRegistry);
namespace Sword25 {
-void AnimationTemplateRegistry::logErrorLn(const char *message) const {
- error("%s", message);
-}
-
-void AnimationTemplateRegistry::logWarningLn(const char *message) const {
- warning("%s", message);
-}
-
bool AnimationTemplateRegistry::persist(OutputPersistenceBlock &writer) {
bool result = true;
diff --git a/engines/sword25/gfx/animationtemplateregistry.h b/engines/sword25/gfx/animationtemplateregistry.h
index c5308bb124..574ccce136 100644
--- a/engines/sword25/gfx/animationtemplateregistry.h
+++ b/engines/sword25/gfx/animationtemplateregistry.h
@@ -53,10 +53,6 @@ public:
virtual bool persist(OutputPersistenceBlock &writer);
virtual bool unpersist(InputPersistenceBlock &reader);
-
-private:
- virtual void logErrorLn(const char *message) const;
- virtual void logWarningLn(const char *message) const;
};
} // End of namespace Sword25
diff --git a/engines/sword25/gfx/renderobjectregistry.cpp b/engines/sword25/gfx/renderobjectregistry.cpp
deleted file mode 100644
index 40029957b1..0000000000
--- a/engines/sword25/gfx/renderobjectregistry.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-/*
- * This code is based on Broken Sword 2.5 engine
- *
- * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer
- *
- * Licensed under GNU GPL v2
- *
- */
-
-#include "sword25/gfx/renderobjectregistry.h"
-
-DECLARE_SINGLETON(Sword25::RenderObjectRegistry);
-
-namespace Sword25 {
-
-void RenderObjectRegistry::logErrorLn(const char *message) const {
- error("%s", message);
-}
-
-void RenderObjectRegistry::logWarningLn(const char *message) const {
- warning("%s", message);
-}
-
-} // End of namespace Sword25
diff --git a/engines/sword25/gfx/renderobjectregistry.h b/engines/sword25/gfx/renderobjectregistry.h
index 357d041068..af63c746cb 100644
--- a/engines/sword25/gfx/renderobjectregistry.h
+++ b/engines/sword25/gfx/renderobjectregistry.h
@@ -47,11 +47,10 @@ class RenderObject;
class RenderObjectRegistry :
public ObjectRegistry<RenderObject>,
public Common::Singleton<RenderObjectRegistry> {
-private:
- virtual void logErrorLn(const char *message) const;
- virtual void logWarningLn(const char *message) const;
};
} // End of namespace Sword25
+DECLARE_SINGLETON(Sword25::RenderObjectRegistry);
+
#endif
diff --git a/engines/sword25/kernel/objectregistry.h b/engines/sword25/kernel/objectregistry.h
index 97fe19c93d..8d0f4a314b 100644
--- a/engines/sword25/kernel/objectregistry.h
+++ b/engines/sword25/kernel/objectregistry.h
@@ -50,14 +50,14 @@ public:
uint registerObject(T *objectPtr) {
// Null-Pointer können nicht registriert werden.
if (objectPtr == 0) {
- logErrorLn("Cannot register a null pointer.");
+ error("Cannot register a null pointer.");
return 0;
}
// Falls das Objekt bereits registriert wurde, wird eine Warnung ausgeben und das Handle zurückgeben.
uint handle = findHandleByPtr(objectPtr);
if (handle != 0) {
- logWarningLn("Tried to register a object that was already registered.");
+ warning("Tried to register a object that was already registered.");
return handle;
}
// Ansonsten wird das Objekt in beide Maps eingetragen und das neue Handle zurückgeben.
@@ -72,19 +72,19 @@ public:
uint registerObject(T *objectPtr, uint handle) {
// Null-Pointer und Null-Handle können nicht registriert werden.
if (objectPtr == 0 || handle == 0) {
- logErrorLn("Cannot register a null pointer or a null handle.");
+ error("Cannot register a null pointer or a null handle.");
return 0;
}
// Falls das Objekt bereits registriert wurde, wird ein Fehler ausgegeben und 0 zurückgeben.
uint handleTest = findHandleByPtr(objectPtr);
if (handleTest != 0) {
- logErrorLn("Tried to register a object that was already registered.");
+ error("Tried to register a object that was already registered.");
return 0;
}
// Falls das Handle bereits vergeben ist, wird ein Fehler ausgegeben und 0 zurückgegeben.
else if (findPtrByHandle(handle) != 0) {
- logErrorLn("Tried to register a handle that is already taken.");
+ error("Tried to register a handle that is already taken.");
return 0;
}
// Ansonsten wird das Objekt in beide Maps eingetragen und das gewünschte Handle zurückgeben.
@@ -109,7 +109,7 @@ public:
_handle2PtrMap.erase(findHandleByPtr(objectPtr));
_ptr2HandleMap.erase(objectPtr);
} else {
- logWarningLn("Tried to remove a object that was not registered.");
+ warning("Tried to remove a object that was not registered.");
}
}
@@ -163,9 +163,6 @@ protected:
// Handle zurückgeben, oder, falls keines gefunden wurde, 0 zurückgeben.
return (it != _ptr2HandleMap.end()) ? it->_value : 0;
}
-
- virtual void logErrorLn(const char *message) const = 0;
- virtual void logWarningLn(const char *message) const = 0;
};
} // End of namespace Sword25
diff --git a/engines/sword25/math/regionregistry.cpp b/engines/sword25/math/regionregistry.cpp
index 5802fbb3ff..978a1807f7 100644
--- a/engines/sword25/math/regionregistry.cpp
+++ b/engines/sword25/math/regionregistry.cpp
@@ -41,14 +41,6 @@ DECLARE_SINGLETON(Sword25::RegionRegistry);
namespace Sword25 {
-void RegionRegistry::logErrorLn(const char *message) const {
- error("%s", message);
-}
-
-void RegionRegistry::logWarningLn(const char *message) const {
- warning("%s", message);
-}
-
bool RegionRegistry::persist(OutputPersistenceBlock &writer) {
bool result = true;
diff --git a/engines/sword25/math/regionregistry.h b/engines/sword25/math/regionregistry.h
index 560d4ae4a9..db3e021e25 100644
--- a/engines/sword25/math/regionregistry.h
+++ b/engines/sword25/math/regionregistry.h
@@ -52,10 +52,6 @@ class RegionRegistry :
public:
virtual bool persist(OutputPersistenceBlock &writer);
virtual bool unpersist(InputPersistenceBlock &reader);
-
-private:
- virtual void logErrorLn(const char *message) const;
- virtual void logWarningLn(const char *message) const;
};
} // End of namespace Sword25
diff --git a/engines/sword25/module.mk b/engines/sword25/module.mk
index 58f1303e66..3ce3f52421 100644
--- a/engines/sword25/module.mk
+++ b/engines/sword25/module.mk
@@ -21,7 +21,6 @@ MODULE_OBJS := \
gfx/panel.o \
gfx/renderobject.o \
gfx/renderobjectmanager.o \
- gfx/renderobjectregistry.o \
gfx/screenshot.o \
gfx/staticbitmap.o \
gfx/text.o \