[Scummvm-cvs-logs] SF.net SVN: scummvm:[48792] scummvm/trunk/backends

bluddy at users.sourceforge.net bluddy at users.sourceforge.net
Sun Apr 25 17:12:24 CEST 2010


Revision: 48792
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48792&view=rev
Author:   bluddy
Date:     2010-04-25 15:12:24 +0000 (Sun, 25 Apr 2010)

Log Message:
-----------
PSP:Implemented fingolfin's suggestion for cleaning up debugging code

Modified Paths:
--------------
    scummvm/trunk/backends/fs/psp/psp-fs.cpp
    scummvm/trunk/backends/fs/psp/psp-stream.cpp
    scummvm/trunk/backends/platform/psp/cursor.cpp
    scummvm/trunk/backends/platform/psp/default_display_client.cpp
    scummvm/trunk/backends/platform/psp/display_client.cpp
    scummvm/trunk/backends/platform/psp/display_manager.cpp
    scummvm/trunk/backends/platform/psp/input.cpp
    scummvm/trunk/backends/platform/psp/memory.cpp
    scummvm/trunk/backends/platform/psp/osys_psp.cpp
    scummvm/trunk/backends/platform/psp/powerman.cpp
    scummvm/trunk/backends/platform/psp/pspkeyboard.cpp
    scummvm/trunk/backends/platform/psp/psppixelformat.cpp
    scummvm/trunk/backends/platform/psp/trace.h

Modified: scummvm/trunk/backends/fs/psp/psp-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/psp/psp-fs.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/fs/psp/psp-fs.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -108,7 +108,6 @@
 		PowerMan.endCriticalSection();
 		_isDirectory = S_ISDIR(st.st_mode);
 	}
-	DEBUG_EXIT_FUNC();
 }
 
 bool PSPFilesystemNode::exists() const {
@@ -123,7 +122,6 @@
 	ret = access(_path.c_str(), F_OK);
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return (ret == 0);
 }
 
@@ -139,7 +137,6 @@
 	ret = access(_path.c_str(), R_OK);
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return (ret == 0);
 }
 
@@ -155,7 +152,6 @@
 	ret = access(_path.c_str(), W_OK);
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return ret == 0;
 }
 
@@ -175,7 +171,6 @@
 
 	AbstractFSNode *node = new PSPFilesystemNode(newPath, true);
 
-	DEBUG_EXIT_FUNC();
 	return node;
 }
 
@@ -233,7 +228,6 @@
 
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return ret;
 }
 
@@ -248,7 +242,7 @@
 	const char *end = lastPathComponent(_path, '/');
 
 	AbstractFSNode *node = new PSPFilesystemNode(Common::String(start, end - start), false);
-	DEBUG_EXIT_FUNC();
+
 	return node;
 }
 

Modified: scummvm/trunk/backends/fs/psp/psp-stream.cpp
===================================================================
--- scummvm/trunk/backends/fs/psp/psp-stream.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/fs/psp/psp-stream.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -54,8 +54,6 @@
 	_errorPos = 0;
 	_errorHandle = 0;
 	_suspendCount = 0;
-
-	DEBUG_EXIT_FUNC();
 }
 
 PSPIoStream::~PSPIoStream() {
@@ -70,8 +68,6 @@
 	fclose((FILE *)_handle);	// We don't need a critical section(?). Worst case, the handle gets closed on its own
 
 	PowerMan.endCriticalSection();
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* Function to open the file pointed to by the path.
@@ -90,7 +86,6 @@
 
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return _handle;
 }
 
@@ -100,7 +95,6 @@
 		PSP_ERROR("mem_ferror[%d], source[%d], suspend error[%d], pos[%d], _errorPos[%d], _errorHandle[%p], suspendCount[%d]\n",
 		          _ferror, _errorSource, _errorSuspend, _pos, _errorPos, _errorHandle, _suspendCount);
 
-	DEBUG_EXIT_FUNC();
 	return _ferror;
 }
 
@@ -136,7 +130,6 @@
 
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return length;
 }
 
@@ -163,7 +156,6 @@
 
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return (ret == 0);
 }
 
@@ -192,7 +184,6 @@
 
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return ret;
 }
 
@@ -218,7 +209,6 @@
 
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return ret;
 }
 
@@ -239,7 +229,6 @@
 
 	PowerMan.endCriticalSection();
 
-	DEBUG_EXIT_FUNC();
 	return (ret == 0);
 }
 
@@ -255,7 +244,6 @@
 		stream = 0;
 	}
 
-	DEBUG_EXIT_FUNC();
 	return stream;
 }
 
@@ -278,7 +266,6 @@
 		_handle = (void *)0xFFFFFFFF;	// Set handle to non-null invalid value so makeFromPath doesn't return error
 	}
 
-	DEBUG_EXIT_FUNC();
 	return 0;
 }
 
@@ -306,7 +293,6 @@
 			_errorHandle = _handle;
 		}
 	}
-	DEBUG_EXIT_FUNC();
 	return ret;
 }
 

