Made the RLE code (semi) readable again

main
Sam Lantinga 2014-06-25 01:35:17 -07:00
parent b4deeeba05
commit a8955f2640
1 changed files with 253 additions and 250 deletions

View File

@ -324,9 +324,9 @@
if (fmt->Gmask == 0x07e0 \
|| fmt->Rmask == 0x07e0 \
|| fmt->Bmask == 0x07e0) { \
if(alpha == 128) \
if (alpha == 128) { \
blitter(2, Uint8, ALPHA_BLIT16_565_50); \
else { \
} else { \
blitter(2, Uint8, ALPHA_BLIT16_565); \
} \
} else \
@ -337,14 +337,15 @@
if (fmt->Gmask == 0x03e0 \
|| fmt->Rmask == 0x03e0 \
|| fmt->Bmask == 0x03e0) { \
if(alpha == 128) \
if (alpha == 128) { \
blitter(2, Uint8, ALPHA_BLIT16_555_50); \
else { \
} else { \
blitter(2, Uint8, ALPHA_BLIT16_555); \
} \
break; \
} \
/* fallthrough */ \
} else \
goto general16; \
break; \
\
default: \
general16: \
@ -360,10 +361,11 @@
if ((fmt->Rmask | fmt->Gmask | fmt->Bmask) == 0x00ffffff \
&& (fmt->Gmask == 0xff00 || fmt->Rmask == 0xff00 \
|| fmt->Bmask == 0xff00)) { \
if(alpha == 128) \
if (alpha == 128) { \
blitter(4, Uint16, ALPHA_BLIT32_888_50); \
else \
} else { \
blitter(4, Uint16, ALPHA_BLIT32_888); \
} \
} else \
blitter(4, Uint16, ALPHA_BLIT_ANY); \
break; \
@ -416,6 +418,7 @@ RLEClipBlit(int w, Uint8 * srcbuf, SDL_Surface * surf_dst,
ofs += run; \
} else if (!ofs) \
break; \
\
if (ofs == w) { \
ofs = 0; \
dstbuf += surf_dst->pitch; \