comparison tools/lib64gfx.c @ 1875:b052754a1a23

Cleanup.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 24 Jun 2018 22:17:28 +0300
parents 1816211341a0
children 34ba8e2d2dd7
comparison
equal deleted inserted replaced
1874:b386d339056f 1875:b052754a1a23
296 if (multicolor) 296 if (multicolor)
297 { 297 {
298 for (yc = 0; yc < height; yc++) 298 for (yc = 0; yc < height; yc++)
299 { 299 {
300 const int offs = yc * width; 300 const int offs = yc * width;
301 int xc;
302 Uint8 *d = dp; 301 Uint8 *d = dp;
303 302
304 for (xc = 0; xc < widthpx / 2; xc++) 303 for (int xc = 0; xc < widthpx / 2; xc++)
305 { 304 {
306 const int b = buf[offs + (xc / 4)]; 305 const int b = buf[offs + (xc / 4)];
307 const int v = 6 - ((xc * 2) & 6); 306 const int v = 6 - ((xc * 2) & 6);
308 const Uint8 c = colors[(b >> v) & 3]; 307 const Uint8 c = colors[(b >> v) & 3];
309 308
317 else 316 else
318 { 317 {
319 for (yc = 0; yc < height; yc++) 318 for (yc = 0; yc < height; yc++)
320 { 319 {
321 const int offs = yc * width; 320 const int offs = yc * width;
322 int xc;
323 Uint8 *d = dp; 321 Uint8 *d = dp;
324 322
325 for (xc = 0; xc < widthpx; xc++) 323 for (int xc = 0; xc < widthpx; xc++)
326 { 324 {
327 const int b = buf[offs + (xc / 8)]; 325 const int b = buf[offs + (xc / 8)];
328 const int v = 7 - (xc & 7); 326 const int v = 7 - (xc & 7);
329 const Uint8 c = colors[(b >> v) & 1]; 327 const Uint8 c = colors[(b >> v) & 1];
330 328