Modified: scummvm/trunk/backends/platform/psp/cursor.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/cursor.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/cursor.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -45,8 +45,6 @@
 	_palette.setPixelFormats(PSPPixelFormat::Type_5551, PSPPixelFormat::Type_Palette_8bit); // default
 	_screenPalette.setPixelFormats(PSPPixelFormat::Type_5551, PSPPixelFormat::Type_Palette_8bit);
 	_buffer.setPixelFormat(PSPPixelFormat::Type_5551);
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Cursor::deallocate() {
@@ -55,8 +53,6 @@
 	_buffer.deallocate();
 	_palette.deallocate();
 	_screenPalette.deallocate();
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Cursor::setCursorPalette(const byte *colors, uint start, uint num) {
@@ -73,8 +69,6 @@
 
 	_palette.setPartial(colors, start, num);
 	setDirty();
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Cursor::setScreenPalette(const byte *colors, uint start, uint num) {
@@ -86,8 +80,6 @@
 
 	_screenPalette.setPartial(colors, start, num);
 	setDirty();
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Cursor::setKeyColor(uint32 color) {
@@ -103,8 +95,6 @@
 	}
 	// Don't need anything special for 16-bit
 	_keyColor = color;
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Cursor::clearKeyColor() {
@@ -121,8 +111,6 @@
 		_renderer.setKeyColor(_keyColor);
 	}
 	setDirty();
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Cursor::enableCursorPalette(bool enable) {
@@ -136,7 +124,6 @@
 		_renderer.setPalette(&_screenPalette);
 
 	setDirty();
-	DEBUG_EXIT_FUNC();
 }
 
 inline void Cursor::setSize(uint32 width, uint32 height) {
@@ -145,8 +132,6 @@
 
 	_buffer.setSize(width, height, Buffer::kSizeByTextureSize);	// we'll use texture size for mouse
 	_renderer.setDrawWholeBuffer();		// We need to let the renderer know how much to draw
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Cursor::copyFromArray(const byte *array) {
@@ -161,9 +146,6 @@
 
 	// debug
 	//PSP_DEBUG_DO(_buffer.print(0xF));
-
-	DEBUG_EXIT_FUNC();
-
 }
 
 void Cursor::setHotspot(int32 x, int32 y) {
@@ -174,7 +156,6 @@
 	updateRendererOffset();	// Important
 
 	PSP_DEBUG_PRINT("hotspotX[%d], hotspotY[%d]\n", x, y);
-	DEBUG_EXIT_FUNC();
 }
 
 // Returns true if change in x or y
@@ -204,11 +185,9 @@
 	if (oldX != _x || oldY != _y) {
 		updateRendererOffset();
 		setDirty();
-		DEBUG_EXIT_FUNC();
 		return true;
 	}
 
-	DEBUG_EXIT_FUNC();
 	return false;
 }
 
@@ -221,8 +200,6 @@
 	PSP_DEBUG_PRINT("width[%u], height[%u]\n", width, height);
 	_mouseLimitWidth = width;
 	_mouseLimitHeight = height;
-
-	DEBUG_EXIT_FUNC();
 }
 
 // Adjust X,Y movement for the screen size to keep it consistent
@@ -253,8 +230,6 @@
 		x = newX;
 		y = newY;
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 // This is only called when we have a new screen
@@ -280,8 +255,6 @@
 		_palette.setPixelFormats(paletteType, bufferType);
 		setRendererModePalettized(true);	// use palettized mechanism
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 // This is called many many times
@@ -331,8 +304,6 @@
 	// debug
 	// PSP_DEBUG_DO(_palette.print(10));
 	// PSP_DEBUG_DO(_screenPalette.print(10));
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Cursor::setXY(int x, int y) {
@@ -342,14 +313,11 @@
 	_y = y;
 	updateRendererOffset();	// Very important to let renderer know things changed
 	setDirty();
-
-	DEBUG_EXIT_FUNC();
 }
 
 inline void Cursor::updateRendererOffset() {
 	DEBUG_ENTER_FUNC();
 	_renderer.setOffsetOnScreen(_x - _hotspotX, _y - _hotspotY);
-	DEBUG_EXIT_FUNC();
 }
 
 inline void Cursor::setRendererModePalettized(bool palettized) {

Modified: scummvm/trunk/backends/platform/psp/default_display_client.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/default_display_client.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/default_display_client.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -39,7 +39,6 @@
 
 	if (!_buffer.allocate(bufferInVram)) {
 		PSP_ERROR("Couldn't allocate buffer.\n");
-		DEBUG_EXIT_FUNC();
 		return false;
 	}
 
@@ -47,13 +46,11 @@
 		PSP_DEBUG_PRINT("_palette[%p]\n", &_palette);
 
 		if (!_palette.allocate()) {
-			PSP_ERROR("Couldn't allocate pallette.\n");
-			DEBUG_EXIT_FUNC();
+			PSP_ERROR("Couldn't allocate palette.\n");
 			return false;
 		}
 	}
 
-	DEBUG_EXIT_FUNC();
 	return true;
 }
 
@@ -68,34 +65,29 @@
 	DEBUG_ENTER_FUNC();
 	_buffer.clear();
 	setDirty();
-	DEBUG_EXIT_FUNC();
 }
 
 inline void DefaultDisplayClient::clearPalette() {
 	DEBUG_ENTER_FUNC();
 	_palette.clear();
 	setDirty();
-	DEBUG_EXIT_FUNC();
 }
 
 void DefaultDisplayClient::init() {
 	DEBUG_ENTER_FUNC();
 	_renderer.setBuffer(&_buffer);
 	_renderer.setPalette(&_palette);
-	DEBUG_EXIT_FUNC();
 }
 
 void DefaultDisplayClient::copyFromRect(const byte *buf, int pitch, int destX, int destY, int recWidth, int recHeight) {
 	DEBUG_ENTER_FUNC();
 	_buffer.copyFromRect(buf, pitch, destX, destY, recWidth, recHeight);
 	setDirty();
-	DEBUG_EXIT_FUNC();
 }
 
 void DefaultDisplayClient::copyToArray(byte *dst, int pitch) {
 	DEBUG_ENTER_FUNC();
 	_buffer.copyToArray(dst, pitch);
-	DEBUG_EXIT_FUNC();
 }
 
 // Class Overlay -------------------------------------------------------
