WII: Replace OverlayColor with uint16.
This commit is contained in:
parent
ac8f282ce1
commit
6792f4450b
2 changed files with 8 additions and 8 deletions
|
@ -72,7 +72,7 @@ private:
|
||||||
bool _overlayVisible;
|
bool _overlayVisible;
|
||||||
u16 _overlayWidth, _overlayHeight;
|
u16 _overlayWidth, _overlayHeight;
|
||||||
u32 _overlaySize;
|
u32 _overlaySize;
|
||||||
OverlayColor *_overlayPixels;
|
uint16 *_overlayPixels;
|
||||||
gfx_screen_coords_t _coordsOverlay;
|
gfx_screen_coords_t _coordsOverlay;
|
||||||
gfx_tex_t _texOverlay;
|
gfx_tex_t _texOverlay;
|
||||||
bool _overlayDirty;
|
bool _overlayDirty;
|
||||||
|
|
|
@ -74,7 +74,7 @@ void OSystem_Wii::initGfx() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_overlaySize = _overlayWidth * _overlayHeight * 2;
|
_overlaySize = _overlayWidth * _overlayHeight * 2;
|
||||||
_overlayPixels = (OverlayColor *) memalign(32, _overlaySize);
|
_overlayPixels = (uint16 *) memalign(32, _overlaySize);
|
||||||
|
|
||||||
memset(&_texMouse, 0, sizeof(gfx_tex_t));
|
memset(&_texMouse, 0, sizeof(gfx_tex_t));
|
||||||
memset(&_texOverlay, 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) {
|
void OSystem_Wii::grabOverlay(void *buf, int pitch) {
|
||||||
int h = _overlayHeight;
|
int h = _overlayHeight;
|
||||||
OverlayColor *src = _overlayPixels;
|
uint16 *src = _overlayPixels;
|
||||||
byte *dst = (byte *)buf;
|
byte *dst = (byte *)buf;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
memcpy(dst, src, _overlayWidth * sizeof(OverlayColor));
|
memcpy(dst, src, _overlayWidth * sizeof(uint16));
|
||||||
src += _overlayWidth;
|
src += _overlayWidth;
|
||||||
dst += pitch;
|
dst += pitch;
|
||||||
} while (--h);
|
} while (--h);
|
||||||
|
@ -588,7 +588,7 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x,
|
||||||
const byte *src = (const byte *)buf;
|
const byte *src = (const byte *)buf;
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
w += x;
|
w += x;
|
||||||
src -= x * sizeof(OverlayColor);
|
src -= x * sizeof(uint16);
|
||||||
x = 0;
|
x = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -607,12 +607,12 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x,
|
||||||
if (w <= 0 || h <= 0)
|
if (w <= 0 || h <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
OverlayColor *dst = _overlayPixels + (y * _overlayWidth + x);
|
uint16 *dst = _overlayPixels + (y * _overlayWidth + x);
|
||||||
if (_overlayWidth == pitch && pitch == w) {
|
if (_overlayWidth == pitch && pitch == w) {
|
||||||
memcpy(dst, src, h * w * sizeof(OverlayColor));
|
memcpy(dst, src, h * w * sizeof(uint16));
|
||||||
} else {
|
} else {
|
||||||
do {
|
do {
|
||||||
memcpy(dst, src, w * sizeof(OverlayColor));
|
memcpy(dst, src, w * sizeof(uint16));
|
||||||
src += pitch;
|
src += pitch;
|
||||||
dst += _overlayWidth;
|
dst += _overlayWidth;
|
||||||
} while (--h);
|
} while (--h);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue