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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Jan 23 15:49:52 CET 2011


Revision: 55462
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55462&view=rev
Author:   thebluegr
Date:     2011-01-23 14:49:50 +0000 (Sun, 23 Jan 2011)

Log Message:
-----------
SWORD25: Removed the custom log class and replaced it with warning/error/debugC calls

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
    scummvm/trunk/engines/sword25/gfx/animation.cpp
    scummvm/trunk/engines/sword25/gfx/animationresource.cpp
    scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp
    scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp
    scummvm/trunk/engines/sword25/gfx/bitmap.cpp
    scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp
    scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp
    scummvm/trunk/engines/sword25/gfx/fontresource.cpp
    scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
    scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
    scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp
    scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp
    scummvm/trunk/engines/sword25/gfx/image/swimage.cpp
    scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
    scummvm/trunk/engines/sword25/gfx/panel.cpp
    scummvm/trunk/engines/sword25/gfx/renderobject.cpp
    scummvm/trunk/engines/sword25/gfx/renderobjectmanager.cpp
    scummvm/trunk/engines/sword25/gfx/renderobjectregistry.cpp
    scummvm/trunk/engines/sword25/gfx/screenshot.cpp
    scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp
    scummvm/trunk/engines/sword25/gfx/text.cpp
    scummvm/trunk/engines/sword25/input/inputengine.cpp
    scummvm/trunk/engines/sword25/input/inputengine_script.cpp
    scummvm/trunk/engines/sword25/kernel/common.h
    scummvm/trunk/engines/sword25/kernel/filesystemutil.cpp
    scummvm/trunk/engines/sword25/kernel/inputpersistenceblock.cpp
    scummvm/trunk/engines/sword25/kernel/kernel.cpp
    scummvm/trunk/engines/sword25/kernel/outputpersistenceblock.cpp
    scummvm/trunk/engines/sword25/kernel/persistenceservice.cpp
    scummvm/trunk/engines/sword25/kernel/resmanager.cpp
    scummvm/trunk/engines/sword25/kernel/resource.cpp
    scummvm/trunk/engines/sword25/math/geometry.cpp
    scummvm/trunk/engines/sword25/math/region.cpp
    scummvm/trunk/engines/sword25/math/regionregistry.cpp
    scummvm/trunk/engines/sword25/math/walkregion.cpp
    scummvm/trunk/engines/sword25/module.mk
    scummvm/trunk/engines/sword25/package/packagemanager.cpp
    scummvm/trunk/engines/sword25/script/lua_extensions.cpp
    scummvm/trunk/engines/sword25/script/luabindhelper.cpp
    scummvm/trunk/engines/sword25/script/luacallback.cpp
    scummvm/trunk/engines/sword25/script/luascript.cpp
    scummvm/trunk/engines/sword25/sfx/soundengine.cpp
    scummvm/trunk/engines/sword25/sword25.cpp
    scummvm/trunk/engines/sword25/sword25.h

Removed Paths:
-------------
    scummvm/trunk/engines/sword25/kernel/log.cpp
    scummvm/trunk/engines/sword25/kernel/log.h

Modified: scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,6 +32,7 @@
  *
  */
 
+#include "sword25/sword25.h"	// for kDebugScript
 #include "sword25/fmv/movieplayer.h"
 #include "sword25/gfx/graphicengine.h"
 #include "sword25/gfx/panel.h"