@@ -108,8 +100,6 @@
 	_renderer.setColorTest(false);
 	_renderer.setUseGlobalScaler(false);
 	_renderer.setFullScreen(true);	// speeds up render slightly
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Overlay::setBytesPerPixel(uint32 size) {
@@ -127,21 +117,17 @@
 		_buffer.setPixelFormat(PSPPixelFormat::Type_8888);
 		break;
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Overlay::setSize(uint32 width, uint32 height) {
 	DEBUG_ENTER_FUNC();
 	_buffer.setSize(width, height, Buffer::kSizeBySourceSize);
 	_renderer.setDrawWholeBuffer();	// We need to let the renderer know how much to draw
-	DEBUG_EXIT_FUNC();
 }
 
 void Overlay::copyToArray(OverlayColor *buf, int pitch) {
 	DEBUG_ENTER_FUNC();
 	_buffer.copyToArray((byte *)buf, pitch * sizeof(OverlayColor));	// Change to bytes
-	DEBUG_EXIT_FUNC();
 }
 
 void Overlay::copyFromRect(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
@@ -151,7 +137,6 @@
 	// debug
 	//_buffer.print(0xFF);
 	setDirty();
-	DEBUG_EXIT_FUNC();
 }
 
 bool Overlay::allocate() {
@@ -159,7 +144,6 @@
 
 	bool ret = DefaultDisplayClient::allocate(true, false);	// buffer in VRAM
 
-	DEBUG_EXIT_FUNC();
 	return ret;
 }
 
@@ -173,8 +157,6 @@
 	_renderer.setColorTest(false);
 	_renderer.setUseGlobalScaler(true);
 	_renderer.setFullScreen(true);
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Screen::setShakePos(int pos) {
@@ -188,8 +170,6 @@
 
 	_buffer.setSize(width, height, Buffer::kSizeBySourceSize);
 	_renderer.setDrawWholeBuffer();	// We need to let the renderer know how much to draw
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Screen::setScummvmPixelFormat(const Graphics::PixelFormat *format) {
@@ -209,8 +189,6 @@
 	PSPPixelFormat::convertFromScummvmPixelFormat(format, bufferFormat, paletteFormat, swapRedBlue);
 	_buffer.setPixelFormat(bufferFormat, swapRedBlue);
 	_palette.setPixelFormats(paletteFormat, bufferFormat, swapRedBlue);
-
-	DEBUG_EXIT_FUNC();
 }
 
 Graphics::Surface *Screen::lockAndGetForEditing() {
@@ -223,8 +201,6 @@
 	_frameBuffer.bytesPerPixel = _buffer.getBytesPerPixel();
 	// We'll set to dirty once we unlock the screen
 
-	DEBUG_EXIT_FUNC();
-
 	return &_frameBuffer;
 }
 
@@ -232,6 +208,4 @@
 	DEBUG_ENTER_FUNC();
 
 	return DefaultDisplayClient::allocate(true, false);	// buffer in VRAM
-
-	DEBUG_EXIT_FUNC();
 }

Modified: scummvm/trunk/backends/platform/psp/display_client.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/display_client.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/display_client.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -53,8 +53,6 @@
 		memset(_values, 0, getSizeInBytes());
 
 	PSP_DEBUG_PRINT("_values[%p]\n", _values);
-
-	DEBUG_EXIT_FUNC();
 }
 
 // Used to clear the specific keycolor
@@ -87,8 +85,6 @@
 	default:
 		PSP_ERROR("Incorrect bits per pixel value[%u]\n", _pixelFormat.bitsPerPixel);
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 //	Set some of the palette to color values in array
@@ -125,8 +121,6 @@
 			palette++;
 		}
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 // Sets pixel format and number of entries by the buffer's pixel format */
@@ -153,8 +147,6 @@
 	}
 
 	_pixelFormat.set(paletteType, swapRedBlue);
-
-	DEBUG_EXIT_FUNC();
 }
 
 bool Palette::allocate() {
@@ -179,14 +171,12 @@
 
 	if (!_values) {
 		PSP_ERROR("Couldn't allocate palette.\n");
-		DEBUG_EXIT_FUNC();
 		return false;
 	}
 
 	PSP_DEBUG_PRINT("_values[%p]\n", _values);
 	clear();
 
-	DEBUG_EXIT_FUNC();
 	return true;
 }
 
@@ -196,8 +186,6 @@
 	free(CACHED(_values));
 	_values = 0;
 	_numOfEntries = 0;
-
-	DEBUG_EXIT_FUNC();
 }
 
 // Copy some of the palette to an array of colors
@@ -240,8 +228,6 @@
 			palette++;
 		}
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Palette::setSingleColorRGBA(uint32 num, byte r, byte g, byte b, byte a) {
@@ -265,7 +251,6 @@
 		PSP_ERROR("Incorrect bitsPerPixel[%d]\n", _pixelFormat.bitsPerPixel);
 		break;
 	}
-	// DEBUG_EXIT_FUNC();
 }
 
 // Print to screen
@@ -326,8 +311,6 @@
 
 	// We use sourceSize because outside, they won't know what the true size is
 	copyFromRect(buffer, pitch, 0, 0, _sourceSize.width, _sourceSize.height);
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* pitch is in bytes */
@@ -345,7 +328,6 @@
 	}
 
 	if (recWidth <= 0 || recHeight <= 0) {
-		DEBUG_EXIT_FUNC();
 		return;
 	}
 
@@ -365,8 +347,6 @@
 			dst += realWidthInBytes;
 		} while (--recHeight);
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* pitch is in bytes */
@@ -385,8 +365,6 @@
 		src += realWidthInBytes;
 		dst += pitch;
 	} while (--h);
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* We can size the buffer either by texture size (multiple of 2^n) or source size. The GU can
@@ -408,8 +386,6 @@
 		_width = _sourceSize.width;
 		_height = _sourceSize.height;
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* Scale a dimension (width/height) up to power of 2 for the texture */
@@ -462,7 +438,6 @@
 
 	if (!_pixels) {
 		PSP_ERROR("couldn't allocate buffer.\n");
-		DEBUG_EXIT_FUNC();
 		return false;
 	}
 
