[Scummvm-cvs-logs] scummvm master -> d8a17a9d91da3d31d7d3a454e010a4fb5b2100ff
digitall
dgturner at iee.org
Sun Nov 18 23:35:34 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:
d8a17a9d91 N64: Fix compiler warnings associated with cursor size variables.
Commit: d8a17a9d91da3d31d7d3a454e010a4fb5b2100ff
https://github.com/scummvm/scummvm/commit/d8a17a9d91da3d31d7d3a454e010a4fb5b2100ff
Author: D G Turner (digitall at scummvm.org)
Date: 2012-11-18T14:34:15-08:00
Commit Message:
N64: Fix compiler warnings associated with cursor size variables.
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 249f72d..bc6b3cb 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -104,9 +104,7 @@ protected:
bool _cursorPaletteDisabled;
bool _dirtyPalette;
- // FIXME: This must be left as "int" for now, to fix the sign-comparison problem
- // there is a little more work involved than an int->uint change
- int _cursorWidth, _cursorHeight;
+ uint _cursorWidth, _cursorHeight;
int _cursorKeycolor;
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 7d6f8f0..1fd52df 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -100,8 +100,8 @@ OSystem_N64::OSystem_N64() {
_cursor_pal = NULL;
_cursor_hic = NULL;
- _cursorWidth = -1;
- _cursorHeight = -1;
+ _cursorWidth = 0;
+ _cursorHeight = 0;
_cursorKeycolor = -1;
_mouseHotspotX = _mouseHotspotY = -1;
@@ -578,8 +578,8 @@ void OSystem_N64::updateScreen() {
int mX = _mouseX - _mouseHotspotX;
int mY = _mouseY - _mouseHotspotY;
- for (int h = 0; h < _cursorHeight; h++)
- for (int w = 0; w < _cursorWidth; w++) {
+ for (uint h = 0; h < _cursorHeight; h++)
+ for (uint w = 0; w < _cursorWidth; w++) {
// Draw pixel
if (((mY + h) >= 0) && ((mY + h) < _mouseMaxY) && ((mX + w) >= 0) && ((mX + w) < _mouseMaxX)) {
uint16 cursor_pixel_hic = _cursor_hic[(h * _cursorWidth) + w];
More information about the Scummvm-git-logs
mailing list