amiga_imgv

diff src/sdl/gfx.c @ 5:0d3d7b020e6a

progress...
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 27 Oct 2017 12:32:24 +0300
parents 0fd37effde29
children ae0ada629b03
line diff
     1.1 --- a/src/sdl/gfx.c	Fri Oct 27 11:36:18 2017 +0300
     1.2 +++ b/src/sdl/gfx.c	Fri Oct 27 12:32:24 2017 +0300
     1.3 @@ -153,12 +153,12 @@
     1.4  			int bit = 7 - (j & 7);
     1.5  
     1.6  			for(k=0; k<img->nbitplanes; k++) {
     1.7 -				idx = (idx << 1) | ((*(src + k * img->width / 8) >> bit) & 1);
     1.8 +				idx |= (((*(src + k * img->width / 8) >> bit) & 1) << k);
     1.9  			}
    1.10  
    1.11  			printf("%d ", idx);
    1.12  			color = palette[idx];
    1.13 -			/*ham = (idx >> 4) & 3;
    1.14 +			ham = (idx >> 4) & 3;
    1.15  			color = (i & j) ? dest[-1] : 0;
    1.16  
    1.17  			switch(ham) {
    1.18 @@ -174,7 +174,6 @@
    1.19  			case 3:
    1.20  				color = (color & ~GMASK) | (((uint32_t)idx & 0xf) << GSHIFT);
    1.21  			}
    1.22 -			*/
    1.23  
    1.24  			*dest++ = color;
    1.25  			if(!bit) {