src/video/SDL_pixels.c
changeset 695 8f579a0e17e6
parent 688 c0522010bb6d
child 769 b8d311d90021
equal deleted inserted replaced
694:f0c696e476da 695:8f579a0e17e6
   387 		v = (pixel & fmt->Bmask) >> fmt->Bshift;
   387 		v = (pixel & fmt->Bmask) >> fmt->Bshift;
   388 		*b = (v << fmt->Bloss) + (v >> (8 - (fmt->Bloss << 1)));
   388 		*b = (v << fmt->Bloss) + (v >> (8 - (fmt->Bloss << 1)));
   389 		if(fmt->Amask) {
   389 		if(fmt->Amask) {
   390 		        v = (pixel & fmt->Amask) >> fmt->Ashift;
   390 		        v = (pixel & fmt->Amask) >> fmt->Ashift;
   391 			*a = (v << fmt->Aloss) + (v >> (8 - (fmt->Aloss << 1)));
   391 			*a = (v << fmt->Aloss) + (v >> (8 - (fmt->Aloss << 1)));
   392 		} else
   392 		} else {
   393 		        *a = SDL_ALPHA_OPAQUE;
   393 		        *a = SDL_ALPHA_OPAQUE;
       
   394                 }
   394 	} else {
   395 	} else {
   395 		*r = fmt->palette->colors[pixel].r;
   396 		*r = fmt->palette->colors[pixel].r;
   396 		*g = fmt->palette->colors[pixel].g;
   397 		*g = fmt->palette->colors[pixel].g;
   397 		*b = fmt->palette->colors[pixel].b;
   398 		*b = fmt->palette->colors[pixel].b;
   398 		*a = SDL_ALPHA_OPAQUE;
   399 		*a = SDL_ALPHA_OPAQUE;