@@ -471,7 +446,6 @@
 	_pixels = UNCACHED(_pixels);
 
 	clear();
-	DEBUG_EXIT_FUNC();
 	return true;
 }
 
@@ -487,8 +461,6 @@
 		free(CACHED(_pixels));
 
 	_pixels = 0;
-
-	DEBUG_EXIT_FUNC();
 }
 
 void Buffer::clear() {
@@ -496,8 +468,6 @@
 
 	if (_pixels)
 		memset(_pixels, 0, getSizeInBytes());
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* Convert 4 bit images to match weird PSP format */
@@ -517,8 +487,6 @@
 			*dest++ = ((val >> 4) & 0x0F0F0F0F) | ((val << 4) & 0xF0F0F0F0);
 		}
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 // Print buffer contents to screen (only source size is printed out)
@@ -585,8 +553,6 @@
 
 		guDrawVertices(vertices);
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 inline void GuRenderer::setMaxTextureOffsetByIndex(uint32 x, uint32 y) {
@@ -595,7 +561,6 @@
 
 	_maxTextureOffset.x = x << maxTextureSizeShift; /* x times 512 */
 	_maxTextureOffset.y = y << maxTextureSizeShift; /* y times 512 */
-	DEBUG_EXIT_FUNC();
 }
 
 inline void GuRenderer::guProgramDrawBehavior() {
@@ -618,8 +583,6 @@
 		sceGuColorFunc(GU_NOTEQUAL, _keyColor, 0x00ffffff);
 	} else
 		sceGuDisable(GU_COLOR_TEST);
-
-	DEBUG_EXIT_FUNC();
 }
 
 inline void GuRenderer::guLoadPalette() {
@@ -639,8 +602,6 @@
 
 	sceGuClutMode(convertToGuPixelFormat(_palette->getPixelFormat()), 0, mask, 0);
 	sceGuClutLoad(_palette->getNumOfEntries() >> 3, _palette->getRawValues());
-
-	DEBUG_EXIT_FUNC();
 }
 
 inline void GuRenderer::guProgramTextureFormat() {
@@ -648,7 +609,6 @@
 	PSP_DEBUG_PRINT("pixelFormat[%d]\n", _buffer->getPixelFormat());
 
 	sceGuTexMode(convertToGuPixelFormat(_buffer->getPixelFormat()), 0, 0, 0);
-	DEBUG_EXIT_FUNC();
 }
 
 inline uint32 GuRenderer::convertToGuPixelFormat(PSPPixelFormat::Type format) {
@@ -681,17 +641,13 @@
 
 	PSP_DEBUG_PRINT("Pixelformat[%d], guFormat[%d]\n", format, guFormat);
 
-	DEBUG_EXIT_FUNC();
 	return guFormat;
-
 }
 
 inline void GuRenderer::guLoadTexture() {
 	DEBUG_ENTER_FUNC();
 
 	sceGuTexImage(0, _buffer->getTextureWidth(), _buffer->getTextureHeight(), _buffer->getWidth(), _buffer->getPixels() + _buffer->_pixelFormat.pixelsToBytes(_maxTextureOffset.x));
-
-	DEBUG_EXIT_FUNC();
 }
 
 inline Vertex *GuRenderer::guGetVertices() {
@@ -699,7 +655,6 @@
 
 	Vertex *ret = (Vertex *)sceGuGetMemory(2 * sizeof(Vertex));
 
-	DEBUG_EXIT_FUNC();
 	return ret;
 }
 
@@ -759,8 +714,6 @@
 
 	PSP_DEBUG_PRINT("TextureStart: X[%f] Y[%f] TextureEnd: X[%.1f] Y[%.1f]\n", textureStartX, textureStartY, textureEndX, textureEndY);
 	PSP_DEBUG_PRINT("ImageStart:   X[%f] Y[%f] ImageEnd:   X[%.1f] Y[%.1f]\n", imageStartX, imageStartY, imageEndX, imageEndY);
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* Scale the input X offset to appear in proper position on the screen */
@@ -795,7 +748,6 @@
 	DEBUG_ENTER_FUNC();
 
 	sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF | GU_VERTEX_32BITF | GU_TRANSFORM_2D, 2, 0, vertices);
-	DEBUG_EXIT_FUNC();
 }
 
 void GuRenderer::cacheInvalidate(void *pointer, uint32 size) {

Modified: scummvm/trunk/backends/platform/psp/display_manager.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/display_manager.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/display_manager.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -83,8 +83,6 @@
 
 	sceDisplayWaitVblankStart();
 	sceGuDisplay(1);
-
-	DEBUG_EXIT_FUNC();
 }
 
 void MasterGuRenderer::guProgramDisplayBufferSizes() {
@@ -106,8 +104,6 @@
 		VramAllocator::instance().allocate(PSP_FRAME_SIZE * sizeof(uint32) * 2);
 		break;
 	}
-
-	DEBUG_EXIT_FUNC();
 }
 
 // These are GU commands that should always stay the same
@@ -130,8 +126,6 @@
 
 	sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); // Also good enough for all purposes
 	sceGuAlphaFunc(GU_GREATER, 0, 0xFF);	   // Also good enough for all purposes
-
-	DEBUG_EXIT_FUNC();
 }
 
 inline void MasterGuRenderer::guPostRender() {
@@ -147,8 +141,6 @@
 
 	sceDisplayWaitVblankStart();
 	sceGuSwapBuffers();
-
-	DEBUG_EXIT_FUNC();
 }
 
 void MasterGuRenderer::guShutDown() {
@@ -173,8 +165,6 @@
 	_cursor->init();
 
 	_masterGuRenderer.guInit();				// start up the renderer
-
-	DEBUG_EXIT_FUNC();
 }
 
 void DisplayManager::setSizeAndPixelFormat(uint width, uint height, const Graphics::PixelFormat *format) {
@@ -198,8 +188,6 @@
 	_displayParams.screenSource.width = width;
 	_displayParams.screenSource.height = height;
 	calculateScaleParams();
-
-	DEBUG_EXIT_FUNC();
 }
 
 bool DisplayManager::setGraphicsMode(const char *name) {
@@ -210,13 +198,11 @@
 	while (_supportedModes[i].name) {
 		if (!strcmpi(_supportedModes[i].name, name)) {
 			setGraphicsMode(_supportedModes[i].id);
-			DEBUG_EXIT_FUNC();
 			return true;
 		}
 		i++;
 	}
 
-	DEBUG_EXIT_FUNC();
 	return false;
 }
 
