[Scummvm-cvs-logs] SF.net SVN: scummvm:[55488] scummvm/trunk/engines/sword25

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Jan 24 01:03:09 CET 2011


Revision: 55488
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55488&view=rev
Author:   thebluegr
Date:     2011-01-24 00:03:09 +0000 (Mon, 24 Jan 2011)

Log Message:
-----------
SWORD25: Removed the logErrorLn and logWarningLn wrappers

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp
    scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.h
    scummvm/trunk/engines/sword25/gfx/renderobjectregistry.h
    scummvm/trunk/engines/sword25/kernel/objectregistry.h
    scummvm/trunk/engines/sword25/math/regionregistry.cpp
    scummvm/trunk/engines/sword25/math/regionregistry.h
    scummvm/trunk/engines/sword25/module.mk

Removed Paths:
-------------
    scummvm/trunk/engines/sword25/gfx/renderobjectregistry.cpp

Modified: scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp	2011-01-23 23:25:34 UTC (rev 55487)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp	2011-01-24 00:03:09 UTC (rev 55488)
@@ -41,14 +41,6 @@
 
 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;
 

Modified: scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.h	2011-01-23 23:25:34 UTC (rev 55487)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.h	2011-01-24 00:03:09 UTC (rev 55488)
@@ -53,10 +53,6 @@
 
 	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

Deleted: scummvm/trunk/engines/sword25/gfx/renderobjectregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/renderobjectregistry.cpp	2011-01-23 23:25:34 UTC (rev 55487)
+++ scummvm/trunk/engines/sword25/gfx/renderobjectregistry.cpp	2011-01-24 00:03:09 UTC (rev 55488)
@@ -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

Modified: scummvm/trunk/engines/sword25/gfx/renderobjectregistry.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/renderobjectregistry.h	2011-01-23 23:25:34 UTC (rev 55487)
+++ scummvm/trunk/engines/sword25/gfx/renderobjectregistry.h	2011-01-24 00:03:09 UTC (rev 55488)
@@ -47,11 +47,10 @@
 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

Modified: scummvm/trunk/engines/sword25/kernel/objectregistry.h
===================================================================
--- scummvm/trunk/engines/sword25/kernel/objectregistry.h	2011-01-23 23:25:34 UTC (rev 55487)
+++ scummvm/trunk/engines/sword25/kernel/objectregistry.h	2011-01-24 00:03:09 UTC (rev 55488)
@@ -50,14 +50,14 @@
 	uint registerObject(T *objectPtr) {
 		// Null-Pointer k\xF6nnen 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\xFCckgeben.
 		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\xFCckgeben.
@@ -72,19 +72,19 @@
 	uint registerObject(T *objectPtr, uint handle) {
 		// Null-Pointer und Null-Handle k\xF6nnen 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\xFCckgeben.
 		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\xFCckgegeben.
 		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\xFCnschte Handle zur\xFCckgeben.
@@ -109,7 +109,7 @@
 			_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 @@
 		// Handle zur\xFCckgeben, oder, falls keines gefunden wurde, 0 zur\xFCckgeben.
 		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

Modified: scummvm/trunk/engines/sword25/math/regionregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/regionregistry.cpp	2011-01-23 23:25:34 UTC (rev 55487)
+++ scummvm/trunk/engines/sword25/math/regionregistry.cpp	2011-01-24 00:03:09 UTC (rev 55488)
@@ -41,14 +41,6 @@
 
 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;
 

Modified: scummvm/trunk/engines/sword25/math/regionregistry.h
===================================================================
--- scummvm/trunk/engines/sword25/math/regionregistry.h	2011-01-23 23:25:34 UTC (rev 55487)
+++ scummvm/trunk/engines/sword25/math/regionregistry.h	2011-01-24 00:03:09 UTC (rev 55488)
@@ -52,10 +52,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

Modified: scummvm/trunk/engines/sword25/module.mk
===================================================================
--- scummvm/trunk/engines/sword25/module.mk	2011-01-23 23:25:34 UTC (rev 55487)
+++ scummvm/trunk/engines/sword25/module.mk	2011-01-24 00:03:09 UTC (rev 55488)
@@ -21,7 +21,6 @@
 	gfx/panel.o \
 	gfx/renderobject.o \
 	gfx/renderobjectmanager.o \
-	gfx/renderobjectregistry.o \
 	gfx/screenshot.o \
 	gfx/staticbitmap.o \
 	gfx/text.o \


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list