Mercurial > hg > dmlib
changeset 1614:b2fe49401465
Cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 15 May 2018 12:35:55 +0300 |
parents | 70b04c16aa40 |
children | 2f8f2f7a42c8 |
files | tools/libgfx.c |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/libgfx.c Tue May 15 12:30:29 2018 +0300 +++ b/tools/libgfx.c Tue May 15 12:35:55 2018 +0300 @@ -1603,8 +1603,7 @@ void dmDecodeBitPlane(Uint8 *dp, Uint8 *src, const int width, const int nplane) { - int xc; - for (xc = 0; xc < width; xc++) + for (int xc = 0; xc < width; xc++) { const Uint8 data = (src[xc / 8] >> (7 - (xc & 7))) & 1; dp[xc] |= (data << nplane); @@ -1640,13 +1639,12 @@ // Decode the chunk for (yc = 0; yc < img->height; yc++) { - int plane; const int nplanes = iff->bmhd.nplanes; Uint8 *dp = img->data + (yc * img->pitch); dmMemset(dp, 0, img->pitch); - for (plane = 0; plane < nplanes; plane++) + for (int plane = 0; plane < nplanes; plane++) { // Decompress or read data if (!dmIFFReadOneRow(fp, iff, buf, bufLen)) @@ -1666,8 +1664,6 @@ // Read mask data if (iff->bmhd.masking == IFF_MASK_HAS_MASK) { - int xc; - // Decompress or read data if (!dmIFFReadOneRow(fp, iff, buf, bufLen)) { @@ -1677,7 +1673,7 @@ } // Decode mask - for (xc = 0; xc < img->width; xc++) + for (int xc = 0; xc < img->width; xc++) { const Uint8 data = (buf[xc / 8] >> (7 - (xc & 7))) & 1;