@@ -248,7 +234,6 @@
 
 	calculateScaleParams();
 
-	DEBUG_EXIT_FUNC();
 	return true;
 }
 
@@ -264,7 +249,6 @@
 	DEBUG_ENTER_FUNC();
 
 	if (!isTimeToUpdate()) {
-		DEBUG_EXIT_FUNC();
 		return;
 	}
 
@@ -273,7 +257,6 @@
 	        (!_cursor->isDirty()) &&
 	        (!_keyboard->isDirty())) {
 		PSP_DEBUG_PRINT("Nothing dirty\n");
-		DEBUG_EXIT_FUNC();
 		return;
 	}
 
@@ -306,8 +289,6 @@
 	_keyboard->setClean();
 
 	_masterGuRenderer.guPostRender();
-
-	DEBUG_EXIT_FUNC();
 }
 
 inline bool DisplayManager::isTimeToUpdate() {

Modified: scummvm/trunk/backends/platform/psp/input.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/input.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/input.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -55,7 +55,6 @@
 
 	uint32 time = g_system->getMillis();	// may not be necessary with read
 	if (time - _lastPadCheckTime < PAD_CHECK_TIME) {
-		DEBUG_EXIT_FUNC();
 		return false;
 	}
 
@@ -78,8 +77,6 @@
 		PSP_DEBUG_PRINT("event.type[%d]\n", event.type);
 	}
 
-	DEBUG_EXIT_FUNC();
-
 	return haveEvent;
 }
 
@@ -100,7 +97,6 @@
 
 	_prevButtons = pad.Buttons;
 
-	DEBUG_EXIT_FUNC();
 	return haveEvent;
 }
 
@@ -156,7 +152,6 @@
 		haveEvent = true;
 	}
 
-	DEBUG_EXIT_FUNC();
 	return haveEvent;
 }
 
@@ -185,7 +180,6 @@
 			key = Common::KEYCODE_KP9;
 	}
 
-	DEBUG_EXIT_FUNC();
 	return key;
 }
 
@@ -238,7 +232,6 @@
 		haveEvent = true;
 	}
 
-	DEBUG_EXIT_FUNC();
 	return haveEvent;
 }
 
@@ -292,7 +285,6 @@
 			PSP_DEBUG_PRINT("Nub event. X[%d], Y[%d]\n", newX, newY);
 		}
 	}
-	DEBUG_EXIT_FUNC();
 	return haveEvent;
 }
 
@@ -309,7 +301,5 @@
 	else 				// between these points, dampen the response to 0
 		input = 0;
 
-
-	DEBUG_EXIT_FUNC();
 	return input;
 }

Modified: scummvm/trunk/backends/platform/psp/memory.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/memory.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/memory.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -72,7 +72,6 @@
 		if (bytes > prefixDst)	// check that we can afford to subtract from bytes
 			bytes -= prefixDst;
 		else {
-			DEBUG_EXIT_FUNC();
 			return;
 		}
 		dst32 = (uint32 *)(dst + prefixDst);
@@ -126,7 +125,7 @@
 		PSP_DEBUG_PRINT("\n");
 #endif
 
-	DEBUG_EXIT_FUNC();
+	return;		// So we have something to jump to with the label
 }
 
 inline void Copier::copy8(byte *dst, const byte *src, uint32 bytes) {
@@ -200,7 +199,6 @@
 	PSP_DEBUG_PRINT("Allocated in VRAM, size %u at %p.\n", size, lastAddress);
 	PSP_DEBUG_PRINT("Total allocated %u, remaining %u.\n", _bytesAllocated, (2 * 1024 * 1024) - _bytesAllocated);
 
-	DEBUG_EXIT_FUNC();
 	return lastAddress;
 }
 
@@ -217,11 +215,9 @@
 			_bytesAllocated -= (*i).size;
 			_allocList.erase(i);
 			PSP_DEBUG_PRINT("Deallocated address[%p], size[%u]\n", (*i).address, (*i).size);
-			DEBUG_EXIT_FUNC();
 			return;
 		}
 	}
 
 	PSP_DEBUG_PRINT("Address[%p] not allocated.\n", address);
-	DEBUG_EXIT_FUNC();
 }

Modified: scummvm/trunk/backends/platform/psp/osys_psp.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/osys_psp.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/osys_psp.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -97,8 +97,6 @@
 	setupMixer();
 
 	OSystem::initBackend();
