aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/n64
diff options
context:
space:
mode:
authorD G Turner2012-11-19 00:35:07 +0000
committerD G Turner2012-11-19 17:26:28 +0000
commit61cb8648a970b671b49d8c2813b7cc0dfb81de60 (patch)
treef6e2ec64bc13697089671da82e14773723388925 /backends/platform/n64
parentbbb83f132b23b6a45eb6d979172264c1587f227a (diff)
downloadscummvm-rg350-61cb8648a970b671b49d8c2813b7cc0dfb81de60.tar.gz
scummvm-rg350-61cb8648a970b671b49d8c2813b7cc0dfb81de60.tar.bz2
scummvm-rg350-61cb8648a970b671b49d8c2813b7cc0dfb81de60.zip
N64: Fix remaining warnings associated with mouse cursor drawing.
Diffstat (limited to 'backends/platform/n64')
-rw-r--r--backends/platform/n64/osys_n64_base.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 1fd52dfde3..7a702297e2 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -575,19 +575,20 @@ void OSystem_N64::updateScreen() {
horiz_pix_skip = skip_pixels;
}
- int mX = _mouseX - _mouseHotspotX;
- int mY = _mouseY - _mouseHotspotY;
-
- for (uint h = 0; h < _cursorHeight; h++)
+ for (uint h = 0; h < _cursorHeight; h++) {
for (uint w = 0; w < _cursorWidth; w++) {
+ int posX = (_mouseX - _mouseHotspotX) + w;
+ int posY = (_mouseY - _mouseHotspotY) + h;
+
// Draw pixel
- if (((mY + h) >= 0) && ((mY + h) < _mouseMaxY) && ((mX + w) >= 0) && ((mX + w) < _mouseMaxX)) {
+ if ((posY >= 0) && (posY < _mouseMaxY) && (posX >= 0) && (posX < _mouseMaxX)) {
uint16 cursor_pixel_hic = _cursor_hic[(h * _cursorWidth) + w];
if (!(cursor_pixel_hic & 0x00001))
- mouse_framebuffer[((mY + h) * _frameBufferWidth) + ((mX + w) + _offscrPixels + horiz_pix_skip)] = cursor_pixel_hic;
+ mouse_framebuffer[(posY * _frameBufferWidth) + (posX + _offscrPixels + horiz_pix_skip)] = cursor_pixel_hic;
}
}
+ }
}
#ifndef _ENABLE_DEBUG_