Mercurial > hg > dmlib
diff tools/lib64gfx.h @ 2306:e798a41f27a5
Clean up some code duplication.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 08 Jul 2019 12:25:46 +0300 |
parents | ecc17b2e129e |
children | 0f8232c2af63 |
line wrap: on
line diff
--- a/tools/lib64gfx.h Mon Jul 08 10:28:00 2019 +0300 +++ b/tools/lib64gfx.h Mon Jul 08 12:25:46 2019 +0300 @@ -433,8 +433,9 @@ const int \ x = rasterX / 8, \ y = rasterY / 8, \ + yb = rasterY & 7, \ yoffs = y * ximg->fmt->chWidth, \ - bmoffs = yoffs * 8 + (rasterY & 7) + (x * 8), \ + bmoffs = yoffs * 8 + yb + (x * 8), \ scroffs = yoffs + x, \ vshift = 7 - (rasterX & 7); @@ -443,8 +444,9 @@ const int \ x = rasterX / 4, \ y = rasterY / 8, \ + yb = rasterY & 7, \ yoffs = y * (ximg)->fmt->chWidth, \ - bmoffs = yoffs * 8 + (rasterY & 7) + (x * 8), \ + bmoffs = yoffs * 8 + yb + (x * 8), \ scroffs = yoffs + x, \ vshift = 6 - ((rasterX * 2) & 6);