-
-	DEBUG_EXIT_FUNC();
 }
 
 bool OSystem_PSP::hasFeature(Feature f) {
@@ -118,38 +116,22 @@
 
 int OSystem_PSP::getDefaultGraphicsMode() const {
 	DEBUG_ENTER_FUNC();
-
-	int ret = _displayManager.getDefaultGraphicsMode();
-
-	DEBUG_EXIT_FUNC();
-	return ret;
+	return _displayManager.getDefaultGraphicsMode();
 }
 
 bool OSystem_PSP::setGraphicsMode(int mode) {
 	DEBUG_ENTER_FUNC();
-
-	int ret = _displayManager.setGraphicsMode(mode);
-
-	DEBUG_EXIT_FUNC();
-	return ret;
+	return _displayManager.setGraphicsMode(mode);
 }
 
 bool OSystem_PSP::setGraphicsMode(const char *name) {
 	DEBUG_ENTER_FUNC();
-
-	int ret = _displayManager.setGraphicsMode(name);
-
-	DEBUG_EXIT_FUNC();
-	return ret;
+	return _displayManager.setGraphicsMode(name);
 }
 
 int OSystem_PSP::getGraphicsMode() const {
 	DEBUG_ENTER_FUNC();
-
-	int ret = _displayManager.getGraphicsMode();
-
-	DEBUG_EXIT_FUNC();
-	return ret;
+	return _displayManager.getGraphicsMode();
 }
 
 #ifdef USE_RGB_COLOR
@@ -166,144 +148,94 @@
 
 void OSystem_PSP::initSize(uint width, uint height, const Graphics::PixelFormat *format) {
 	DEBUG_ENTER_FUNC();
-
 	_displayManager.setSizeAndPixelFormat(width, height, format);
 
 	_cursor.setVisible(false);
 	_cursor.setLimits(_screen.getWidth(), _screen.getHeight());
-
-	DEBUG_EXIT_FUNC();
 }
 
 int16 OSystem_PSP::getWidth() {
 	DEBUG_ENTER_FUNC();
-
-	int16 ret = (int16)_screen.getWidth();
-
-	DEBUG_EXIT_FUNC();
-	return ret;
+	return (int16)_screen.getWidth();
 }
 
 int16 OSystem_PSP::getHeight() {
 	DEBUG_ENTER_FUNC();
-
-	int16 ret = (int16)_screen.getHeight();
-
-	DEBUG_EXIT_FUNC();
-	return ret;
+	return (int16)_screen.getHeight();
 }
 
 void OSystem_PSP::setPalette(const byte *colors, uint start, uint num) {
 	DEBUG_ENTER_FUNC();
-
 	_screen.setPartialPalette(colors, start, num);
 	_cursor.setScreenPalette(colors, start, num);
 	_cursor.clearKeyColor();
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::setCursorPalette(const byte *colors, uint start, uint num) {
 	DEBUG_ENTER_FUNC();
-
 	_cursor.setCursorPalette(colors, start, num);
 	_cursor.enableCursorPalette(true);
 	_cursor.clearKeyColor();	// Do we need this?
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::disableCursorPalette(bool disable) {
 	DEBUG_ENTER_FUNC();
-
 	_cursor.enableCursorPalette(!disable);
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
 	DEBUG_ENTER_FUNC();
-
 	_screen.copyFromRect(buf, pitch, x, y, w, h);
-
-	DEBUG_EXIT_FUNC();
 }
 
 Graphics::Surface *OSystem_PSP::lockScreen() {
 	DEBUG_ENTER_FUNC();
-
-	Graphics::Surface *ret = _screen.lockAndGetForEditing();
-
-	DEBUG_EXIT_FUNC();
-	return ret;
+	return _screen.lockAndGetForEditing();
 }
 
 void OSystem_PSP::unlockScreen() {
 	DEBUG_ENTER_FUNC();
 	// The screen is always completely updated anyway, so we don't have to force a full update here.
 	_screen.unlock();
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::updateScreen() {
 	DEBUG_ENTER_FUNC();
-
 	_displayManager.renderAll();
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::setShakePos(int shakeOffset) {
 	DEBUG_ENTER_FUNC();
-
 	_screen.setShakePos(shakeOffset);
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::showOverlay() {
 	DEBUG_ENTER_FUNC();
-
 	_overlay.setVisible(true);
 	_cursor.setLimits(_overlay.getWidth(), _overlay.getHeight());
 	_cursor.useGlobalScaler(false);	// mouse with overlay is 1:1
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::hideOverlay() {
 	DEBUG_ENTER_FUNC();
-
 	_overlay.setVisible(false);
 	_cursor.setLimits(_screen.getWidth(), _screen.getHeight());
 	_cursor.useGlobalScaler(true);	// mouse needs to be scaled with screen
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::clearOverlay() {
 	DEBUG_ENTER_FUNC();
-
 	_overlay.clearBuffer();
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::grabOverlay(OverlayColor *buf, int pitch) {
 	DEBUG_ENTER_FUNC();
-
 	_overlay.copyToArray(buf, pitch);
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
 	DEBUG_ENTER_FUNC();
-
 	_overlay.copyFromRect(buf, pitch, x, y, w, h);
-
-	DEBUG_EXIT_FUNC();
 }
 
 int16 OSystem_PSP::getOverlayWidth() {
@@ -316,35 +248,25 @@
 
 void OSystem_PSP::grabPalette(byte *colors, uint start, uint num) {
 	DEBUG_ENTER_FUNC();
-
 	_screen.getPartialPalette(colors, start, num);
-
-	DEBUG_EXIT_FUNC();
 }
 
 bool OSystem_PSP::showMouse(bool v) {
 	DEBUG_ENTER_FUNC();
-
 	PSP_DEBUG_PRINT("%s\n", v ? "true" : "false");
 	bool last = _cursor.isVisible();
 	_cursor.setVisible(v);
 
-	DEBUG_EXIT_FUNC();
-
 	return last;
 }
 
 void OSystem_PSP::warpMouse(int x, int y) {
 	DEBUG_ENTER_FUNC();
-
 	_cursor.setXY(x, y);
-
-	DEBUG_EXIT_FUNC();
 }
 
 void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) {
 	DEBUG_ENTER_FUNC();
-
 	PSP_DEBUG_PRINT("pbuf[%p], w[%u], h[%u], hotspot:X[%d], Y[%d], keycolor[%d], scale[%d], pformat[%p]\n", buf, w, h, hotspotX, hotspotY, keycolor, cursorTargetScale, format);
 	if (format) {
 		PSP_DEBUG_PRINT("format: bpp[%d], rLoss[%d], gLoss[%d], bLoss[%d], aLoss[%d], rShift[%d], gShift[%d], bShift[%d], aShift[%d]\n", format->bytesPerPixel, format->rLoss, format->gLoss, format->bLoss, format->aLoss, format->rShift, format->gShift, format->bShift, format->aShift);
@@ -356,8 +278,6 @@
 	_cursor.setHotspot(hotspotX, hotspotY);
 	_cursor.clearKeyColor();
 	_cursor.copyFromArray(buf);
-
-	DEBUG_EXIT_FUNC();
 }
 
 bool OSystem_PSP::pollEvent(Common::Event &event) {

Modified: scummvm/trunk/backends/platform/psp/powerman.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/powerman.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/powerman.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -83,8 +83,6 @@
 	_listCounter = 0;
 	PMStatusSet(kInitDone);
 	_error = 0;
-
-	DEBUG_EXIT_FUNC();
 }
 
 /*******************************************
@@ -110,7 +108,6 @@
 
 	debugPM();
 
-	DEBUG_EXIT_FUNC();
 	return 0;
 }
 
@@ -138,7 +135,6 @@
 	PSP_DEBUG_PRINT("Out of unregisterSuspend\n");
 	debugPM();
 
-	DEBUG_EXIT_FUNC();
 	return 0;
 }
 
@@ -163,8 +159,6 @@
 
 	SDL_DestroyMutex(_listMutex);
 	_listMutex = 0;
-
-	DEBUG_EXIT_FUNC();
 }
 
 /*******************************************
@@ -247,7 +241,6 @@
 		ret = Error;
 	}
 
-	DEBUG_EXIT_FUNC();
 	return ret;
 }
 
@@ -285,7 +278,6 @@
 		ret = Error;
 	}
 
-	DEBUG_EXIT_FUNC();
 	return ret;
 }
 
@@ -377,7 +369,6 @@
 
 	scePowerUnlock(0);				// Allow the PSP to go to sleep now
 
-	DEBUG_EXIT_FUNC();
 	return ret;
 }
 
@@ -452,6 +443,5 @@
 
 	scePowerUnlock(0);	// Allow new suspends
 
-	DEBUG_EXIT_FUNC();
 	return ret;
 }

Modified: scummvm/trunk/backends/platform/psp/pspkeyboard.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/pspkeyboard.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/pspkeyboard.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -124,8 +124,6 @@
 	_renderer.setAlphaBlending(true);
 	_renderer.setColorTest(false);
 	_renderer.setUseGlobalScaler(false);
-
-	DEBUG_EXIT_FUNC();
 }
 
 // Destructor
@@ -133,7 +131,6 @@
 	DEBUG_ENTER_FUNC();
 
 	if (!_init) {
-		DEBUG_EXIT_FUNC();
 		return;
 	}
 
@@ -142,8 +139,6 @@
 		_palettes[i].deallocate();
 	}
 	_init = false;
-
-	DEBUG_EXIT_FUNC();
 }
 
 void PSPKeyboard::setVisible(bool val) {
@@ -164,8 +159,6 @@
 	_movedX = newX;
 	_movedY = newY;
 	setDirty();
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* move the position the keyboard is currently drawn at */
@@ -175,13 +168,10 @@
 	int newX = _movedX + amount;
 
 	if (newX > PSP_SCREEN_WIDTH - 5 || newX < 0 - 140) {	// clamp
-		DEBUG_EXIT_FUNC();
 		return;
 	}
 	_movedX = newX;
 	setDirty();
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* move the position the keyboard is currently drawn at */
@@ -191,13 +181,10 @@
 	int newY = _movedY + amount;
 
 	if (newY > PSP_SCREEN_HEIGHT - 5 || newY < 0 - 140)	{ // clamp
-		DEBUG_EXIT_FUNC();
 		return;
 	}
 	_movedY = newY;
 	setDirty();
-
-	DEBUG_EXIT_FUNC();
 }
 
 /* draw the keyboard at the current position */
@@ -229,8 +216,6 @@
 	_renderer.setOffsetInBuffer(x * OrangeBlockSize, y * OrangeBlockSize);
 	_renderer.setDrawSize(OrangeBlockSize, OrangeBlockSize);
 	_renderer.render();
-
-	DEBUG_EXIT_FUNC();
 }
 
 inline void PSPKeyboard::convertCursorToXY(CursorDirections cur, int &x, int &y) {
@@ -264,7 +249,6 @@
 
 	if (_init) {
 		PSP_DEBUG_PRINT("keyboard already loaded into memory\n");
-		DEBUG_EXIT_FUNC();
 		return true;
 	}
 
@@ -371,7 +355,6 @@
 	delete fileArchive;
 	delete zipArchive;
 
-	DEBUG_EXIT_FUNC();
 	return true;
 
 ERROR:
@@ -386,7 +369,6 @@
 	}
 	_init = false;
 
-	DEBUG_EXIT_FUNC();
 	return false;
 }
 
@@ -406,14 +388,12 @@
 
 	png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
 	if (png_ptr == NULL) {
-		DEBUG_EXIT_FUNC();
 		return -1;
 	}
 	png_set_error_fn(png_ptr, (png_voidp) NULL, (png_error_ptr) NULL, user_warning_fn);
 	info_ptr = png_create_info_struct(png_ptr);
 	if (info_ptr == NULL) {
 		png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
-		DEBUG_EXIT_FUNC();
 		return -1;
 	}
 	// Set the png lib to use our read function
@@ -432,7 +412,6 @@
 	*png_width = width;
 	*png_height = height;
 
-	DEBUG_EXIT_FUNC();
 	return 0;
 }
 
@@ -451,7 +430,6 @@
 	png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
 	if (png_ptr == NULL) {
 		PSP_ERROR("Couldn't create read struct to load keyboard\n");
-		DEBUG_EXIT_FUNC();
 		return -1;
 	}
 	// Use dummy error function
@@ -461,7 +439,6 @@
 	if (info_ptr == NULL) {
 		PSP_ERROR("Couldn't create info struct to load keyboard\n");
 		png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
-		DEBUG_EXIT_FUNC();
 		return -1;
 	}
 
@@ -496,7 +473,6 @@
 	if (!line) {
 		png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
 		PSP_ERROR("Couldn't allocate line\n");
-		DEBUG_EXIT_FUNC();
 		return -1;
 	}
 
@@ -511,7 +487,6 @@
 	png_read_end(png_ptr, info_ptr);
 	png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
 
-	DEBUG_EXIT_FUNC();
 	return 0;
 }
 
@@ -567,7 +542,6 @@
 
 	_prevButtons = pad.Buttons;
 
-	DEBUG_EXIT_FUNC();
 	return haveEvent;
 }
 
@@ -595,7 +569,6 @@
 		else  /* DOWN(PSP_CTRL_RIGHT) */
 			increaseKeyboardLocationX(5);
 	}
-	DEBUG_EXIT_FUNC();
 }
 
 bool PSPKeyboard::handleDefaultState(Common::Event &event, SceCtrlData &pad) {
@@ -611,7 +584,6 @@
 	else if (!DOWN(PSP_4BUTTONS))				// Must be up to move cursor
 		getCursorMovement(pad);
 
-	DEBUG_EXIT_FUNC();
 	return haveEvent;
 }
 
@@ -623,9 +595,8 @@
 	if (CHANGED(PSP_4BUTTONS | PSP_CTRL_RTRIGGER | PSP_CTRL_LTRIGGER))
 		haveEvent = getInputChoice(event, pad);
 	if (!DOWN(PSP_4BUTTONS | PSP_CTRL_RTRIGGER | PSP_CTRL_LTRIGGER)) // Must be up to move cursor
-		getCursorMovement(pad)
+		getCursorMovement(pad);
 
-		DEBUG_EXIT_FUNC();
 	return haveEvent;
 }
 
@@ -689,7 +660,6 @@
 
 	haveEvent = (choice != Common::KEYCODE_INVALID) ? true : false;	// We have an event/don't if it's invalid
 
-	DEBUG_EXIT_FUNC();
 	return haveEvent;
 }
 
