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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Jan 23 16:01:24 CET 2011


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

Log Message:
-----------
SWORD25: Replaced BS_ASSERT() with assert()

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp
    scummvm/trunk/engines/sword25/fmv/yuvtorgba.cpp
    scummvm/trunk/engines/sword25/gfx/animation.cpp
    scummvm/trunk/engines/sword25/gfx/animationresource.cpp
    scummvm/trunk/engines/sword25/gfx/animationresource.h
    scummvm/trunk/engines/sword25/gfx/animationtemplate.h
    scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp
    scummvm/trunk/engines/sword25/gfx/bitmapresource.h
    scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp
    scummvm/trunk/engines/sword25/gfx/fontresource.cpp
    scummvm/trunk/engines/sword25/gfx/fontresource.h
    scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
    scummvm/trunk/engines/sword25/gfx/graphicengine.h
    scummvm/trunk/engines/sword25/gfx/graphicengine_script.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/image/vectorimage.h
    scummvm/trunk/engines/sword25/gfx/panel.cpp
    scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp
    scummvm/trunk/engines/sword25/gfx/text.cpp
    scummvm/trunk/engines/sword25/gfx/timedrenderobject.cpp
    scummvm/trunk/engines/sword25/input/inputengine_script.cpp
    scummvm/trunk/engines/sword25/kernel/common.h
    scummvm/trunk/engines/sword25/kernel/kernel.cpp
    scummvm/trunk/engines/sword25/kernel/kernel_script.cpp
    scummvm/trunk/engines/sword25/kernel/resource.cpp
    scummvm/trunk/engines/sword25/math/geometry_script.cpp
    scummvm/trunk/engines/sword25/math/region.cpp
    scummvm/trunk/engines/sword25/math/region.h
    scummvm/trunk/engines/sword25/math/vertex.cpp
    scummvm/trunk/engines/sword25/math/walkregion.cpp
    scummvm/trunk/engines/sword25/package/packagemanager_script.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_script.cpp
    scummvm/trunk/engines/sword25/sword25.cpp

