Mercurial > hg > dmlib
comparison tools/libgfx.c @ 2067:430c010d97c1
Fix hardcoding in ACBM decoding.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 05 Dec 2018 13:33:45 +0200 |
parents | 451980580189 |
children | e4dc8fbaa5ad |
comparison
equal
deleted
inserted
replaced
2066:63284e9ad95e | 2067:430c010d97c1 |
---|---|
1695 } | 1695 } |
1696 | 1696 |
1697 for (int yc = 0; yc < img->height; yc++) | 1697 for (int yc = 0; yc < img->height; yc++) |
1698 { | 1698 { |
1699 Uint8 *dp = img->data + (yc * img->pitch); | 1699 Uint8 *dp = img->data + (yc * img->pitch); |
1700 Uint8 *sp = buf + (yc * img->width) / 8; | |
1700 for (int xc = 0; xc < img->width; xc++) | 1701 for (int xc = 0; xc < img->width; xc++) |
1701 { | 1702 { |
1702 const Uint8 data = dmDecodeBit(buf + yc * 40, xc); | 1703 dp[xc] |= dmDecodeBit(sp, xc) << plane; |
1703 if (data) | |
1704 dp[xc] |= 1 << plane; | |
1705 } | 1704 } |
1706 } | 1705 } |
1707 } | 1706 } |
1708 } | 1707 } |
1709 else | 1708 else |