aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/gfxcore.cpp
diff options
context:
space:
mode:
authorStrangerke2012-06-14 00:11:56 +0200
committerStrangerke2012-06-14 00:12:45 +0200
commit42a322d671a27406a9dd993f82675dda0ee4780b (patch)
treeb2da7f1959a2c38deb153340cb649eda50462de1 /engines/tony/gfxcore.cpp
parent746dcf33da340702157dc7aca0f01265648189be (diff)
downloadscummvm-rg350-42a322d671a27406a9dd993f82675dda0ee4780b.tar.gz
scummvm-rg350-42a322d671a27406a9dd993f82675dda0ee4780b.tar.bz2
scummvm-rg350-42a322d671a27406a9dd993f82675dda0ee4780b.zip
TONY: Silent some CppCheck warnings
Diffstat (limited to 'engines/tony/gfxcore.cpp')
-rw-r--r--engines/tony/gfxcore.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 83769ee78b..e168d2b7c9 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -390,16 +390,15 @@ RMGfxSourceBufferPal::~RMGfxSourceBufferPal() {
}
int RMGfxSourceBufferPal::loadPaletteWA(const byte *buf, bool bSwapped) {
- int i;
-
- if (bSwapped)
- for (i = 0; i < (1 << getBpp()); i++) {
+ if (bSwapped) {
+ for (int i = 0; i < (1 << getBpp()); i++) {
_pal[i * 3 + 0] = buf[i * 3 + 2];
_pal[i * 3 + 1] = buf[i * 3 + 1];
_pal[i * 3 + 2] = buf[i * 3 + 0];
}
- else
+ } else {
copyMemory(_pal, buf, (1 << getBpp()) * 3);
+ }
preparePalette();
@@ -1819,7 +1818,6 @@ RMGfxSourceBuffer16::~RMGfxSourceBuffer16() {
}
void RMGfxSourceBuffer16::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
- int x, y;
uint16 *buf = bigBuf;
uint16 *raw = (uint16 *)_buf;
int dimx, dimy;
@@ -1852,8 +1850,8 @@ void RMGfxSourceBuffer16::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimi
buf += y1 * bigBuf.getDimx() + x1;
if (_bTrasp0) {
- for (y = 0; y < dimy; y++) {
- for (x = 0; x < dimx;) {
+ for (int y = 0; y < dimy; y++) {
+ for (int x = 0; x < dimx;) {
while (x < dimx && raw[x] == 0)
x++;
@@ -1867,7 +1865,7 @@ void RMGfxSourceBuffer16::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimi
buf += bigBuf.getDimx();
}
} else {
- for (y = 0; y < dimy; y++) {
+ for (int y = 0; y < dimy; y++) {
Common::copy(raw, raw + dimx, buf);
buf += bigBuf.getDimx();
raw += _dimx;