@@ -43,16 +44,14 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "MOVIEPLAYER"
-
 #define FLT_EPSILON     1.192092896e-07F        /* smallest such that 1.0+FLT_EPSILON != 1.0 */
 
 #ifdef USE_THEORADEC
 MoviePlayer::MoviePlayer(Kernel *pKernel) : Service(pKernel), _decoder(g_system->getMixer()) {
 	if (!registerScriptBindings())
-		BS_LOG_ERRORLN("Script bindings could not be registered.");
+		error("Script bindings could not be registered.");
 	else
-		BS_LOGLN("Script bindings registered.");
+		debugC(kDebugScript, "Script bindings registered.");
 }
 
 MoviePlayer::~MoviePlayer() {
@@ -70,7 +69,7 @@
 #if INDIRECTRENDERING
 	_outputBitmap = pGfx->getMainPanel()->addDynamicBitmap(_decoder.getWidth(), _decoder.getHeight());
 	if (!_outputBitmap.isValid()) {
-		BS_LOG_ERRORLN("Output bitmap for movie playback could not be created.");
+		error("Output bitmap for movie playback could not be created.");
 		return false;
 	}
 
@@ -177,7 +176,7 @@
 
 MoviePlayer::MoviePlayer(Kernel *pKernel) : Service(pKernel) {
 	if (!registerScriptBindings())
-		BS_LOG_ERRORLN("Script bindings could not be registered.");
+		error("Script bindings could not be registered.");
 	else
 		BS_LOGLN("Script bindings registered.");
 }

Modified: scummvm/trunk/engines/sword25/gfx/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animation.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/animation.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -48,8 +48,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "ANIMATION"
-
 Animation::Animation(RenderObjectPtr<RenderObject> parentPtr, const Common::String &fileName) :
 	TimedRenderObject(parentPtr, RenderObject::TYPE_ANIMATION) {
 	// Das BS_RenderObject konnte nicht erzeugt werden, daher muss an dieser Stelle abgebrochen werden.
@@ -102,7 +100,7 @@
 	if (resourcePtr && resourcePtr->getType() == Resource::TYPE_ANIMATION)
 		_animationResourcePtr = static_cast<AnimationResource *>(resourcePtr);
 	else {
-		BS_LOG_ERRORLN("The resource \"%s\" could not be requested. The Animation can't be created.", fileName.c_str());
+		error("The resource \"%s\" could not be requested. The Animation can't be created.", fileName.c_str());
 		return;
 	}
 
@@ -164,7 +162,7 @@
 	BS_ASSERT(animationDescriptionPtr);
 
 	if (nr >= animationDescriptionPtr->getFrameCount()) {
-		BS_LOG_ERRORLN("Tried to set animation to illegal frame (%d). Value must be between 0 and %d.",
+		error("Tried to set animation to illegal frame (%d). Value must be between 0 and %d.",
 		               nr, animationDescriptionPtr->getFrameCount());
 		return;
 	}
@@ -326,7 +324,7 @@
 		BS_ASSERT(animationDescriptionPtr);
 		for (uint i = 0; i < animationDescriptionPtr->getFrameCount(); ++i) {
 			if (!Kernel::getInstance()->getResourceManager()->requestResource(animationDescriptionPtr->getFrame(i).fileName)) {
-				BS_LOG_ERRORLN("Could not lock all animation frames.");
+				error("Could not lock all animation frames.");
 				return false;
 			}
 		}
@@ -344,7 +342,7 @@
 		for (uint i = 0; i < animationDescriptionPtr->getFrameCount(); ++i) {
 			Resource *pResource;
 			if (!(pResource = Kernel::getInstance()->getResourceManager()->requestResource(animationDescriptionPtr->getFrame(i).fileName))) {
-				BS_LOG_ERRORLN("Could not unlock all animation frames.");
+				error("Could not unlock all animation frames.");
 				return false;
 			}
 
@@ -419,7 +417,7 @@
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
 	BS_ASSERT(animationDescriptionPtr);
 	if (!animationDescriptionPtr->isAlphaAllowed()) {
-		BS_LOG_WARNINGLN("Tried to set alpha value on an animation that does not support alpha. Call was ignored.");
+		warning("Tried to set alpha value on an animation that does not support alpha. Call was ignored.");
 		return;
 	}
 
@@ -434,7 +432,7 @@
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
 	BS_ASSERT(animationDescriptionPtr);
 	if (!animationDescriptionPtr->isColorModulationAllowed()) {
-		BS_LOG_WARNINGLN("Tried to set modulation color on an animation that does not support color modulation. Call was ignored");
+		warning("Tried to set modulation color on an animation that does not support color modulation. Call was ignored");
 		return;
 	}
 
@@ -454,7 +452,7 @@
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
 	BS_ASSERT(animationDescriptionPtr);
 	if (!animationDescriptionPtr->isScalingAllowed()) {
-		BS_LOG_WARNINGLN("Tried to set x scale factor on an animation that does not support scaling. Call was ignored");
+		warning("Tried to set x scale factor on an animation that does not support scaling. Call was ignored");
 		return;
 	}
 
@@ -471,7 +469,7 @@
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
 	BS_ASSERT(animationDescriptionPtr);
 	if (!animationDescriptionPtr->isScalingAllowed()) {
-		BS_LOG_WARNINGLN("Tried to set y scale factor on an animation that does not support scaling. Call was ignored");
+		warning("Tried to set y scale factor on an animation that does not support scaling. Call was ignored");
 		return;
 	}
 

Modified: scummvm/trunk/engines/sword25/gfx/animationresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -40,8 +40,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "ANIMATIONRESOURCE"
-
 namespace {
 const int   DEFAULT_FPS = 10;
 const int   MIN_FPS     = 1;
@@ -67,7 +65,7 @@
 	uint fileSize;
 	char *xmlData = _pPackage->getXmlFile(getFileName(), &fileSize);
 	if (!xmlData) {
-		BS_LOG_ERRORLN("Could not read \"%s\".", getFileName().c_str());
+		error("Could not read \"%s\".", getFileName().c_str());
 		return; 
 	}
 
@@ -84,19 +82,19 @@
 
 	// Give an error message if there weren't any frames specified
 	if (_frames.empty()) {
-		BS_LOG_ERRORLN("\"%s\" does not have any frames.", getFileName().c_str());
+		error("\"%s\" does not have any frames.", getFileName().c_str());
 		return;
 	}
 
 	// Pre-cache all the frames
 	if (!precacheAllFrames()) {
-		BS_LOG_ERRORLN("Could not precache all frames of \"%s\".", getFileName().c_str());
+		error("Could not precache all frames of \"%s\".", getFileName().c_str());
 		return;
 	}
 
 	// Post processing to compute animation features
 	if (!computeFeatures()) {
-		BS_LOG_ERRORLN("Could not determine the features of \"%s\".", getFileName().c_str());
+		error("Could not determine the features of \"%s\".", getFileName().c_str());
 		return;
 	}
 
@@ -130,7 +128,7 @@
 	} else if (strcmp(loopTypeString, "jojo") == 0) {
 		_animationType = Animation::AT_JOJO;
 	} else {
-		BS_LOG_WARNINGLN("Illegal type value (\"%s\") in <animation> tag in \"%s\". Assuming default (\"loop\").",
+		warning("Illegal type value (\"%s\") in <animation> tag in \"%s\". Assuming default (\"loop\").",
 				loopTypeString, getFileName().c_str());
 		_animationType = Animation::AT_LOOP;
 	}
@@ -147,12 +145,12 @@
 
 	const char *fileString = node->values["file"].c_str();
 	if (!fileString) {
-		BS_LOG_ERRORLN("<frame> tag without file attribute occurred in \"%s\".", getFileName().c_str());
+		error("<frame> tag without file attribute occurred in \"%s\".", getFileName().c_str());
 		return false;
 	}
 	frame.fileName = _pPackage->getAbsolutePath(fileString);
 	if (frame.fileName.empty()) {
-		BS_LOG_ERRORLN("Could not create absolute path for file specified in <frame> tag in \"%s\": \"%s\".", 
+		error("Could not create absolute path for file specified in <frame> tag in \"%s\": \"%s\".", 
 			getFileName().c_str(), fileString);
 		return false;
 	}
@@ -165,25 +163,25 @@
 	const char *hotspotyString = node->values["hotspoty"].c_str();
 	if ((!hotspotxString && hotspotyString) ||
 	        (hotspotxString && !hotspotyString))
-		BS_LOG_WARNINGLN("%s attribute occurred without %s attribute in <frame> tag in \"%s\". Assuming default (\"0\").",
+		warning("%s attribute occurred without %s attribute in <frame> tag in \"%s\". Assuming default (\"0\").",
 		                 hotspotxString ? "hotspotx" : "hotspoty",
 		                 !hotspotyString ? "hotspoty" : "hotspotx",
 		                 getFileName().c_str());
 
 	frame.hotspotX = 0;
 	if (hotspotxString && !parseIntegerKey(hotspotxString, 1, &frame.hotspotX))
-		BS_LOG_WARNINGLN("Illegal hotspotx value (\"%s\") in frame tag in \"%s\". Assuming default (\"%s\").",
+		warning("Illegal hotspotx value (\"%s\") in frame tag in \"%s\". Assuming default (\"%s\").",
 		                 hotspotxString, getFileName().c_str(), frame.hotspotX);
 
 	frame.hotspotY = 0;
 	if (hotspotyString && !parseIntegerKey(hotspotyString, 1, &frame.hotspotY))
-		BS_LOG_WARNINGLN("Illegal hotspoty value (\"%s\") in frame tag in \"%s\". Assuming default (\"%s\").",
+		warning("Illegal hotspoty value (\"%s\") in frame tag in \"%s\". Assuming default (\"%s\").",
 		                 hotspotyString, getFileName().c_str(), frame.hotspotY);
 
 	Common::String flipVString = node->values["flipv"];
 	if (!flipVString.empty()) {
 		if (!parseBooleanKey(flipVString, frame.flipV)) {
-			BS_LOG_WARNINGLN("Illegal flipv value (\"%s\") in <frame> tag in \"%s\". Assuming default (\"false\").",
+			warning("Illegal flipv value (\"%s\") in <frame> tag in \"%s\". Assuming default (\"false\").",
 			                 flipVString.c_str(), getFileName().c_str());
 			frame.flipV = false;
 		}
@@ -193,7 +191,7 @@
 	Common::String flipHString = node->values["fliph"];
 	if (!flipHString.empty()) {
 		if (!parseBooleanKey(flipVString, frame.flipV)) {
-			BS_LOG_WARNINGLN("Illegal fliph value (\"%s\") in <frame> tag in \"%s\". Assuming default (\"false\").",
+			warning("Illegal fliph value (\"%s\") in <frame> tag in \"%s\". Assuming default (\"false\").",
 			                 flipHString.c_str(), getFileName().c_str());
 			frame.flipH = false;
 		}
@@ -211,7 +209,7 @@
 	Common::Array<Frame>::const_iterator iter = _frames.begin();
 	for (; iter != _frames.end(); ++iter) {
 		if (!Kernel::getInstance()->getResourceManager()->precacheResource((*iter).fileName)) {
-			BS_LOG_ERRORLN("Could not precache \"%s\".", (*iter).fileName.c_str());
+			error("Could not precache \"%s\".", (*iter).fileName.c_str());
 			return false;
 		}
 	}
@@ -232,7 +230,7 @@
 	for (; iter != _frames.end(); ++iter) {
 		BitmapResource *pBitmap;
 		if (!(pBitmap = static_cast<BitmapResource *>(Kernel::getInstance()->getResourceManager()->requestResource((*iter).fileName)))) {
-			BS_LOG_ERRORLN("Could not request \"%s\".", (*iter).fileName.c_str());
+			error("Could not request \"%s\".", (*iter).fileName.c_str());
 			return false;
 		}
 

Modified: scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,8 +32,6 @@
  *
  */
 
-#define BS_LOG_PREFIX "ANIMATIONTEMPLATE"
-
 #include "sword25/kernel/kernel.h"
 #include "sword25/kernel/resource.h"
 #include "sword25/kernel/outputpersistenceblock.h"
@@ -128,7 +126,7 @@
 	ResourceManager *RMPtr = Kernel::getInstance()->getResourceManager();
 	Resource *resourcePtr;
 	if (NULL == (resourcePtr = RMPtr->requestResource(sourceAnimation)) || resourcePtr->getType() != Resource::TYPE_ANIMATION) {
-		BS_LOG_ERRORLN("The resource \"%s\" could not be requested or is has an invalid type. The animation template can't be created.", sourceAnimation.c_str());
+		error("The resource \"%s\" could not be requested or is has an invalid type. The animation template can't be created.", sourceAnimation.c_str());
 		return 0;
 	}
 	return static_cast<AnimationResource *>(resourcePtr);
@@ -158,7 +156,7 @@
 
 bool AnimationTemplate::validateSourceIndex(uint index) const {
 	if (index > _sourceAnimationPtr->getFrameCount()) {
-		BS_LOG_WARNINGLN("Tried to insert a frame (\"%d\") that does not exist in the source animation (\"%s\"). Ignoring call.",
+		warning("Tried to insert a frame (\"%d\") that does not exist in the source animation (\"%s\"). Ignoring call.",
 		                 index, _sourceAnimationPtr->getFileName().c_str());
 		return false;
 	} else
@@ -167,7 +165,7 @@
 
 bool AnimationTemplate::validateDestIndex(uint index) const {
 	if (index > _frames.size()) {
-		BS_LOG_WARNINGLN("Tried to change a nonexistent frame (\"%d\") in a template animation. Ignoring call.",
+		warning("Tried to change a nonexistent frame (\"%d\") in a template animation. Ignoring call.",
 		                 index);
 		return false;
 	} else

Modified: scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,8 +32,6 @@
  *
  */
 
-#define BS_LOG_PREFIX "ANIMATIONTEMPLATEREGISTRY"
-
 #include "sword25/kernel/outputpersistenceblock.h"
 #include "sword25/kernel/inputpersistenceblock.h"
 #include "sword25/gfx/animationtemplateregistry.h"
@@ -44,11 +42,11 @@
 namespace Sword25 {
 
 void AnimationTemplateRegistry::logErrorLn(const char *message) const {
-	BS_LOG_ERRORLN(message);
+	error(message);
 }
 
 void AnimationTemplateRegistry::logWarningLn(const char *message) const {
-	BS_LOG_WARNINGLN(message);
+	warning(message);
 }
 
 bool AnimationTemplateRegistry::persist(OutputPersistenceBlock &writer) {

Modified: scummvm/trunk/engines/sword25/gfx/bitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmap.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/bitmap.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -38,8 +38,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "BITMAP"
-
 Bitmap::Bitmap(RenderObjectPtr<RenderObject> parentPtr, TYPES type, uint handle) :
 	RenderObject(parentPtr, type, handle),
 	_modulationColor(0xffffffff),
@@ -54,7 +52,7 @@
 
 void Bitmap::setAlpha(int alpha) {
 	if (!isAlphaAllowed()) {
-		BS_LOG_WARNINGLN("Tried to set alpha value on a bitmap that does not support alpha blending. Call was ignored.");
+		warning("Tried to set alpha value on a bitmap that does not support alpha blending. Call was ignored.");
 		return;
 	}
 
@@ -64,7 +62,7 @@
 			alpha = 0;
 		if (alpha > 255)
 			alpha = 255;
-		BS_LOG_WARNINGLN("Tried to set an invalid alpha value (%d) on a bitmap. Value was changed to %d.", oldAlpha, alpha);
+		warning("Tried to set an invalid alpha value (%d) on a bitmap. Value was changed to %d.", oldAlpha, alpha);
 
 		return;
 	}
@@ -78,7 +76,7 @@
 
 void Bitmap::setModulationColor(uint modulationColor) {
 	if (!isColorModulationAllowed()) {
-		BS_LOG_WARNINGLN("Tried to set modulation color of a bitmap that does not support color modulation. Call was ignored.");
+		warning("Tried to set modulation color of a bitmap that does not support color modulation. Call was ignored.");
 		return;
 	}
 
@@ -96,12 +94,12 @@
 
 void Bitmap::setScaleFactorX(float scaleFactorX) {
 	if (!isScalingAllowed()) {
-		BS_LOG_WARNINGLN("Tried to set scale factor of a bitmap that does not support scaling. Call was ignored.");
+		warning("Tried to set scale factor of a bitmap that does not support scaling. Call was ignored.");
 		return;
 	}
 
 	if (scaleFactorX < 0) {
-		BS_LOG_WARNINGLN("Tried to set scale factor of a bitmap to a negative value. Call was ignored.");
+		warning("Tried to set scale factor of a bitmap to a negative value. Call was ignored.");
 		return;
 	}
 
@@ -118,12 +116,12 @@
 
 void Bitmap::setScaleFactorY(float scaleFactorY) {
 	if (!isScalingAllowed()) {
-		BS_LOG_WARNINGLN("Tried to set scale factor of a bitmap that does not support scaling. Call was ignored.");
+		warning("Tried to set scale factor of a bitmap that does not support scaling. Call was ignored.");
 		return;
 	}
 
 	if (scaleFactorY < 0) {
-		BS_LOG_WARNINGLN("Tried to set scale factor of a bitmap to a negative value. Call was ignored.");
+		warning("Tried to set scale factor of a bitmap to a negative value. Call was ignored.");
 		return;
 	}
 

Modified: scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -39,8 +39,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "BITMAP"
-
 BitmapResource::BitmapResource(const Common::String &filename, Image *pImage) :
 	_valid(false),
 	_pImage(pImage),

Modified: scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -39,8 +39,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "DYNAMICBITMAP"
-
 DynamicBitmap::DynamicBitmap(RenderObjectPtr<RenderObject> parentPtr, uint width, uint height) :
 	Bitmap(parentPtr, TYPE_DYNAMICBITMAP) {
 	// Das BS_Bitmap konnte nicht erzeugt werden, daher muss an dieser Stelle abgebrochen werden.
@@ -124,7 +122,7 @@
 
 	// Bilddaten werden nicht gespeichert. Dies ist auch nicht weiter von bedeutung, da BS_DynamicBitmap nur vom Videoplayer benutzt wird.
 	// W\xE4hrend ein Video abl\xE4uft kann niemals gespeichert werden. BS_DynamicBitmap kann nur der Vollst\xE4ndigkeit halber persistiert werden.
-	BS_LOG_WARNINGLN("Persisting a BS_DynamicBitmap. Bitmap content is not persisted.");
+	warning("Persisting a BS_DynamicBitmap. Bitmap content is not persisted.");
 
 	result &= RenderObject::persistChildren(writer);
 
@@ -140,7 +138,7 @@
 	result &= createRenderedImage(_width, _height);
 
 	// Bilddaten werden nicht gespeichert (s.o.).
-	BS_LOG_WARNINGLN("Unpersisting a BS_DynamicBitmap. Bitmap contents are missing.");
+	warning("Unpersisting a BS_DynamicBitmap. Bitmap contents are missing.");
 
 	// Bild mit durchsichtigen Bilddaten initialisieren.
 	byte *transparentImageData = (byte *)calloc(_width * _height * 4, 1);

Modified: scummvm/trunk/engines/sword25/gfx/fontresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/fontresource.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/fontresource.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,8 +32,6 @@
  *
  */
 
-#define BS_LOG_PREFIX "FONTRESOURCE"
-
 #include "sword25/kernel/kernel.h"
 #include "sword25/package/packagemanager.h"
 
@@ -61,7 +59,7 @@
 	uint fileSize;
 	char *xmlData = pPackage->getXmlFile(getFileName(), &fileSize);
 	if (!xmlData) {
-		BS_LOG_ERRORLN("Could not read \"%s\".", getFileName().c_str());
+		error("Could not read \"%s\".", getFileName().c_str());
 		return;
 	}
 
@@ -79,13 +77,13 @@
 	Common::String bitmapFilename = node->values["bitmap"];
 
 	if (!parseIntegerKey(node->values["lineheight"], 1, &_lineHeight)) {
-		BS_LOG_WARNINGLN("Illegal or missing lineheight attribute in <font> tag in \"%s\". Assuming default (\"%d\").",
+		warning("Illegal or missing lineheight attribute in <font> tag in \"%s\". Assuming default (\"%d\").",
 		                 getFileName().c_str(), DEFAULT_LINEHEIGHT);
 		_lineHeight = DEFAULT_LINEHEIGHT;
 	}
 
 	if (!parseIntegerKey(node->values["gap"], 1, &_gapWidth)) {
-		BS_LOG_WARNINGLN("Illegal or missing gap attribute in <font> tag in \"%s\". Assuming default (\"%d\").",
+		warning("Illegal or missing gap attribute in <font> tag in \"%s\". Assuming default (\"%d\").",
 		                 getFileName().c_str(), DEFAULT_GAPWIDTH);
 		_gapWidth = DEFAULT_GAPWIDTH;
 	}
@@ -98,13 +96,13 @@
 	// Get the full path and filename for the bitmap resource
 	_bitmapFileName = pPackage->getAbsolutePath(bitmapFilename);
 	if (_bitmapFileName == "") {
-		BS_LOG_ERRORLN("Image file \"%s\" was specified in <font> tag of \"%s\" but could not be found.",
+		error("Image file \"%s\" was specified in <font> tag of \"%s\" but could not be found.",
 		               _bitmapFileName.c_str(), getFileName().c_str());
 	}
 
 	// Pre-cache the resource
 	if (!_pKernel->getResourceManager()->precacheResource(_bitmapFileName)) {
-		BS_LOG_ERRORLN("Could not precache \"%s\".", _bitmapFileName.c_str());
+		error("Could not precache \"%s\".", _bitmapFileName.c_str());
 	}
 
 	return true;

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,10 +32,9 @@
  *
  */
 
-#define BS_LOG_PREFIX "GRAPHICENGINE"
-
 #include "common/system.h"
 
+#include "sword25/sword25.h"	// for kDebugScript
 #include "sword25/gfx/bitmapresource.h"
 #include "sword25/gfx/animationresource.h"
 #include "sword25/gfx/fontresource.h"
@@ -79,9 +78,9 @@
 	_frameTimeSamples.resize(FRAMETIME_SAMPLE_COUNT);
 
 	if (!registerScriptBindings())
-		BS_LOG_ERRORLN("Script bindings could not be registered.");
+		error("Script bindings could not be registered.");
 	else
-		BS_LOGLN("Script bindings registered.");
+		debugC(kDebugScript, "Script bindings registered.");
 }
 
 GraphicEngine::~GraphicEngine() {
@@ -94,13 +93,13 @@
 bool GraphicEngine::init(int width, int height, int bitDepth, int backbufferCount, bool isWindowed_) {
 	// Warnung ausgeben, wenn eine nicht unterst\xFCtzte Bittiefe gew\xE4hlt wurde.
 	if (bitDepth != BIT_DEPTH) {
-		BS_LOG_WARNINGLN("Can't use a bit depth of %d (not supported). Falling back to %d.", bitDepth, BIT_DEPTH);
+		warning("Can't use a bit depth of %d (not supported). Falling back to %d.", bitDepth, BIT_DEPTH);
 		_bitDepth = BIT_DEPTH;
 	}
 
 	// Warnung ausgeben, wenn nicht genau ein Backbuffer gew\xE4hlt wurde.
 	if (backbufferCount != BACKBUFFER_COUNT) {
-		BS_LOG_WARNINGLN("Can't use %d backbuffers (not supported). Falling back to %d.", backbufferCount, BACKBUFFER_COUNT);
+		warning("Can't use %d backbuffers (not supported). Falling back to %d.", backbufferCount, BACKBUFFER_COUNT);
 		backbufferCount = BACKBUFFER_COUNT;
 	}
 
@@ -311,7 +310,7 @@
 		uint fileSize;
 		pFileData = pPackage->getFile(filename, &fileSize);
 		if (!pFileData) {
-			BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str());
+			error("File \"%s\" could not be loaded.", filename.c_str());
 			return 0;
 		}
 
@@ -356,7 +355,7 @@
 		}
 	}
 
-	BS_LOG_ERRORLN("Service cannot load \"%s\".", filename.c_str());
+	error("Service cannot load \"%s\".", filename.c_str());
 	return 0;
 }
 

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -50,8 +50,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "GRAPHICENGINE"
-
 static bool animationDeleteCallback(uint Data);
 static bool animationActionCallback(uint Data);
 static bool animationLoopPointCallback(uint Data);

Modified: scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -42,9 +42,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "PNGLOADER"
-
-
 /**
  * Load a NULL-terminated string from the given stream.
  */

Modified: scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -44,8 +44,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "RENDEREDIMAGE"
-
 // -----------------------------------------------------------------------------
 // CONSTRUCTION / DESTRUCTION
 // -----------------------------------------------------------------------------
@@ -66,21 +64,21 @@
 	uint fileSize;
 	pFileData = pPackage->getFile(filename, &fileSize);
 	if (!pFileData) {
-		BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str());
+		error("File \"%s\" could not be loaded.", filename.c_str());
 		return;
 	}
 
 	// Bildeigenschaften bestimmen
 	int pitch;
 	if (!PNGLoader::imageProperties(pFileData, fileSize, _width, _height)) {
-		BS_LOG_ERRORLN("Could not read image properties.");
+		error("Could not read image properties.");
 		delete[] pFileData;
 		return;
 	}
 
 	// Das Bild dekomprimieren
 	if (!PNGLoader::decodeImage(pFileData, fileSize, _data, _width, _height, pitch)) {
-		BS_LOG_ERRORLN("Could not decode image.");
+		error("Could not decode image.");
 		delete[] pFileData;
 		return;
 	}
@@ -129,7 +127,7 @@
 // -----------------------------------------------------------------------------
 
 bool RenderedImage::fill(const Common::Rect *pFillRect, uint color) {
-	BS_LOG_ERRORLN("Fill() is not supported.");
+	error("Fill() is not supported.");
 	return false;
 }
 
@@ -138,7 +136,7 @@
 bool RenderedImage::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
 	// \xDCberpr\xFCfen, ob PixelData ausreichend viele Pixel enth\xE4lt um ein Bild der Gr\xF6\xDFe Width * Height zu erzeugen
 	if (size < static_cast<uint>(_width * _height * 4)) {
-		BS_LOG_ERRORLN("PixelData vector is too small to define a 32 bit %dx%d image.", _width, _height);
+		error("PixelData vector is too small to define a 32 bit %dx%d image.", _width, _height);
 		return false;
 	}
 
@@ -162,7 +160,7 @@
 // -----------------------------------------------------------------------------
 
 uint RenderedImage::getPixel(int x, int y) {
-	BS_LOG_ERRORLN("GetPixel() is not supported. Returning black.");
+	error("GetPixel() is not supported. Returning black.");
 	return 0;
 }
 

Modified: scummvm/trunk/engines/sword25/gfx/image/swimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/swimage.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/image/swimage.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -38,9 +38,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "SWIMAGE"
-
-
 SWImage::SWImage(const Common::String &filename, bool &result) :
 	_imageDataPtr(0),
 	_width(0),
@@ -55,21 +52,21 @@
 	uint fileSize;
 	pFileData = pPackage->getFile(filename, &fileSize);
 	if (!pFileData) {
-		BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str());
+		error("File \"%s\" could not be loaded.", filename.c_str());
 		return;
 	}
 
 	// Bildeigenschaften bestimmen
 	int pitch;
 	if (!PNGLoader::imageProperties(pFileData, fileSize, _width, _height)) {
-		BS_LOG_ERRORLN("Could not read image properties.");
+		error("Could not read image properties.");
 		return;
 	}
 
 	// Das Bild dekomprimieren
 	byte *pUncompressedData;
 	if (!PNGLoader::decodeImage(pFileData, fileSize, pUncompressedData, _width, _height, pitch)) {
-		BS_LOG_ERRORLN("Could not decode image.");
+		error("Could not decode image.");
 		return;
 	}
 
@@ -92,17 +89,17 @@
                       Common::Rect *pPartRect,
                       uint color,
                       int width, int height) {
-	BS_LOG_ERRORLN("Blit() is not supported.");
+	error("Blit() is not supported.");
 	return false;
 }
 
 bool SWImage::fill(const Common::Rect *pFillRect, uint color) {
-	BS_LOG_ERRORLN("Fill() is not supported.");
+	error("Fill() is not supported.");
 	return false;
 }
 
 bool SWImage::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
-	BS_LOG_ERRORLN("SetContent() is not supported.");
+	error("SetContent() is not supported.");
 	return false;
 }
 

Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -44,8 +44,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "VECTORIMAGE"
-
 #define BEZSMOOTHNESS 0.5
 
 // -----------------------------------------------------------------------------
@@ -234,21 +232,21 @@
 	if (signature[0] != 'F' ||
 	        signature[1] != 'W' ||
 	        signature[2] != 'S') {
-		BS_LOG_ERRORLN("File is not a valid SWF-file");
+		error("File is not a valid SWF-file");
 		return;
 	}
 
 	// Versionsangabe \xFCberpr\xFCfen
 	uint32 version = bs.getByte();
 	if (version > MAX_ACCEPTED_FLASH_VERSION) {
-		BS_LOG_ERRORLN("File is of version %d. Highest accepted version is %d.", version, MAX_ACCEPTED_FLASH_VERSION);
+		error("File is of version %d. Highest accepted version is %d.", version, MAX_ACCEPTED_FLASH_VERSION);
 		return;
 	}
 
 	// Dateigr\xF6\xDFe auslesen und mit der tats\xE4chlichen Gr\xF6\xDFe vergleichen
 	uint32 storedFileSize = bs.getUInt32();
 	if (storedFileSize != fileSize) {
-		BS_LOG_ERRORLN("File is not a valid SWF-file");
+		error("File is not a valid SWF-file");
 		return;
 	}
 
@@ -582,7 +580,7 @@
 // -----------------------------------------------------------------------------
 
 bool VectorImage::fill(const Common::Rect *pFillRect, uint color) {
-	BS_LOG_ERRORLN("Fill() is not supported.");
+	error("Fill() is not supported.");
 	return false;
 }
 
@@ -590,14 +588,14 @@
 // -----------------------------------------------------------------------------
 
 uint VectorImage::getPixel(int x, int y) {
-	BS_LOG_ERRORLN("GetPixel() is not supported. Returning black.");
+	error("GetPixel() is not supported. Returning black.");
 	return 0;
 }
 
 // -----------------------------------------------------------------------------
 
 bool VectorImage::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
-	BS_LOG_ERRORLN("SetContent() is not supported.");
+	error("SetContent() is not supported.");
 	return 0;
 }
 

Modified: scummvm/trunk/engines/sword25/gfx/panel.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/panel.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/panel.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -41,8 +41,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "PANEL"
-
 Panel::Panel(RenderObjectPtr<RenderObject> parentPtr, int width, int height, uint color) :
 	RenderObject(parentPtr, RenderObject::TYPE_PANEL),
 	_color(color) {
@@ -52,12 +50,12 @@
 	_height = height;
 
 	if (_width < 0) {
-		BS_LOG_ERRORLN("Tried to initialise a panel with an invalid width (%d).", _width);
+		error("Tried to initialise a panel with an invalid width (%d).", _width);
 		return;
 	}
 
 	if (_height < 0) {
-		BS_LOG_ERRORLN("Tried to initialise a panel with an invalid height (%d).", _height);
+		error("Tried to initialise a panel with an invalid height (%d).", _height);
 		return;
 	}
 

Modified: scummvm/trunk/engines/sword25/gfx/renderobject.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/renderobject.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/renderobject.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -51,8 +51,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "RENDEROBJECT"
-
 RenderObject::RenderObject(RenderObjectPtr<RenderObject> parentPtr, TYPES type, uint handle) :
 	_managerPtr(0),
 	_parentPtr(parentPtr),
@@ -90,7 +88,7 @@
 		_parentPtr->addObject(this->getHandle());
 	} else {
 		if (getType() != TYPE_ROOT) {
-			BS_LOG_ERRORLN("Tried to create a non-root render object and has no parent. All non-root render objects have to have a parent.");
+			error("Tried to create a non-root render object and has no parent. All non-root render objects have to have a parent.");
 			return;
 		}
 	}
@@ -226,7 +224,7 @@
 
 bool RenderObject::addObject(RenderObjectPtr<RenderObject> pObject) {
 	if (!pObject.isValid()) {
-		BS_LOG_ERRORLN("Tried to add a null object to a renderobject.");
+		error("Tried to add a null object to a renderobject.");
 		return false;
 	}
 
@@ -249,7 +247,7 @@
 			return true;
 		}
 
-	BS_LOG_ERRORLN("Tried to detach children from a render object that isn't its parent.");
+	error("Tried to detach children from a render object that isn't its parent.");
 	return false;
 }
 
@@ -289,7 +287,7 @@
 
 void RenderObject::setZ(int z) {
 	if (z < 0)
-		BS_LOG_ERRORLN("Tried to set a negative Z value (%d).", z);
+		error("Tried to set a negative Z value (%d).", z);
 	else
 		_z = z;
 }
@@ -500,7 +498,7 @@
 		break;
 
 	default:
-		BS_LOG_ERRORLN("Cannot recreate render object of unknown type %d.", type);
+		error("Cannot recreate render object of unknown type %d.", type);
 	}
 
 	return result;

Modified: scummvm/trunk/engines/sword25/gfx/renderobjectmanager.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/renderobjectmanager.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/renderobjectmanager.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -46,8 +46,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "RENDEROBJECTMANAGER"
-
 RenderObjectManager::RenderObjectManager(int width, int height, int framebufferCount) :
 	_frameStarted(false) {
 	// Wurzel des BS_RenderObject-Baumes erzeugen.

Modified: scummvm/trunk/engines/sword25/gfx/renderobjectregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/renderobjectregistry.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/renderobjectregistry.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -38,14 +38,12 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "RENDEROBJECTREGISTRY"
-
 void RenderObjectRegistry::logErrorLn(const char *message) const {
-	BS_LOG_ERRORLN(message);
+	error(message);
 }
 
 void RenderObjectRegistry::logWarningLn(const char *message) const {
-	BS_LOG_WARNINGLN(message);
+	warning(message);
 }
 
 } // End of namespace Sword25

Modified: scummvm/trunk/engines/sword25/gfx/screenshot.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/screenshot.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/screenshot.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -35,8 +35,6 @@
 // Disable symbol overrides so that we can use png.h
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-#define BS_LOG_PREFIX "SCREENSHOT"
-
 #include "common/memstream.h"
 #include "sword25/gfx/screenshot.h"
 #include "sword25/kernel/filesystemutil.h"
@@ -130,7 +128,7 @@
 
 	// The source image must be 800x600.
 	if (data->w != 800 || data->h != 600 || data->bytesPerPixel != 4) {
-		BS_LOG_ERRORLN("The sreenshot dimensions have to be 800x600 in order to be saved as a thumbnail.");
+		error("The sreenshot dimensions have to be 800x600 in order to be saved as a thumbnail.");
 		return false;
 	}
 

Modified: scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -40,8 +40,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "STATICBITMAP"
-
 StaticBitmap::StaticBitmap(RenderObjectPtr<RenderObject> parentPtr, const Common::String &filename) :
 	Bitmap(parentPtr, TYPE_STATICBITMAP) {
 	// Das BS_Bitmap konnte nicht erzeugt werden, daher muss an dieser Stelle abgebrochen werden.
@@ -60,11 +58,11 @@
 	// Bild-Resource laden
 	Resource *resourcePtr = Kernel::getInstance()->getResourceManager()->requestResource(filename);
 	if (!resourcePtr) {
-		BS_LOG_ERRORLN("Could not request resource \"%s\".", filename.c_str());
+		warning("Could not request resource \"%s\".", filename.c_str());
 		return false;
 	}
 	if (resourcePtr->getType() != Resource::TYPE_BITMAP) {
-		BS_LOG_ERRORLN("Requested resource \"%s\" is not a bitmap.", filename.c_str());
+		error("Requested resource \"%s\" is not a bitmap.", filename.c_str());
 		return false;
 	}
 
@@ -130,7 +128,7 @@
 }
 
 bool StaticBitmap::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
-	BS_LOG_ERRORLN("SetContent() ist not supported with this object.");
+	error("SetContent() ist not supported with this object.");
 	return false;
 }
 

Modified: scummvm/trunk/engines/sword25/gfx/text.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/text.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/gfx/text.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -46,8 +46,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "TEXT"
-
 namespace {
 const uint AUTO_WRAP_THRESHOLD_DEFAULT = 300;
 }
@@ -79,7 +77,7 @@
 		forceRefresh();
 		return true;
 	} else {
-		BS_LOG_ERRORLN("Could not precache font \"%s\". Font probably does not exist.", font.c_str());
+		error("Could not precache font \"%s\". Font probably does not exist.", font.c_str());
 		return false;
 	}
 
@@ -136,11 +134,11 @@
 	{
 		Resource *pResource = rmPtr->requestResource(fontPtr->getCharactermapFileName());
 		if (!pResource) {
-			BS_LOG_ERRORLN("Could not request resource \"%s\".", fontPtr->getCharactermapFileName().c_str());
+			warning("Could not request resource \"%s\".", fontPtr->getCharactermapFileName().c_str());
 			return false;
 		}
 		if (pResource->getType() != Resource::TYPE_BITMAP) {
-			BS_LOG_ERRORLN("Requested resource \"%s\" is not a bitmap.", fontPtr->getCharactermapFileName().c_str());
+			error("Requested resource \"%s\" is not a bitmap.", fontPtr->getCharactermapFileName().c_str());
 			return false;
 		}
 
@@ -198,11 +196,11 @@
 	{
 		Resource *resourcePtr = rmPtr->requestResource(_font);
 		if (!resourcePtr) {
-			BS_LOG_ERRORLN("Could not request resource \"%s\".", _font.c_str());
+			warning("Could not request resource \"%s\".", _font.c_str());
 			return NULL;
 		}
 		if (resourcePtr->getType() != Resource::TYPE_FONT) {
-			BS_LOG_ERRORLN("Requested resource \"%s\" is not a font.", _font.c_str());
+			error("Requested resource \"%s\" is not a font.", _font.c_str());
 			return NULL;
 		}
 

Modified: scummvm/trunk/engines/sword25/input/inputengine.cpp
===================================================================
--- scummvm/trunk/engines/sword25/input/inputengine.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/input/inputengine.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,12 +32,12 @@
  *
  */
 
-#define BS_LOG_PREFIX "INPUTENGINE"
-
 #include "common/algorithm.h"
 #include "common/events.h"
 #include "common/system.h"
 #include "common/util.h"
+
+#include "sword25/sword25.h"
 #include "sword25/kernel/kernel.h"
 #include "sword25/kernel/inputpersistenceblock.h"
 #include "sword25/kernel/outputpersistenceblock.h"
@@ -70,9 +70,9 @@
 	_rightMouseState[1] = false;
 
 	if (!registerScriptBindings())
-		BS_LOG_ERRORLN("Script bindings could not be registered.");
+		error("Script bindings could not be registered.");
 	else
-		BS_LOGLN("Script bindings registered.");
+		debugC(kDebugScript, "Script bindings registered.");
 }
 
 InputEngine::~InputEngine() {

Modified: scummvm/trunk/engines/sword25/input/inputengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/input/inputengine_script.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/input/inputengine_script.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -42,8 +42,6 @@
 
 #include "sword25/input/inputengine.h"
 
-#define BS_LOG_PREFIX "INPUTENGINE"
-
 namespace Sword25 {
 
 static void theCharacterCallback(int character);

Modified: scummvm/trunk/engines/sword25/kernel/common.h
===================================================================
--- scummvm/trunk/engines/sword25/kernel/common.h	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/common.h	2011-01-23 14:49:50 UTC (rev 55462)
@@ -48,11 +48,10 @@
 // Global constants
 #define DEBUG
 
-#define BS_ACTIVATE_LOGGING // When defined, logging is activated
-
-// Engine Includes
-#include "sword25/kernel/log.h"
-
+// Includes
+#include "common/array.h"
+#include "common/file.h"
+#include "sword25/kernel/common.h"
 #include "common/debug.h"
 
 #define BS_ASSERT(EXP) assert(EXP)

Modified: scummvm/trunk/engines/sword25/kernel/filesystemutil.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/filesystemutil.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/filesystemutil.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -41,8 +41,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "FILESYSTEMUTIL"
-
 Common::String FileSystemUtil::getUserdataDirectory() {
 	// FIXME: This code is a hack which bypasses the savefile API,
 	// and should eventually be removed.

Modified: scummvm/trunk/engines/sword25/kernel/inputpersistenceblock.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/inputpersistenceblock.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/inputpersistenceblock.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,8 +32,6 @@
  *
  */
 
-#define BS_LOG_PREFIX "INPUTPERSISTENCEBLOCK"
-
 #include "sword25/kernel/inputpersistenceblock.h"
 
 namespace Sword25 {
@@ -46,7 +44,7 @@
 
 InputPersistenceBlock::~InputPersistenceBlock() {
 	if (_iter != _data.end())
-		BS_LOG_WARNINGLN("Persistence block was not read to the end.");
+		warning("Persistence block was not read to the end.");
 }
 
 void InputPersistenceBlock::read(int16 &value) {
@@ -131,7 +129,7 @@
 		return true;
 	} else {
 		_errorState = END_OF_DATA;
-		BS_LOG_ERRORLN("Unexpected end of persistence block.");
+		error("Unexpected end of persistence block.");
 		return false;
 	}
 }
@@ -144,7 +142,7 @@
 		return true;
 	} else {
 		_errorState = OUT_OF_SYNC;
-		BS_LOG_ERRORLN("Wrong type marker found in persistence block.");
+		error("Wrong type marker found in persistence block.");
 		return false;
 	}
 }

Modified: scummvm/trunk/engines/sword25/kernel/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/kernel.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/kernel.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -33,6 +33,8 @@
  */
 
 #include "common/system.h"
+
+#include "sword25/sword25.h"	// for kDebugScript
 #include "sword25/gfx/graphicengine.h"
 #include "sword25/fmv/movieplayer.h"
 #include "sword25/input/inputengine.h"
@@ -45,8 +47,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "KERNEL"
-
 Kernel *Kernel::_instance = 0;
 
 Kernel::Kernel() :
@@ -60,8 +60,6 @@
 	_fmv(0)
 	{
 
-	// Log that the kernel is beign created
-	BS_LOGLN("created.");
 	_instance = this;
 
 	// Create the resource manager
@@ -76,11 +74,11 @@
 
 	// Register kernel script bindings
 	if (!registerScriptBindings()) {
-		BS_LOG_ERRORLN("Script bindings could not be registered.");
+		error("Script bindings could not be registered.");
 		_initSuccess = false;
 		return;
 	}
-	BS_LOGLN("Script bindings registered.");
+	debugC(kDebugScript, "Script bindings registered.");
 
 	_input = new InputEngine(this);
 	assert(_input);
@@ -133,8 +131,6 @@
 
 	// Resource-Manager freigeben
 	delete _resourceManager;
-
-	BS_LOGLN("destroyed.");
 }
 
 /**

Deleted: scummvm/trunk/engines/sword25/kernel/log.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/log.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/log.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -1,214 +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/kernel/log.h"
-#include "base/version.h"
-#include "common/config-manager.h"
-#include "common/fs.h"
-
-namespace Sword25 {
-
-static const char *BF_LOG_FILENAME = "log.txt";
-static const size_t LOG_BUFFERSIZE = 1024 * 16;
-
-// Logging will take place only when it's activated
-#ifdef BS_ACTIVATE_LOGGING
-
-Common::WriteStream *BS_Log::_logFile = NULL;
-bool BS_Log::_lineBegin = true;
-const char *BS_Log::_prefix = NULL;
-const char *BS_Log::_file = NULL;
-int BS_Log::_line = 0;
-bool BS_Log::_autoNewline = false;
-
-bool BS_Log::createLog() {
-	// Open the log file
-	Common::FSNode dataDir(ConfMan.get("path"));
-	Common::FSNode file = dataDir.getChild(BF_LOG_FILENAME);
-
-	// Open the file for saving
-	_logFile = file.createWriteStream();
-
-	if (_logFile) {
-		// Add a title into the log file
-		log("Broken Sword 2.5 Engine - Build: %s - %s - VersionID: %s\n", __DATE__, __TIME__, gScummVMFullVersion);
-		log("-----------------------------------------------------------------------------------------------------\n");
-
-		return true;
-	}
-
-	// Log file could not be created
-	return false;
-}
-
-void BS_Log::closeLog() {
-	delete _logFile;
-	_logFile = NULL;
-}
-
-void BS_Log::log(const char *format, ...) {
-	char message[LOG_BUFFERSIZE];
-
-	// Create the message
-	va_list argList;
-	va_start(argList, format);
-	vsnprintf(message, sizeof(message), format, argList);
-
-	// Log the message
-	writeLog(message);
-
-	flushLog();
-}
-
-void BS_Log::logPrefix(const char *prefix, const char *format, ...) {
-	char message[LOG_BUFFERSIZE];
-	char extFormat[LOG_BUFFERSIZE];
-
-	// If the issue has ceased at the beginning of a new line, the new issue to begin with the prefix
-	extFormat[0] = 0;
-	if (_lineBegin) {
-		snprintf(extFormat, sizeof(extFormat), "%s: ", prefix);
-		_lineBegin = false;
-	}
-	// Format String pass line by line and each line with the initial prefix
-	for (;;) {
-		const char *nextLine = strstr(format, "\n");
-		if (!nextLine || *(nextLine + strlen("\n")) == 0) {
-			Common::strlcat(extFormat, format, sizeof(extFormat));
-			if (nextLine)
-				_lineBegin = true;
-			break;
-		} else {
-			strncat(extFormat, format, (nextLine - format) + strlen("\n"));
-			Common::strlcat(extFormat, prefix, sizeof(extFormat));
-			Common::strlcat(extFormat, ": ", sizeof(extFormat));
-		}
-
-		format = nextLine + strlen("\n");
-	}
-
-	// Create message
-	va_list argList;
-	va_start(argList, format);
-	vsnprintf(message, sizeof(message), extFormat, argList);
-
-	// Log the message
-	writeLog(message);
-
-	flushLog();
-}
-
-void BS_Log::logDecorated(const char *format, ...) {
-	// Nachricht erzeugen
-	char message[LOG_BUFFERSIZE];
-	va_list argList;
-	va_start(argList, format);
-	vsnprintf(message, sizeof(message), format, argList);
-
-	// Zweiten prefix erzeugen, falls gew\xFCnscht
-	char secondaryPrefix[1024];
-	if (_file && _line)
-		snprintf(secondaryPrefix, sizeof(secondaryPrefix), "(file: %s, line: %d) - ", _file, _line);
-
-	// Nachricht zeilenweise ausgeben und an jeden Zeilenanfang das Pr\xE4fix setzen
-	char *messageWalker = message;
-	for (;;) {
-		char *nextLine = strstr(messageWalker, "\n");
-		if (nextLine) {
-			*nextLine = 0;
-			if (_lineBegin) {
-				writeLog(_prefix);
-				if (_file && _line)
-					writeLog(secondaryPrefix);
-			}
-			writeLog(messageWalker);
-			writeLog("\n");
-			messageWalker = nextLine + sizeof("\n") - 1;
-			_lineBegin = true;
-		} else {
-			if (_lineBegin) {
-				writeLog(_prefix);
-				if (_file && _line)
-					writeLog(secondaryPrefix);
-			}
-			writeLog(messageWalker);
-			_lineBegin = false;
-			break;
-		}
-	}
-
-	// Falls gew\xFCnscht, wird ans Ende der Nachricht automatisch ein Newline angeh\xE4ngt.
-	if (_autoNewline) {
-		writeLog("\n");
-		_lineBegin = true;
-	}
-
-	// Pseudoparameter zur\xFCcksetzen
-	_prefix = NULL;
-	_file = 0;
-	_line = 0;
-	_autoNewline = false;
-
-	flushLog();
-}
-
-int BS_Log::writeLog(const char *message) {
-	if (!_logFile && !createLog())
-		return false;
-
-	debugN(0, "%s", message);
-
-	_logFile->writeString(message);
-
-	return true;
-}
-
-void BS_Log::flushLog() {
-	if (_logFile)
-		_logFile->flush();
-}
-
-void (*BS_LogPtr)(const char *, ...) = BS_Log::log;
-
-void BS_Log_C(const char *message) {
-	BS_LogPtr(message);
-}
-
-#else
-
-void BS_Log_C(const char *message) {};
-
-#endif
-
-} // End of namespace Sword25

Deleted: scummvm/trunk/engines/sword25/kernel/log.h
===================================================================
--- scummvm/trunk/engines/sword25/kernel/log.h	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/log.h	2011-01-23 14:49:50 UTC (rev 55462)
@@ -1,134 +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
- *
- */
-
-#ifndef SWORD25_LOG_H
-#define SWORD25_LOG_H
-
-// Includes
-#include "common/array.h"
-#include "common/file.h"
-#include "sword25/kernel/common.h"
-
-namespace Sword25 {
-
-// Logging soll nur stattfinden wenn es aktiviert ist
-#ifdef BS_ACTIVATE_LOGGING
-
-// Logging-Makros
-#define BS_LOG              BS_Log::setPrefix(BS_LOG_PREFIX ": "), BS_Log::logDecorated
-#define BS_LOGLN            BS_Log::setPrefix(BS_LOG_PREFIX ": "), BS_Log::setAutoNewline(true), BS_Log::logDecorated
-#define BS_LOG_WARNING      BS_Log::setPrefix(BS_LOG_PREFIX ": WARNING - "), BS_Log::logDecorated
-#define BS_LOG_WARNINGLN    BS_Log::setPrefix(BS_LOG_PREFIX ": WARNING - "), BS_Log::setAutoNewline(true), BS_Log::logDecorated
-#define BS_LOG_ERROR        BS_Log::setPrefix(BS_LOG_PREFIX ": ERROR - "), BS_Log::logDecorated
-#define BS_LOG_ERRORLN      BS_Log::setPrefix(BS_LOG_PREFIX ": ERROR - "), BS_Log::setAutoNewline(true), BS_Log::logDecorated
-#define BS_LOG_EXTERROR     BS_Log::setPrefix(BS_LOG_PREFIX ": ERROR "), BS_Log::setFile(__FILE__), BS_Log::setLine(__LINE__), BS_Log::logDecorated
-#define BS_LOG_EXTERRORLN   BS_Log::setPrefix(BS_LOG_PREFIX ": ERROR "), BS_Log::setFile(__FILE__), BS_Log::setLine(__LINE__),  BS_Log::setAutoNewline(true), BS_Log::logDecorated
-
-// Die Version der Logging-Klasse mit aktiviertem Logging
-class BS_Log {
-public:
-	static void clear();
-	static void log(const char *format, ...);
-	static void logPrefix(const char *prefix, const char *format, ...);
-	static void logDecorated(const char *format, ...);
-
-	static void setPrefix(const char *prefix) {
-		_prefix = prefix;
-	}
-	static void setFile(const char *file) {
-		_file = file;
-	}
-	static void setLine(int line) {
-		_line = line;
-	}
-	static void setAutoNewline(bool autoNewline) {
-		_autoNewline = autoNewline;
-	}
-
-	static void closeLog();
-
-private:
-	static Common::WriteStream *_logFile;
-	static bool _lineBegin;
-	static const char *_prefix;
-	static const char *_file;
-	static int _line;
-	static bool _autoNewline;
-
-	static bool createLog();
-
-	static int writeLog(const char *message);
-	static void flushLog();
-};
-
-// Auxiliary function that allows to log C functions (needed for Lua).
-#define BS_Log_C error
-
-
-#else
-
-// Logging-Macros
-#define BS_LOG
-#define BS_LOGLN
-#define BS_LOG_WARNING
-#define BS_LOG_WARNINGLN
-#define BS_LOG_ERROR
-#define BS_LOG_ERRORLN
-#define BS_LOG_EXTERROR
-#define BS_LOG_EXTERRORLN
-
-// The version of the logging class with logging disabled
-class BS_Log {
-public:
-	// This version implements all the various methods as empty stubs
-	static void log(const char *text, ...) {};
-	static void logPrefix(const char *prefix, const char *format, ...) {};
-	static void logDecorated(const char *format, ...) {};
-
-	static void setPrefix(const char *prefix) {};
-	static void setFile(const char *file) {};
-	static void setLine(int line) {};
-	static void setAutoNewline(bool autoNewline) {};
-
-	typedef void (*LOG_LISTENER_CALLBACK)(const char *);
-	static void registerLogListener(LOG_LISTENER_CALLBACK callback) {};
-};
-
-#define BS_Log_C error
-
-#endif
-
-} // End of namespace Sword25
-
-#endif

Modified: scummvm/trunk/engines/sword25/kernel/outputpersistenceblock.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/outputpersistenceblock.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/outputpersistenceblock.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,8 +32,6 @@
  *
  */
 
-#define BS_LOG_PREFIX "OUTPUTPERSISTENCEBLOCK"
-
 #include "sword25/kernel/outputpersistenceblock.h"
 
 namespace {

Modified: scummvm/trunk/engines/sword25/kernel/persistenceservice.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/persistenceservice.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/persistenceservice.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -46,8 +46,6 @@
 #include "sword25/script/script.h"
 #include <zlib.h>
 
-#define BS_LOG_PREFIX "PERSISTENCESERVICE"
-
 namespace Sword25 {
 
 //static const char *SAVEGAME_EXTENSION = ".b25s";
@@ -215,7 +213,7 @@
 bool checkslotID(uint slotID) {
 	// \xDCberpr\xFCfen, ob die Slot-ID zul\xE4ssig ist.
 	if (slotID >= SLOT_COUNT) {
-		BS_LOG_ERRORLN("Tried to access an invalid slot (%d). Only slot ids from 0 to %d are allowed.", slotID, SLOT_COUNT - 1);
+		error("Tried to access an invalid slot (%d). Only slot ids from 0 to %d are allowed.", slotID, SLOT_COUNT - 1);
 		return false;
 	} else {
 		return true;
@@ -255,7 +253,7 @@
 
 	// \xDCberpr\xFCfen, ob die Slot-ID zul\xE4ssig ist.
 	if (slotID >= SLOT_COUNT) {
-		BS_LOG_ERRORLN("Tried to save to an invalid slot (%d). Only slot ids form 0 to %d are allowed.", slotID, SLOT_COUNT - 1);
+		error("Tried to save to an invalid slot (%d). Only slot ids form 0 to %d are allowed.", slotID, SLOT_COUNT - 1);
 		return false;
 	}
 
@@ -327,7 +325,7 @@
 
 		delete[] buffer;
 	} else {
-		BS_LOG_WARNINGLN("The screenshot file \"%s\" does not exist. Savegame is written without a screenshot.", filename.c_str());
+		warning("The screenshot file \"%s\" does not exist. Savegame is written without a screenshot.", filename.c_str());
 	}
 
 	file->finalize();
@@ -347,7 +345,7 @@
 
 	// \xDCberpr\xFCfen, ob die Slot-ID zul\xE4ssig ist.
 	if (slotID >= SLOT_COUNT) {
-		BS_LOG_ERRORLN("Tried to load from an invalid slot (%d). Only slot ids form 0 to %d are allowed.", slotID, SLOT_COUNT - 1);
+		error("Tried to load from an invalid slot (%d). Only slot ids form 0 to %d are allowed.", slotID, SLOT_COUNT - 1);
 		return false;
 	}
 
@@ -355,7 +353,7 @@
 
 	// \xDCberpr\xFCfen, ob der Slot belegt ist.
 	if (!curSavegameInfo.isOccupied) {
-		BS_LOG_ERRORLN("Tried to load from an empty slot (%d).", slotID);
+		error("Tried to load from an empty slot (%d).", slotID);
 		return false;
 	}
 
@@ -364,7 +362,7 @@
 	// da sich die Versions-ID bei jeder Code\xE4nderung mit\xE4ndert.
 #ifndef DEBUG
 	if (!curSavegameInfo.isCompatible) {
-		BS_LOG_ERRORLN("Tried to load a savegame (%d) that is not compatible with this engine version.", slotID);
+		error("Tried to load a savegame (%d) that is not compatible with this engine version.", slotID);
 		return false;
 	}
 #endif
@@ -377,7 +375,7 @@
 	file->seek(curSavegameInfo.gamedataOffset);
 	file->read(reinterpret_cast<char *>(&compressedDataBuffer[0]), curSavegameInfo.gamedataLength);
 	if (file->err()) {
-		BS_LOG_ERRORLN("Unable to load the gamedata from the savegame file \"%s\".", curSavegameInfo.filename.c_str());
+		error("Unable to load the gamedata from the savegame file \"%s\".", curSavegameInfo.filename.c_str());
 		delete[] compressedDataBuffer;
 		delete[] uncompressedDataBuffer;
 		return false;
@@ -387,7 +385,7 @@
 	uLongf uncompressedBufferSize = curSavegameInfo.gamedataUncompressedLength;
 	if (uncompress(reinterpret_cast<Bytef *>(&uncompressedDataBuffer[0]), &uncompressedBufferSize,
 	               reinterpret_cast<Bytef *>(&compressedDataBuffer[0]), curSavegameInfo.gamedataLength) != Z_OK) {
-		BS_LOG_ERRORLN("Unable to decompress the gamedata from savegame file \"%s\".", curSavegameInfo.filename.c_str());
+		error("Unable to decompress the gamedata from savegame file \"%s\".", curSavegameInfo.filename.c_str());
 		delete[] uncompressedDataBuffer;
 		delete[] compressedDataBuffer;
 		delete file;
@@ -410,7 +408,7 @@
 	delete file;
 
 	if (!success) {
-		BS_LOG_ERRORLN("Unable to unpersist the gamedata from savegame file \"%s\".", curSavegameInfo.filename.c_str());
+		error("Unable to unpersist the gamedata from savegame file \"%s\".", curSavegameInfo.filename.c_str());
 		return false;
 	}
 

Modified: scummvm/trunk/engines/sword25/kernel/resmanager.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/resmanager.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/resmanager.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,16 +32,14 @@
  *
  */
 
+#include "sword25/sword25.h"	// for kDebugResource
 #include "sword25/kernel/resmanager.h"
-
 #include "sword25/kernel/resource.h"
 #include "sword25/kernel/resservice.h"
 #include "sword25/package/packagemanager.h"
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "RESOURCEMANAGER"
-
 ResourceManager::~ResourceManager() {
 	// Clear all unlocked resources
 	emptyCache();
@@ -49,7 +47,7 @@
 	// All remaining resources are not released, so print warnings and release
 	Common::List<Resource *>::iterator iter = _resources.begin();
 	for (; iter != _resources.end(); ++iter) {
-		BS_LOG_WARNINGLN("Resource \"%s\" was not released.", (*iter)->getFileName().c_str());
+		warning("Resource \"%s\" was not released.", (*iter)->getFileName().c_str());
 
 		// Set the lock count to zero
 		while ((*iter)->getLockCount() > 0) {
@@ -68,7 +66,7 @@
  */
 bool ResourceManager::registerResourceService(ResourceService *pService) {
 	if (!pService) {
-		BS_LOG_ERRORLN("Can't register NULL resource service.");
+		error("Can't register NULL resource service.");
 		return false;
 	}
 
@@ -136,7 +134,7 @@
 
 	// The resource was not found, therefore, must not be loaded yet
 	if (_logCacheMiss)
-		BS_LOG_WARNINGLN("\"%s\" was not precached.", uniqueFileName.c_str());
+		warning("\"%s\" was not precached.", uniqueFileName.c_str());
 
 	Resource *pResource = loadResource(uniqueFileName);
 	if (pResource) {
@@ -163,7 +161,7 @@
 
 	if (forceReload && resourcePtr) {
 		if (resourcePtr->getLockCount()) {
-			BS_LOG_ERRORLN("Could not force precaching of \"%s\". The resource is locked.", fileName.c_str());
+			error("Could not force precaching of \"%s\". The resource is locked.", fileName.c_str());
 			return false;
 		} else {
 			deleteResource(resourcePtr);
@@ -172,7 +170,8 @@
 	}
 
 	if (!resourcePtr && loadResource(uniqueFileName) == NULL) {
-		BS_LOG_ERRORLN("Could not precache \"%s\",", fileName.c_str());
+		// This isn't fatal - e.g. it can happen when loading saved games
+		debugC(kDebugResource, "Could not precache \"%s\",", fileName.c_str());
 		return false;
 	}
 
@@ -208,7 +207,7 @@
 			// Load the resource
 			Resource *pResource = _resourceServices[i]->loadResource(fileName);
 			if (!pResource) {
-				BS_LOG_ERRORLN("Responsible service could not load resource \"%s\".", fileName.c_str());
+				error("Responsible service could not load resource \"%s\".", fileName.c_str());
 				return NULL;
 			}
 
@@ -223,7 +222,8 @@
 		}
 	}
 
-	BS_LOG_ERRORLN("Could not find a service that can load \"%s\".", fileName.c_str());
+	// This isn't fatal - e.g. it can happen when loading saved games
+	debugC(kDebugResource, "Could not find a service that can load \"%s\".", fileName.c_str());
 	return NULL;
 }
 
@@ -235,14 +235,14 @@
 	// Get a pointer to the package manager
 	PackageManager *pPackage = (PackageManager *)_kernelPtr->getPackage();
 	if (!pPackage) {
-		BS_LOG_ERRORLN("Could not get package manager.");
+		error("Could not get package manager.");
 		return Common::String();
 	}
 
 	// Absoluten Pfad der Datei bekommen und somit die Eindeutigkeit des Dateinamens sicherstellen
 	Common::String uniquefileName = pPackage->getAbsolutePath(fileName);
 	if (uniquefileName.empty())
-		BS_LOG_ERRORLN("Could not create absolute file name for \"%s\".", fileName.c_str());
+		error("Could not create absolute file name for \"%s\".", fileName.c_str());
 
 	return uniquefileName;
 }
@@ -284,7 +284,7 @@
 void ResourceManager::dumpLockedResources() {
 	for (Common::List<Resource *>::iterator iter = _resources.begin(); iter != _resources.end(); ++iter) {
 		if ((*iter)->getLockCount() > 0) {
-			BS_LOGLN("%s", (*iter)->getFileName().c_str());
+			debugC(kDebugResource, "%s", (*iter)->getFileName().c_str());
 		}
 	}
 }

Modified: scummvm/trunk/engines/sword25/kernel/resource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/resource.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/kernel/resource.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -38,8 +38,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "RESOURCE"
-
 Resource::Resource(const Common::String &fileName, RESOURCE_TYPES type) :
 	_type(type),
 	_refCount(0) {
@@ -53,7 +51,7 @@
 	if (_refCount) {
 		--_refCount;
 	} else
-		BS_LOG_WARNINGLN("Released unlocked resource \"%s\".", _fileName.c_str());
+		warning("Released unlocked resource \"%s\".", _fileName.c_str());
 }
 
 } // End of namespace Sword25

Modified: scummvm/trunk/engines/sword25/math/geometry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/geometry.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/math/geometry.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,17 +32,16 @@
  *
  */
 
+#include "sword25/sword25.h"	// for kDebugScript
 #include "sword25/math/geometry.h"
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "GEOMETRY"
-
 Geometry::Geometry(Kernel *pKernel) : Service(pKernel) {
 	if (!registerScriptBindings())
-		BS_LOG_ERRORLN("Script bindings could not be registered.");
+		error("Script bindings could not be registered.");
 	else
-		BS_LOGLN("Script bindings registered.");
+		debugC(kDebugScript, "Script bindings registered.");
 }
 
 

Modified: scummvm/trunk/engines/sword25/math/region.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/region.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/math/region.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -39,8 +39,6 @@
 #include "sword25/math/walkregion.h"
 #include "sword25/math/regionregistry.h"
 
-#define BS_LOG_PREFIX "REGION"
-
 namespace Sword25 {
 
 Region::Region() : _valid(false), _type(RT_REGION) {
@@ -261,7 +259,7 @@
 			}
 		}
 
-		BS_LOG_WARNINGLN("Clostest vertex forced because edgepoint was outside region.");
+		warning("Clostest vertex forced because edgepoint was outside region.");
 		return closestVertex;
 	}
 }

Modified: scummvm/trunk/engines/sword25/math/regionregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/regionregistry.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/math/regionregistry.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,8 +32,6 @@
  *
  */
 
-#define BS_LOG_PREFIX "REGIONREGISTRY"
-
 #include "sword25/kernel/outputpersistenceblock.h"
 #include "sword25/kernel/inputpersistenceblock.h"
 #include "sword25/math/regionregistry.h"
@@ -44,11 +42,11 @@
 namespace Sword25 {
 
 void RegionRegistry::logErrorLn(const char *message) const {
-	BS_LOG_ERRORLN(message);
+	error(message);
 }
 
 void RegionRegistry::logWarningLn(const char *message) const {
-	BS_LOG_WARNINGLN(message);
+	warning(message);
 }
 
 bool RegionRegistry::persist(OutputPersistenceBlock &writer) {

Modified: scummvm/trunk/engines/sword25/math/walkregion.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/walkregion.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/math/walkregion.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -38,8 +38,6 @@
 #include "sword25/math/walkregion.h"
 #include "sword25/math/line.h"
 
-#define BS_LOG_PREFIX "WALKREGION"
-
 namespace Sword25 {
 
 static const int Infinity = 0x7fffffff;
@@ -285,7 +283,7 @@
 
 		// Check to make sure the point is really in the region. If not, stop with an error
 		if (!isPointInRegion(newStart)) {
-			BS_LOG_ERRORLN("Constructed startpoint ((%d,%d) from (%d,%d)) is not inside the region.",
+			error("Constructed startpoint ((%d,%d) from (%d,%d)) is not inside the region.",
 			               newStart.x, newStart.y,
 			               start.x, start.y);
 			return false;
@@ -301,7 +299,7 @@
 
 		// Make sure that the determined point is really within the region
 		if (!isPointInRegion(newEnd)) {
-			BS_LOG_ERRORLN("Constructed endpoint ((%d,%d) from (%d,%d)) is not inside the region.",
+			error("Constructed endpoint ((%d,%d) from (%d,%d)) is not inside the region.",
 			               newEnd.x, newEnd.y,
 			               end.x, end.y);
 			return false;

Modified: scummvm/trunk/engines/sword25/module.mk
===================================================================
--- scummvm/trunk/engines/sword25/module.mk	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/module.mk	2011-01-23 14:49:50 UTC (rev 55462)
@@ -38,7 +38,6 @@
 	kernel/inputpersistenceblock.o \
 	kernel/kernel.o \
 	kernel/kernel_script.o \
-	kernel/log.o \
 	kernel/outputpersistenceblock.o \
 	kernel/persistenceservice.o \
 	kernel/resmanager.o \

Modified: scummvm/trunk/engines/sword25/package/packagemanager.cpp
===================================================================
--- scummvm/trunk/engines/sword25/package/packagemanager.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/package/packagemanager.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,14 +32,13 @@
  *
  */
 
-#define BS_LOG_PREFIX "PACKAGEMANAGER"
-
 #include "common/archive.h"
 #include "common/config-manager.h"
 #include "common/savefile.h"
 #include "common/str-array.h"
 #include "common/system.h"
 #include "common/unzip.h"
+#include "sword25/sword25.h"	// for kDebugScript
 #include "sword25/kernel/filesystemutil.h"
 #include "sword25/package/packagemanager.h"
 
@@ -62,9 +61,9 @@
 	_currentDirectory(PATH_SEPARATOR),
 	_rootFolder(ConfMan.get("path")) {
 	if (!registerScriptBindings())
-		BS_LOG_ERRORLN("Script bindings could not be registered.");
+		error("Script bindings could not be registered.");
 	else
-		BS_LOGLN("Script bindings registered.");
+		debugC(kDebugScript, "Script bindings registered.");
 }
 
 PackageManager::~PackageManager() {
@@ -106,10 +105,10 @@
 
 	Common::Archive *zipFile = Common::makeZipArchive(fileName);
 	if (zipFile == NULL) {
-		BS_LOG_ERRORLN("Unable to mount file \"%s\" to \"%s\"", fileName.c_str(), mountPosition.c_str());
+		error("Unable to mount file \"%s\" to \"%s\"", fileName.c_str(), mountPosition.c_str());
 		return false;
 	} else {
-		BS_LOGLN("Package '%s' mounted as '%s'.", fileName.c_str(), mountPosition.c_str());
+		debugC(kDebugResource, "Package '%s' mounted as '%s'.", fileName.c_str(), mountPosition.c_str());
 		Common::ArchiveMemberList files;
 		zipFile->listMembers(files);
 		debug(3, "Capacity %d", files.size());
@@ -127,10 +126,10 @@
 	Common::FSNode directory(directoryName);
 	Common::Archive *folderArchive = new Common::FSDirectory(directory, 6);
 	if (!directory.exists() || (folderArchive == NULL)) {
-		BS_LOG_ERRORLN("Unable to mount directory \"%s\" to \"%s\".", directoryName.c_str(), mountPosition.c_str());
+		error("Unable to mount directory \"%s\" to \"%s\".", directoryName.c_str(), mountPosition.c_str());
 		return false;
 	} else {
-		BS_LOGLN("Directory '%s' mounted as '%s'.", directoryName.c_str(), mountPosition.c_str());
+		debugC(kDebugResource, "Directory '%s' mounted as '%s'.", directoryName.c_str(), mountPosition.c_str());
 
 		Common::ArchiveMemberList files;
 		folderArchive->listMembers(files);
@@ -152,7 +151,7 @@
 		Common::InSaveFile *file = sfm->openForLoading(
 			FileSystemUtil::getPathFilename(fileName));
 		if (!file) {
-			BS_LOG_ERRORLN("Could not load savegame \"%s\".", fileName.c_str());
+			error("Could not load savegame \"%s\".", fileName.c_str());
 			return 0;
 		}
 

Modified: scummvm/trunk/engines/sword25/script/lua_extensions.cpp
===================================================================
--- scummvm/trunk/engines/sword25/script/lua_extensions.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/script/lua_extensions.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -47,7 +47,6 @@
 	lua_pushstring(L, "WARNING - ");
 	lua_pushvalue(L, 1);
 	lua_concat(L, 3);
-	BS_Log::log("%s\n", luaL_checkstring(L, -1));
 	lua_pop(L, 1);
 
 #ifdef DEBUG

Modified: scummvm/trunk/engines/sword25/script/luabindhelper.cpp
===================================================================
--- scummvm/trunk/engines/sword25/script/luabindhelper.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/script/luabindhelper.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -36,8 +36,6 @@
 #include "sword25/script/luabindhelper.h"
 #include "sword25/script/luascript.h"
 
-#define BS_LOG_PREFIX "LUABINDHELPER"
-
 namespace {
 const char *METATABLES_TABLE_NAME = "__METATABLES";
 const char *PERMANENTS_TABLE_NAME = "Permanents";

Modified: scummvm/trunk/engines/sword25/script/luacallback.cpp
===================================================================
--- scummvm/trunk/engines/sword25/script/luacallback.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/script/luacallback.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -42,8 +42,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "LUA"
-
 LuaCallback::LuaCallback(lua_State *L) {
 	// Create callback table
 	lua_newtable(L);
@@ -122,7 +120,7 @@
 			// Lua_pcall the function and the parameters pop themselves from the stack
 			if (lua_pcall(L, argumentCount, 0, 0) != 0) {
 				// An error has occurred
-				BS_LOG_ERRORLN("An error occured executing a callback function: %s", lua_tostring(L, -1));
+				error("An error occured executing a callback function: %s", lua_tostring(L, -1));
 
 				// Pop error message from the stack
 				lua_pop(L, 1);

Modified: scummvm/trunk/engines/sword25/script/luascript.cpp
===================================================================
--- scummvm/trunk/engines/sword25/script/luascript.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/script/luascript.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,8 +32,6 @@
  *
  */
 
-#define BS_LOG_PREFIX "LUA"
-
 #include "common/array.h"
 #include "common/debug-channels.h"
 
@@ -66,7 +64,7 @@
 
 namespace {
 int panicCB(lua_State *L) {
-	BS_LOG_ERRORLN("Lua panic. Error message: %s", lua_isnil(L, -1) ? "" : lua_tostring(L, -1));
+	error("Lua panic. Error message: %s", lua_isnil(L, -1) ? "" : lua_tostring(L, -1));
 	return 0;
 }
 
@@ -82,7 +80,7 @@
 	// Lua-State initialisation, as well as standard libaries initialisation
 	_state = luaL_newstate();
 	if (!_state || ! registerStandardLibs() || !registerStandardLibExtensions()) {
-		BS_LOG_ERRORLN("Lua could not be initialized.");
+		error("Lua could not be initialized.");
 		return false;
 	}
 
@@ -100,7 +98,7 @@
 	// Compile the code
 	if (luaL_loadbuffer(_state, errorHandlerCode, strlen(errorHandlerCode), "PCALL ERRORHANDLER") != 0) {
 		// An error occurred, so dislay the reason and exit
-		BS_LOG_ERRORLN("Couldn't compile luaL_pcall errorhandler:\n%s", lua_tostring(_state, -1));
+		error("Couldn't compile luaL_pcall errorhandler:\n%s", lua_tostring(_state, -1));
 		lua_pop(_state, 1);
 
 		return false;
@@ -108,7 +106,7 @@
 	// Running the code, the error handler function sets the top of the stack
 	if (lua_pcall(_state, 0, 1, 0) != 0) {
 		// An error occurred, so dislay the reason and exit
-		BS_LOG_ERRORLN("Couldn't prepare luaL_pcall errorhandler:\n%s", lua_tostring(_state, -1));
+		error("Couldn't prepare luaL_pcall errorhandler:\n%s", lua_tostring(_state, -1));
 		lua_pop(_state, 1);
 
 		return false;
@@ -135,7 +133,7 @@
 			lua_sethook(_state, debugHook, mask, 0);
 	}
 
-	BS_LOGLN("Lua initialized.");
+	debugC(kDebugScript, "Lua initialized.");
 
 	return true;
 }
@@ -154,7 +152,7 @@
 	uint fileSize;
 	byte *fileData = pPackage->getFile(fileName, &fileSize);
 	if (!fileData) {
-		BS_LOG_ERRORLN("Couldn't read \"%s\".", fileName.c_str());
+		error("Couldn't read \"%s\".", fileName.c_str());
 #ifdef DEBUG
 		BS_ASSERT(__startStackDepth == lua_gettop(_state));
 #endif
@@ -211,7 +209,7 @@
 bool LuaScriptEngine::executeBuffer(const byte *data, uint size, const Common::String &name) const {
 	// Compile buffer
 	if (luaL_loadbuffer(_state, (const char *)data, size, name.c_str()) != 0) {
-		BS_LOG_ERRORLN("Couldn't compile \"%s\":\n%s", name.c_str(), lua_tostring(_state, -1));
+		error("Couldn't compile \"%s\":\n%s", name.c_str(), lua_tostring(_state, -1));
 		lua_pop(_state, 1);
 
 		return false;
@@ -223,7 +221,7 @@
 
 	// Run buffer contents
 	if (lua_pcall(_state, 0, 0, -2) != 0) {
-		BS_LOG_ERRORLN("An error occured while executing \"%s\":\n%s.",
+		error("An error occured while executing \"%s\":\n%s.",
 		               name.c_str(),
 		               lua_tostring(_state, -1));
 		lua_pop(_state, 2);

Modified: scummvm/trunk/engines/sword25/sfx/soundengine.cpp
===================================================================
--- scummvm/trunk/engines/sword25/sfx/soundengine.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/sfx/soundengine.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -32,8 +32,6 @@
  *
  */
 
-#define BS_LOG_PREFIX "SOUNDENGINE"
-
 #include "sword25/sword25.h"
 #include "sword25/sfx/soundengine.h"
 #include "sword25/package/packagemanager.h"
@@ -57,9 +55,9 @@
 
 SoundEngine::SoundEngine(Kernel *pKernel) : ResourceService(pKernel) {
 	if (!registerScriptBindings())
-		BS_LOG_ERRORLN("Script bindings could not be registered.");
+		error("Script bindings could not be registered.");
 	else
-		BS_LOGLN("Script bindings registered.");
+		debugC(kDebugSound, "Script bindings registered.");
 
 	_mixer = g_system->getMixer();
 

Modified: scummvm/trunk/engines/sword25/sword25.cpp
===================================================================
--- scummvm/trunk/engines/sword25/sword25.cpp	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/sword25.cpp	2011-01-23 14:49:50 UTC (rev 55462)
@@ -49,8 +49,6 @@
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "MAIN"
-
 const char *const PACKAGE_MANAGER = "archiveFS";
 const char *const DEFAULT_SCRIPT_FILE = "/system/boot.lua";
 
@@ -96,7 +94,7 @@
 
 	// Kernel initialization
 	if (!Kernel::getInstance()->getInitSuccess()) {
-		BS_LOG_ERRORLN("Kernel initialization failed.");
+		error("Kernel initialization failed.");
 		return Common::kUnknownError;
 	}
 
@@ -113,7 +111,7 @@
 	// Pass the command line to the script engine.
 	ScriptEngine *scriptPtr = Kernel::getInstance()->getScript();
 	if (!scriptPtr) {
-		BS_LOG_ERRORLN("Script intialization failed.");
+		error("Script intialization failed.");
 		return Common::kUnknownError;
 	}
 
@@ -143,9 +141,6 @@
 	RenderObjectRegistry::destroy();
 	RegionRegistry::destroy();
 
-	// Free the log file if it was used
-	BS_Log::closeLog();
-
 	return true;
 }
 

Modified: scummvm/trunk/engines/sword25/sword25.h
===================================================================
--- scummvm/trunk/engines/sword25/sword25.h	2011-01-23 11:00:57 UTC (rev 55461)
+++ scummvm/trunk/engines/sword25/sword25.h	2011-01-23 14:49:50 UTC (rev 55462)
@@ -31,7 +31,6 @@
 #include "common/util.h"
 #include "engines/engine.h"
 
-#include "sword25/kernel/log.h"
 #include "sword25/console.h"
 
 struct ADGameDescription;
@@ -52,7 +51,8 @@
 
 enum {
 	kDebugScript = 1 << 0,
-	kDebugSound = 1 << 1
+	kDebugSound = 1 << 1,
+	kDebugResource = 1 << 2
 };
 
 enum GameFlags {


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