# HG changeset patch # User Matti Hamalainen # Date 1529976699 -10800 # Node ID 54baa688425badfba269aa2a0a99550e15553ffe # Parent 50dbfc10f49f60b5e18def5a110ff40e8dc3209f Cleanups. diff -r 50dbfc10f49f -r 54baa688425b tools/libgfx.c --- 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++) {