[Scummvm-cvs-logs] scummvm master -> 61cb8648a970b671b49d8c2813b7cc0dfb81de60
digitall
dgturner at iee.org
Mon Nov 19 18:27:50 CET 2012
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
61cb8648a9 N64: Fix remaining warnings associated with mouse cursor drawing.
Commit: 61cb8648a970b671b49d8c2813b7cc0dfb81de60
https://github.com/scummvm/scummvm/commit/61cb8648a970b671b49d8c2813b7cc0dfb81de60
Author: D G Turner (digitall at scummvm.org)
Date: 2012-11-19T09:26:28-08:00
Commit Message:
N64: Fix remaining warnings associated with mouse cursor drawing.
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 1fd52df..7a70229 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_
More information about the Scummvm-git-logs
mailing list