Mercurial > hg > dmlib
changeset 1633:da4d7b5873c0
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 25 May 2018 01:42:12 +0300 |
parents | 2a1866fd546e |
children | 7f1f90d15d72 |
files | tools/lib64fmts.c |
diffstat | 1 files changed, 12 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/lib64fmts.c Fri May 25 01:41:31 2018 +0300 +++ b/tools/lib64fmts.c Fri May 25 01:42:12 2018 +0300 @@ -478,50 +478,49 @@ static Uint8 fmtGetPixelBFLI( const DMC64Image *img, const int bmoffs, const int scroffs, - const int vshift, const int vbitmap, const int raster) + const int vshift, const int bitmap, const int raster) { - const int vbb = raster < 200 ? 0 : 1; + const int vbb = bmoffs > 0x1fff ? 1 : 0; const int vbank = (raster & 7) + (vbb * 8); - const int vbmoffs = raster < 200 ? bmoffs : bmoffs - 8000; - const int vscroffs = scroffs & 1023; + const int vbmoffs = bmoffs & 0x1fff; + const int vscroffs = scroffs & 0x3ff; //fprintf(stderr, "bmoffs=%d, scroffs=%d, vshift=%d, vbitmap=%d, raster=%d\n", vbmoffs, vscroffs, vshift, vbb, raster); return dmC64GetGenericMCPixel( img, vbmoffs, vscroffs, vshift, - vbank, vbb, 0, - img->bgcolor); + vbank, vbb, 0, img->bgcolor); } static Uint8 fmtGetPixelBlackMailFLI( const DMC64Image *img, const int bmoffs, const int scroffs, - const int vshift, const int vbitmap, const int raster) + const int shift, const int bitmap, const int raster) { const int vbank = raster & 7; return dmC64GetGenericMCPixel( - img, bmoffs, scroffs, vshift, - vbank, vbitmap, 0, + img, bmoffs, scroffs, shift, + vbank, bitmap, 0, img->extraData[0].data[raster] & 15); } static Uint8 fmtGetPixelFLIDesigner( const DMC64Image *img, const int bmoffs, const int scroffs, - const int vshift, const int vbitmap, const int raster) + const int shift, const int bitmap, const int raster) { - return dmC64GetGenericMCPixel(img, bmoffs, scroffs, vshift, raster & 7, vbitmap, 0, img->bgcolor); + return dmC64GetGenericMCPixel(img, bmoffs, scroffs, shift, raster & 7, bitmap, 0, img->bgcolor); } static Uint8 fmtGetPixelCHFLI( const DMC64Image *img, const int bmoffs, const int scroffs, - const int vshift, const int vbitmap, const int raster) + const int shift, const int bitmap, const int raster) { const int vbank = raster & 7; - if ((img->bitmap[vbitmap].data[bmoffs] >> vshift) & 1) + if ((img->bitmap[bitmap].data[bmoffs] >> shift) & 1) return img->screen[vbank].data[scroffs] >> 4; else return img->screen[vbank].data[scroffs] & 15;