@@ -718,7 +688,6 @@
 		_dirty = true;
 		_oldCursor = cursor;
 	}
-	DEBUG_EXIT_FUNC();
 }
 
 void PSPKeyboard::handleLTriggerDownState(SceCtrlData &pad) {
@@ -733,7 +702,6 @@
 
 		_state = kDefault;
 	}
-	DEBUG_EXIT_FUNC();
 }
 
 void PSPKeyboard::handleRTriggerDownState(SceCtrlData &pad) {
@@ -748,5 +716,4 @@
 
 		_state = kDefault;
 	}
-	DEBUG_EXIT_FUNC();
 }

Modified: scummvm/trunk/backends/platform/psp/psppixelformat.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/psppixelformat.cpp	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/psppixelformat.cpp	2010-04-25 15:12:24 UTC (rev 48792)
@@ -65,7 +65,6 @@
 	}
 
 	PSP_DEBUG_PRINT("bitsPerPixel[%u]\n", bitsPerPixel);
-	DEBUG_EXIT_FUNC();
 }
 
 // Convert from ScummVM general PixelFormat to our pixel format
@@ -185,6 +184,5 @@
 	output = ((b << 16) | (g << 8) | (r << 0) | (a << 24));
 	PSP_DEBUG_PRINT_FUNC("input color[%x], output[%x]\n", color, output);
 
