Mercurial > hg > dmlib
changeset 1899:54baa688425b
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 26 Jun 2018 04:31:39 +0300 |
parents | 50dbfc10f49f |
children | 8c6040d5b930 |
files | tools/libgfx.c |
diffstat | 1 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/libgfx.c Tue Jun 26 04:31:24 2018 +0300 +++ b/tools/libgfx.c Tue Jun 26 04:31:39 2018 +0300 @@ -1577,13 +1577,6 @@ } -static void dmDecodeBitPlane(Uint8 *dst, const Uint8 *src, const int width, const int nplane) -{ - for (int xc = 0; xc < width; xc++) - dst[xc] |= dmDecodeBit(src, xc) << nplane; -} - - static int dmDecodeILBMBody(DMResource *fp, DMIFF *iff, DMImage *img) { Uint8 *buf; @@ -1617,7 +1610,8 @@ } // Decode bitplane - dmDecodeBitPlane(dp, buf, img->width, plane); + for (int xc = 0; xc < img->width; xc++) + dp[xc] |= dmDecodeBit(buf, xc) << plane; } // Read mask data @@ -2002,9 +1996,9 @@ BOOL dmIFFEncodeByteRun1Row(DMResource *fp, const Uint8 *buf, const size_t bufLen) { - size_t l_offs = 0, offs = 0; unsigned int r_count = 0; int prev = -1, mode = DMODE_LIT; + size_t offs, l_offs = 0; for (offs = 0; offs < bufLen; offs++) {