src/video/SDL_blit.h
changeset 535 917cc5c56176
parent 297 f6ffac90895c
child 553 417f8709e648
equal deleted inserted replaced
534:1ea658a3dd52 535:917cc5c56176
   328 #define PIXEL_FROM_RGBA(pixel, fmt, r, g, b, a)				\
   328 #define PIXEL_FROM_RGBA(pixel, fmt, r, g, b, a)				\
   329 {									\
   329 {									\
   330 	pixel = ((r>>fmt->Rloss)<<fmt->Rshift)|				\
   330 	pixel = ((r>>fmt->Rloss)<<fmt->Rshift)|				\
   331 		((g>>fmt->Gloss)<<fmt->Gshift)|				\
   331 		((g>>fmt->Gloss)<<fmt->Gshift)|				\
   332 		((b>>fmt->Bloss)<<fmt->Bshift)|				\
   332 		((b>>fmt->Bloss)<<fmt->Bshift)|				\
   333 		((a<<fmt->Aloss)<<fmt->Ashift);				\
   333 		((a>>fmt->Aloss)<<fmt->Ashift);				\
   334 }
   334 }
   335 #define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)			\
   335 #define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)			\
   336 {									\
   336 {									\
   337 	switch (bpp) {							\
   337 	switch (bpp) {							\
   338 		case 2: {						\
   338 		case 2: {						\