-	DEBUG_EXIT_FUNC();
 	return output;
 }

Modified: scummvm/trunk/backends/platform/psp/trace.h
===================================================================
--- scummvm/trunk/backends/platform/psp/trace.h	2010-04-25 09:35:34 UTC (rev 48791)
+++ scummvm/trunk/backends/platform/psp/trace.h	2010-04-25 15:12:24 UTC (rev 48792)
@@ -100,19 +100,29 @@
 
 /* Debugging function calls */
 #ifdef __PSP_DEBUG_FUNCS__
-#define DEBUG_ENTER_FUNC()					PSP_INFO_PRINT_INDENT("++ %s\n", __PRETTY_FUNCTION__); \
-												psp_debug_indent++
 
-#define DEBUG_EXIT_FUNC()					psp_debug_indent--; \
-												if (psp_debug_indent < 0) PSP_ERROR("debug indent < 0\n"); \
-												PSP_INFO_PRINT_INDENT("-- %s\n", __PRETTY_FUNCTION__)
+// We use this class to print out function calls on the stack in an easy way.
+//
+class PSPStackDebugFuncs {
+    Common::String _name;
 
-#define INLINE			/* don't want to inline so we get function names properly */
+public:
+	PSPStackDebugFuncs(const char *name) : _name(name) {
+		PSP_INFO_PRINT_INDENT("++ %s\n", _name.c_str()); \
+		psp_debug_indent++;
+    }
 
+	~PSPStackDebugFuncs() {
+		psp_debug_indent--; \
+		if (psp_debug_indent < 0) PSP_ERROR("debug indent < 0\n"); \
+		PSP_INFO_PRINT_INDENT("-- %s\n", _name.c_str());
+	}
+}
+
+/* We don't need anything but this line at the beginning of each function to debug function calls */
+	#define DEBUG_ENTER_FUNC()					PSPStackDebugFuncs(__PRETTY_FUNCTION__)
 #else /* Don't debug function calls */
-#define DEBUG_ENTER_FUNC()
-#define DEBUG_EXIT_FUNC()
-#define INLINE						inline
+	#define DEBUG_ENTER_FUNC()
 #endif /* __PSP_DEBUG_FUNCS__ */
 
 // Undef the main defines for next time


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