comparison tools/lib64gfx.c @ 1764:52e31cfc1e36

Implement fake X raster position for the pixel getting functions. At some point this will be turned into real fullscreen raster position.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 12 Jun 2018 04:43:05 +0300
parents b9f3c1796fba
children 88354355b8e1
comparison
equal deleted inserted replaced
1763:847bd77a538d 1764:52e31cfc1e36
1295 const int x = xc / 8; 1295 const int x = xc / 8;
1296 const int scroffs = scroffsy + x; 1296 const int scroffs = scroffsy + x;
1297 const int bmoffs = bmoffsy + (x * 8); 1297 const int bmoffs = bmoffsy + (x * 8);
1298 const int vshift = 7 - (xc & 7); 1298 const int vshift = 7 - (xc & 7);
1299 1299
1300 *d++ = getPixel(src, bmoffs, scroffs, vshift, 0, yc); 1300 *d++ = getPixel(src, bmoffs, scroffs, vshift, 0, xc, yc);
1301 } 1301 }
1302 else 1302 else
1303 // Multicolor bitmap and variants 1303 // Multicolor bitmap and variants
1304 for (xc = 0; xc < rwidth; xc++) 1304 for (xc = 0; xc < rwidth; xc++)
1305 { 1305 {
1311 if (src->type & D64_FMT_ILACE) 1311 if (src->type & D64_FMT_ILACE)
1312 { 1312 {
1313 switch (src->laceType) 1313 switch (src->laceType)
1314 { 1314 {
1315 case D64_ILACE_RES: 1315 case D64_ILACE_RES:
1316 *d++ = getPixel(src, bmoffs, scroffs, vshift, 0, yc); 1316 *d++ = getPixel(src, bmoffs, scroffs, vshift, 0, xc, yc);
1317 *d++ = getPixel(src, bmoffs, scroffs, vshift, 1, yc); 1317 *d++ = getPixel(src, bmoffs, scroffs, vshift, 1, xc, yc);
1318 break; 1318 break;
1319 1319
1320 default: 1320 default:
1321 return DMERR_NOT_SUPPORTED; 1321 return DMERR_NOT_SUPPORTED;
1322 } 1322 }
1323 } 1323 }
1324 else 1324 else
1325 { 1325 {
1326 *d++ = getPixel(src, bmoffs, scroffs, vshift, 0, yc); 1326 *d++ = getPixel(src, bmoffs, scroffs, vshift, 0, xc, yc);
1327 } 1327 }
1328 } 1328 }
1329 } 1329 }
1330 dp += dst->pitch; 1330 dp += dst->pitch;
1331 } 1331 }