Modified: scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -45,7 +45,7 @@
 
 int loadMovie(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	lua_pushbooleancpp(L, FMVPtr->loadMovie(luaL_checkstring(L, 1), lua_gettop(L) == 2 ? static_cast<uint>(luaL_checknumber(L, 2)) : 10));
 
@@ -54,7 +54,7 @@
 
 int unloadMovie(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	lua_pushbooleancpp(L, FMVPtr->unloadMovie());
 
@@ -63,7 +63,7 @@
 
 int play(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	lua_pushbooleancpp(L, FMVPtr->play());
 
@@ -72,7 +72,7 @@
 
 int pause(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	lua_pushbooleancpp(L, FMVPtr->pause());
 
@@ -81,7 +81,7 @@
 
 int update(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	FMVPtr->update();
 
@@ -90,7 +90,7 @@
 
 int isMovieLoaded(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	lua_pushbooleancpp(L, FMVPtr->isMovieLoaded());
 
@@ -99,7 +99,7 @@
 
 int isPaused(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	lua_pushbooleancpp(L, FMVPtr->isPaused());
 
@@ -108,7 +108,7 @@
 
 int getScaleFactor(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	lua_pushnumber(L, FMVPtr->getScaleFactor());
 
@@ -117,7 +117,7 @@
 
 int setScaleFactor(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	FMVPtr->setScaleFactor(static_cast<float>(luaL_checknumber(L, 1)));
 
@@ -126,7 +126,7 @@
 
 int getTime(lua_State *L) {
 	MoviePlayer *FMVPtr = Kernel::getInstance()->getFMV();
-	BS_ASSERT(FMVPtr);
+	assert(FMVPtr);
 
 	lua_pushnumber(L, FMVPtr->getTime());
 
@@ -151,9 +151,9 @@
 
 bool MoviePlayer::registerScriptBindings() {
 	ScriptEngine *pScript = Kernel::getInstance()->getScript();
-	BS_ASSERT(pScript);
+	assert(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->getScriptObject());
-	BS_ASSERT(L);
+	assert(L);
 
 	if (!LuaBindhelper::addFunctionsToLib(L, LIBRARY_NAME, LIBRARY_FUNCTIONS)) return false;
 

Modified: scummvm/trunk/engines/sword25/fmv/yuvtorgba.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/yuvtorgba.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/fmv/yuvtorgba.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -167,16 +167,16 @@
 void YUVtoBGRA::translate(th_ycbcr_buffer &YUVBuffer, const th_info &theoraInfo, byte *pixelData, int pixelsSize) {
 
 	// Width and height of all buffers have to be divisible by 2.
-	BS_ASSERT((YUVBuffer[0].width & 1)   == 0);
-	BS_ASSERT((YUVBuffer[0].height & 1)  == 0);
-	BS_ASSERT((YUVBuffer[1].width & 1)   == 0);
-	BS_ASSERT((YUVBuffer[2].width & 1)  == 0);
+	assert((YUVBuffer[0].width & 1)   == 0);
+	assert((YUVBuffer[0].height & 1)  == 0);
+	assert((YUVBuffer[1].width & 1)   == 0);
+	assert((YUVBuffer[2].width & 1)  == 0);
 
 	// UV images have to have a quarter of the Y image resolution
-	BS_ASSERT(YUVBuffer[1].width  == YUVBuffer[0].width >> 1);
-	BS_ASSERT(YUVBuffer[2].width  == YUVBuffer[0].width >> 1);
-	BS_ASSERT(YUVBuffer[1].height == YUVBuffer[0].height >> 1);
-	BS_ASSERT(YUVBuffer[2].height == YUVBuffer[0].height >> 1);
+	assert(YUVBuffer[1].width  == YUVBuffer[0].width >> 1);
+	assert(YUVBuffer[2].width  == YUVBuffer[0].width >> 1);
+	assert(YUVBuffer[1].height == YUVBuffer[0].height >> 1);
+	assert(YUVBuffer[2].height == YUVBuffer[0].height >> 1);
 
 	const int *cl = &CLAMP_TAB[320];
 

Modified: scummvm/trunk/engines/sword25/gfx/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animation.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/animation.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -159,7 +159,7 @@
 
 void Animation::setFrame(uint nr) {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 
 	if (nr >= animationDescriptionPtr->getFrameCount()) {
 		error("Tried to set animation to illegal frame (%d). Value must be between 0 and %d.",
@@ -175,18 +175,18 @@
 
 bool Animation::doRender() {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
-	BS_ASSERT(_currentFrame < animationDescriptionPtr->getFrameCount());
+	assert(animationDescriptionPtr);
+	assert(_currentFrame < animationDescriptionPtr->getFrameCount());
 
 	// Bitmap des aktuellen Frames holen
 	Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource(animationDescriptionPtr->getFrame(_currentFrame).fileName);
-	BS_ASSERT(pResource);
-	BS_ASSERT(pResource->getType() == Resource::TYPE_BITMAP);
+	assert(pResource);
+	assert(pResource->getType() == Resource::TYPE_BITMAP);
 	BitmapResource *pBitmapResource = static_cast<BitmapResource *>(pResource);
 
 	// Framebufferobjekt holen
 	GraphicEngine *pGfx = Kernel::getInstance()->getGfx();
-	BS_ASSERT(pGfx);
+	assert(pGfx);
 
 	// Bitmap zeichnen
 	bool result;
@@ -210,8 +210,8 @@
 
 void Animation::frameNotification(int timeElapsed) {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
-	BS_ASSERT(timeElapsed >= 0);
+	assert(animationDescriptionPtr);
+	assert(timeElapsed >= 0);
 
 	// Nur wenn die Animation l\xE4uft wird sie auch weiterbewegt
 	if (_running) {
@@ -236,7 +236,7 @@
 			break;
 
 		default:
-			BS_ASSERT(0);
+			assert(0);
 		}
 
 		// Deal with overflows
@@ -246,7 +246,7 @@
 				_loopPointCallback = 0;
 
 			// An underflow may only occur if the animation type is JOJO.
-			BS_ASSERT(animationDescriptionPtr->getAnimationType() == AT_JOJO);
+			assert(animationDescriptionPtr->getAnimationType() == AT_JOJO);
 			tmpCurFrame = - tmpCurFrame;
 			_direction = FORWARD;
 		} else if (static_cast<uint>(tmpCurFrame) >= animationDescriptionPtr->getFrameCount()) {
@@ -271,7 +271,7 @@
 				break;
 
 			default:
-				BS_ASSERT(0);
+				assert(0);
 			}
 		}
 
@@ -291,18 +291,18 @@
 	// Gr\xF6\xDFe und Position der Animation anhand des aktuellen Frames bestimmen
 	computeCurrentCharacteristics();
 
-	BS_ASSERT(_currentFrame < animationDescriptionPtr->getFrameCount());
-	BS_ASSERT(_currentFrameTime >= 0);
+	assert(_currentFrame < animationDescriptionPtr->getFrameCount());
+	assert(_currentFrameTime >= 0);
 }
 
 void Animation::computeCurrentCharacteristics() {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	const AnimationResource::Frame &curFrame = animationDescriptionPtr->getFrame(_currentFrame);
 
 	Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource(curFrame.fileName);
-	BS_ASSERT(pResource);
-	BS_ASSERT(pResource->getType() == Resource::TYPE_BITMAP);
+	assert(pResource);
+	assert(pResource->getType() == Resource::TYPE_BITMAP);
 	BitmapResource *pBitmap = static_cast<BitmapResource *>(pResource);
 
 	// Gr\xF6\xDFe des Bitmaps auf die Animation \xFCbertragen
@@ -321,7 +321,7 @@
 bool Animation::lockAllFrames() {
 	if (!_framesLocked) {
 		AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-		BS_ASSERT(animationDescriptionPtr);
+		assert(animationDescriptionPtr);
 		for (uint i = 0; i < animationDescriptionPtr->getFrameCount(); ++i) {
 			if (!Kernel::getInstance()->getResourceManager()->requestResource(animationDescriptionPtr->getFrame(i).fileName)) {
 				error("Could not lock all animation frames.");
@@ -338,7 +338,7 @@
 bool Animation::unlockAllFrames() {
 	if (_framesLocked) {
 		AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-		BS_ASSERT(animationDescriptionPtr);
+		assert(animationDescriptionPtr);
 		for (uint i = 0; i < animationDescriptionPtr->getFrameCount(); ++i) {
 			Resource *pResource;
 			if (!(pResource = Kernel::getInstance()->getResourceManager()->requestResource(animationDescriptionPtr->getFrame(i).fileName))) {
@@ -360,37 +360,37 @@
 
 Animation::ANIMATION_TYPES Animation::getAnimationType() const {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	return animationDescriptionPtr->getAnimationType();
 }
 
 int Animation::getFPS() const {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	return animationDescriptionPtr->getFPS();
 }
 
 int Animation::getFrameCount() const {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	return animationDescriptionPtr->getFrameCount();
 }
 
 bool Animation::isScalingAllowed() const {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	return animationDescriptionPtr->isScalingAllowed();
 }
 
 bool Animation::isAlphaAllowed() const {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	return animationDescriptionPtr->isAlphaAllowed();
 }
 
 bool Animation::isColorModulationAllowed() const {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	return animationDescriptionPtr->isColorModulationAllowed();
 }
 
@@ -415,7 +415,7 @@
 
 void Animation::setAlpha(int alpha) {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	if (!animationDescriptionPtr->isAlphaAllowed()) {
 		warning("Tried to set alpha value on an animation that does not support alpha. Call was ignored.");
 		return;
@@ -430,7 +430,7 @@
 
 void Animation::setModulationColor(uint modulationColor) {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	if (!animationDescriptionPtr->isColorModulationAllowed()) {
 		warning("Tried to set modulation color on an animation that does not support color modulation. Call was ignored");
 		return;
@@ -450,7 +450,7 @@
 
 void Animation::setScaleFactorX(float scaleFactorX) {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	if (!animationDescriptionPtr->isScalingAllowed()) {
 		warning("Tried to set x scale factor on an animation that does not support scaling. Call was ignored");
 		return;
@@ -467,7 +467,7 @@
 
 void Animation::setScaleFactorY(float scaleFactorY) {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	if (!animationDescriptionPtr->isScalingAllowed()) {
 		warning("Tried to set y scale factor on an animation that does not support scaling. Call was ignored");
 		return;
@@ -484,7 +484,7 @@
 
 const Common::String &Animation::getCurrentAction() const {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	return animationDescriptionPtr->getFrame(_currentFrame).action;
 }
 
@@ -506,12 +506,12 @@
 
 int Animation::computeXModifier() const {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	const AnimationResource::Frame &curFrame = animationDescriptionPtr->getFrame(_currentFrame);
 
 	Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource(curFrame.fileName);
-	BS_ASSERT(pResource);
-	BS_ASSERT(pResource->getType() == Resource::TYPE_BITMAP);
+	assert(pResource);
+	assert(pResource->getType() == Resource::TYPE_BITMAP);
 	BitmapResource *pBitmap = static_cast<BitmapResource *>(pResource);
 
 	int result = curFrame.flipV ? - static_cast<int>((pBitmap->getWidth() - 1 - curFrame.hotspotX) * _scaleFactorX) :
@@ -524,12 +524,12 @@
 
 int Animation::computeYModifier() const {
 	AnimationDescription *animationDescriptionPtr = getAnimationDescription();
-	BS_ASSERT(animationDescriptionPtr);
+	assert(animationDescriptionPtr);
 	const AnimationResource::Frame &curFrame = animationDescriptionPtr->getFrame(_currentFrame);
 
 	Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource(curFrame.fileName);
-	BS_ASSERT(pResource);
-	BS_ASSERT(pResource->getType() == Resource::TYPE_BITMAP);
+	assert(pResource);
+	assert(pResource->getType() == Resource::TYPE_BITMAP);
 	BitmapResource *pBitmap = static_cast<BitmapResource *>(pResource);
 
 	int result = curFrame.flipH ? - static_cast<int>((pBitmap->getHeight() - 1 - curFrame.hotspotY) * _scaleFactorY) :
@@ -566,7 +566,7 @@
 		writer.write(marker);
 		writer.write(_animationTemplateHandle);
 	} else {
-		BS_ASSERT(false);
+		assert(false);
 	}
 
 	//writer.write(_AnimationDescriptionPtr);
@@ -620,7 +620,7 @@
 	} else if (marker == 1) {
 		reader.read(_animationTemplateHandle);
 	} else {
-		BS_ASSERT(false);
+		assert(false);
 	}
 
 	reader.read(_framesLocked);

Modified: scummvm/trunk/engines/sword25/gfx/animationresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -52,7 +52,7 @@
 		_valid(false) {
 	// Get a pointer to the package manager
 	_pPackage = Kernel::getInstance()->getPackage();
-	BS_ASSERT(_pPackage);
+	assert(_pPackage);
 
 	// Switch to the folder the specified Xml fiile is in
 	Common::String oldDirectory = _pPackage->getCurrentDirectory();
@@ -218,7 +218,7 @@
 }
 
 bool AnimationResource::computeFeatures() {
-	BS_ASSERT(_frames.size());
+	assert(_frames.size());
 
 	// Alle Features werden als vorhanden angenommen
 	_scalingAllowed = true;

Modified: scummvm/trunk/engines/sword25/gfx/animationresource.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.h	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.h	2011-01-23 15:01:24 UTC (rev 55464)
@@ -52,7 +52,7 @@
 	virtual ~AnimationResource();
 
 	virtual const Frame    &getFrame(uint index) const {
-		BS_ASSERT(index < _frames.size());
+		assert(index < _frames.size());
 		return _frames[index];
 	}
 	virtual uint    getFrameCount() const {

Modified: scummvm/trunk/engines/sword25/gfx/animationtemplate.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplate.h	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplate.h	2011-01-23 15:01:24 UTC (rev 55464)
@@ -63,7 +63,7 @@
 	~AnimationTemplate();
 
 	virtual const Frame    &getFrame(uint index) const {
-		BS_ASSERT(index < _frames.size());
+		assert(index < _frames.size());
 		return _frames[index];
 	}
 	virtual uint    getFrameCount() const {

Modified: scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -51,8 +51,8 @@
 }
 
 uint BitmapResource::getPixel(int x, int y) const {
-	BS_ASSERT(x >= 0 && x < _pImage->getWidth());
-	BS_ASSERT(y >= 0 && y < _pImage->getHeight());
+	assert(x >= 0 && x < _pImage->getWidth());
+	assert(y >= 0 && y < _pImage->getHeight());
 
 	return _pImage->getPixel(x, y);
 }

Modified: scummvm/trunk/engines/sword25/gfx/bitmapresource.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmapresource.h	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/bitmapresource.h	2011-01-23 15:01:24 UTC (rev 55464)
@@ -73,7 +73,7 @@
 	    @brief Gibt die Breite des Bitmaps zur\xFCck.
 	*/
 	int getWidth() const {
-		BS_ASSERT(_pImage);
+		assert(_pImage);
 		return _pImage->getWidth();
 	}
 
@@ -81,7 +81,7 @@
 	    @brief Gibt die H\xF6he des Bitmaps zur\xFCck.
 	*/
 	int getHeight() const {
-		BS_ASSERT(_pImage);
+		assert(_pImage);
 		return _pImage->getHeight();
 	}
 
@@ -126,7 +126,7 @@
 	          Common::Rect *pSrcPartRect = NULL,
 	          uint color = BS_ARGB(255, 255, 255, 255),
 	          int width = -1, int height = -1) {
-		BS_ASSERT(_pImage);
+		assert(_pImage);
 		return _pImage->blit(posX, posY, flipping, pSrcPartRect, color, width, height);
 	}
 
@@ -144,7 +144,7 @@
 	    @remark Falls das Rechteck nicht v\xF6llig innerhalb des Bildschirms ist, wird es automatisch zurechtgestutzt.
 	*/
 	bool fill(const Common::Rect *pFillRect = 0, uint color = BS_RGB(0, 0, 0)) {
-		BS_ASSERT(_pImage);
+		assert(_pImage);
 		return _pImage->fill(pFillRect, color);
 	}
 
@@ -166,7 +166,7 @@
 	    @return Gibt false zur\xFCck, falls ein Blit-Aufruf mit diesem Objekt als Ziel nicht gestattet ist.
 	*/
 	bool isBlitTarget() {
-		BS_ASSERT(_pImage);
+		assert(_pImage);
 		return _pImage->isBlitTarget();
 	}
 
@@ -174,7 +174,7 @@
 	    @brief Gibt true zur\xFCck, falls das BS_Image bei einem Aufruf von Blit() skaliert dargestellt werden kann.
 	*/
 	bool isScalingAllowed() {
-		BS_ASSERT(_pImage);
+		assert(_pImage);
 		return _pImage->isScalingAllowed();
 	}
 
@@ -182,7 +182,7 @@
 	    @brief Gibt true zur\xFCck, wenn das BS_Image mit einem Aufruf von Fill() gef\xFCllt werden kann.
 	*/
 	bool isFillingAllowed() {
-		BS_ASSERT(_pImage);
+		assert(_pImage);
 		return _pImage->isFillingAllowed();
 	}
 
@@ -190,7 +190,7 @@
 	    @brief Gibt true zur\xFCck, wenn das BS_Image bei einem Aufruf von Blit() mit einem Alphawert dargestellt werden kann.
 	*/
 	bool isAlphaAllowed() {
-		BS_ASSERT(_pImage);
+		assert(_pImage);
 		return _pImage->isAlphaAllowed();
 	}
 
@@ -198,7 +198,7 @@
 	    @brief Gibt true zur\xFCck, wenn das BS_Image bei einem Aufruf von Blit() mit Farbmodulation dargestellt werden kann.
 	*/
 	bool isColorModulationAllowed() {
-		BS_ASSERT(_pImage);
+		assert(_pImage);
 		return _pImage->isColorModulationAllowed();
 	}
 

Modified: scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -67,8 +67,8 @@
 }
 
 uint DynamicBitmap::getPixel(int x, int y) const {
-	BS_ASSERT(x >= 0 && x < _width);
-	BS_ASSERT(y >= 0 && y < _height);
+	assert(x >= 0 && x < _width);
+	assert(y >= 0 && y < _height);
 
 	return _image->getPixel(x, y);
 }
@@ -76,7 +76,7 @@
 bool DynamicBitmap::doRender() {
 	// Framebufferobjekt holen
 	GraphicEngine *pGfx = Kernel::getInstance()->getGfx();
-	BS_ASSERT(pGfx);
+	assert(pGfx);
 
 	// Bitmap zeichnen
 	bool result;

Modified: scummvm/trunk/engines/sword25/gfx/fontresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/fontresource.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/fontresource.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -51,9 +51,9 @@
 	Common::XMLParser() {
 
 	// Get a pointer to the package manager
-	BS_ASSERT(_pKernel);
+	assert(_pKernel);
 	PackageManager *pPackage = _pKernel->getPackage();
-	BS_ASSERT(pPackage);
+	assert(pPackage);
 
 	// Load the contents of the file
 	uint fileSize;
@@ -89,9 +89,9 @@
 	}
 	
 	// Get a reference to the package manager
-	BS_ASSERT(_pKernel);
+	assert(_pKernel);
 	PackageManager *pPackage = _pKernel->getPackage();
-	BS_ASSERT(pPackage);
+	assert(pPackage);
 
 	// Get the full path and filename for the bitmap resource
 	_bitmapFileName = pPackage->getAbsolutePath(bitmapFilename);

Modified: scummvm/trunk/engines/sword25/gfx/fontresource.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/fontresource.h	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/fontresource.h	2011-01-23 15:01:24 UTC (rev 55464)
@@ -88,7 +88,7 @@
 	    @return Das Bounding-Rect des \xFCbergebenen Zeichens auf der Charactermap.
 	*/
 	const Common::Rect &getCharacterRect(int character) const {
-		BS_ASSERT(character >= 0 && character < 256);
+		assert(character >= 0 && character < 256);
 		return _characterRects[character];
 	}
 

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -258,7 +258,7 @@
 // -----------------------------------------------------------------------------
 
 Resource *GraphicEngine::loadResource(const Common::String &filename) {
-	BS_ASSERT(canLoadResource(filename));
+	assert(canLoadResource(filename));
 
 	// Load image for "software buffer" (FIXME: Whatever that means?)
 	if (filename.hasSuffix("_s.png")) {
@@ -303,7 +303,7 @@
 
 		// Pointer auf Package-Manager holen
 		PackageManager *pPackage = Kernel::getInstance()->getPackage();
-		BS_ASSERT(pPackage);
+		assert(pPackage);
 
 		// Datei laden
 		byte *pFileData;
@@ -470,7 +470,7 @@
 	}
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return (alpha << 24) | (red << 16) | (green << 8) | blue;

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.h	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.h	2011-01-23 15:01:24 UTC (rev 55464)
@@ -313,7 +313,7 @@
 			return width * 4;
 
 		default:
-			BS_ASSERT(false);
+			assert(false);
 		}
 
 		return -1;

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -128,7 +128,7 @@
 		newUintUserData(L, animationTemplateHandle);
 		//luaL_getmetatable(L, ANIMATION_TEMPLATE_CLASS_NAME);
 		LuaBindhelper::getMetatable(L, ANIMATION_TEMPLATE_CLASS_NAME);
-		BS_ASSERT(!lua_isnil(L, -1));
+		assert(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 	} else {
 		lua_pushnil(L);
@@ -198,9 +198,9 @@
 
 static GraphicEngine *getGE() {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	GraphicEngine *pGE = pKernel->getGfx();
-	BS_ASSERT(pGE);
+	assert(pGE);
 	return pGE;
 }
 
@@ -238,17 +238,17 @@
 
 	// Main-Panel zum Gfx-Modul hinzuf\xFCgen
 	RenderObjectPtr<Panel> mainPanelPtr(getGE()->getMainPanel());
-	BS_ASSERT(mainPanelPtr.isValid());
+	assert(mainPanelPtr.isValid());
 
 	lua_pushstring(L, GFX_LIBRARY_NAME);
 	lua_gettable(L, LUA_GLOBALSINDEX);
-	BS_ASSERT(!lua_isnil(L, -1));
+	assert(!lua_isnil(L, -1));
 
 	newUintUserData(L, mainPanelPtr->getHandle());
-	BS_ASSERT(!lua_isnil(L, -1));
+	assert(!lua_isnil(L, -1));
 	// luaL_getmetatable(L, PANEL_CLASS_NAME);
 	LuaBindhelper::getMetatable(L, PANEL_CLASS_NAME);
-	BS_ASSERT(!lua_isnil(L, -1));
+	assert(!lua_isnil(L, -1));
 	lua_setmetatable(L, -2);
 
 	lua_pushstring(L, "MainPanel");
@@ -258,7 +258,7 @@
 	lua_pop(L, 1);
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return 1;
@@ -445,7 +445,7 @@
 
 static int ro_setPos(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	Vertex pos;
 	Vertex::luaVertexToVertex(L, 2, pos);
 	roPtr->setPos(pos.x, pos.y);
@@ -454,35 +454,35 @@
 
 static int ro_setX(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	roPtr->setX(static_cast<int>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int ro_setY(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	roPtr->setY(static_cast<int>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int ro_setZ(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	roPtr->setZ(static_cast<int>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int ro_setVisible(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	roPtr->setVisible(lua_tobooleancpp(L, 2));
 	return 0;
 }
 
 static int ro_getX(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	lua_pushnumber(L, roPtr->getX());
 
 	return 1;
@@ -490,7 +490,7 @@
 
 static int ro_getY(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	lua_pushnumber(L, roPtr->getY());
 
 	return 1;
@@ -498,7 +498,7 @@
 
 static int ro_getZ(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	lua_pushnumber(L, roPtr->getZ());
 
 	return 1;
@@ -506,7 +506,7 @@
 
 static int ro_getAbsoluteX(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	lua_pushnumber(L, roPtr->getAbsoluteX());
 
 	return 1;
@@ -514,7 +514,7 @@
 
 static int ro_getAbsoluteY(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	lua_pushnumber(L, roPtr->getAbsoluteY());
 
 	return 1;
@@ -522,7 +522,7 @@
 
 static int ro_getWidth(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	lua_pushnumber(L, roPtr->getWidth());
 
 	return 1;
@@ -530,7 +530,7 @@
 
 static int ro_getHeight(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	lua_pushnumber(L, roPtr->getHeight());
 
 	return 1;
@@ -538,7 +538,7 @@
 
 static int ro_isVisible(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	lua_pushbooleancpp(L, roPtr->isVisible());
 
 	return 1;
@@ -546,7 +546,7 @@
 
 static int ro_addPanel(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	RenderObjectPtr<Panel> panelPtr = roPtr->addPanel(static_cast<int>(luaL_checknumber(L, 2)),
 	                                        static_cast<int>(luaL_checknumber(L, 3)),
 	                                        GraphicEngine::luaColorToARGBColor(L, 4));
@@ -554,7 +554,7 @@
 		newUintUserData(L, panelPtr->getHandle());
 		// luaL_getmetatable(L, PANEL_CLASS_NAME);
 		LuaBindhelper::getMetatable(L, PANEL_CLASS_NAME);
-		BS_ASSERT(!lua_isnil(L, -1));
+		assert(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 	} else
 		lua_pushnil(L);
@@ -564,13 +564,13 @@
 
 static int ro_addBitmap(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	RenderObjectPtr<Bitmap> bitmaPtr = roPtr->addBitmap(luaL_checkstring(L, 2));
 	if (bitmaPtr.isValid()) {
 		newUintUserData(L, bitmaPtr->getHandle());
 		// luaL_getmetatable(L, BITMAP_CLASS_NAME);
 		LuaBindhelper::getMetatable(L, BITMAP_CLASS_NAME);
-		BS_ASSERT(!lua_isnil(L, -1));
+		assert(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 	} else
 		lua_pushnil(L);
@@ -580,7 +580,7 @@
 
 static int ro_addText(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 
 	RenderObjectPtr<Text> textPtr;
 	if (lua_gettop(L) >= 3)
@@ -592,7 +592,7 @@
 		newUintUserData(L, textPtr->getHandle());
 		// luaL_getmetatable(L, TEXT_CLASS_NAME);
 		LuaBindhelper::getMetatable(L, TEXT_CLASS_NAME);
-		BS_ASSERT(!lua_isnil(L, -1));
+		assert(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 	} else
 		lua_pushnil(L);
@@ -602,7 +602,7 @@
 
 static int ro_addAnimation(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 
 	RenderObjectPtr<Animation> animationPtr;
 	if (lua_type(L, 2) == LUA_TUSERDATA)
@@ -614,7 +614,7 @@
 		newUintUserData(L, animationPtr->getHandle());
 		// luaL_getmetatable(L, ANIMATION_CLASS_NAME);
 		LuaBindhelper::getMetatable(L, ANIMATION_CLASS_NAME);
-		BS_ASSERT(!lua_isnil(L, -1));
+		assert(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 
 		// Alle Animationscallbacks registrieren.
@@ -670,7 +670,7 @@
 
 static int p_getColor(lua_State *L) {
 	RenderObjectPtr<Panel> PanelPtr = checkPanel(L);
-	BS_ASSERT(PanelPtr.isValid());
+	assert(PanelPtr.isValid());
 	GraphicEngine::ARGBColorToLuaColor(L, PanelPtr->getColor());
 
 	return 1;
@@ -678,14 +678,14 @@
 
 static int p_setColor(lua_State *L) {
 	RenderObjectPtr<Panel> PanelPtr = checkPanel(L);
-	BS_ASSERT(PanelPtr.isValid());
+	assert(PanelPtr.isValid());
 	PanelPtr->setColor(GraphicEngine::luaColorToARGBColor(L, 2));
 	return 0;
 }
 
 static int p_remove(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	roPtr.erase();
 	return 0;
 }
@@ -715,98 +715,98 @@
 
 static int b_setAlpha(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	bitmapPtr->setAlpha(static_cast<uint>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int b_setTintColor(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	bitmapPtr->setModulationColor(GraphicEngine::luaColorToARGBColor(L, 2));
 	return 0;
 }
 
 static int b_setScaleFactor(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	bitmapPtr->setScaleFactor(static_cast<float>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int b_setScaleFactorX(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	bitmapPtr->setScaleFactorX(static_cast<float>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int b_setScaleFactorY(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	bitmapPtr->setScaleFactorY(static_cast<float>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int b_setFlipH(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	bitmapPtr->setFlipH(lua_tobooleancpp(L, 2));
 	return 0;
 }
 
 static int b_setFlipV(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	bitmapPtr->setFlipV(lua_tobooleancpp(L, 2));
 	return 0;
 }
 
 static int b_getAlpha(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	lua_pushnumber(L, bitmapPtr->getAlpha());
 	return 1;
 }
 
 static int b_getTintColor(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	GraphicEngine::ARGBColorToLuaColor(L, bitmapPtr->getModulationColor());
 	return 1;
 }
 
 static int b_getScaleFactorX(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	lua_pushnumber(L, bitmapPtr->getScaleFactorX());
 	return 1;
 }
 
 static int b_getScaleFactorY(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	lua_pushnumber(L, bitmapPtr->getScaleFactorY());
 	return 1;
 }
 
 static int b_isFlipH(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	lua_pushbooleancpp(L, bitmapPtr->isFlipH());
 	return 1;
 }
 
 static int b_isFlipV(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	lua_pushbooleancpp(L, bitmapPtr->isFlipV());
 	return 1;
 }
 
 static int b_getPixel(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	Vertex Pos;
 	Vertex::luaVertexToVertex(L, 2, Pos);
 	GraphicEngine::ARGBColorToLuaColor(L, bitmapPtr->getPixel(Pos.x, Pos.y));
@@ -815,28 +815,28 @@
 
 static int b_isScalingAllowed(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	lua_pushbooleancpp(L, bitmapPtr->isScalingAllowed());
 	return 1;
 }
 
 static int b_isAlphaAllowed(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	lua_pushbooleancpp(L, bitmapPtr->isAlphaAllowed());
 	return 1;
 }
 
 static int b_isTintingAllowed(lua_State *L) {
 	RenderObjectPtr<Bitmap> bitmapPtr = checkBitmap(L);
-	BS_ASSERT(bitmapPtr.isValid());
+	assert(bitmapPtr.isValid());
 	lua_pushbooleancpp(L, bitmapPtr->isColorModulationAllowed());
 	return 1;
 }
 
 static int b_remove(lua_State *L) {
 	RenderObjectPtr<RenderObject> roPtr = checkRenderObject(L);
-	BS_ASSERT(roPtr.isValid());
+	assert(roPtr.isValid());
 	roPtr.erase();
 	return 0;
 }
@@ -882,84 +882,84 @@
 
 static int a_play(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr->play();
 	return 0;
 }
 
 static int a_pause(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr->pause();
 	return 0;
 }
 
 static int a_stop(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr->stop();
 	return 0;
 }
 
 static int a_setFrame(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr->setFrame(static_cast<uint>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int a_setAlpha(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr->setAlpha(static_cast<int>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int a_setTintColor(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr->setModulationColor(GraphicEngine::luaColorToARGBColor(L, 2));
 	return 0;
 }
 
 static int a_setScaleFactor(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr->setScaleFactor(static_cast<float>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int a_setScaleFactorX(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr->setScaleFactorX(static_cast<float>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int a_setScaleFactorY(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr->setScaleFactorY(static_cast<float>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int a_getScaleFactorX(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushnumber(L, animationPtr->getScaleFactorX());
 	return 1;
 }
 
 static int a_getScaleFactorY(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushnumber(L, animationPtr->getScaleFactorY());
 	return 1;
 }
 
 static int a_getAnimationType(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	switch (animationPtr->getAnimationType()) {
 	case Animation::AT_JOJO:
 		lua_pushstring(L, "jojo");
@@ -971,63 +971,63 @@
 		lua_pushstring(L, "oneshot");
 		break;
 	default:
-		BS_ASSERT(false);
+		assert(false);
 	}
 	return 1;
 }
 
 static int a_getFPS(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushnumber(L, animationPtr->getFPS());
 	return 1;
 }
 
 static int a_getFrameCount(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushnumber(L, animationPtr->getFrameCount());
 	return 1;
 }
 
 static int a_isScalingAllowed(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushbooleancpp(L, animationPtr->isScalingAllowed());
 	return 1;
 }
 
 static int a_isAlphaAllowed(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushbooleancpp(L, animationPtr->isAlphaAllowed());
 	return 1;
 }
 
 static int a_isTintingAllowed(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushbooleancpp(L, animationPtr->isColorModulationAllowed());
 	return 1;
 }
 
 static int a_getCurrentFrame(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushnumber(L, animationPtr->getCurrentFrame());
 	return 1;
 }
 
 static int a_getCurrentAction(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushstring(L, animationPtr->getCurrentAction().c_str());
 	return 1;
 }
 
 static int a_isPlaying(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	lua_pushbooleancpp(L, animationPtr->isRunning());
 	return 1;
 }
@@ -1041,7 +1041,7 @@
 
 static int a_registerLoopPointCallback(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	luaL_checktype(L, 2, LUA_TFUNCTION);
 
 	lua_pushvalue(L, 2);
@@ -1052,7 +1052,7 @@
 
 static int a_unregisterLoopPointCallback(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	luaL_checktype(L, 2, LUA_TFUNCTION);
 
 	lua_pushvalue(L, 2);
@@ -1074,7 +1074,7 @@
 
 static int a_registerActionCallback(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	luaL_checktype(L, 2, LUA_TFUNCTION);
 
 	lua_pushvalue(L, 2);
@@ -1085,7 +1085,7 @@
 
 static int a_unregisterActionCallback(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	luaL_checktype(L, 2, LUA_TFUNCTION);
 
 	lua_pushvalue(L, 2);
@@ -1103,7 +1103,7 @@
 
 static int a_remove(lua_State *L) {
 	RenderObjectPtr<Animation> animationPtr = checkAnimation(L);
-	BS_ASSERT(animationPtr.isValid());
+	assert(animationPtr.isValid());
 	animationPtr.erase();
 	return 0;
 }
@@ -1155,91 +1155,91 @@
 
 static int t_setFont(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	textPtr->setFont(luaL_checkstring(L, 2));
 	return 0;
 }
 
 static int t_setText(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	textPtr->setText(luaL_checkstring(L, 2));
 	return 0;
 }
 
 static int t_setAlpha(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	textPtr->setAlpha(static_cast<int>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int t_setColor(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	textPtr->setColor(GraphicEngine::luaColorToARGBColor(L, 2));
 	return 0;
 }
 
 static int t_setAutoWrap(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	textPtr->setAutoWrap(lua_tobooleancpp(L, 2));
 	return 0;
 }
 
 static int t_setAutoWrapThreshold(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	textPtr->setAutoWrapThreshold(static_cast<uint>(luaL_checknumber(L, 2)));
 	return 0;
 }
 
 static int t_getText(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	lua_pushstring(L, textPtr->getText().c_str());
 	return 1;
 }
 
 static int t_getFont(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	lua_pushstring(L, textPtr->getFont().c_str());
 	return 1;
 }
 
 static int t_getAlpha(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	lua_pushnumber(L, textPtr->getAlpha());
 	return 1;
 }
 
 static int t_getColor(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	lua_pushnumber(L, textPtr->getColor());
 	return 1;
 }
 
 static int t_isAutoWrap(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	lua_pushbooleancpp(L, textPtr->isAutoWrapActive());
 	return 1;
 }
 
 static int t_getAutoWrapThreshold(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	lua_pushnumber(L, textPtr->getAutoWrapThreshold());
 	return 1;
 }
 
 static int t_remove(lua_State *L) {
 	RenderObjectPtr<Text> textPtr = checkText(L);
-	BS_ASSERT(textPtr.isValid());
+	assert(textPtr.isValid());
 	textPtr.erase();
 	return 0;
 }
@@ -1263,11 +1263,11 @@
 
 bool GraphicEngine::registerScriptBindings() {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ScriptEngine *pScript = pKernel->getScript();
-	BS_ASSERT(pScript);
+	assert(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->getScriptObject());
-	BS_ASSERT(L);
+	assert(L);
 
 	if (!LuaBindhelper::addMethodsToClass(L, BITMAP_CLASS_NAME, RENDEROBJECT_METHODS)) return false;
 	if (!LuaBindhelper::addMethodsToClass(L, ANIMATION_CLASS_NAME, RENDEROBJECT_METHODS)) return false;

Modified: scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -55,7 +55,7 @@
 	result = false;
 
 	PackageManager *pPackage = Kernel::getInstance()->getPackage();
-	BS_ASSERT(pPackage);
+	assert(pPackage);
 
 	_backSurface = Kernel::getInstance()->getGfx()->getSurface();
 

Modified: scummvm/trunk/engines/sword25/gfx/image/swimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/swimage.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/image/swimage.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -45,7 +45,7 @@
 	result = false;
 
 	PackageManager *pPackage = Kernel::getInstance()->getPackage();
-	BS_ASSERT(pPackage);
+	assert(pPackage);
 
 	// Datei laden
 	byte *pFileData;
@@ -104,8 +104,8 @@
 }
 
 uint SWImage::getPixel(int x, int y) {
-	BS_ASSERT(x >= 0 && x < _width);
-	BS_ASSERT(y >= 0 && y < _height);
+	assert(x >= 0 && x < _width);
+	assert(y >= 0 && y < _height);
 
 	return _imageDataPtr[_width * y + x];
 }

Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -293,7 +293,7 @@
 
 	// Die Ausf\xFChrung darf nicht an dieser Stelle ankommen: Entweder es wird ein Shape gefunden, dann wird die Funktion mit vorher verlassen, oder
 	// es wird keines gefunden, dann tritt eine Exception auf sobald \xFCber das Ende der Datei hinaus gelesen wird.
-	BS_ASSERT(false);
+	assert(false);
 }
 
 VectorImage::~VectorImage() {

Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimage.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimage.h	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimage.h	2011-01-23 15:01:24 UTC (rev 55464)
@@ -101,12 +101,12 @@
 		return _pathInfos.size();
 	}
 	const VectorPathInfo &getPathInfo(uint pathNr) const {
-		BS_ASSERT(pathNr < getPathCount());
+		assert(pathNr < getPathCount());
 		return _pathInfos[pathNr];
 	}
 
 	double getLineStyleWidth(uint lineStyle) const {
-		BS_ASSERT(lineStyle < _lineStyles.size());
+		assert(lineStyle < _lineStyles.size());
 		return _lineStyles[lineStyle].width;
 	}
 
@@ -115,7 +115,7 @@
 	}
 
 	uint32 getLineStyleColor(uint lineStyle) const {
-		BS_ASSERT(lineStyle < _lineStyles.size());
+		assert(lineStyle < _lineStyles.size());
 		return _lineStyles[lineStyle].color;
 	}
 
@@ -124,7 +124,7 @@
 	}
 
 	uint32 getFillStyleColor(uint fillStyle) const {
-		BS_ASSERT(fillStyle < _fillStyles.size());
+		assert(fillStyle < _fillStyles.size());
 		return _fillStyles[fillStyle];
 	}
 
@@ -165,7 +165,7 @@
 		return _elements.size();
 	}
 	const VectorImageElement &getElement(uint elementNr) const {
-		BS_ASSERT(elementNr < _elements.size());
+		assert(elementNr < _elements.size());
 		return _elements[elementNr];
 	}
 	const Common::Rect &getBoundingBox() const {

Modified: scummvm/trunk/engines/sword25/gfx/panel.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/panel.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/panel.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -76,7 +76,7 @@
 		return true;
 
 	GraphicEngine *gfxPtr = Kernel::getInstance()->getGfx();
-	BS_ASSERT(gfxPtr);
+	assert(gfxPtr);
 
 	return gfxPtr->fill(&_bbox, _color);
 }

Modified: scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -87,13 +87,13 @@
 bool StaticBitmap::doRender() {
 	// Bitmap holen
 	Resource *resourcePtr = Kernel::getInstance()->getResourceManager()->requestResource(_resourceFilename);
-	BS_ASSERT(resourcePtr);
-	BS_ASSERT(resourcePtr->getType() == Resource::TYPE_BITMAP);
+	assert(resourcePtr);
+	assert(resourcePtr->getType() == Resource::TYPE_BITMAP);
 	BitmapResource *bitmapResourcePtr = static_cast<BitmapResource *>(resourcePtr);
 
 	// Framebufferobjekt holen
 	GraphicEngine *gfxPtr = Kernel::getInstance()->getGfx();
-	BS_ASSERT(gfxPtr);
+	assert(gfxPtr);
 
 	// Bitmap zeichnen
 	bool result;
@@ -116,11 +116,11 @@
 }
 
 uint StaticBitmap::getPixel(int x, int y) const {
-	BS_ASSERT(x >= 0 && x < _width);
-	BS_ASSERT(y >= 0 && y < _height);
+	assert(x >= 0 && x < _width);
+	assert(y >= 0 && y < _height);
 
 	Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource(_resourceFilename);
-	BS_ASSERT(pResource->getType() == Resource::TYPE_BITMAP);
+	assert(pResource->getType() == Resource::TYPE_BITMAP);
 	BitmapResource *pBitmapResource = static_cast<BitmapResource *>(pResource);
 	uint result = pBitmapResource->getPixel(x, y);
 	pResource->release();
@@ -134,7 +134,7 @@
 
 bool StaticBitmap::isAlphaAllowed() const {
 	Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource(_resourceFilename);
-	BS_ASSERT(pResource->getType() == Resource::TYPE_BITMAP);
+	assert(pResource->getType() == Resource::TYPE_BITMAP);
 	bool result = static_cast<BitmapResource *>(pResource)->isAlphaAllowed();
 	pResource->release();
 	return result;
@@ -142,7 +142,7 @@
 
 bool StaticBitmap::isColorModulationAllowed() const {
 	Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource(_resourceFilename);
-	BS_ASSERT(pResource->getType() == Resource::TYPE_BITMAP);
+	assert(pResource->getType() == Resource::TYPE_BITMAP);
 	bool result = static_cast<BitmapResource *>(pResource)->isColorModulationAllowed();
 	pResource->release();
 	return result;
@@ -150,7 +150,7 @@
 
 bool StaticBitmap::isScalingAllowed() const {
 	Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource(_resourceFilename);
-	BS_ASSERT(pResource->getType() == Resource::TYPE_BITMAP);
+	assert(pResource->getType() == Resource::TYPE_BITMAP);
 	bool result = static_cast<BitmapResource *>(pResource)->isScalingAllowed();
 	pResource->release();
 	return result;

Modified: scummvm/trunk/engines/sword25/gfx/text.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/text.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/text.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -98,7 +98,7 @@
 }
 
 void Text::setAlpha(int alpha) {
-	BS_ASSERT(alpha >= 0 && alpha < 256);
+	assert(alpha >= 0 && alpha < 256);
 	uint newModulationColor = (_modulationColor & 0x00ffffff) | alpha << 24;
 	if (newModulationColor != _modulationColor) {
 		_modulationColor = newModulationColor;
@@ -147,7 +147,7 @@
 
 	// Framebufferobjekt holen.
 	GraphicEngine *gfxPtr = Kernel::getInstance()->getGfx();
-	BS_ASSERT(gfxPtr);
+	assert(gfxPtr);
 
 	bool result = true;
 	Common::Array<Line>::iterator iter = _lines.begin();
@@ -212,7 +212,7 @@
 
 void Text::updateFormat() {
 	FontResource *fontPtr = lockFontResource();
-	BS_ASSERT(fontPtr);
+	assert(fontPtr);
 
 	updateMetrics(*fontPtr);
 
@@ -263,7 +263,7 @@
 
 			if (lastSpace < _text.size()) {
 				++curLine;
-				BS_ASSERT(curLine == _lines.size());
+				assert(curLine == _lines.size());
 				_lines.resize(curLine + 1);
 				_lines[curLine].text = "";
 			}

Modified: scummvm/trunk/engines/sword25/gfx/timedrenderobject.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/timedrenderobject.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/gfx/timedrenderobject.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -40,12 +40,12 @@
 
 TimedRenderObject::TimedRenderObject(RenderObjectPtr<RenderObject> pParent, TYPES type, uint handle) :
 	RenderObject(pParent, type, handle) {
-	BS_ASSERT(getManager());
+	assert(getManager());
 	getManager()->attatchTimedRenderObject(this->getHandle());
 }
 
 TimedRenderObject::~TimedRenderObject() {
-	BS_ASSERT(getManager());
+	assert(getManager());
 	getManager()->detatchTimedRenderObject(this->getHandle());
 }
 

Modified: scummvm/trunk/engines/sword25/input/inputengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/input/inputengine_script.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/input/inputengine_script.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -84,9 +84,9 @@
 
 static InputEngine *getIE() {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	InputEngine *pIE = pKernel->getInput();
-	BS_ASSERT(pIE);
+	assert(pIE);
 	return pIE;
 }
 
@@ -263,11 +263,11 @@
 
 bool InputEngine::registerScriptBindings() {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ScriptEngine *pScript = pKernel->getScript();
-	BS_ASSERT(pScript);
+	assert(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->getScriptObject());
-	BS_ASSERT(L);
+	assert(L);
 
 	if (!LuaBindhelper::addFunctionsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_FUNCTIONS)) return false;
 	if (!LuaBindhelper::addConstantsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_CONSTANTS)) return false;

Modified: scummvm/trunk/engines/sword25/kernel/common.h
===================================================================
--- scummvm/trunk/engines/sword25/kernel/common.h	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/kernel/common.h	2011-01-23 15:01:24 UTC (rev 55464)
@@ -54,6 +54,4 @@
 #include "sword25/kernel/common.h"
 #include "common/debug.h"
 
-#define BS_ASSERT(EXP) assert(EXP)
-
 #endif

Modified: scummvm/trunk/engines/sword25/kernel/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/kernel.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/kernel/kernel.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -139,7 +139,7 @@
  * @param Max       The maximum allowed value
  */
 int Kernel::getRandomNumber(int min, int max) {
-	BS_ASSERT(min <= max);
+	assert(min <= max);
 
 	return min + _rnd.getRandomNumber(max - min + 1);
 }

Modified: scummvm/trunk/engines/sword25/kernel/kernel_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/kernel_script.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/kernel/kernel_script.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -86,7 +86,7 @@
 
 static int getMilliTicks(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 
 	lua_pushnumber(L, pKernel->getMilliTicks());
 
@@ -95,7 +95,7 @@
 
 static int getTimer(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 
 	lua_pushnumber(L, static_cast<lua_Number>(pKernel->getMilliTicks()) / 1000.0);
 
@@ -112,23 +112,23 @@
 
 static int sleep(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	pKernel->sleep(static_cast<uint>(luaL_checknumber(L, 1) * 1000));
 	return 0;
 }
 
 static int crash(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	pKernel->crash();
 	return 0;
 }
 
 static int executeFile(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ScriptEngine *pSE = pKernel->getScript();
-	BS_ASSERT(pSE);
+	assert(pSE);
 
 	lua_pushbooleancpp(L, pSE->executeFile(luaL_checkstring(L, 1)));
 
@@ -370,9 +370,9 @@
 
 static int precacheResource(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ResourceManager *pResource = pKernel->getResourceManager();
-	BS_ASSERT(pResource);
+	assert(pResource);
 
 	lua_pushbooleancpp(L, pResource->precacheResource(luaL_checkstring(L, 1)));
 
@@ -381,9 +381,9 @@
 
 static int forcePrecacheResource(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ResourceManager *pResource = pKernel->getResourceManager();
-	BS_ASSERT(pResource);
+	assert(pResource);
 
 	lua_pushbooleancpp(L, pResource->precacheResource(luaL_checkstring(L, 1), true));
 
@@ -392,9 +392,9 @@
 
 static int getMaxMemoryUsage(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ResourceManager *pResource = pKernel->getResourceManager();
-	BS_ASSERT(pResource);
+	assert(pResource);
 
 	lua_pushnumber(L, pResource->getMaxMemoryUsage());
 
@@ -403,9 +403,9 @@
 
 static int setMaxMemoryUsage(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ResourceManager *pResource = pKernel->getResourceManager();
-	BS_ASSERT(pResource);
+	assert(pResource);
 
 	pResource->setMaxMemoryUsage(static_cast<uint>(lua_tonumber(L, 1)));
 
@@ -414,9 +414,9 @@
 
 static int emptyCache(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ResourceManager *pResource = pKernel->getResourceManager();
-	BS_ASSERT(pResource);
+	assert(pResource);
 
 	pResource->emptyCache();
 
@@ -425,9 +425,9 @@
 
 static int isLogCacheMiss(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ResourceManager *pResource = pKernel->getResourceManager();
-	BS_ASSERT(pResource);
+	assert(pResource);
 
 	lua_pushbooleancpp(L, pResource->isLogCacheMiss());
 
@@ -436,9 +436,9 @@
 
 static int setLogCacheMiss(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ResourceManager *pResource = pKernel->getResourceManager();
-	BS_ASSERT(pResource);
+	assert(pResource);
 
 	pResource->setLogCacheMiss(lua_tobooleancpp(L, 1));
 
@@ -447,9 +447,9 @@
 
 static int dumpLockedResources(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ResourceManager *pResource = pKernel->getResourceManager();
-	BS_ASSERT(pResource);
+	assert(pResource);
 
 	pResource->dumpLockedResources();
 
@@ -535,9 +535,9 @@
 
 bool Kernel::registerScriptBindings() {
 	ScriptEngine *pScript = getScript();
-	BS_ASSERT(pScript);
+	assert(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->getScriptObject());
-	BS_ASSERT(L);
+	assert(L);
 
 	if (!LuaBindhelper::addFunctionsToLib(L, KERNEL_LIBRARY_NAME, KERNEL_FUNCTIONS)) return false;
 	if (!LuaBindhelper::addFunctionsToLib(L, WINDOW_LIBRARY_NAME, WINDOW_FUNCTIONS)) return false;

Modified: scummvm/trunk/engines/sword25/kernel/resource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/resource.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/kernel/resource.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -42,7 +42,7 @@
 	_type(type),
 	_refCount(0) {
 	PackageManager *pPM = Kernel::getInstance()->getPackage();
-	BS_ASSERT(pPM);
+	assert(pPM);
 
 	_fileName = pPM->getAbsolutePath(fileName);
 }

Modified: scummvm/trunk/engines/sword25/math/geometry_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/geometry_script.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/math/geometry_script.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -114,7 +114,7 @@
 	}
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return true;
@@ -151,10 +151,10 @@
 		// Vertex
 		vertices.push_back(Vertex(X, Y));
 	}
-	BS_ASSERT((int)vertices.size() == vertexCount);
+	assert((int)vertices.size() == vertexCount);
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	// Create polygon
@@ -185,10 +185,10 @@
 	} else if (!strcmp(className, WALKREGION_CLASS_NAME)) {
 		regionHandle = WalkRegion::create(Region::RT_WALKREGION);
 	} else {
-		BS_ASSERT(false);
+		assert(false);
 	}
 
-	BS_ASSERT(regionHandle);
+	assert(regionHandle);
 
 	// If the first element of the parameter is a number, then case 1 is accepted
 	// If the first element of the parameter is a table, then case 2 is accepted
@@ -224,7 +224,7 @@
 				tablePolygonToPolygon(L, holes.back());
 				lua_pop(L, 1);
 			}
-			BS_ASSERT((int)holes.size() == polygonCount - 1);
+			assert((int)holes.size() == polygonCount - 1);
 
 			RegionRegistry::instance().resolveHandle(regionHandle)->init(polygon, &holes);
 		}
@@ -237,7 +237,7 @@
 	}
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return regionHandle;
@@ -247,12 +247,12 @@
 	// Region due to the Lua code to create
 	// Any errors that occur will be intercepted to the luaL_error
 	uint regionHandle = tableRegionToRegion(L, className);
-	BS_ASSERT(regionHandle);
+	assert(regionHandle);
 
 	newUintUserData(L, regionHandle);
 	// luaL_getmetatable(L, className);
 	LuaBindhelper::getMetatable(L, className);
-	BS_ASSERT(!lua_isnil(L, -1));
+	assert(!lua_isnil(L, -1));
 	lua_setmetatable(L, -2);
 }
 
@@ -290,7 +290,7 @@
 
 static int r_isValid(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 
 	lua_pushbooleancpp(L, pR->isValid());
 	return 1;
@@ -298,7 +298,7 @@
 
 static int r_getX(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 
 	lua_pushnumber(L, pR->getPosX());
 	return 1;
@@ -306,7 +306,7 @@
 
 static int r_getY(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 
 	lua_pushnumber(L, pR->getPosY());
 	return 1;
@@ -314,7 +314,7 @@
 
 static int r_getPos(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 
 	Vertex::vertexToLuaVertex(L, pR->getPosition());
 	return 1;
@@ -322,7 +322,7 @@
 
 static int r_isPointInRegion(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 
 	Vertex vertex;
 	Vertex::luaVertexToVertex(L, 2, vertex);
@@ -332,7 +332,7 @@
 
 static int r_setPos(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 
 	Vertex vertex;
 	Vertex::luaVertexToVertex(L, 2, vertex);
@@ -343,7 +343,7 @@
 
 static int r_setX(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 
 	pR->setPosX(static_cast<int>(luaL_checknumber(L, 2)));
 
@@ -352,7 +352,7 @@
 
 static int r_setY(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 
 	pR->setPosY(static_cast<int>(luaL_checknumber(L, 2)));
 
@@ -361,7 +361,7 @@
 
 static void drawPolygon(const Polygon &polygon, uint color, const Vertex &offset) {
 	GraphicEngine *pGE = Kernel::getInstance()->getGfx();
-	BS_ASSERT(pGE);
+	assert(pGE);
 
 	for (int i = 0; i < polygon.vertexCount - 1; i++)
 		pGE->drawDebugLine(polygon.vertices[i] + offset, polygon.vertices[i + 1] + offset, color);
@@ -377,7 +377,7 @@
 
 static int r_draw(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 
 	switch (lua_gettop(L)) {
 	case 3: {
@@ -400,7 +400,7 @@
 
 static int r_getCentroid(lua_State *L) {
 	Region *RPtr = checkRegion(L);
-	BS_ASSERT(RPtr);
+	assert(RPtr);
 
 	Vertex::vertexToLuaVertex(L, RPtr->getCentroid());
 
@@ -409,7 +409,7 @@
 
 static int r_delete(lua_State *L) {
 	Region *pR = checkRegion(L);
-	BS_ASSERT(pR);
+	assert(pR);
 	delete pR;
 	return 0;
 }
@@ -443,7 +443,7 @@
 
 static int wr_getPath(lua_State *L) {
 	WalkRegion *pWR = checkWalkRegion(L);
-	BS_ASSERT(pWR);
+	assert(pWR);
 
 	Vertex start;
 	Vertex::luaVertexToVertex(L, 2, start);
@@ -471,11 +471,11 @@
 
 bool Geometry::registerScriptBindings() {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ScriptEngine *pScript = pKernel->getScript();
-	BS_ASSERT(pScript);
+	assert(pScript);
 	lua_State *L = static_cast< lua_State *>(pScript->getScriptObject());
-	BS_ASSERT(L);
+	assert(L);
 
 	if (!LuaBindhelper::addMethodsToClass(L, REGION_CLASS_NAME, REGION_METHODS)) return false;
 	if (!LuaBindhelper::addMethodsToClass(L, WALKREGION_CLASS_NAME, REGION_METHODS)) return false;

Modified: scummvm/trunk/engines/sword25/math/region.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/region.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/math/region.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -62,7 +62,7 @@
 		break;
 
 	default:
-		BS_ASSERT(true);
+		assert(true);
 	}
 
 	return RegionRegistry::instance().resolvePtr(regionPtr);
@@ -80,7 +80,7 @@
 	} else if (type == RT_WALKREGION) {
 		regionPtr = new WalkRegion(reader, handle);
 	} else {
-		BS_ASSERT(false);
+		assert(false);
 	}
 
 	return RegionRegistry::instance().resolvePtr(regionPtr);
@@ -206,7 +206,7 @@
 
 	const Polygon &polygon = _polygons[polygonIdx];
 
-	BS_ASSERT(polygon.vertexCount > 1);
+	assert(polygon.vertexCount > 1);
 
 	// For each line of the polygon, calculate the point that is cloest to the given point
 	// The point of this set with the smallest distance to the given point is the result.
@@ -287,7 +287,7 @@
 
 // Line of Sight
 bool Region::isLineOfSight(const Vertex &a, const Vertex &b) const {
-	BS_ASSERT(_polygons.size());
+	assert(_polygons.size());
 
 	// The line must be within the contour polygon, and outside of any hole polygons
 	Common::Array<Polygon>::const_iterator iter = _polygons.begin();

Modified: scummvm/trunk/engines/sword25/math/region.h
===================================================================
--- scummvm/trunk/engines/sword25/math/region.h	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/math/region.h	2011-01-23 15:01:24 UTC (rev 55464)
@@ -232,7 +232,7 @@
 };
 
 inline const Polygon &Region::getHole(uint i) const {
-	BS_ASSERT(i < _polygons.size() - 1);
+	assert(i < _polygons.size() - 1);
 	return _polygons[i + 1];
 }
 

Modified: scummvm/trunk/engines/sword25/math/vertex.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/vertex.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/math/vertex.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -62,7 +62,7 @@
 	lua_pop(L, 1);
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return vertex;

Modified: scummvm/trunk/engines/sword25/math/walkregion.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/walkregion.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/math/walkregion.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -68,7 +68,7 @@
 }
 
 bool WalkRegion::queryPath(Vertex startPoint, Vertex endPoint, BS_Path &path) {
-	BS_ASSERT(path.empty());
+	assert(path.empty());
 
 	// If the start and finish are identical, no path can be found trivially
 	if (startPoint == endPoint)
@@ -111,7 +111,7 @@
 		(*dijkstraIter).parentIter = dijkstraNodes.end();
 		if (region.isLineOfSight(*nodesIter, start))(*dijkstraIter).cost = (*nodesIter).distance(start);
 	}
-	BS_ASSERT(dijkstraIter == dijkstraNodes.end());
+	assert(dijkstraIter == dijkstraNodes.end());
 }
 
 static DijkstraNode::Iter chooseClosestNode(DijkstraNode::Container &nodes) {
@@ -204,7 +204,7 @@
 			// The list is done in reverse order and inserted into the path
 			DijkstraNode::ConstIter curNode = endPoint.parentIter;
 			while (curNode != dijkstraNodes.end()) {
-				BS_ASSERT((*curNode).chosen);
+				assert((*curNode).chosen);
 				path.push_back(_nodes[curNode - dijkstraNodes.begin()]);
 				curNode = (*curNode).parentIter;
 			}

Modified: scummvm/trunk/engines/sword25/package/packagemanager_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/package/packagemanager_script.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/package/packagemanager_script.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -43,9 +43,9 @@
 
 static PackageManager *getPM() {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	PackageManager *pPM = pKernel->getPackage();
-	BS_ASSERT(pPM);
+	assert(pPM);
 	return pPM;
 }
 
@@ -196,11 +196,11 @@
 
 bool PackageManager::registerScriptBindings() {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ScriptEngine *pScript = pKernel->getScript();
-	BS_ASSERT(pScript);
+	assert(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->getScriptObject());
-	BS_ASSERT(L);
+	assert(L);
 
 	if (!LuaBindhelper::addFunctionsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_FUNCTIONS))
 		return false;

Modified: scummvm/trunk/engines/sword25/script/lua_extensions.cpp
===================================================================
--- scummvm/trunk/engines/sword25/script/lua_extensions.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/script/lua_extensions.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -50,7 +50,7 @@
 	lua_pop(L, 1);
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return 0;
@@ -63,7 +63,7 @@
 
 bool LuaScriptEngine::registerStandardLibExtensions() {
 	lua_State *L = _state;
-	BS_ASSERT(_state);
+	assert(_state);
 
 	if (!LuaBindhelper::addFunctionsToLib(L, "", GLOBAL_FUNCTIONS))
 		return false;

Modified: scummvm/trunk/engines/sword25/script/luabindhelper.cpp
===================================================================
--- scummvm/trunk/engines/sword25/script/luabindhelper.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/script/luabindhelper.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -123,7 +123,7 @@
 	}
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return true;
@@ -168,7 +168,7 @@
 	}
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return true;
@@ -207,7 +207,7 @@
 	lua_pop(L, 1);
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return true;
@@ -243,7 +243,7 @@
 	lua_pop(L, 1);
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(L));
+	assert(__startStackDepth == lua_gettop(L));
 #endif
 
 	return true;

Modified: scummvm/trunk/engines/sword25/script/luacallback.cpp
===================================================================
--- scummvm/trunk/engines/sword25/script/luacallback.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/script/luacallback.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -52,7 +52,7 @@
 }
 
 void LuaCallback::registerCallbackFunction(lua_State *L, uint objectHandle) {
-	BS_ASSERT(lua_isfunction(L, -1));
+	assert(lua_isfunction(L, -1));
 	ensureObjectCallbackTableExists(L, objectHandle);
 
 	// Store function in the callback object table store
@@ -64,7 +64,7 @@
 }
 
 void LuaCallback::unregisterCallbackFunction(lua_State *L, uint objectHandle) {
-	BS_ASSERT(lua_isfunction(L, -1));
+	assert(lua_isfunction(L, -1));
 	ensureObjectCallbackTableExists(L, objectHandle);
 
 	// Iterate over all elements of the object callback table and remove the function from it

Modified: scummvm/trunk/engines/sword25/script/luascript.cpp
===================================================================
--- scummvm/trunk/engines/sword25/script/luascript.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/script/luascript.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -146,7 +146,7 @@
 
 	// Get a pointer to the package manager
 	PackageManager *pPackage = Kernel::getInstance()->getPackage();
-	BS_ASSERT(pPackage);
+	assert(pPackage);
 
 	// File read
 	uint fileSize;
@@ -154,7 +154,7 @@
 	if (!fileData) {
 		error("Couldn't read \"%s\".", fileName.c_str());
 #ifdef DEBUG
-		BS_ASSERT(__startStackDepth == lua_gettop(_state));
+		assert(__startStackDepth == lua_gettop(_state));
 #endif
 		return false;
 	}
@@ -164,7 +164,7 @@
 		// Release file buffer
 		delete[] fileData;
 #ifdef DEBUG
-		BS_ASSERT(__startStackDepth == lua_gettop(_state));
+		assert(__startStackDepth == lua_gettop(_state));
 #endif
 		return false;
 	}
@@ -173,7 +173,7 @@
 	delete[] fileData;
 
 #ifdef DEBUG
-	BS_ASSERT(__startStackDepth == lua_gettop(_state));
+	assert(__startStackDepth == lua_gettop(_state));
 #endif
 
 	return true;

Modified: scummvm/trunk/engines/sword25/sfx/soundengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/sfx/soundengine_script.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/sfx/soundengine_script.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -47,9 +47,9 @@
 
 static int init(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	if (lua_gettop(L) == 0)
 		lua_pushbooleancpp(L, pSfx->init(44100, 32));
@@ -63,9 +63,9 @@
 
 static int update(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->update();
 
@@ -74,9 +74,9 @@
 
 static int setVolume(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->setVolume(static_cast<float>(luaL_checknumber(L, 1)),
 	                static_cast<SoundEngine::SOUND_TYPES>(static_cast<uint>(luaL_checknumber(L, 2))));
@@ -86,9 +86,9 @@
 
 static int getVolume(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	lua_pushnumber(L, pSfx->getVolume(static_cast<SoundEngine::SOUND_TYPES>(static_cast<uint>(luaL_checknumber(L, 1)))));
 
@@ -97,9 +97,9 @@
 
 static int pauseAll(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->pauseAll();
 
@@ -108,9 +108,9 @@
 
 static int resumeAll(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->resumeAll();
 
@@ -119,9 +119,9 @@
 
 static int pauseLayer(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->pauseLayer(static_cast<int>(luaL_checknumber(L, 1)));
 
@@ -130,9 +130,9 @@
 
 static int resumeLayer(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->resumeLayer(static_cast<int>(luaL_checknumber(L, 1)));
 
@@ -177,9 +177,9 @@
 
 static int playSound(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	Common::String fileName;
 	SoundEngine::SOUND_TYPES type;
@@ -198,9 +198,9 @@
 
 static int playSoundEx(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	Common::String fileName;
 	SoundEngine::SOUND_TYPES type;
@@ -219,9 +219,9 @@
 
 static int setSoundVolume(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->setSoundVolume(static_cast<uint>(luaL_checknumber(L, 1)), static_cast<float>(luaL_checknumber(L, 2)));
 
@@ -230,9 +230,9 @@
 
 static int setSoundPanning(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->setSoundPanning(static_cast<uint>(luaL_checknumber(L, 1)), static_cast<float>(luaL_checknumber(L, 2)));
 
@@ -241,9 +241,9 @@
 
 static int pauseSound(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->pauseSound(static_cast<uint>(luaL_checknumber(L, 1)));
 
@@ -252,9 +252,9 @@
 
 static int resumeSound(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->resumeSound(static_cast<uint>(luaL_checknumber(L, 1)));
 
@@ -263,9 +263,9 @@
 
 static int stopSound(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	pSfx->stopSound(static_cast<uint>(luaL_checknumber(L, 1)));
 
@@ -274,9 +274,9 @@
 
 static int isSoundPaused(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	lua_pushbooleancpp(L, pSfx->isSoundPaused(static_cast<uint>(luaL_checknumber(L, 1))));
 
@@ -285,9 +285,9 @@
 
 static int isSoundPlaying(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	lua_pushbooleancpp(L, pSfx->isSoundPlaying(static_cast<uint>(luaL_checknumber(L, 1))));
 
@@ -296,9 +296,9 @@
 
 static int getSoundVolume(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	lua_pushnumber(L, pSfx->getSoundVolume(static_cast<uint>(luaL_checknumber(L, 1))));
 
@@ -307,9 +307,9 @@
 
 static int getSoundPanning(lua_State *L) {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	SoundEngine *pSfx = pKernel->getSfx();
-	BS_ASSERT(pSfx);
+	assert(pSfx);
 
 	lua_pushnumber(L, pSfx->getSoundPanning(static_cast<uint>(luaL_checknumber(L, 1))));
 
@@ -350,11 +350,11 @@
 
 bool SoundEngine::registerScriptBindings() {
 	Kernel *pKernel = Kernel::getInstance();
-	BS_ASSERT(pKernel);
+	assert(pKernel);
 	ScriptEngine *pScript = pKernel->getScript();
-	BS_ASSERT(pScript);
+	assert(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->getScriptObject());
-	BS_ASSERT(L);
+	assert(L);
 
 	if (!LuaBindhelper::addFunctionsToLib(L, SFX_LIBRARY_NAME, SFX_FUNCTIONS)) return false;
 	if (!LuaBindhelper::addConstantsToLib(L, SFX_LIBRARY_NAME, SFX_CONSTANTS)) return false;

Modified: scummvm/trunk/engines/sword25/sword25.cpp
===================================================================
--- scummvm/trunk/engines/sword25/sword25.cpp	2011-01-23 14:57:21 UTC (rev 55463)
+++ scummvm/trunk/engines/sword25/sword25.cpp	2011-01-23 15:01:24 UTC (rev 55464)
@@ -127,7 +127,7 @@
 bool Sword25Engine::appMain() {
 	// The main script start. This script loads all the other scripts and starts the actual game.
 	ScriptEngine *scriptPtr = Kernel::getInstance()->getScript();
-	BS_ASSERT(scriptPtr);
+	assert(scriptPtr);
 	scriptPtr->executeFile(DEFAULT_SCRIPT_FILE);
 
 	return true;
@@ -146,7 +146,7 @@
 
 bool Sword25Engine::loadPackages() {
 	PackageManager *packageManagerPtr = Kernel::getInstance()->getPackage();
-	BS_ASSERT(packageManagerPtr);
+	assert(packageManagerPtr);
 
 	// Load the main package
 	if (!packageManagerPtr->loadPackage("data.b25c", "/"))


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