aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wii
diff options
context:
space:
mode:
authorJohannes Schickel2012-06-20 17:14:51 +0200
committerJohannes Schickel2012-06-20 17:14:51 +0200
commit6792f4450b13c1f62acf37673d03f390dfce4e3c (patch)
tree61362bcde6e8523333bf796fdeada995c23ffd26 /backends/platform/wii
parentac8f282ce1814bd087ca1127afc2f3a4b3cec294 (diff)
downloadscummvm-rg350-6792f4450b13c1f62acf37673d03f390dfce4e3c.tar.gz
scummvm-rg350-6792f4450b13c1f62acf37673d03f390dfce4e3c.tar.bz2
scummvm-rg350-6792f4450b13c1f62acf37673d03f390dfce4e3c.zip
WII: Replace OverlayColor with uint16.
Diffstat (limited to 'backends/platform/wii')
-rw-r--r--backends/platform/wii/osystem.h2
-rw-r--r--backends/platform/wii/osystem_gfx.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index f1c8d77533..abafa7f642 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 6b0e31bd7b..6fbf51a8d1 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);