diff options
author | D G Turner | 2012-11-30 12:08:55 +0000 |
---|---|---|
committer | D G Turner | 2012-11-30 12:08:55 +0000 |
commit | 617f6179c1b96a1d2f8209dac8a3bf23da2415de (patch) | |
tree | c67454d143a44a045d9787bd39dcab091aeea253 /engines/dreamweb/vgafades.cpp | |
parent | 9dc4542f3cda5aa055419bb0cc25cf06a3cc492a (diff) | |
download | scummvm-rg350-617f6179c1b96a1d2f8209dac8a3bf23da2415de.tar.gz scummvm-rg350-617f6179c1b96a1d2f8209dac8a3bf23da2415de.tar.bz2 scummvm-rg350-617f6179c1b96a1d2f8209dac8a3bf23da2415de.zip |
DREAMWEB: Change various loop variables to uint, rather than size_t.
This is partly for readability and partly to avoid any possible
portability issues i.e. though they should be the same, size_t is
defined by system headers, whereas uint is defined within our build
system.
Also, replaced a array size calculation with our ARRAYSIZE macro.
Diffstat (limited to 'engines/dreamweb/vgafades.cpp')
-rw-r--r-- | engines/dreamweb/vgafades.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp index c8f05641b5..d1e2480f70 100644 --- a/engines/dreamweb/vgafades.cpp +++ b/engines/dreamweb/vgafades.cpp @@ -56,8 +56,8 @@ void DreamWebEngine::fadeDOS() { //processEvents will be called from waitForVSync uint8 *dst = _startPal; getPalette(dst, 0, 64); - for (int fade = 0; fade < 64; ++fade) { - for (int c = 0; c < 768; ++c) { //original sources decrement 768 values -> 256 colors + for (uint fade = 0; fade < 64; ++fade) { + for (uint c = 0; c < 768; ++c) { //original sources decrement 768 values -> 256 colors if (dst[c]) { --dst[c]; } @@ -88,7 +88,7 @@ void DreamWebEngine::fadeCalculation() { uint8 *startPal = _startPal; const uint8 *endPal = _endPal; - for (size_t i = 0; i < 256 * 3; ++i) { + for (uint i = 0; i < 256 * 3; ++i) { uint8 s = startPal[i]; uint8 e = endPal[i]; if (s == e) @@ -212,7 +212,7 @@ void DreamWebEngine::fadeScreenDownHalf() { const uint8 *startPal = _startPal; uint8 *endPal = _endPal; - for (int i = 0; i < 256 * 3; ++i) { + for (uint i = 0; i < 256 * 3; ++i) { *endPal >>= 1; endPal++; } @@ -239,7 +239,7 @@ void DreamWebEngine::greyscaleSum() { byte *src = _mainPal; byte *dst = _endPal; - for (int i = 0; i < 256; ++i) { + for (uint i = 0; i < 256; ++i) { const unsigned int r = 20 * *src++; const unsigned int g = 59 * *src++; const unsigned int b = 11 * *src++; |