comparison tools/lib64fmts.c @ 2163:1e7d80bfc8f1

Rename some variables.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 11 Jun 2019 01:08:55 +0300
parents 6a6344f8f535
children ed079e869d64
comparison
equal deleted inserted replaced
2162:875e2b7b24dd 2163:1e7d80bfc8f1
1222 1222
1223 static int fmtGetPixelPentelPaint(Uint8 *col, 1223 static int fmtGetPixelPentelPaint(Uint8 *col,
1224 const DMC64Image *img, const int rasterX, const int rasterY) 1224 const DMC64Image *img, const int rasterX, const int rasterY)
1225 { 1225 {
1226 DM_C64_GENERIC_SC_PIXEL_DEFS(img) 1226 DM_C64_GENERIC_SC_PIXEL_DEFS(img)
1227 const int ry = rasterY / D64_SPR_HEIGHT_PX; 1227 const int spr_y = rasterY / D64_SPR_HEIGHT_PX;
1228 const int yd = rasterY % D64_SPR_HEIGHT_PX; 1228 const int spr_yd = rasterY % D64_SPR_HEIGHT_PX;
1229 const int rx = rasterX / D64_SPR_WIDTH_PX; 1229 const int spr_x = rasterX / D64_SPR_WIDTH_PX;
1230 const int xd = rasterX % D64_SPR_WIDTH_PX; 1230 const int spr_xd = rasterX % D64_SPR_WIDTH_PX;
1231 const int offs = (ry * 8 + rx) * D64_SPR_SIZE + (yd * D64_SPR_WIDTH_UT) + (xd / 8); 1231 const int offs = (spr_y * 8 + spr_x) * D64_SPR_SIZE + (spr_yd * D64_SPR_WIDTH_UT) + (spr_xd / 8);
1232 const int mask = 1 << (7 - (rasterX & 7)); 1232 const int mask = 1 << (7 - (rasterX & 7));
1233 int res;
1233 1234
1234 Uint8 color1, 1235 Uint8 color1,
1235 color2 = img->extraData[0].data[offs] & mask ? 0x0f : 0, 1236 color2 = img->extraData[0].data[offs] & mask ? 0x0f : 0,
1236 color3 = img->extraData[0].data[offs + D64_SPR_SIZE * 155] & mask ? img->d022 : 0; 1237 color3 = img->extraData[0].data[offs + D64_SPR_SIZE * 155] & mask ? img->d022 : 0;
1237
1238 int res;
1239 1238
1240 if ((res = dmC64GetGenericSCPixel(&color1, img, bmoffs, scroffs, vshift, 0, 0)) != DMERR_OK) 1239 if ((res = dmC64GetGenericSCPixel(&color1, img, bmoffs, scroffs, vshift, 0, 0)) != DMERR_OK)
1241 return res; 1240 return res;
1242 1241
1243 *col = color3 ? color3 : ( color2 ? color2 : color1 ); 1242 *col = color3 ? color3 : ( color2 ? color2 : color1 );