[Scummvm-cvs-logs] scummvm master -> 9701094fcd7709072c0893cba26282781087ea29

lordhoto lordhoto at gmail.com
Wed Jun 20 17:24:42 CEST 2012


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ac8f282ce1 IPHONE: Replace OverlayColor uses with uint16.
6792f4450b WII: Replace OverlayColor with uint16.
4b32d5de0e WII: Fix check for whole width updates in copyRectToOverlay.
36ac1e8b47 PSP: Replace OverlayColor with uint16.
703be9f87c N64: Replace OverlayColor with uint16.
9701094fcd N64: Fix check for whole width updates in copyRectToOverlay.


Commit: ac8f282ce1814bd087ca1127afc2f3a4b3cec294
    https://github.com/scummvm/scummvm/commit/ac8f282ce1814bd087ca1127afc2f3a4b3cec294
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-06-20T08:13:12-07:00

Commit Message:
IPHONE: Replace OverlayColor uses with uint16.

Changed paths:
    backends/platform/iphone/osys_video.mm



diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm
index b01c925..aa18564 100644
--- a/backends/platform/iphone/osys_video.mm
+++ b/backends/platform/iphone/osys_video.mm
@@ -316,7 +316,7 @@ void OSystem_IPHONE::grabOverlay(void *buf, int pitch) {
 	byte *dst = (byte *)buf;
 	const byte *src = (const byte *)_videoContext->overlayTexture.getBasePtr(0, 0);
 	do {
-		memcpy(dst, src, _videoContext->overlayWidth * sizeof(OverlayColor));
+		memcpy(dst, src, _videoContext->overlayWidth * sizeof(uint16));
 		src += _videoContext->overlayTexture.pitch;
 		dst += pitch;
 	} while (--h);
@@ -329,7 +329,7 @@ void OSystem_IPHONE::copyRectToOverlay(const void *buf, int pitch, int x, int y,
 	//Clip the coordinates
 	if (x < 0) {
 		w += x;
-		src -= x * sizeof(OverlayColor);
+		src -= x * sizeof(uint16);
 		x = 0;
 	}
 
@@ -354,7 +354,7 @@ void OSystem_IPHONE::copyRectToOverlay(const void *buf, int pitch, int x, int y,
 
 	byte *dst = (byte *)_videoContext->overlayTexture.getBasePtr(x, y);
 	do { 
-		memcpy(dst, src, w * sizeof(OverlayColor));
+		memcpy(dst, src, w * sizeof(uint16));
 		src += pitch;
 		dst += _videoContext->overlayTexture.pitch;
 	} while (--h);


Commit: 6792f4450b13c1f62acf37673d03f390dfce4e3c
    https://github.com/scummvm/scummvm/commit/6792f4450b13c1f62acf37673d03f390dfce4e3c
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-06-20T08:14:51-07:00

Commit Message:
WII: Replace OverlayColor with uint16.

Changed paths:
    backends/platform/wii/osystem.h
    backends/platform/wii/osystem_gfx.cpp



diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index f1c8d77..abafa7f 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -72,7 +72,7 @@ private:
 	bool _overlayVisible;
 	u16 _overlayWidth, _overlayHeight;
 	u32 _overlaySize;
-	OverlayColor *_overlayPixels;
+	uint16 *_overlayPixels;
 	gfx_screen_coords_t _coordsOverlay;
 	gfx_tex_t _texOverlay;
 	bool _overlayDirty;
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 6b0e31b..6fbf51a 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -74,7 +74,7 @@ void OSystem_Wii::initGfx() {
 #endif
 
 	_overlaySize = _overlayWidth * _overlayHeight * 2;
-	_overlayPixels = (OverlayColor *) memalign(32, _overlaySize);
+	_overlayPixels = (uint16 *) memalign(32, _overlaySize);
 
 	memset(&_texMouse, 0, sizeof(gfx_tex_t));
 	memset(&_texOverlay, 0, sizeof(gfx_tex_t));
@@ -573,11 +573,11 @@ void OSystem_Wii::clearOverlay() {
 
 void OSystem_Wii::grabOverlay(void *buf, int pitch) {
 	int h = _overlayHeight;
-	OverlayColor *src = _overlayPixels;
+	uint16 *src = _overlayPixels;
 	byte *dst = (byte *)buf;
 
 	do {
-		memcpy(dst, src, _overlayWidth * sizeof(OverlayColor));
+		memcpy(dst, src, _overlayWidth * sizeof(uint16));
 		src += _overlayWidth;
 		dst += pitch;
 	} while (--h);
@@ -588,7 +588,7 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x,
 	const byte *src = (const byte *)buf;
 	if (x < 0) {
 		w += x;
-		src -= x * sizeof(OverlayColor);
+		src -= x * sizeof(uint16);
 		x = 0;
 	}
 
@@ -607,12 +607,12 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x,
 	if (w <= 0 || h <= 0)
 		return;
 
-	OverlayColor *dst = _overlayPixels + (y * _overlayWidth + x);
+	uint16 *dst = _overlayPixels + (y * _overlayWidth + x);
 	if (_overlayWidth == pitch && pitch == w) {
-		memcpy(dst, src, h * w * sizeof(OverlayColor));
+		memcpy(dst, src, h * w * sizeof(uint16));
 	} else {
 		do {
-			memcpy(dst, src, w * sizeof(OverlayColor));
+			memcpy(dst, src, w * sizeof(uint16));
 			src += pitch;
 			dst += _overlayWidth;
 		} while (--h);


Commit: 4b32d5de0e83551e18e23a5be575d24585f1d91d
    https://github.com/scummvm/scummvm/commit/4b32d5de0e83551e18e23a5be575d24585f1d91d
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-06-20T08:18:19-07:00

Commit Message:
WII: Fix check for whole width updates in copyRectToOverlay.

Changed paths:
    backends/platform/wii/osystem_gfx.cpp



diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 6fbf51a..90e4d98 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -608,8 +608,8 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x,
 		return;
 
 	uint16 *dst = _overlayPixels + (y * _overlayWidth + x);
-	if (_overlayWidth == pitch && pitch == w) {
-		memcpy(dst, src, h * w * sizeof(uint16));
+	if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) {
+		memcpy(dst, src, h * pitch);
 	} else {
 		do {
 			memcpy(dst, src, w * sizeof(uint16));


Commit: 36ac1e8b4780bd217c400b3edab62e484b60e388
    https://github.com/scummvm/scummvm/commit/36ac1e8b4780bd217c400b3edab62e484b60e388
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-06-20T08:20:00-07:00

Commit Message:
PSP: Replace OverlayColor with uint16.

Changed paths:
    backends/platform/psp/display_manager.cpp



diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp
index 10a732b..c2ff84c 100644
--- a/backends/platform/psp/display_manager.cpp
+++ b/backends/platform/psp/display_manager.cpp
@@ -302,7 +302,7 @@ void DisplayManager::init() {
 
 	// Init overlay since we never change the size
 	_overlay->deallocate();
-	_overlay->setBytesPerPixel(sizeof(OverlayColor));
+	_overlay->setBytesPerPixel(sizeof(uint16));
 	_overlay->setSize(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
 	_overlay->allocate();
 }


Commit: 703be9f87cc46e416475d526ba5c412af3d8c282
    https://github.com/scummvm/scummvm/commit/703be9f87cc46e416475d526ba5c412af3d8c282
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-06-20T08:21:05-07:00

Commit Message:
N64: Replace OverlayColor with uint16.

Changed paths:
    backends/platform/n64/osys_n64.h
    backends/platform/n64/osys_n64_base.cpp



diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index 3266180..249f72d 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -81,7 +81,7 @@ protected:
 
 	uint16 *_offscreen_hic; // Offscreen converted to 16bit surface
 	uint8  *_offscreen_pal; // Offscreen with palette indexes
-	OverlayColor *_overlayBuffer; // Offscreen for the overlay (16 bit)
+	uint16 *_overlayBuffer; // Offscreen for the overlay (16 bit)
 
 	uint16 *_screenPalette; // Array for palette entries (256 colors max)
 
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 8f17171..cf513eb 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -95,7 +95,7 @@ OSystem_N64::OSystem_N64() {
 	// Allocate memory for offscreen buffers
 	_offscreen_hic = (uint16 *)memalign(8, _screenWidth * _screenHeight * 2);
 	_offscreen_pal = (uint8 *)memalign(8, _screenWidth * _screenHeight);
-	_overlayBuffer = (uint16 *)memalign(8, _overlayWidth * _overlayHeight * sizeof(OverlayColor));
+	_overlayBuffer = (uint16 *)memalign(8, _overlayWidth * _overlayHeight * sizeof(uint16));
 
 	_cursor_pal = NULL;
 	_cursor_hic = NULL;
@@ -108,7 +108,7 @@ OSystem_N64::OSystem_N64() {
 	// Clean offscreen buffers
 	memset(_offscreen_hic, 0, _screenWidth * _screenHeight * 2);
 	memset(_offscreen_pal, 0, _screenWidth * _screenHeight);
-	memset(_overlayBuffer, 0, _overlayWidth * _overlayHeight * sizeof(OverlayColor));
+	memset(_overlayBuffer, 0, _overlayWidth * _overlayHeight * sizeof(uint16));
 
 	// Default graphic mode
 	_graphicMode = OVERS_NTSC_340X240;
@@ -667,7 +667,7 @@ void OSystem_N64::hideOverlay() {
 }
 
 void OSystem_N64::clearOverlay() {
-	memset(_overlayBuffer, 0, _overlayWidth * _overlayHeight * sizeof(OverlayColor));
+	memset(_overlayBuffer, 0, _overlayWidth * _overlayHeight * sizeof(uint16));
 
 	uint8 skip_lines = (_screenHeight - _gameHeight) / 4;
 	uint8 skip_pixels = (_screenWidth - _gameWidth) / 2; // Center horizontally the image
@@ -685,11 +685,11 @@ void OSystem_N64::clearOverlay() {
 
 void OSystem_N64::grabOverlay(void *buf, int pitch) {
 	int h = _overlayHeight;
-	OverlayColor *src = _overlayBuffer;
+	uint16 *src = _overlayBuffer;
 	byte *dst = (byte *)buf;
 
 	do {
-		memcpy(dst, src, _overlayWidth * sizeof(OverlayColor));
+		memcpy(dst, src, _overlayWidth * sizeof(uint16));
 		src += _overlayWidth;
 		dst += pitch;
 	} while (--h);
@@ -700,7 +700,7 @@ void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, in
 	//Clip the coordinates
 	if (x < 0) {
 		w += x;
-		src -= x * sizeof(OverlayColor);
+		src -= x * sizeof(uint16);
 		x = 0;
 	}
 
@@ -722,13 +722,13 @@ void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, in
 		return;
 
 
-	OverlayColor *dst = _overlayBuffer + (y * _overlayWidth + x);
+	uint16 *dst = _overlayBuffer + (y * _overlayWidth + x);
 
 	if (_overlayWidth == pitch && pitch == w) {
-		memcpy(dst, src, h * w * sizeof(OverlayColor));
+		memcpy(dst, src, h * w * sizeof(uint16));
 	} else {
 		do {
-			memcpy(dst, src, w * sizeof(OverlayColor));
+			memcpy(dst, src, w * sizeof(uint16));
 			src += pitch;
 			dst += _overlayWidth;
 		} while (--h);


Commit: 9701094fcd7709072c0893cba26282781087ea29
    https://github.com/scummvm/scummvm/commit/9701094fcd7709072c0893cba26282781087ea29
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-06-20T08:21:50-07:00

Commit Message:
N64: Fix check for whole width updates in copyRectToOverlay.

Changed paths:
    backends/platform/n64/osys_n64_base.cpp



diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index cf513eb..7d6f8f0 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -724,8 +724,8 @@ void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, in
 
 	uint16 *dst = _overlayBuffer + (y * _overlayWidth + x);
 
-	if (_overlayWidth == pitch && pitch == w) {
-		memcpy(dst, src, h * w * sizeof(uint16));
+	if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) {
+		memcpy(dst, src, h * pitch);
 	} else {
 		do {
 			memcpy(dst, src, w * sizeof(uint16));






More information about the Scummvm-git-logs mailing list