src/video/SDL_blit_N.c
branchSDL-1.3
changeset 1662 782fd950bd46
parent 1659 14717b52abc0
child 1668 4da1ee79c9af
     1.1 --- a/src/video/SDL_blit_N.c	Sun May 21 17:27:13 2006 +0000
     1.2 +++ b/src/video/SDL_blit_N.c	Sun May 28 13:04:16 2006 +0000
     1.3 @@ -38,20 +38,23 @@
     1.4  #define assert(X)
     1.5  #ifdef __MACOSX__
     1.6  #include <sys/sysctl.h>
     1.7 -static size_t GetL3CacheSize( void )
     1.8 +static size_t
     1.9 +GetL3CacheSize (void)
    1.10  {
    1.11      const char key[] = "hw.l3cachesize";
    1.12      u_int64_t result = 0;
    1.13 -    size_t typeSize = sizeof( result );
    1.14 +    size_t typeSize = sizeof (result);
    1.15  
    1.16  
    1.17 -    int err = sysctlbyname( key, &result, &typeSize, NULL, 0 );
    1.18 -    if( 0 != err ) return 0;
    1.19 +    int err = sysctlbyname (key, &result, &typeSize, NULL, 0);
    1.20 +    if (0 != err)
    1.21 +        return 0;
    1.22  
    1.23      return result;
    1.24  }
    1.25  #else
    1.26 -static size_t GetL3CacheSize( void )
    1.27 +static size_t
    1.28 +GetL3CacheSize (void)
    1.29  {
    1.30      /* XXX: Just guess G4 */
    1.31      return 2097152;
    1.32 @@ -59,14 +62,14 @@
    1.33  #endif /* __MACOSX__ */
    1.34  
    1.35  #if (defined(__MACOSX__) && (__GNUC__ < 4))
    1.36 -    #define VECUINT8_LITERAL(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
    1.37 +#define VECUINT8_LITERAL(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
    1.38          (vector unsigned char) ( a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p )
    1.39 -    #define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \
    1.40 +#define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \
    1.41          (vector unsigned short) ( a,b,c,d,e,f,g,h )
    1.42  #else
    1.43 -    #define VECUINT8_LITERAL(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
    1.44 +#define VECUINT8_LITERAL(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
    1.45          (vector unsigned char) { a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p }
    1.46 -    #define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \
    1.47 +#define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \
    1.48          (vector unsigned short) { a,b,c,d,e,f,g,h }
    1.49  #endif
    1.50  
    1.51 @@ -101,11 +104,12 @@
    1.52      : vec_add(vec_lvsl(8, src), vec_splat_u8(8)))
    1.53  
    1.54  /* Calculate the permute vector used for 32->32 swizzling */
    1.55 -static vector unsigned char calc_swizzle32(const SDL_PixelFormat *srcfmt,
    1.56 -                                  const SDL_PixelFormat *dstfmt)
    1.57 +static vector unsigned char
    1.58 +calc_swizzle32 (const SDL_PixelFormat * srcfmt,
    1.59 +                const SDL_PixelFormat * dstfmt)
    1.60  {
    1.61      /*
    1.62 -    * We have to assume that the bits that aren't used by other
    1.63 +     * We have to assume that the bits that aren't used by other
    1.64       *  colors is alpha, and it's one complete byte, since some formats
    1.65       *  leave alpha with a zero mask, but we should still swizzle the bits.
    1.66       */
    1.67 @@ -115,62 +119,68 @@
    1.68          0, 0, 0, 0,
    1.69          16, 8, 0, 24,
    1.70          0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000,
    1.71 -        0, 0};
    1.72 +        0, 0
    1.73 +    };
    1.74      if (!srcfmt) {
    1.75          srcfmt = &default_pixel_format;
    1.76      }
    1.77      if (!dstfmt) {
    1.78          dstfmt = &default_pixel_format;
    1.79      }
    1.80 -    const vector unsigned char plus = VECUINT8_LITERAL(
    1.81 -                                      0x00, 0x00, 0x00, 0x00,
    1.82 -                                      0x04, 0x04, 0x04, 0x04,
    1.83 -                                      0x08, 0x08, 0x08, 0x08,
    1.84 -                                      0x0C, 0x0C, 0x0C, 0x0C );
    1.85 +    const vector unsigned char plus =
    1.86 +        VECUINT8_LITERAL (0x00, 0x00, 0x00, 0x00,
    1.87 +                          0x04, 0x04, 0x04, 0x04,
    1.88 +                          0x08, 0x08, 0x08, 0x08,
    1.89 +                          0x0C, 0x0C, 0x0C, 0x0C);
    1.90      vector unsigned char vswiz;
    1.91      vector unsigned int srcvec;
    1.92  #define RESHIFT(X) (3 - ((X) >> 3))
    1.93 -    Uint32 rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift);
    1.94 -    Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
    1.95 -    Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
    1.96 +    Uint32 rmask = RESHIFT (srcfmt->Rshift) << (dstfmt->Rshift);
    1.97 +    Uint32 gmask = RESHIFT (srcfmt->Gshift) << (dstfmt->Gshift);
    1.98 +    Uint32 bmask = RESHIFT (srcfmt->Bshift) << (dstfmt->Bshift);
    1.99      Uint32 amask;
   1.100      /* Use zero for alpha if either surface doesn't have alpha */
   1.101      if (dstfmt->Amask) {
   1.102 -        amask = ((srcfmt->Amask) ? RESHIFT(srcfmt->Ashift) : 0x10) << (dstfmt->Ashift);
   1.103 -    } else {    
   1.104 -        amask = 0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^ 0xFFFFFFFF);
   1.105 -    }           
   1.106 -#undef RESHIFT  
   1.107 -    ((unsigned int *)(char*)&srcvec)[0] = (rmask | gmask | bmask | amask);
   1.108 -    vswiz = vec_add(plus, (vector unsigned char)vec_splat(srcvec, 0));
   1.109 -    return(vswiz);
   1.110 +        amask =
   1.111 +            ((srcfmt->Amask) ? RESHIFT (srcfmt->Ashift) : 0x10) << (dstfmt->
   1.112 +                                                                    Ashift);
   1.113 +    } else {
   1.114 +        amask =
   1.115 +            0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^
   1.116 +                          0xFFFFFFFF);
   1.117 +    }
   1.118 +#undef RESHIFT
   1.119 +    ((unsigned int *) (char *) &srcvec)[0] = (rmask | gmask | bmask | amask);
   1.120 +    vswiz = vec_add (plus, (vector unsigned char) vec_splat (srcvec, 0));
   1.121 +    return (vswiz);
   1.122  }
   1.123  
   1.124 -static void Blit_RGB888_RGB565(SDL_BlitInfo *info);
   1.125 -static void Blit_RGB888_RGB565Altivec(SDL_BlitInfo *info) {
   1.126 +static void Blit_RGB888_RGB565 (SDL_BlitInfo * info);
   1.127 +static void
   1.128 +Blit_RGB888_RGB565Altivec (SDL_BlitInfo * info)
   1.129 +{
   1.130      int height = info->d_height;
   1.131      Uint8 *src = (Uint8 *) info->s_pixels;
   1.132      int srcskip = info->s_skip;
   1.133      Uint8 *dst = (Uint8 *) info->d_pixels;
   1.134      int dstskip = info->d_skip;
   1.135      SDL_PixelFormat *srcfmt = info->src;
   1.136 -    vector unsigned char valpha = vec_splat_u8(0);
   1.137 -    vector unsigned char vpermute = calc_swizzle32(srcfmt, NULL);
   1.138 -    vector unsigned char vgmerge = VECUINT8_LITERAL(
   1.139 -        0x00, 0x02, 0x00, 0x06,
   1.140 -        0x00, 0x0a, 0x00, 0x0e,
   1.141 -        0x00, 0x12, 0x00, 0x16,
   1.142 -        0x00, 0x1a, 0x00, 0x1e);
   1.143 -    vector unsigned short v1 = vec_splat_u16(1);
   1.144 -    vector unsigned short v3 = vec_splat_u16(3);
   1.145 -    vector unsigned short v3f = VECUINT16_LITERAL(
   1.146 -        0x003f, 0x003f, 0x003f, 0x003f,
   1.147 -        0x003f, 0x003f, 0x003f, 0x003f);
   1.148 -    vector unsigned short vfc = VECUINT16_LITERAL(
   1.149 -        0x00fc, 0x00fc, 0x00fc, 0x00fc,
   1.150 -        0x00fc, 0x00fc, 0x00fc, 0x00fc);
   1.151 -    vector unsigned short vf800 = (vector unsigned short)vec_splat_u8(-7);
   1.152 -    vf800 = vec_sl(vf800, vec_splat_u16(8));
   1.153 +    vector unsigned char valpha = vec_splat_u8 (0);
   1.154 +    vector unsigned char vpermute = calc_swizzle32 (srcfmt, NULL);
   1.155 +    vector unsigned char vgmerge = VECUINT8_LITERAL (0x00, 0x02, 0x00, 0x06,
   1.156 +                                                     0x00, 0x0a, 0x00, 0x0e,
   1.157 +                                                     0x00, 0x12, 0x00, 0x16,
   1.158 +                                                     0x00, 0x1a, 0x00, 0x1e);
   1.159 +    vector unsigned short v1 = vec_splat_u16 (1);
   1.160 +    vector unsigned short v3 = vec_splat_u16 (3);
   1.161 +    vector unsigned short v3f =
   1.162 +        VECUINT16_LITERAL (0x003f, 0x003f, 0x003f, 0x003f,
   1.163 +                           0x003f, 0x003f, 0x003f, 0x003f);
   1.164 +    vector unsigned short vfc =
   1.165 +        VECUINT16_LITERAL (0x00fc, 0x00fc, 0x00fc, 0x00fc,
   1.166 +                           0x00fc, 0x00fc, 0x00fc, 0x00fc);
   1.167 +    vector unsigned short vf800 = (vector unsigned short) vec_splat_u8 (-7);
   1.168 +    vf800 = vec_sl (vf800, vec_splat_u16 (8));
   1.169  
   1.170      while (height--) {
   1.171          vector unsigned char valigner;
   1.172 @@ -195,39 +205,42 @@
   1.173              widthvar--; \
   1.174          }
   1.175  
   1.176 -        ONE_PIXEL_BLEND(((UNALIGNED_PTR(dst)) && (width)), width);
   1.177 +        ONE_PIXEL_BLEND (((UNALIGNED_PTR (dst)) && (width)), width);
   1.178  
   1.179          /* After all that work, here's the vector part! */
   1.180 -        extrawidth = (width % 8);  /* trailing unaligned stores */
   1.181 +        extrawidth = (width % 8);       /* trailing unaligned stores */
   1.182          width -= extrawidth;
   1.183 -        vsrc = vec_ld(0, src);
   1.184 -        valigner = VEC_ALIGNER(src);
   1.185 +        vsrc = vec_ld (0, src);
   1.186 +        valigner = VEC_ALIGNER (src);
   1.187  
   1.188          while (width) {
   1.189              vector unsigned short vpixel, vrpixel, vgpixel, vbpixel;
   1.190              vector unsigned int vsrc1, vsrc2;
   1.191              vector unsigned char vdst;
   1.192  
   1.193 -            voverflow = vec_ld(15, src);
   1.194 -            vsrc = vec_perm(vsrc, voverflow, valigner);
   1.195 -            vsrc1 = (vector unsigned int)vec_perm(vsrc, valpha, vpermute);
   1.196 +            voverflow = vec_ld (15, src);
   1.197 +            vsrc = vec_perm (vsrc, voverflow, valigner);
   1.198 +            vsrc1 = (vector unsigned int) vec_perm (vsrc, valpha, vpermute);
   1.199              src += 16;
   1.200              vsrc = voverflow;
   1.201 -            voverflow = vec_ld(15, src);
   1.202 -            vsrc = vec_perm(vsrc, voverflow, valigner);
   1.203 -            vsrc2 = (vector unsigned int)vec_perm(vsrc, valpha, vpermute);
   1.204 +            voverflow = vec_ld (15, src);
   1.205 +            vsrc = vec_perm (vsrc, voverflow, valigner);
   1.206 +            vsrc2 = (vector unsigned int) vec_perm (vsrc, valpha, vpermute);
   1.207              /* 1555 */
   1.208 -            vpixel = (vector unsigned short)vec_packpx(vsrc1, vsrc2);
   1.209 -            vgpixel = (vector unsigned short)vec_perm(vsrc1, vsrc2, vgmerge);
   1.210 -            vgpixel = vec_and(vgpixel, vfc);
   1.211 -            vgpixel = vec_sl(vgpixel, v3);
   1.212 -            vrpixel = vec_sl(vpixel, v1);
   1.213 -            vrpixel = vec_and(vrpixel, vf800);
   1.214 -            vbpixel = vec_and(vpixel, v3f);
   1.215 -            vdst = vec_or((vector unsigned char)vrpixel, (vector unsigned char)vgpixel);
   1.216 +            vpixel = (vector unsigned short) vec_packpx (vsrc1, vsrc2);
   1.217 +            vgpixel =
   1.218 +                (vector unsigned short) vec_perm (vsrc1, vsrc2, vgmerge);
   1.219 +            vgpixel = vec_and (vgpixel, vfc);
   1.220 +            vgpixel = vec_sl (vgpixel, v3);
   1.221 +            vrpixel = vec_sl (vpixel, v1);
   1.222 +            vrpixel = vec_and (vrpixel, vf800);
   1.223 +            vbpixel = vec_and (vpixel, v3f);
   1.224 +            vdst =
   1.225 +                vec_or ((vector unsigned char) vrpixel,
   1.226 +                        (vector unsigned char) vgpixel);
   1.227              /* 565 */
   1.228 -            vdst = vec_or(vdst, (vector unsigned char)vbpixel);
   1.229 -            vec_st(vdst, 0, dst);
   1.230 +            vdst = vec_or (vdst, (vector unsigned char) vbpixel);
   1.231 +            vec_st (vdst, 0, dst);
   1.232  
   1.233              width -= 8;
   1.234              src += 16;
   1.235 @@ -235,20 +248,22 @@
   1.236              vsrc = voverflow;
   1.237          }
   1.238  
   1.239 -        assert(width == 0);
   1.240 +        assert (width == 0);
   1.241  
   1.242          /* do scalar until we can align... */
   1.243 -        ONE_PIXEL_BLEND((extrawidth), extrawidth);
   1.244 +        ONE_PIXEL_BLEND ((extrawidth), extrawidth);
   1.245  #undef ONE_PIXEL_BLEND
   1.246  
   1.247 -        src += srcskip;  /* move to next row, accounting for pitch. */
   1.248 +        src += srcskip;         /* move to next row, accounting for pitch. */
   1.249          dst += dstskip;
   1.250      }
   1.251  
   1.252  
   1.253  }
   1.254  
   1.255 -static void Blit_RGB565_32Altivec(SDL_BlitInfo *info) {
   1.256 +static void
   1.257 +Blit_RGB565_32Altivec (SDL_BlitInfo * info)
   1.258 +{
   1.259      int height = info->d_height;
   1.260      Uint8 *src = (Uint8 *) info->s_pixels;
   1.261      int srcskip = info->s_skip;
   1.262 @@ -260,67 +275,64 @@
   1.263      vector unsigned char valpha;
   1.264      vector unsigned char vpermute;
   1.265      vector unsigned short vf800;
   1.266 -    vector unsigned int v8 = vec_splat_u32(8);
   1.267 -    vector unsigned int v16 = vec_add(v8, v8);
   1.268 -    vector unsigned short v2 = vec_splat_u16(2);
   1.269 -    vector unsigned short v3 = vec_splat_u16(3);
   1.270 +    vector unsigned int v8 = vec_splat_u32 (8);
   1.271 +    vector unsigned int v16 = vec_add (v8, v8);
   1.272 +    vector unsigned short v2 = vec_splat_u16 (2);
   1.273 +    vector unsigned short v3 = vec_splat_u16 (3);
   1.274      /* 
   1.275 -        0x10 - 0x1f is the alpha
   1.276 -        0x00 - 0x0e evens are the red
   1.277 -        0x01 - 0x0f odds are zero
   1.278 -    */
   1.279 -    vector unsigned char vredalpha1 = VECUINT8_LITERAL(
   1.280 -        0x10, 0x00, 0x01, 0x01,
   1.281 -        0x10, 0x02, 0x01, 0x01,
   1.282 -        0x10, 0x04, 0x01, 0x01,
   1.283 -        0x10, 0x06, 0x01, 0x01
   1.284 -    );
   1.285 -    vector unsigned char vredalpha2 = (vector unsigned char) (
   1.286 -        vec_add((vector unsigned int)vredalpha1, vec_sl(v8, v16))
   1.287 -    );
   1.288 +       0x10 - 0x1f is the alpha
   1.289 +       0x00 - 0x0e evens are the red
   1.290 +       0x01 - 0x0f odds are zero
   1.291 +     */
   1.292 +    vector unsigned char vredalpha1 =
   1.293 +        VECUINT8_LITERAL (0x10, 0x00, 0x01, 0x01,
   1.294 +                          0x10, 0x02, 0x01, 0x01,
   1.295 +                          0x10, 0x04, 0x01, 0x01,
   1.296 +                          0x10, 0x06, 0x01, 0x01);
   1.297 +    vector unsigned char vredalpha2 =
   1.298 +        (vector unsigned
   1.299 +         char) (vec_add ((vector unsigned int) vredalpha1, vec_sl (v8, v16))
   1.300 +        );
   1.301      /*
   1.302 -        0x00 - 0x0f is ARxx ARxx ARxx ARxx
   1.303 -        0x11 - 0x0f odds are blue
   1.304 -    */
   1.305 -    vector unsigned char vblue1 = VECUINT8_LITERAL(
   1.306 -        0x00, 0x01, 0x02, 0x11,
   1.307 -        0x04, 0x05, 0x06, 0x13,
   1.308 -        0x08, 0x09, 0x0a, 0x15,
   1.309 -        0x0c, 0x0d, 0x0e, 0x17
   1.310 -    );
   1.311 -    vector unsigned char vblue2 = (vector unsigned char)(
   1.312 -        vec_add((vector unsigned int)vblue1, v8)
   1.313 -    );
   1.314 +       0x00 - 0x0f is ARxx ARxx ARxx ARxx
   1.315 +       0x11 - 0x0f odds are blue
   1.316 +     */
   1.317 +    vector unsigned char vblue1 = VECUINT8_LITERAL (0x00, 0x01, 0x02, 0x11,
   1.318 +                                                    0x04, 0x05, 0x06, 0x13,
   1.319 +                                                    0x08, 0x09, 0x0a, 0x15,
   1.320 +                                                    0x0c, 0x0d, 0x0e, 0x17);
   1.321 +    vector unsigned char vblue2 =
   1.322 +        (vector unsigned char) (vec_add ((vector unsigned int) vblue1, v8)
   1.323 +        );
   1.324      /*
   1.325 -        0x00 - 0x0f is ARxB ARxB ARxB ARxB
   1.326 -        0x10 - 0x0e evens are green
   1.327 -    */
   1.328 -    vector unsigned char vgreen1 = VECUINT8_LITERAL(
   1.329 -        0x00, 0x01, 0x10, 0x03,
   1.330 -        0x04, 0x05, 0x12, 0x07,
   1.331 -        0x08, 0x09, 0x14, 0x0b,
   1.332 -        0x0c, 0x0d, 0x16, 0x0f
   1.333 -    );
   1.334 -    vector unsigned char vgreen2 = (vector unsigned char)(
   1.335 -        vec_add((vector unsigned int)vgreen1, vec_sl(v8, v8))
   1.336 -    );
   1.337 -    
   1.338 +       0x00 - 0x0f is ARxB ARxB ARxB ARxB
   1.339 +       0x10 - 0x0e evens are green
   1.340 +     */
   1.341 +    vector unsigned char vgreen1 = VECUINT8_LITERAL (0x00, 0x01, 0x10, 0x03,
   1.342 +                                                     0x04, 0x05, 0x12, 0x07,
   1.343 +                                                     0x08, 0x09, 0x14, 0x0b,
   1.344 +                                                     0x0c, 0x0d, 0x16, 0x0f);
   1.345 +    vector unsigned char vgreen2 =
   1.346 +        (vector unsigned
   1.347 +         char) (vec_add ((vector unsigned int) vgreen1, vec_sl (v8, v8))
   1.348 +        );
   1.349  
   1.350 -    assert(srcfmt->BytesPerPixel == 2);
   1.351 -    assert(dstfmt->BytesPerPixel == 4);
   1.352  
   1.353 -    vf800 = (vector unsigned short)vec_splat_u8(-7);
   1.354 -    vf800 = vec_sl(vf800, vec_splat_u16(8));
   1.355 +    assert (srcfmt->BytesPerPixel == 2);
   1.356 +    assert (dstfmt->BytesPerPixel == 4);
   1.357 +
   1.358 +    vf800 = (vector unsigned short) vec_splat_u8 (-7);
   1.359 +    vf800 = vec_sl (vf800, vec_splat_u16 (8));
   1.360  
   1.361      if (dstfmt->Amask && srcfmt->alpha) {
   1.362 -        ((unsigned char *)&valpha)[0] = alpha = srcfmt->alpha;
   1.363 -        valpha = vec_splat(valpha, 0);
   1.364 +        ((unsigned char *) &valpha)[0] = alpha = srcfmt->alpha;
   1.365 +        valpha = vec_splat (valpha, 0);
   1.366      } else {
   1.367          alpha = 0;
   1.368 -        valpha = vec_splat_u8(0);
   1.369 +        valpha = vec_splat_u8 (0);
   1.370      }
   1.371  
   1.372 -    vpermute = calc_swizzle32(NULL, dstfmt);
   1.373 +    vpermute = calc_swizzle32 (NULL, dstfmt);
   1.374      while (height--) {
   1.375          vector unsigned char valigner;
   1.376          vector unsigned char voverflow;
   1.377 @@ -342,58 +354,64 @@
   1.378              dst += 4; \
   1.379              widthvar--; \
   1.380          }
   1.381 -        ONE_PIXEL_BLEND(((UNALIGNED_PTR(dst)) && (width)), width);
   1.382 +        ONE_PIXEL_BLEND (((UNALIGNED_PTR (dst)) && (width)), width);
   1.383  
   1.384          /* After all that work, here's the vector part! */
   1.385 -        extrawidth = (width % 8);  /* trailing unaligned stores */
   1.386 +        extrawidth = (width % 8);       /* trailing unaligned stores */
   1.387          width -= extrawidth;
   1.388 -        vsrc = vec_ld(0, src);
   1.389 -        valigner = VEC_ALIGNER(src);
   1.390 +        vsrc = vec_ld (0, src);
   1.391 +        valigner = VEC_ALIGNER (src);
   1.392  
   1.393          while (width) {
   1.394              vector unsigned short vR, vG, vB;
   1.395              vector unsigned char vdst1, vdst2;
   1.396  
   1.397 -            voverflow = vec_ld(15, src);
   1.398 -            vsrc = vec_perm(vsrc, voverflow, valigner);
   1.399 +            voverflow = vec_ld (15, src);
   1.400 +            vsrc = vec_perm (vsrc, voverflow, valigner);
   1.401  
   1.402 -            vR = vec_and((vector unsigned short)vsrc, vf800);
   1.403 -            vB = vec_sl((vector unsigned short)vsrc, v3);
   1.404 -            vG = vec_sl(vB, v2);
   1.405 +            vR = vec_and ((vector unsigned short) vsrc, vf800);
   1.406 +            vB = vec_sl ((vector unsigned short) vsrc, v3);
   1.407 +            vG = vec_sl (vB, v2);
   1.408  
   1.409 -            vdst1 = (vector unsigned char)vec_perm((vector unsigned char)vR, valpha, vredalpha1);
   1.410 -            vdst1 = vec_perm(vdst1, (vector unsigned char)vB, vblue1);
   1.411 -            vdst1 = vec_perm(vdst1, (vector unsigned char)vG, vgreen1);
   1.412 -            vdst1 = vec_perm(vdst1, valpha, vpermute);
   1.413 -            vec_st(vdst1, 0, dst);
   1.414 +            vdst1 =
   1.415 +                (vector unsigned char) vec_perm ((vector unsigned char) vR,
   1.416 +                                                 valpha, vredalpha1);
   1.417 +            vdst1 = vec_perm (vdst1, (vector unsigned char) vB, vblue1);
   1.418 +            vdst1 = vec_perm (vdst1, (vector unsigned char) vG, vgreen1);
   1.419 +            vdst1 = vec_perm (vdst1, valpha, vpermute);
   1.420 +            vec_st (vdst1, 0, dst);
   1.421  
   1.422 -            vdst2 = (vector unsigned char)vec_perm((vector unsigned char)vR, valpha, vredalpha2);
   1.423 -            vdst2 = vec_perm(vdst2, (vector unsigned char)vB, vblue2);
   1.424 -            vdst2 = vec_perm(vdst2, (vector unsigned char)vG, vgreen2);
   1.425 -            vdst2 = vec_perm(vdst2, valpha, vpermute);
   1.426 -            vec_st(vdst2, 16, dst);
   1.427 -            
   1.428 +            vdst2 =
   1.429 +                (vector unsigned char) vec_perm ((vector unsigned char) vR,
   1.430 +                                                 valpha, vredalpha2);
   1.431 +            vdst2 = vec_perm (vdst2, (vector unsigned char) vB, vblue2);
   1.432 +            vdst2 = vec_perm (vdst2, (vector unsigned char) vG, vgreen2);
   1.433 +            vdst2 = vec_perm (vdst2, valpha, vpermute);
   1.434 +            vec_st (vdst2, 16, dst);
   1.435 +
   1.436              width -= 8;
   1.437              dst += 32;
   1.438              src += 16;
   1.439              vsrc = voverflow;
   1.440          }
   1.441  
   1.442 -        assert(width == 0);
   1.443 +        assert (width == 0);
   1.444  
   1.445  
   1.446          /* do scalar until we can align... */
   1.447 -        ONE_PIXEL_BLEND((extrawidth), extrawidth);
   1.448 +        ONE_PIXEL_BLEND ((extrawidth), extrawidth);
   1.449  #undef ONE_PIXEL_BLEND
   1.450  
   1.451 -        src += srcskip;  /* move to next row, accounting for pitch. */
   1.452 +        src += srcskip;         /* move to next row, accounting for pitch. */
   1.453          dst += dstskip;
   1.454      }
   1.455  
   1.456  }
   1.457  
   1.458  
   1.459 -static void Blit_RGB555_32Altivec(SDL_BlitInfo *info) {
   1.460 +static void
   1.461 +Blit_RGB555_32Altivec (SDL_BlitInfo * info)
   1.462 +{
   1.463      int height = info->d_height;
   1.464      Uint8 *src = (Uint8 *) info->s_pixels;
   1.465      int srcskip = info->s_skip;
   1.466 @@ -405,67 +423,64 @@
   1.467      vector unsigned char valpha;
   1.468      vector unsigned char vpermute;
   1.469      vector unsigned short vf800;
   1.470 -    vector unsigned int v8 = vec_splat_u32(8);
   1.471 -    vector unsigned int v16 = vec_add(v8, v8);
   1.472 -    vector unsigned short v1 = vec_splat_u16(1);
   1.473 -    vector unsigned short v3 = vec_splat_u16(3);
   1.474 +    vector unsigned int v8 = vec_splat_u32 (8);
   1.475 +    vector unsigned int v16 = vec_add (v8, v8);
   1.476 +    vector unsigned short v1 = vec_splat_u16 (1);
   1.477 +    vector unsigned short v3 = vec_splat_u16 (3);
   1.478      /* 
   1.479 -        0x10 - 0x1f is the alpha
   1.480 -        0x00 - 0x0e evens are the red
   1.481 -        0x01 - 0x0f odds are zero
   1.482 -    */
   1.483 -    vector unsigned char vredalpha1 = VECUINT8_LITERAL(
   1.484 -        0x10, 0x00, 0x01, 0x01,
   1.485 -        0x10, 0x02, 0x01, 0x01,
   1.486 -        0x10, 0x04, 0x01, 0x01,
   1.487 -        0x10, 0x06, 0x01, 0x01
   1.488 -    );
   1.489 -    vector unsigned char vredalpha2 = (vector unsigned char)(
   1.490 -        vec_add((vector unsigned int)vredalpha1, vec_sl(v8, v16))
   1.491 -    );
   1.492 +       0x10 - 0x1f is the alpha
   1.493 +       0x00 - 0x0e evens are the red
   1.494 +       0x01 - 0x0f odds are zero
   1.495 +     */
   1.496 +    vector unsigned char vredalpha1 =
   1.497 +        VECUINT8_LITERAL (0x10, 0x00, 0x01, 0x01,
   1.498 +                          0x10, 0x02, 0x01, 0x01,
   1.499 +                          0x10, 0x04, 0x01, 0x01,
   1.500 +                          0x10, 0x06, 0x01, 0x01);
   1.501 +    vector unsigned char vredalpha2 =
   1.502 +        (vector unsigned
   1.503 +         char) (vec_add ((vector unsigned int) vredalpha1, vec_sl (v8, v16))
   1.504 +        );
   1.505      /*
   1.506 -        0x00 - 0x0f is ARxx ARxx ARxx ARxx
   1.507 -        0x11 - 0x0f odds are blue
   1.508 -    */
   1.509 -    vector unsigned char vblue1 = VECUINT8_LITERAL(
   1.510 -        0x00, 0x01, 0x02, 0x11,
   1.511 -        0x04, 0x05, 0x06, 0x13,
   1.512 -        0x08, 0x09, 0x0a, 0x15,
   1.513 -        0x0c, 0x0d, 0x0e, 0x17
   1.514 -    );
   1.515 -    vector unsigned char vblue2 = (vector unsigned char)(
   1.516 -        vec_add((vector unsigned int)vblue1, v8)
   1.517 -    );
   1.518 +       0x00 - 0x0f is ARxx ARxx ARxx ARxx
   1.519 +       0x11 - 0x0f odds are blue
   1.520 +     */
   1.521 +    vector unsigned char vblue1 = VECUINT8_LITERAL (0x00, 0x01, 0x02, 0x11,
   1.522 +                                                    0x04, 0x05, 0x06, 0x13,
   1.523 +                                                    0x08, 0x09, 0x0a, 0x15,
   1.524 +                                                    0x0c, 0x0d, 0x0e, 0x17);
   1.525 +    vector unsigned char vblue2 =
   1.526 +        (vector unsigned char) (vec_add ((vector unsigned int) vblue1, v8)
   1.527 +        );
   1.528      /*
   1.529 -        0x00 - 0x0f is ARxB ARxB ARxB ARxB
   1.530 -        0x10 - 0x0e evens are green
   1.531 -    */
   1.532 -    vector unsigned char vgreen1 = VECUINT8_LITERAL(
   1.533 -        0x00, 0x01, 0x10, 0x03,
   1.534 -        0x04, 0x05, 0x12, 0x07,
   1.535 -        0x08, 0x09, 0x14, 0x0b,
   1.536 -        0x0c, 0x0d, 0x16, 0x0f
   1.537 -    );
   1.538 -    vector unsigned char vgreen2 = (vector unsigned char)(
   1.539 -        vec_add((vector unsigned int)vgreen1, vec_sl(v8, v8))
   1.540 -    );
   1.541 -    
   1.542 +       0x00 - 0x0f is ARxB ARxB ARxB ARxB
   1.543 +       0x10 - 0x0e evens are green
   1.544 +     */
   1.545 +    vector unsigned char vgreen1 = VECUINT8_LITERAL (0x00, 0x01, 0x10, 0x03,
   1.546 +                                                     0x04, 0x05, 0x12, 0x07,
   1.547 +                                                     0x08, 0x09, 0x14, 0x0b,
   1.548 +                                                     0x0c, 0x0d, 0x16, 0x0f);
   1.549 +    vector unsigned char vgreen2 =
   1.550 +        (vector unsigned
   1.551 +         char) (vec_add ((vector unsigned int) vgreen1, vec_sl (v8, v8))
   1.552 +        );
   1.553  
   1.554 -    assert(srcfmt->BytesPerPixel == 2);
   1.555 -    assert(dstfmt->BytesPerPixel == 4);
   1.556  
   1.557 -    vf800 = (vector unsigned short)vec_splat_u8(-7);
   1.558 -    vf800 = vec_sl(vf800, vec_splat_u16(8));
   1.559 +    assert (srcfmt->BytesPerPixel == 2);
   1.560 +    assert (dstfmt->BytesPerPixel == 4);
   1.561 +
   1.562 +    vf800 = (vector unsigned short) vec_splat_u8 (-7);
   1.563 +    vf800 = vec_sl (vf800, vec_splat_u16 (8));
   1.564  
   1.565      if (dstfmt->Amask && srcfmt->alpha) {
   1.566 -        ((unsigned char *)&valpha)[0] = alpha = srcfmt->alpha;
   1.567 -        valpha = vec_splat(valpha, 0);
   1.568 +        ((unsigned char *) &valpha)[0] = alpha = srcfmt->alpha;
   1.569 +        valpha = vec_splat (valpha, 0);
   1.570      } else {
   1.571          alpha = 0;
   1.572 -        valpha = vec_splat_u8(0);
   1.573 +        valpha = vec_splat_u8 (0);
   1.574      }
   1.575  
   1.576 -    vpermute = calc_swizzle32(NULL, dstfmt);
   1.577 +    vpermute = calc_swizzle32 (NULL, dstfmt);
   1.578      while (height--) {
   1.579          vector unsigned char valigner;
   1.580          vector unsigned char voverflow;
   1.581 @@ -487,59 +502,64 @@
   1.582              dst += 4; \
   1.583              widthvar--; \
   1.584          }
   1.585 -        ONE_PIXEL_BLEND(((UNALIGNED_PTR(dst)) && (width)), width);
   1.586 +        ONE_PIXEL_BLEND (((UNALIGNED_PTR (dst)) && (width)), width);
   1.587  
   1.588          /* After all that work, here's the vector part! */
   1.589 -        extrawidth = (width % 8);  /* trailing unaligned stores */
   1.590 +        extrawidth = (width % 8);       /* trailing unaligned stores */
   1.591          width -= extrawidth;
   1.592 -        vsrc = vec_ld(0, src);
   1.593 -        valigner = VEC_ALIGNER(src);
   1.594 +        vsrc = vec_ld (0, src);
   1.595 +        valigner = VEC_ALIGNER (src);
   1.596  
   1.597          while (width) {
   1.598              vector unsigned short vR, vG, vB;
   1.599              vector unsigned char vdst1, vdst2;
   1.600  
   1.601 -            voverflow = vec_ld(15, src);
   1.602 -            vsrc = vec_perm(vsrc, voverflow, valigner);
   1.603 +            voverflow = vec_ld (15, src);
   1.604 +            vsrc = vec_perm (vsrc, voverflow, valigner);
   1.605  
   1.606 -            vR = vec_and(vec_sl((vector unsigned short)vsrc,v1), vf800);
   1.607 -            vB = vec_sl((vector unsigned short)vsrc, v3);
   1.608 -            vG = vec_sl(vB, v3);
   1.609 +            vR = vec_and (vec_sl ((vector unsigned short) vsrc, v1), vf800);
   1.610 +            vB = vec_sl ((vector unsigned short) vsrc, v3);
   1.611 +            vG = vec_sl (vB, v3);
   1.612  
   1.613 -            vdst1 = (vector unsigned char)vec_perm((vector unsigned char)vR, valpha, vredalpha1);
   1.614 -            vdst1 = vec_perm(vdst1, (vector unsigned char)vB, vblue1);
   1.615 -            vdst1 = vec_perm(vdst1, (vector unsigned char)vG, vgreen1);
   1.616 -            vdst1 = vec_perm(vdst1, valpha, vpermute);
   1.617 -            vec_st(vdst1, 0, dst);
   1.618 +            vdst1 =
   1.619 +                (vector unsigned char) vec_perm ((vector unsigned char) vR,
   1.620 +                                                 valpha, vredalpha1);
   1.621 +            vdst1 = vec_perm (vdst1, (vector unsigned char) vB, vblue1);
   1.622 +            vdst1 = vec_perm (vdst1, (vector unsigned char) vG, vgreen1);
   1.623 +            vdst1 = vec_perm (vdst1, valpha, vpermute);
   1.624 +            vec_st (vdst1, 0, dst);
   1.625  
   1.626 -            vdst2 = (vector unsigned char)vec_perm((vector unsigned char)vR, valpha, vredalpha2);
   1.627 -            vdst2 = vec_perm(vdst2, (vector unsigned char)vB, vblue2);
   1.628 -            vdst2 = vec_perm(vdst2, (vector unsigned char)vG, vgreen2);
   1.629 -            vdst2 = vec_perm(vdst2, valpha, vpermute);
   1.630 -            vec_st(vdst2, 16, dst);
   1.631 -            
   1.632 +            vdst2 =
   1.633 +                (vector unsigned char) vec_perm ((vector unsigned char) vR,
   1.634 +                                                 valpha, vredalpha2);
   1.635 +            vdst2 = vec_perm (vdst2, (vector unsigned char) vB, vblue2);
   1.636 +            vdst2 = vec_perm (vdst2, (vector unsigned char) vG, vgreen2);
   1.637 +            vdst2 = vec_perm (vdst2, valpha, vpermute);
   1.638 +            vec_st (vdst2, 16, dst);
   1.639 +
   1.640              width -= 8;
   1.641              dst += 32;
   1.642              src += 16;
   1.643              vsrc = voverflow;
   1.644          }
   1.645  
   1.646 -        assert(width == 0);
   1.647 +        assert (width == 0);
   1.648  
   1.649  
   1.650          /* do scalar until we can align... */
   1.651 -        ONE_PIXEL_BLEND((extrawidth), extrawidth);
   1.652 +        ONE_PIXEL_BLEND ((extrawidth), extrawidth);
   1.653  #undef ONE_PIXEL_BLEND
   1.654  
   1.655 -        src += srcskip;  /* move to next row, accounting for pitch. */
   1.656 +        src += srcskip;         /* move to next row, accounting for pitch. */
   1.657          dst += dstskip;
   1.658      }
   1.659  
   1.660  }
   1.661  
   1.662 -static void BlitNtoNKey(SDL_BlitInfo *info);
   1.663 -static void BlitNtoNKeyCopyAlpha(SDL_BlitInfo *info);
   1.664 -static void Blit32to32KeyAltivec(SDL_BlitInfo *info)
   1.665 +static void BlitNtoNKey (SDL_BlitInfo * info);
   1.666 +static void BlitNtoNKeyCopyAlpha (SDL_BlitInfo * info);
   1.667 +static void
   1.668 +Blit32to32KeyAltivec (SDL_BlitInfo * info)
   1.669  {
   1.670      int height = info->d_height;
   1.671      Uint32 *srcp = (Uint32 *) info->s_pixels;
   1.672 @@ -551,35 +571,37 @@
   1.673      SDL_PixelFormat *dstfmt = info->dst;
   1.674      int dstbpp = dstfmt->BytesPerPixel;
   1.675      int copy_alpha = (srcfmt->Amask && dstfmt->Amask);
   1.676 -	unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
   1.677 +    unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
   1.678      Uint32 rgbmask = srcfmt->Rmask | srcfmt->Gmask | srcfmt->Bmask;
   1.679 -	Uint32 ckey = info->src->colorkey;
   1.680 +    Uint32 ckey = info->src->colorkey;
   1.681      vector unsigned int valpha;
   1.682      vector unsigned char vpermute;
   1.683      vector unsigned char vzero;
   1.684      vector unsigned int vckey;
   1.685      vector unsigned int vrgbmask;
   1.686 -    vpermute = calc_swizzle32(srcfmt, dstfmt);
   1.687 +    vpermute = calc_swizzle32 (srcfmt, dstfmt);
   1.688      if (info->d_width < 16) {
   1.689 -        if(copy_alpha) {
   1.690 -            BlitNtoNKeyCopyAlpha(info);
   1.691 +        if (copy_alpha) {
   1.692 +            BlitNtoNKeyCopyAlpha (info);
   1.693          } else {
   1.694 -            BlitNtoNKey(info);
   1.695 +            BlitNtoNKey (info);
   1.696          }
   1.697          return;
   1.698      }
   1.699 -    vzero = vec_splat_u8(0);
   1.700 +    vzero = vec_splat_u8 (0);
   1.701      if (alpha) {
   1.702 -        ((unsigned char *)&valpha)[0] = (unsigned char)alpha;
   1.703 -        valpha = (vector unsigned int)vec_splat((vector unsigned char)valpha, 0);
   1.704 +        ((unsigned char *) &valpha)[0] = (unsigned char) alpha;
   1.705 +        valpha =
   1.706 +            (vector unsigned int) vec_splat ((vector unsigned char) valpha,
   1.707 +                                             0);
   1.708      } else {
   1.709 -        valpha = (vector unsigned int)vzero;
   1.710 +        valpha = (vector unsigned int) vzero;
   1.711      }
   1.712      ckey &= rgbmask;
   1.713 -    ((unsigned int *)(char*)&vckey)[0] = ckey;
   1.714 -    vckey = vec_splat(vckey, 0);
   1.715 -    ((unsigned int *)(char*)&vrgbmask)[0] = rgbmask;
   1.716 -    vrgbmask = vec_splat(vrgbmask, 0);
   1.717 +    ((unsigned int *) (char *) &vckey)[0] = ckey;
   1.718 +    vckey = vec_splat (vckey, 0);
   1.719 +    ((unsigned int *) (char *) &vrgbmask)[0] = rgbmask;
   1.720 +    vrgbmask = vec_splat (vrgbmask, 0);
   1.721  
   1.722      while (height--) {
   1.723  #define ONE_PIXEL_BLEND(condition, widthvar) \
   1.724 @@ -613,37 +635,39 @@
   1.725              } \
   1.726          }
   1.727          int width = info->d_width;
   1.728 -        ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width);
   1.729 -        assert(width > 0);
   1.730 +        ONE_PIXEL_BLEND ((UNALIGNED_PTR (dstp)) && (width), width);
   1.731 +        assert (width > 0);
   1.732          if (width > 0) {
   1.733              int extrawidth = (width % 4);
   1.734 -            vector unsigned char valigner = VEC_ALIGNER(srcp);
   1.735 -            vector unsigned int vs = vec_ld(0, srcp);
   1.736 +            vector unsigned char valigner = VEC_ALIGNER (srcp);
   1.737 +            vector unsigned int vs = vec_ld (0, srcp);
   1.738              width -= extrawidth;
   1.739 -            assert(width >= 4);
   1.740 +            assert (width >= 4);
   1.741              while (width) {
   1.742                  vector unsigned char vsel;
   1.743                  vector unsigned int vd;
   1.744 -                vector unsigned int voverflow = vec_ld(15, srcp);
   1.745 +                vector unsigned int voverflow = vec_ld (15, srcp);
   1.746                  /* load the source vec */
   1.747 -                vs = vec_perm(vs, voverflow, valigner);
   1.748 +                vs = vec_perm (vs, voverflow, valigner);
   1.749                  /* vsel is set for items that match the key */
   1.750 -                vsel = (vector unsigned char)vec_and(vs, vrgbmask);
   1.751 -                vsel = (vector unsigned char)vec_cmpeq(vs, vckey);
   1.752 +                vsel = (vector unsigned char) vec_and (vs, vrgbmask);
   1.753 +                vsel = (vector unsigned char) vec_cmpeq (vs, vckey);
   1.754                  /* permute the src vec to the dest format */
   1.755 -                vs = vec_perm(vs, valpha, vpermute);
   1.756 +                vs = vec_perm (vs, valpha, vpermute);
   1.757                  /* load the destination vec */
   1.758 -                vd = vec_ld(0, dstp);
   1.759 +                vd = vec_ld (0, dstp);
   1.760                  /* select the source and dest into vs */
   1.761 -                vd = (vector unsigned int)vec_sel((vector unsigned char)vs, (vector unsigned char)vd, vsel);
   1.762 -                
   1.763 -                vec_st(vd, 0, dstp);
   1.764 +                vd = (vector unsigned int) vec_sel ((vector unsigned char) vs,
   1.765 +                                                    (vector unsigned char) vd,
   1.766 +                                                    vsel);
   1.767 +
   1.768 +                vec_st (vd, 0, dstp);
   1.769                  srcp += 4;
   1.770                  width -= 4;
   1.771                  dstp += 4;
   1.772                  vs = voverflow;
   1.773              }
   1.774 -            ONE_PIXEL_BLEND((extrawidth), extrawidth);
   1.775 +            ONE_PIXEL_BLEND ((extrawidth), extrawidth);
   1.776  #undef ONE_PIXEL_BLEND
   1.777              srcp += srcskip >> 2;
   1.778              dstp += dstskip >> 2;
   1.779 @@ -653,7 +677,8 @@
   1.780  
   1.781  /* Altivec code to swizzle one 32-bit surface to a different 32-bit format. */
   1.782  /* Use this on a G5 */
   1.783 -static void ConvertAltivec32to32_noprefetch(SDL_BlitInfo *info)
   1.784 +static void
   1.785 +ConvertAltivec32to32_noprefetch (SDL_BlitInfo * info)
   1.786  {
   1.787      int height = info->d_height;
   1.788      Uint32 *src = (Uint32 *) info->s_pixels;
   1.789 @@ -662,18 +687,18 @@
   1.790      int dstskip = info->d_skip;
   1.791      SDL_PixelFormat *srcfmt = info->src;
   1.792      SDL_PixelFormat *dstfmt = info->dst;
   1.793 -    vector unsigned int vzero = vec_splat_u32(0);
   1.794 -    vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt);
   1.795 +    vector unsigned int vzero = vec_splat_u32 (0);
   1.796 +    vector unsigned char vpermute = calc_swizzle32 (srcfmt, dstfmt);
   1.797      if (dstfmt->Amask && !srcfmt->Amask) {
   1.798          if (srcfmt->alpha) {
   1.799              vector unsigned char valpha;
   1.800 -            ((unsigned char *)&valpha)[0] = srcfmt->alpha;
   1.801 -            vzero = (vector unsigned int)vec_splat(valpha, 0);
   1.802 +            ((unsigned char *) &valpha)[0] = srcfmt->alpha;
   1.803 +            vzero = (vector unsigned int) vec_splat (valpha, 0);
   1.804          }
   1.805      }
   1.806  
   1.807 -    assert(srcfmt->BytesPerPixel == 4);
   1.808 -    assert(dstfmt->BytesPerPixel == 4);
   1.809 +    assert (srcfmt->BytesPerPixel == 4);
   1.810 +    assert (dstfmt->BytesPerPixel == 4);
   1.811  
   1.812      while (height--) {
   1.813          vector unsigned char valigner;
   1.814 @@ -686,41 +711,41 @@
   1.815          int extrawidth;
   1.816  
   1.817          /* do scalar until we can align... */
   1.818 -        while ((UNALIGNED_PTR(dst)) && (width)) {
   1.819 +        while ((UNALIGNED_PTR (dst)) && (width)) {
   1.820              bits = *(src++);
   1.821 -            RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   1.822 -            *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   1.823 +            RGBA_FROM_8888 (bits, srcfmt, r, g, b, a);
   1.824 +            *(dst++) = MAKE8888 (dstfmt, r, g, b, a);
   1.825              width--;
   1.826          }
   1.827  
   1.828          /* After all that work, here's the vector part! */
   1.829          extrawidth = (width % 4);
   1.830          width -= extrawidth;
   1.831 -        valigner = VEC_ALIGNER(src);
   1.832 -        vbits = vec_ld(0, src);
   1.833 +        valigner = VEC_ALIGNER (src);
   1.834 +        vbits = vec_ld (0, src);
   1.835  
   1.836 -       while (width) {
   1.837 -            voverflow = vec_ld(15, src);
   1.838 +        while (width) {
   1.839 +            voverflow = vec_ld (15, src);
   1.840              src += 4;
   1.841              width -= 4;
   1.842 -            vbits = vec_perm(vbits, voverflow, valigner);  /* src is ready. */
   1.843 -            vbits = vec_perm(vbits, vzero, vpermute);  /* swizzle it. */
   1.844 -            vec_st(vbits, 0, dst);  /* store it back out. */
   1.845 +            vbits = vec_perm (vbits, voverflow, valigner);      /* src is ready. */
   1.846 +            vbits = vec_perm (vbits, vzero, vpermute);  /* swizzle it. */
   1.847 +            vec_st (vbits, 0, dst);     /* store it back out. */
   1.848              dst += 4;
   1.849              vbits = voverflow;
   1.850          }
   1.851  
   1.852 -        assert(width == 0);
   1.853 +        assert (width == 0);
   1.854  
   1.855          /* cover pixels at the end of the row that didn't fit in 16 bytes. */
   1.856          while (extrawidth) {
   1.857 -            bits = *(src++);  /* max 7 pixels, don't bother with prefetch. */
   1.858 -            RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   1.859 -            *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   1.860 +            bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
   1.861 +            RGBA_FROM_8888 (bits, srcfmt, r, g, b, a);
   1.862 +            *(dst++) = MAKE8888 (dstfmt, r, g, b, a);
   1.863              extrawidth--;
   1.864          }
   1.865  
   1.866 -        src += srcskip >> 2;  /* move to next row, accounting for pitch. */
   1.867 +        src += srcskip >> 2;    /* move to next row, accounting for pitch. */
   1.868          dst += dstskip >> 2;
   1.869      }
   1.870  
   1.871 @@ -728,7 +753,8 @@
   1.872  
   1.873  /* Altivec code to swizzle one 32-bit surface to a different 32-bit format. */
   1.874  /* Use this on a G4 */
   1.875 -static void ConvertAltivec32to32_prefetch(SDL_BlitInfo *info)
   1.876 +static void
   1.877 +ConvertAltivec32to32_prefetch (SDL_BlitInfo * info)
   1.878  {
   1.879      const int scalar_dst_lead = sizeof (Uint32) * 4;
   1.880      const int vector_dst_lead = sizeof (Uint32) * 16;
   1.881 @@ -740,18 +766,18 @@
   1.882      int dstskip = info->d_skip;
   1.883      SDL_PixelFormat *srcfmt = info->src;
   1.884      SDL_PixelFormat *dstfmt = info->dst;
   1.885 -    vector unsigned int vzero = vec_splat_u32(0);
   1.886 -    vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt);
   1.887 +    vector unsigned int vzero = vec_splat_u32 (0);
   1.888 +    vector unsigned char vpermute = calc_swizzle32 (srcfmt, dstfmt);
   1.889      if (dstfmt->Amask && !srcfmt->Amask) {
   1.890          if (srcfmt->alpha) {
   1.891              vector unsigned char valpha;
   1.892 -            ((unsigned char *)&valpha)[0] = srcfmt->alpha;
   1.893 -            vzero = (vector unsigned int)vec_splat(valpha, 0);
   1.894 +            ((unsigned char *) &valpha)[0] = srcfmt->alpha;
   1.895 +            vzero = (vector unsigned int) vec_splat (valpha, 0);
   1.896          }
   1.897      }
   1.898  
   1.899 -    assert(srcfmt->BytesPerPixel == 4);
   1.900 -    assert(dstfmt->BytesPerPixel == 4);
   1.901 +    assert (srcfmt->BytesPerPixel == 4);
   1.902 +    assert (dstfmt->BytesPerPixel == 4);
   1.903  
   1.904      while (height--) {
   1.905          vector unsigned char valigner;
   1.906 @@ -764,75 +790,81 @@
   1.907          int extrawidth;
   1.908  
   1.909          /* do scalar until we can align... */
   1.910 -        while ((UNALIGNED_PTR(dst)) && (width)) {
   1.911 -            vec_dstt(src+scalar_dst_lead, DST_CTRL(2,32,1024), DST_CHAN_SRC);
   1.912 -            vec_dstst(dst+scalar_dst_lead, DST_CTRL(2,32,1024), DST_CHAN_DEST);
   1.913 +        while ((UNALIGNED_PTR (dst)) && (width)) {
   1.914 +            vec_dstt (src + scalar_dst_lead, DST_CTRL (2, 32, 1024),
   1.915 +                      DST_CHAN_SRC);
   1.916 +            vec_dstst (dst + scalar_dst_lead, DST_CTRL (2, 32, 1024),
   1.917 +                       DST_CHAN_DEST);
   1.918              bits = *(src++);
   1.919 -            RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   1.920 -            *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   1.921 +            RGBA_FROM_8888 (bits, srcfmt, r, g, b, a);
   1.922 +            *(dst++) = MAKE8888 (dstfmt, r, g, b, a);
   1.923              width--;
   1.924          }
   1.925  
   1.926          /* After all that work, here's the vector part! */
   1.927          extrawidth = (width % 4);
   1.928          width -= extrawidth;
   1.929 -        valigner = VEC_ALIGNER(src);
   1.930 -        vbits = vec_ld(0, src);
   1.931 +        valigner = VEC_ALIGNER (src);
   1.932 +        vbits = vec_ld (0, src);
   1.933  
   1.934          while (width) {
   1.935 -            vec_dstt(src+vector_dst_lead, DST_CTRL(2,32,1024), DST_CHAN_SRC);
   1.936 -            vec_dstst(dst+vector_dst_lead, DST_CTRL(2,32,1024), DST_CHAN_DEST);
   1.937 -            voverflow = vec_ld(15, src);
   1.938 +            vec_dstt (src + vector_dst_lead, DST_CTRL (2, 32, 1024),
   1.939 +                      DST_CHAN_SRC);
   1.940 +            vec_dstst (dst + vector_dst_lead, DST_CTRL (2, 32, 1024),
   1.941 +                       DST_CHAN_DEST);
   1.942 +            voverflow = vec_ld (15, src);
   1.943              src += 4;
   1.944              width -= 4;
   1.945 -            vbits = vec_perm(vbits, voverflow, valigner);  /* src is ready. */
   1.946 -            vbits = vec_perm(vbits, vzero, vpermute);  /* swizzle it. */
   1.947 -            vec_st(vbits, 0, dst);  /* store it back out. */
   1.948 +            vbits = vec_perm (vbits, voverflow, valigner);      /* src is ready. */
   1.949 +            vbits = vec_perm (vbits, vzero, vpermute);  /* swizzle it. */
   1.950 +            vec_st (vbits, 0, dst);     /* store it back out. */
   1.951              dst += 4;
   1.952              vbits = voverflow;
   1.953          }
   1.954 -        
   1.955 -        assert(width == 0);
   1.956 +
   1.957 +        assert (width == 0);
   1.958  
   1.959          /* cover pixels at the end of the row that didn't fit in 16 bytes. */
   1.960          while (extrawidth) {
   1.961 -            bits = *(src++);  /* max 7 pixels, don't bother with prefetch. */
   1.962 -            RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   1.963 -            *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   1.964 +            bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
   1.965 +            RGBA_FROM_8888 (bits, srcfmt, r, g, b, a);
   1.966 +            *(dst++) = MAKE8888 (dstfmt, r, g, b, a);
   1.967              extrawidth--;
   1.968          }
   1.969  
   1.970 -        src += srcskip >> 2;  /* move to next row, accounting for pitch. */
   1.971 +        src += srcskip >> 2;    /* move to next row, accounting for pitch. */
   1.972          dst += dstskip >> 2;
   1.973      }
   1.974  
   1.975 -    vec_dss(DST_CHAN_SRC);
   1.976 -    vec_dss(DST_CHAN_DEST);
   1.977 +    vec_dss (DST_CHAN_SRC);
   1.978 +    vec_dss (DST_CHAN_DEST);
   1.979  }
   1.980  
   1.981 -static Uint32 GetBlitFeatures( void )
   1.982 +static Uint32
   1.983 +GetBlitFeatures (void)
   1.984  {
   1.985      static Uint32 features = 0xffffffff;
   1.986      if (features == 0xffffffff) {
   1.987          /* Provide an override for testing .. */
   1.988 -        char *override = SDL_getenv("SDL_ALTIVEC_BLIT_FEATURES");
   1.989 +        char *override = SDL_getenv ("SDL_ALTIVEC_BLIT_FEATURES");
   1.990          if (override) {
   1.991              features = 0;
   1.992 -            SDL_sscanf(override, "%u", &features);
   1.993 +            SDL_sscanf (override, "%u", &features);
   1.994          } else {
   1.995 -            features = ( 0
   1.996 -                /* Feature 1 is has-MMX */
   1.997 -                | ((SDL_HasMMX()) ? 1 : 0)
   1.998 -                /* Feature 2 is has-AltiVec */
   1.999 -                | ((SDL_HasAltiVec()) ? 2 : 0)
  1.1000 -                /* Feature 4 is dont-use-prefetch */
  1.1001 -                /* !!!! FIXME: Check for G5 or later, not the cache size! Always prefetch on a G4. */
  1.1002 -                | ((GetL3CacheSize() == 0) ? 4 : 0)
  1.1003 -            );
  1.1004 +            features = (0
  1.1005 +                        /* Feature 1 is has-MMX */
  1.1006 +                        | ((SDL_HasMMX ())? 1 : 0)
  1.1007 +                        /* Feature 2 is has-AltiVec */
  1.1008 +                        | ((SDL_HasAltiVec ())? 2 : 0)
  1.1009 +                        /* Feature 4 is dont-use-prefetch */
  1.1010 +                        /* !!!! FIXME: Check for G5 or later, not the cache size! Always prefetch on a G4. */
  1.1011 +                        | ((GetL3CacheSize () == 0) ? 4 : 0)
  1.1012 +                );
  1.1013          }
  1.1014      }
  1.1015      return features;
  1.1016  }
  1.1017 +
  1.1018  #if __MWERKS__
  1.1019  #pragma altivec_model off
  1.1020  #endif
  1.1021 @@ -869,104 +901,110 @@
  1.1022  	              (((src)&0x0000E000)>>11)| \
  1.1023  	              (((src)&0x000000C0)>>6)); \
  1.1024  }
  1.1025 -static void Blit_RGB888_index8(SDL_BlitInfo *info)
  1.1026 +static void
  1.1027 +Blit_RGB888_index8 (SDL_BlitInfo * info)
  1.1028  {
  1.1029  #ifndef USE_DUFFS_LOOP
  1.1030 -	int c;
  1.1031 +    int c;
  1.1032  #endif
  1.1033 -	int width, height;
  1.1034 -	Uint32 *src;
  1.1035 -	const Uint8 *map;
  1.1036 -	Uint8 *dst;
  1.1037 -	int srcskip, dstskip;
  1.1038 +    int width, height;
  1.1039 +    Uint32 *src;
  1.1040 +    const Uint8 *map;
  1.1041 +    Uint8 *dst;
  1.1042 +    int srcskip, dstskip;
  1.1043  
  1.1044 -	/* Set up some basic variables */
  1.1045 -	width = info->d_width;
  1.1046 -	height = info->d_height;
  1.1047 -	src = (Uint32 *)info->s_pixels;
  1.1048 -	srcskip = info->s_skip/4;
  1.1049 -	dst = info->d_pixels;
  1.1050 -	dstskip = info->d_skip;
  1.1051 -	map = info->table;
  1.1052 +    /* Set up some basic variables */
  1.1053 +    width = info->d_width;
  1.1054 +    height = info->d_height;
  1.1055 +    src = (Uint32 *) info->s_pixels;
  1.1056 +    srcskip = info->s_skip / 4;
  1.1057 +    dst = info->d_pixels;
  1.1058 +    dstskip = info->d_skip;
  1.1059 +    map = info->table;
  1.1060  
  1.1061 -	if ( map == NULL ) {
  1.1062 -		while ( height-- ) {
  1.1063 +    if (map == NULL) {
  1.1064 +        while (height--) {
  1.1065  #ifdef USE_DUFFS_LOOP
  1.1066 +			/* *INDENT-OFF* */
  1.1067  			DUFFS_LOOP(
  1.1068  				RGB888_RGB332(*dst++, *src);
  1.1069  			, width);
  1.1070 +			/* *INDENT-ON* */
  1.1071  #else
  1.1072 -			for ( c=width/4; c; --c ) {
  1.1073 -				/* Pack RGB into 8bit pixel */
  1.1074 -				++src;
  1.1075 -				RGB888_RGB332(*dst++, *src);
  1.1076 -				++src;
  1.1077 -				RGB888_RGB332(*dst++, *src);
  1.1078 -				++src;
  1.1079 -				RGB888_RGB332(*dst++, *src);
  1.1080 -				++src;
  1.1081 -			}
  1.1082 -			switch ( width & 3 ) {
  1.1083 -				case 3:
  1.1084 -					RGB888_RGB332(*dst++, *src);
  1.1085 -					++src;
  1.1086 -				case 2:
  1.1087 -					RGB888_RGB332(*dst++, *src);
  1.1088 -					++src;
  1.1089 -				case 1:
  1.1090 -					RGB888_RGB332(*dst++, *src);
  1.1091 -					++src;
  1.1092 -			}
  1.1093 +            for (c = width / 4; c; --c) {
  1.1094 +                /* Pack RGB into 8bit pixel */
  1.1095 +                ++src;
  1.1096 +                RGB888_RGB332 (*dst++, *src);
  1.1097 +                ++src;
  1.1098 +                RGB888_RGB332 (*dst++, *src);
  1.1099 +                ++src;
  1.1100 +                RGB888_RGB332 (*dst++, *src);
  1.1101 +                ++src;
  1.1102 +            }
  1.1103 +            switch (width & 3) {
  1.1104 +            case 3:
  1.1105 +                RGB888_RGB332 (*dst++, *src);
  1.1106 +                ++src;
  1.1107 +            case 2:
  1.1108 +                RGB888_RGB332 (*dst++, *src);
  1.1109 +                ++src;
  1.1110 +            case 1:
  1.1111 +                RGB888_RGB332 (*dst++, *src);
  1.1112 +                ++src;
  1.1113 +            }
  1.1114  #endif /* USE_DUFFS_LOOP */
  1.1115 -			src += srcskip;
  1.1116 -			dst += dstskip;
  1.1117 -		}
  1.1118 -	} else {
  1.1119 -		int Pixel;
  1.1120 +            src += srcskip;
  1.1121 +            dst += dstskip;
  1.1122 +        }
  1.1123 +    } else {
  1.1124 +        int Pixel;
  1.1125  
  1.1126 -		while ( height-- ) {
  1.1127 +        while (height--) {
  1.1128  #ifdef USE_DUFFS_LOOP
  1.1129 +			/* *INDENT-OFF* */
  1.1130  			DUFFS_LOOP(
  1.1131  				RGB888_RGB332(Pixel, *src);
  1.1132  				*dst++ = map[Pixel];
  1.1133  				++src;
  1.1134  			, width);
  1.1135 +			/* *INDENT-ON* */
  1.1136  #else
  1.1137 -			for ( c=width/4; c; --c ) {
  1.1138 -				/* Pack RGB into 8bit pixel */
  1.1139 -				RGB888_RGB332(Pixel, *src);
  1.1140 -				*dst++ = map[Pixel];
  1.1141 -				++src;
  1.1142 -				RGB888_RGB332(Pixel, *src);
  1.1143 -				*dst++ = map[Pixel];
  1.1144 -				++src;
  1.1145 -				RGB888_RGB332(Pixel, *src);
  1.1146 -				*dst++ = map[Pixel];
  1.1147 -				++src;
  1.1148 -				RGB888_RGB332(Pixel, *src);
  1.1149 -				*dst++ = map[Pixel];
  1.1150 -				++src;
  1.1151 -			}
  1.1152 -			switch ( width & 3 ) {
  1.1153 -				case 3:
  1.1154 -					RGB888_RGB332(Pixel, *src);
  1.1155 -					*dst++ = map[Pixel];
  1.1156 -					++src;
  1.1157 -				case 2:
  1.1158 -					RGB888_RGB332(Pixel, *src);
  1.1159 -					*dst++ = map[Pixel];
  1.1160 -					++src;
  1.1161 -				case 1:
  1.1162 -					RGB888_RGB332(Pixel, *src);
  1.1163 -					*dst++ = map[Pixel];
  1.1164 -					++src;
  1.1165 -			}
  1.1166 +            for (c = width / 4; c; --c) {
  1.1167 +                /* Pack RGB into 8bit pixel */
  1.1168 +                RGB888_RGB332 (Pixel, *src);
  1.1169 +                *dst++ = map[Pixel];
  1.1170 +                ++src;
  1.1171 +                RGB888_RGB332 (Pixel, *src);
  1.1172 +                *dst++ = map[Pixel];
  1.1173 +                ++src;
  1.1174 +                RGB888_RGB332 (Pixel, *src);
  1.1175 +                *dst++ = map[Pixel];
  1.1176 +                ++src;
  1.1177 +                RGB888_RGB332 (Pixel, *src);
  1.1178 +                *dst++ = map[Pixel];
  1.1179 +                ++src;
  1.1180 +            }
  1.1181 +            switch (width & 3) {
  1.1182 +            case 3:
  1.1183 +                RGB888_RGB332 (Pixel, *src);
  1.1184 +                *dst++ = map[Pixel];
  1.1185 +                ++src;
  1.1186 +            case 2:
  1.1187 +                RGB888_RGB332 (Pixel, *src);
  1.1188 +                *dst++ = map[Pixel];
  1.1189 +                ++src;
  1.1190 +            case 1:
  1.1191 +                RGB888_RGB332 (Pixel, *src);
  1.1192 +                *dst++ = map[Pixel];
  1.1193 +                ++src;
  1.1194 +            }
  1.1195  #endif /* USE_DUFFS_LOOP */
  1.1196 -			src += srcskip;
  1.1197 -			dst += dstskip;
  1.1198 -		}
  1.1199 -	}
  1.1200 +            src += srcskip;
  1.1201 +            dst += dstskip;
  1.1202 +        }
  1.1203 +    }
  1.1204  }
  1.1205 +
  1.1206  /* Special optimized blit for RGB 8-8-8 --> RGB 5-5-5 */
  1.1207  #define RGB888_RGB555(dst, src) { \
  1.1208  	*(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>9)| \
  1.1209 @@ -981,112 +1019,116 @@
  1.1210  	                     (((src[LO])&0x0000F800)>>6)| \
  1.1211  	                     (((src[LO])&0x000000F8)>>3); \
  1.1212  }
  1.1213 -static void Blit_RGB888_RGB555(SDL_BlitInfo *info)
  1.1214 +static void
  1.1215 +Blit_RGB888_RGB555 (SDL_BlitInfo * info)
  1.1216  {
  1.1217  #ifndef USE_DUFFS_LOOP
  1.1218 -	int c;
  1.1219 +    int c;
  1.1220  #endif
  1.1221 -	int width, height;
  1.1222 -	Uint32 *src;
  1.1223 -	Uint16 *dst;
  1.1224 -	int srcskip, dstskip;
  1.1225 +    int width, height;
  1.1226 +    Uint32 *src;
  1.1227 +    Uint16 *dst;
  1.1228 +    int srcskip, dstskip;
  1.1229  
  1.1230 -	/* Set up some basic variables */
  1.1231 -	width = info->d_width;
  1.1232 -	height = info->d_height;
  1.1233 -	src = (Uint32 *)info->s_pixels;
  1.1234 -	srcskip = info->s_skip/4;
  1.1235 -	dst = (Uint16 *)info->d_pixels;
  1.1236 -	dstskip = info->d_skip/2;
  1.1237 +    /* Set up some basic variables */
  1.1238 +    width = info->d_width;
  1.1239 +    height = info->d_height;
  1.1240 +    src = (Uint32 *) info->s_pixels;
  1.1241 +    srcskip = info->s_skip / 4;
  1.1242 +    dst = (Uint16 *) info->d_pixels;
  1.1243 +    dstskip = info->d_skip / 2;
  1.1244  
  1.1245  #ifdef USE_DUFFS_LOOP
  1.1246 -	while ( height-- ) {
  1.1247 +    while (height--) {
  1.1248 +		/* *INDENT-OFF* */
  1.1249  		DUFFS_LOOP(
  1.1250  			RGB888_RGB555(dst, src);
  1.1251  			++src;
  1.1252  			++dst;
  1.1253  		, width);
  1.1254 -		src += srcskip;
  1.1255 -		dst += dstskip;
  1.1256 -	}
  1.1257 +		/* *INDENT-ON* */
  1.1258 +        src += srcskip;
  1.1259 +        dst += dstskip;
  1.1260 +    }
  1.1261  #else
  1.1262 -	/* Memory align at 4-byte boundary, if necessary */
  1.1263 -	if ( (long)dst & 0x03 ) {
  1.1264 -		/* Don't do anything if width is 0 */
  1.1265 -		if ( width == 0 ) {
  1.1266 -			return;
  1.1267 -		}
  1.1268 -		--width;
  1.1269 +    /* Memory align at 4-byte boundary, if necessary */
  1.1270 +    if ((long) dst & 0x03) {
  1.1271 +        /* Don't do anything if width is 0 */
  1.1272 +        if (width == 0) {
  1.1273 +            return;
  1.1274 +        }
  1.1275 +        --width;
  1.1276  
  1.1277 -		while ( height-- ) {
  1.1278 -			/* Perform copy alignment */
  1.1279 -			RGB888_RGB555(dst, src);
  1.1280 -			++src;
  1.1281 -			++dst;
  1.1282 +        while (height--) {
  1.1283 +            /* Perform copy alignment */
  1.1284 +            RGB888_RGB555 (dst, src);
  1.1285 +            ++src;
  1.1286 +            ++dst;
  1.1287  
  1.1288 -			/* Copy in 4 pixel chunks */
  1.1289 -			for ( c=width/4; c; --c ) {
  1.1290 -				RGB888_RGB555_TWO(dst, src);
  1.1291 -				src += 2;
  1.1292 -				dst += 2;
  1.1293 -				RGB888_RGB555_TWO(dst, src);
  1.1294 -				src += 2;
  1.1295 -				dst += 2;
  1.1296 -			}
  1.1297 -			/* Get any leftovers */
  1.1298 -			switch (width & 3) {
  1.1299 -				case 3:
  1.1300 -					RGB888_RGB555(dst, src);
  1.1301 -					++src;
  1.1302 -					++dst;
  1.1303 -				case 2:
  1.1304 -					RGB888_RGB555_TWO(dst, src);
  1.1305 -					src += 2;
  1.1306 -					dst += 2;
  1.1307 -					break;
  1.1308 -				case 1:
  1.1309 -					RGB888_RGB555(dst, src);
  1.1310 -					++src;
  1.1311 -					++dst;
  1.1312 -					break;
  1.1313 -			}
  1.1314 -			src += srcskip;
  1.1315 -			dst += dstskip;
  1.1316 -		}
  1.1317 -	} else { 
  1.1318 -		while ( height-- ) {
  1.1319 -			/* Copy in 4 pixel chunks */
  1.1320 -			for ( c=width/4; c; --c ) {
  1.1321 -				RGB888_RGB555_TWO(dst, src);
  1.1322 -				src += 2;
  1.1323 -				dst += 2;
  1.1324 -				RGB888_RGB555_TWO(dst, src);
  1.1325 -				src += 2;
  1.1326 -				dst += 2;
  1.1327 -			}
  1.1328 -			/* Get any leftovers */
  1.1329 -			switch (width & 3) {
  1.1330 -				case 3:
  1.1331 -					RGB888_RGB555(dst, src);
  1.1332 -					++src;
  1.1333 -					++dst;
  1.1334 -				case 2:
  1.1335 -					RGB888_RGB555_TWO(dst, src);
  1.1336 -					src += 2;
  1.1337 -					dst += 2;
  1.1338 -					break;
  1.1339 -				case 1:
  1.1340 -					RGB888_RGB555(dst, src);
  1.1341 -					++src;
  1.1342 -					++dst;
  1.1343 -					break;
  1.1344 -			}
  1.1345 -			src += srcskip;
  1.1346 -			dst += dstskip;
  1.1347 -		}
  1.1348 -	}
  1.1349 +            /* Copy in 4 pixel chunks */
  1.1350 +            for (c = width / 4; c; --c) {
  1.1351 +                RGB888_RGB555_TWO (dst, src);
  1.1352 +                src += 2;
  1.1353 +                dst += 2;
  1.1354 +                RGB888_RGB555_TWO (dst, src);
  1.1355 +                src += 2;
  1.1356 +                dst += 2;
  1.1357 +            }
  1.1358 +            /* Get any leftovers */
  1.1359 +            switch (width & 3) {
  1.1360 +            case 3:
  1.1361 +                RGB888_RGB555 (dst, src);
  1.1362 +                ++src;
  1.1363 +                ++dst;
  1.1364 +            case 2:
  1.1365 +                RGB888_RGB555_TWO (dst, src);
  1.1366 +                src += 2;
  1.1367 +                dst += 2;
  1.1368 +                break;
  1.1369 +            case 1:
  1.1370 +                RGB888_RGB555 (dst, src);
  1.1371 +                ++src;
  1.1372 +                ++dst;
  1.1373 +                break;
  1.1374 +            }
  1.1375 +            src += srcskip;
  1.1376 +            dst += dstskip;
  1.1377 +        }
  1.1378 +    } else {
  1.1379 +        while (height--) {
  1.1380 +            /* Copy in 4 pixel chunks */
  1.1381 +            for (c = width / 4; c; --c) {
  1.1382 +                RGB888_RGB555_TWO (dst, src);
  1.1383 +                src += 2;
  1.1384 +                dst += 2;
  1.1385 +                RGB888_RGB555_TWO (dst, src);
  1.1386 +                src += 2;
  1.1387 +                dst += 2;
  1.1388 +            }
  1.1389 +            /* Get any leftovers */
  1.1390 +            switch (width & 3) {
  1.1391 +            case 3:
  1.1392 +                RGB888_RGB555 (dst, src);
  1.1393 +                ++src;
  1.1394 +                ++dst;
  1.1395 +            case 2:
  1.1396 +                RGB888_RGB555_TWO (dst, src);
  1.1397 +                src += 2;
  1.1398 +                dst += 2;
  1.1399 +                break;
  1.1400 +            case 1:
  1.1401 +                RGB888_RGB555 (dst, src);
  1.1402 +                ++src;
  1.1403 +                ++dst;
  1.1404 +                break;
  1.1405 +            }
  1.1406 +            src += srcskip;
  1.1407 +            dst += dstskip;
  1.1408 +        }
  1.1409 +    }
  1.1410  #endif /* USE_DUFFS_LOOP */
  1.1411  }
  1.1412 +
  1.1413  /* Special optimized blit for RGB 8-8-8 --> RGB 5-6-5 */
  1.1414  #define RGB888_RGB565(dst, src) { \
  1.1415  	*(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>8)| \
  1.1416 @@ -1101,110 +1143,113 @@
  1.1417  	                     (((src[LO])&0x0000FC00)>>5)| \
  1.1418  	                     (((src[LO])&0x000000F8)>>3); \
  1.1419  }
  1.1420 -static void Blit_RGB888_RGB565(SDL_BlitInfo *info)
  1.1421 +static void
  1.1422 +Blit_RGB888_RGB565 (SDL_BlitInfo * info)
  1.1423  {
  1.1424  #ifndef USE_DUFFS_LOOP
  1.1425 -	int c;
  1.1426 +    int c;
  1.1427  #endif
  1.1428 -	int width, height;
  1.1429 -	Uint32 *src;
  1.1430 -	Uint16 *dst;
  1.1431 -	int srcskip, dstskip;
  1.1432 +    int width, height;
  1.1433 +    Uint32 *src;
  1.1434 +    Uint16 *dst;
  1.1435 +    int srcskip, dstskip;
  1.1436  
  1.1437 -	/* Set up some basic variables */
  1.1438 -	width = info->d_width;
  1.1439 -	height = info->d_height;
  1.1440 -	src = (Uint32 *)info->s_pixels;
  1.1441 -	srcskip = info->s_skip/4;
  1.1442 -	dst = (Uint16 *)info->d_pixels;
  1.1443 -	dstskip = info->d_skip/2;
  1.1444 +    /* Set up some basic variables */
  1.1445 +    width = info->d_width;
  1.1446 +    height = info->d_height;
  1.1447 +    src = (Uint32 *) info->s_pixels;
  1.1448 +    srcskip = info->s_skip / 4;
  1.1449 +    dst = (Uint16 *) info->d_pixels;
  1.1450 +    dstskip = info->d_skip / 2;
  1.1451  
  1.1452  #ifdef USE_DUFFS_LOOP
  1.1453 -	while ( height-- ) {
  1.1454 +    while (height--) {
  1.1455 +		/* *INDENT-OFF* */
  1.1456  		DUFFS_LOOP(
  1.1457  			RGB888_RGB565(dst, src);
  1.1458  			++src;
  1.1459  			++dst;
  1.1460  		, width);
  1.1461 -		src += srcskip;
  1.1462 -		dst += dstskip;
  1.1463 -	}
  1.1464 +		/* *INDENT-ON* */
  1.1465 +        src += srcskip;
  1.1466 +        dst += dstskip;
  1.1467 +    }
  1.1468  #else
  1.1469 -	/* Memory align at 4-byte boundary, if necessary */
  1.1470 -	if ( (long)dst & 0x03 ) {
  1.1471 -		/* Don't do anything if width is 0 */
  1.1472 -		if ( width == 0 ) {
  1.1473 -			return;
  1.1474 -		}
  1.1475 -		--width;
  1.1476 +    /* Memory align at 4-byte boundary, if necessary */
  1.1477 +    if ((long) dst & 0x03) {
  1.1478 +        /* Don't do anything if width is 0 */
  1.1479 +        if (width == 0) {
  1.1480 +            return;
  1.1481 +        }
  1.1482 +        --width;
  1.1483  
  1.1484 -		while ( height-- ) {
  1.1485 -			/* Perform copy alignment */
  1.1486 -			RGB888_RGB565(dst, src);
  1.1487 -			++src;
  1.1488 -			++dst;
  1.1489 +        while (height--) {
  1.1490 +            /* Perform copy alignment */
  1.1491 +            RGB888_RGB565 (dst, src);
  1.1492 +            ++src;
  1.1493 +            ++dst;
  1.1494  
  1.1495 -			/* Copy in 4 pixel chunks */
  1.1496 -			for ( c=width/4; c; --c ) {
  1.1497 -				RGB888_RGB565_TWO(dst, src);
  1.1498 -				src += 2;
  1.1499 -				dst += 2;
  1.1500 -				RGB888_RGB565_TWO(dst, src);
  1.1501 -				src += 2;
  1.1502 -				dst += 2;
  1.1503 -			}
  1.1504 -			/* Get any leftovers */
  1.1505 -			switch (width & 3) {
  1.1506 -				case 3:
  1.1507 -					RGB888_RGB565(dst, src);
  1.1508 -					++src;
  1.1509 -					++dst;
  1.1510 -				case 2:
  1.1511 -					RGB888_RGB565_TWO(dst, src);
  1.1512 -					src += 2;
  1.1513 -					dst += 2;
  1.1514 -					break;
  1.1515 -				case 1:
  1.1516 -					RGB888_RGB565(dst, src);
  1.1517 -					++src;
  1.1518 -					++dst;
  1.1519 -					break;
  1.1520 -			}
  1.1521 -			src += srcskip;
  1.1522 -			dst += dstskip;
  1.1523 -		}
  1.1524 -	} else { 
  1.1525 -		while ( height-- ) {
  1.1526 -			/* Copy in 4 pixel chunks */
  1.1527 -			for ( c=width/4; c; --c ) {
  1.1528 -				RGB888_RGB565_TWO(dst, src);
  1.1529 -				src += 2;
  1.1530 -				dst += 2;
  1.1531 -				RGB888_RGB565_TWO(dst, src);
  1.1532 -				src += 2;
  1.1533 -				dst += 2;
  1.1534 -			}
  1.1535 -			/* Get any leftovers */
  1.1536 -			switch (width & 3) {
  1.1537 -				case 3:
  1.1538 -					RGB888_RGB565(dst, src);
  1.1539 -					++src;
  1.1540 -					++dst;
  1.1541 -				case 2:
  1.1542 -					RGB888_RGB565_TWO(dst, src);
  1.1543 -					src += 2;
  1.1544 -					dst += 2;
  1.1545 -					break;
  1.1546 -				case 1:
  1.1547 -					RGB888_RGB565(dst, src);
  1.1548 -					++src;
  1.1549 -					++dst;
  1.1550 -					break;
  1.1551 -			}
  1.1552 -			src += srcskip;
  1.1553 -			dst += dstskip;
  1.1554 -		}
  1.1555 -	}
  1.1556 +            /* Copy in 4 pixel chunks */
  1.1557 +            for (c = width / 4; c; --c) {
  1.1558 +                RGB888_RGB565_TWO (dst, src);
  1.1559 +                src += 2;
  1.1560 +                dst += 2;
  1.1561 +                RGB888_RGB565_TWO (dst, src);
  1.1562 +                src += 2;
  1.1563 +                dst += 2;
  1.1564 +            }
  1.1565 +            /* Get any leftovers */
  1.1566 +            switch (width & 3) {
  1.1567 +            case 3:
  1.1568 +                RGB888_RGB565 (dst, src);
  1.1569 +                ++src;
  1.1570 +                ++dst;
  1.1571 +            case 2:
  1.1572 +                RGB888_RGB565_TWO (dst, src);
  1.1573 +                src += 2;
  1.1574 +                dst += 2;
  1.1575 +                break;
  1.1576 +            case 1:
  1.1577 +                RGB888_RGB565 (dst, src);
  1.1578 +                ++src;
  1.1579 +                ++dst;
  1.1580 +                break;
  1.1581 +            }
  1.1582 +            src += srcskip;
  1.1583 +            dst += dstskip;
  1.1584 +        }
  1.1585 +    } else {
  1.1586 +        while (height--) {
  1.1587 +            /* Copy in 4 pixel chunks */
  1.1588 +            for (c = width / 4; c; --c) {
  1.1589 +                RGB888_RGB565_TWO (dst, src);
  1.1590 +                src += 2;
  1.1591 +                dst += 2;
  1.1592 +                RGB888_RGB565_TWO (dst, src);
  1.1593 +                src += 2;
  1.1594 +                dst += 2;
  1.1595 +            }
  1.1596 +            /* Get any leftovers */
  1.1597 +            switch (width & 3) {
  1.1598 +            case 3:
  1.1599 +                RGB888_RGB565 (dst, src);
  1.1600 +                ++src;
  1.1601 +                ++dst;
  1.1602 +            case 2:
  1.1603 +                RGB888_RGB565_TWO (dst, src);
  1.1604 +                src += 2;
  1.1605 +                dst += 2;
  1.1606 +                break;
  1.1607 +            case 1:
  1.1608 +                RGB888_RGB565 (dst, src);
  1.1609 +                ++src;
  1.1610 +                ++dst;
  1.1611 +                break;
  1.1612 +            }
  1.1613 +            src += srcskip;
  1.1614 +            dst += dstskip;
  1.1615 +        }
  1.1616 +    }
  1.1617  #endif /* USE_DUFFS_LOOP */
  1.1618  }
  1.1619  
  1.1620 @@ -1213,609 +1258,616 @@
  1.1621  
  1.1622  /* Special optimized blit for RGB 5-6-5 --> 32-bit RGB surfaces */
  1.1623  #define RGB565_32(dst, src, map) (map[src[LO]*2] + map[src[HI]*2+1])
  1.1624 -static void Blit_RGB565_32(SDL_BlitInfo *info, const Uint32 *map)
  1.1625 +static void
  1.1626 +Blit_RGB565_32 (SDL_BlitInfo * info, const Uint32 * map)
  1.1627  {
  1.1628  #ifndef USE_DUFFS_LOOP
  1.1629 -	int c;
  1.1630 +    int c;
  1.1631  #endif
  1.1632 -	int width, height;
  1.1633 -	Uint8 *src;
  1.1634 -	Uint32 *dst;
  1.1635 -	int srcskip, dstskip;
  1.1636 +    int width, height;
  1.1637 +    Uint8 *src;
  1.1638 +    Uint32 *dst;
  1.1639 +    int srcskip, dstskip;
  1.1640  
  1.1641 -	/* Set up some basic variables */
  1.1642 -	width = info->d_width;
  1.1643 -	height = info->d_height;
  1.1644 -	src = (Uint8 *)info->s_pixels;
  1.1645 -	srcskip = info->s_skip;
  1.1646 -	dst = (Uint32 *)info->d_pixels;
  1.1647 -	dstskip = info->d_skip/4;
  1.1648 +    /* Set up some basic variables */
  1.1649 +    width = info->d_width;
  1.1650 +    height = info->d_height;
  1.1651 +    src = (Uint8 *) info->s_pixels;
  1.1652 +    srcskip = info->s_skip;
  1.1653 +    dst = (Uint32 *) info->d_pixels;
  1.1654 +    dstskip = info->d_skip / 4;
  1.1655  
  1.1656  #ifdef USE_DUFFS_LOOP
  1.1657 -	while ( height-- ) {
  1.1658 +    while (height--) {
  1.1659 +		/* *INDENT-OFF* */
  1.1660  		DUFFS_LOOP(
  1.1661  		{
  1.1662  			*dst++ = RGB565_32(dst, src, map);
  1.1663  			src += 2;
  1.1664  		},
  1.1665  		width);
  1.1666 -		src += srcskip;
  1.1667 -		dst += dstskip;
  1.1668 -	}
  1.1669 +		/* *INDENT-ON* */
  1.1670 +        src += srcskip;
  1.1671 +        dst += dstskip;
  1.1672 +    }
  1.1673  #else
  1.1674 -	while ( height-- ) {
  1.1675 -		/* Copy in 4 pixel chunks */
  1.1676 -		for ( c=width/4; c; --c ) {
  1.1677 -			*dst++ = RGB565_32(dst, src, map);
  1.1678 -			src += 2;
  1.1679 -			*dst++ = RGB565_32(dst, src, map);
  1.1680 -			src += 2;
  1.1681 -			*dst++ = RGB565_32(dst, src, map);
  1.1682 -			src += 2;
  1.1683 -			*dst++ = RGB565_32(dst, src, map);
  1.1684 -			src += 2;
  1.1685 -		}
  1.1686 -		/* Get any leftovers */
  1.1687 -		switch (width & 3) {
  1.1688 -			case 3:
  1.1689 -				*dst++ = RGB565_32(dst, src, map);
  1.1690 -				src += 2;
  1.1691 -			case 2:
  1.1692 -				*dst++ = RGB565_32(dst, src, map);
  1.1693 -				src += 2;
  1.1694 -			case 1:
  1.1695 -				*dst++ = RGB565_32(dst, src, map);
  1.1696 -				src += 2;
  1.1697 -				break;
  1.1698 -		}
  1.1699 -		src += srcskip;
  1.1700 -		dst += dstskip;
  1.1701 -	}
  1.1702 +    while (height--) {
  1.1703 +        /* Copy in 4 pixel chunks */
  1.1704 +        for (c = width / 4; c; --c) {
  1.1705 +            *dst++ = RGB565_32 (dst, src, map);
  1.1706 +            src += 2;
  1.1707 +            *dst++ = RGB565_32 (dst, src, map);
  1.1708 +            src += 2;
  1.1709 +            *dst++ = RGB565_32 (dst, src, map);
  1.1710 +            src += 2;
  1.1711 +            *dst++ = RGB565_32 (dst, src, map);
  1.1712 +            src += 2;
  1.1713 +        }
  1.1714 +        /* Get any leftovers */
  1.1715 +        switch (width & 3) {
  1.1716 +        case 3:
  1.1717 +            *dst++ = RGB565_32 (dst, src, map);
  1.1718 +            src += 2;
  1.1719 +        case 2:
  1.1720 +            *dst++ = RGB565_32 (dst, src, map);
  1.1721 +            src += 2;
  1.1722 +        case 1:
  1.1723 +            *dst++ = RGB565_32 (dst, src, map);
  1.1724 +            src += 2;
  1.1725 +            break;
  1.1726 +        }
  1.1727 +        src += srcskip;
  1.1728 +        dst += dstskip;
  1.1729 +    }
  1.1730  #endif /* USE_DUFFS_LOOP */
  1.1731  }
  1.1732  
  1.1733  /* Special optimized blit for RGB 5-6-5 --> ARGB 8-8-8-8 */
  1.1734  static const Uint32 RGB565_ARGB8888_LUT[512] = {
  1.1735 -		0x00000000, 0xff000000, 0x00000008, 0xff002000,
  1.1736 -		0x00000010, 0xff004000, 0x00000018, 0xff006100,
  1.1737 -		0x00000020, 0xff008100, 0x00000029, 0xff00a100,
  1.1738 -		0x00000031, 0xff00c200, 0x00000039, 0xff00e200,
  1.1739 -		0x00000041, 0xff080000, 0x0000004a, 0xff082000,
  1.1740 -		0x00000052, 0xff084000, 0x0000005a, 0xff086100,
  1.1741 -		0x00000062, 0xff088100, 0x0000006a, 0xff08a100,
  1.1742 -		0x00000073, 0xff08c200, 0x0000007b, 0xff08e200,
  1.1743 -		0x00000083, 0xff100000, 0x0000008b, 0xff102000,
  1.1744 -		0x00000094, 0xff104000, 0x0000009c, 0xff106100,
  1.1745 -		0x000000a4, 0xff108100, 0x000000ac, 0xff10a100,
  1.1746 -		0x000000b4, 0xff10c200, 0x000000bd, 0xff10e200,
  1.1747 -		0x000000c5, 0xff180000, 0x000000cd, 0xff182000,
  1.1748 -		0x000000d5, 0xff184000, 0x000000de, 0xff186100,
  1.1749 -		0x000000e6, 0xff188100, 0x000000ee, 0xff18a100,
  1.1750 -		0x000000f6, 0xff18c200, 0x000000ff, 0xff18e200,
  1.1751 -		0x00000400, 0xff200000, 0x00000408, 0xff202000,
  1.1752 -		0x00000410, 0xff204000, 0x00000418, 0xff206100,
  1.1753 -		0x00000420, 0xff208100, 0x00000429, 0xff20a100,
  1.1754 -		0x00000431, 0xff20c200, 0x00000439, 0xff20e200,
  1.1755 -		0x00000441, 0xff290000, 0x0000044a, 0xff292000,
  1.1756 -		0x00000452, 0xff294000, 0x0000045a, 0xff296100,
  1.1757 -		0x00000462, 0xff298100, 0x0000046a, 0xff29a100,
  1.1758 -		0x00000473, 0xff29c200, 0x0000047b, 0xff29e200,
  1.1759 -		0x00000483, 0xff310000, 0x0000048b, 0xff312000,
  1.1760 -		0x00000494, 0xff314000, 0x0000049c, 0xff316100,
  1.1761 -		0x000004a4, 0xff318100, 0x000004ac, 0xff31a100,
  1.1762 -		0x000004b4, 0xff31c200, 0x000004bd, 0xff31e200,
  1.1763 -		0x000004c5, 0xff390000, 0x000004cd, 0xff392000,
  1.1764 -		0x000004d5, 0xff394000, 0x000004de, 0xff396100,
  1.1765 -		0x000004e6, 0xff398100, 0x000004ee, 0xff39a100,
  1.1766 -		0x000004f6, 0xff39c200, 0x000004ff, 0xff39e200,
  1.1767 -		0x00000800, 0xff410000, 0x00000808, 0xff412000,
  1.1768 -		0x00000810, 0xff414000, 0x00000818, 0xff416100,
  1.1769 -		0x00000820, 0xff418100, 0x00000829, 0xff41a100,
  1.1770 -		0x00000831, 0xff41c200, 0x00000839, 0xff41e200,
  1.1771 -		0x00000841, 0xff4a0000, 0x0000084a, 0xff4a2000,
  1.1772 -		0x00000852, 0xff4a4000, 0x0000085a, 0xff4a6100,
  1.1773 -		0x00000862, 0xff4a8100, 0x0000086a, 0xff4aa100,
  1.1774 -		0x00000873, 0xff4ac200, 0x0000087b, 0xff4ae200,
  1.1775 -		0x00000883, 0xff520000, 0x0000088b, 0xff522000,
  1.1776 -		0x00000894, 0xff524000, 0x0000089c, 0xff526100,
  1.1777 -		0x000008a4, 0xff528100, 0x000008ac, 0xff52a100,
  1.1778 -		0x000008b4, 0xff52c200, 0x000008bd, 0xff52e200,
  1.1779 -		0x000008c5, 0xff5a0000, 0x000008cd, 0xff5a2000,
  1.1780 -		0x000008d5, 0xff5a4000, 0x000008de, 0xff5a6100,
  1.1781 -		0x000008e6, 0xff5a8100, 0x000008ee, 0xff5aa100,
  1.1782 -		0x000008f6, 0xff5ac200, 0x000008ff, 0xff5ae200,
  1.1783 -		0x00000c00, 0xff620000, 0x00000c08, 0xff622000,
  1.1784 -		0x00000c10, 0xff624000, 0x00000c18, 0xff626100,
  1.1785 -		0x00000c20, 0xff628100, 0x00000c29, 0xff62a100,
  1.1786 -		0x00000c31, 0xff62c200, 0x00000c39, 0xff62e200,
  1.1787 -		0x00000c41, 0xff6a0000, 0x00000c4a, 0xff6a2000,
  1.1788 -		0x00000c52, 0xff6a4000, 0x00000c5a, 0xff6a6100,
  1.1789 -		0x00000c62, 0xff6a8100, 0x00000c6a, 0xff6aa100,
  1.1790 -		0x00000c73, 0xff6ac200, 0x00000c7b, 0xff6ae200,
  1.1791 -		0x00000c83, 0xff730000, 0x00000c8b, 0xff732000,
  1.1792 -		0x00000c94, 0xff734000, 0x00000c9c, 0xff736100,
  1.1793 -		0x00000ca4, 0xff738100, 0x00000cac, 0xff73a100,
  1.1794 -		0x00000cb4, 0xff73c200, 0x00000cbd, 0xff73e200,
  1.1795 -		0x00000cc5, 0xff7b0000, 0x00000ccd, 0xff7b2000,
  1.1796 -		0x00000cd5, 0xff7b4000, 0x00000cde, 0xff7b6100,
  1.1797 -		0x00000ce6, 0xff7b8100, 0x00000cee, 0xff7ba100,
  1.1798 -		0x00000cf6, 0xff7bc200, 0x00000cff, 0xff7be200,
  1.1799 -		0x00001000, 0xff830000, 0x00001008, 0xff832000,
  1.1800 -		0x00001010, 0xff834000, 0x00001018, 0xff836100,
  1.1801 -		0x00001020, 0xff838100, 0x00001029, 0xff83a100,
  1.1802 -		0x00001031, 0xff83c200, 0x00001039, 0xff83e200,
  1.1803 -		0x00001041, 0xff8b0000, 0x0000104a, 0xff8b2000,
  1.1804 -		0x00001052, 0xff8b4000, 0x0000105a, 0xff8b6100,
  1.1805 -		0x00001062, 0xff8b8100, 0x0000106a, 0xff8ba100,
  1.1806 -		0x00001073, 0xff8bc200, 0x0000107b, 0xff8be200,
  1.1807 -		0x00001083, 0xff940000, 0x0000108b, 0xff942000,
  1.1808 -		0x00001094, 0xff944000, 0x0000109c, 0xff946100,
  1.1809 -		0x000010a4, 0xff948100, 0x000010ac, 0xff94a100,
  1.1810 -		0x000010b4, 0xff94c200, 0x000010bd, 0xff94e200,
  1.1811 -		0x000010c5, 0xff9c0000, 0x000010cd, 0xff9c2000,
  1.1812 -		0x000010d5, 0xff9c4000, 0x000010de, 0xff9c6100,
  1.1813 -		0x000010e6, 0xff9c8100, 0x000010ee, 0xff9ca100,
  1.1814 -		0x000010f6, 0xff9cc200, 0x000010ff, 0xff9ce200,
  1.1815 -		0x00001400, 0xffa40000, 0x00001408, 0xffa42000,
  1.1816 -		0x00001410, 0xffa44000, 0x00001418, 0xffa46100,
  1.1817 -		0x00001420, 0xffa48100, 0x00001429, 0xffa4a100,
  1.1818 -		0x00001431, 0xffa4c200, 0x00001439, 0xffa4e200,
  1.1819 -		0x00001441, 0xffac0000, 0x0000144a, 0xffac2000,
  1.1820 -		0x00001452, 0xffac4000, 0x0000145a, 0xffac6100,
  1.1821 -		0x00001462, 0xffac8100, 0x0000146a, 0xffaca100,
  1.1822 -		0x00001473, 0xffacc200, 0x0000147b, 0xfface200,
  1.1823 -		0x00001483, 0xffb40000, 0x0000148b, 0xffb42000,
  1.1824 -		0x00001494, 0xffb44000, 0x0000149c, 0xffb46100,
  1.1825 -		0x000014a4, 0xffb48100, 0x000014ac, 0xffb4a100,
  1.1826 -		0x000014b4, 0xffb4c200, 0x000014bd, 0xffb4e200,
  1.1827 -		0x000014c5, 0xffbd0000, 0x000014cd, 0xffbd2000,
  1.1828 -		0x000014d5, 0xffbd4000, 0x000014de, 0xffbd6100,
  1.1829 -		0x000014e6, 0xffbd8100, 0x000014ee, 0xffbda100,
  1.1830 -		0x000014f6, 0xffbdc200, 0x000014ff, 0xffbde200,
  1.1831 -		0x00001800, 0xffc50000, 0x00001808, 0xffc52000,
  1.1832 -		0x00001810, 0xffc54000, 0x00001818, 0xffc56100,
  1.1833 -		0x00001820, 0xffc58100, 0x00001829, 0xffc5a100,
  1.1834 -		0x00001831, 0xffc5c200, 0x00001839, 0xffc5e200,
  1.1835 -		0x00001841, 0xffcd0000, 0x0000184a, 0xffcd2000,
  1.1836 -		0x00001852, 0xffcd4000, 0x0000185a, 0xffcd6100,
  1.1837 -		0x00001862, 0xffcd8100, 0x0000186a, 0xffcda100,
  1.1838 -		0x00001873, 0xffcdc200, 0x0000187b, 0xffcde200,
  1.1839 -		0x00001883, 0xffd50000, 0x0000188b, 0xffd52000,
  1.1840 -		0x00001894, 0xffd54000, 0x0000189c, 0xffd56100,
  1.1841 -		0x000018a4, 0xffd58100, 0x000018ac, 0xffd5a100,
  1.1842 -		0x000018b4, 0xffd5c200, 0x000018bd, 0xffd5e200,
  1.1843 -		0x000018c5, 0xffde0000, 0x000018cd, 0xffde2000,
  1.1844 -		0x000018d5, 0xffde4000, 0x000018de, 0xffde6100,
  1.1845 -		0x000018e6, 0xffde8100, 0x000018ee, 0xffdea100,
  1.1846 -		0x000018f6, 0xffdec200, 0x000018ff, 0xffdee200,
  1.1847 -		0x00001c00, 0xffe60000, 0x00001c08, 0xffe62000,
  1.1848 -		0x00001c10, 0xffe64000, 0x00001c18, 0xffe66100,
  1.1849 -		0x00001c20, 0xffe68100, 0x00001c29, 0xffe6a100,
  1.1850 -		0x00001c31, 0xffe6c200, 0x00001c39, 0xffe6e200,
  1.1851 -		0x00001c41, 0xffee0000, 0x00001c4a, 0xffee2000,
  1.1852 -		0x00001c52, 0xffee4000, 0x00001c5a, 0xffee6100,
  1.1853 -		0x00001c62, 0xffee8100, 0x00001c6a, 0xffeea100,
  1.1854 -		0x00001c73, 0xffeec200, 0x00001c7b, 0xffeee200,
  1.1855 -		0x00001c83, 0xfff60000, 0x00001c8b, 0xfff62000,
  1.1856 -		0x00001c94, 0xfff64000, 0x00001c9c, 0xfff66100,
  1.1857 -		0x00001ca4, 0xfff68100, 0x00001cac, 0xfff6a100,
  1.1858 -		0x00001cb4, 0xfff6c200, 0x00001cbd, 0xfff6e200,
  1.1859 -		0x00001cc5, 0xffff0000, 0x00001ccd, 0xffff2000,
  1.1860 -		0x00001cd5, 0xffff4000, 0x00001cde, 0xffff6100,
  1.1861 -		0x00001ce6, 0xffff8100, 0x00001cee, 0xffffa100,
  1.1862 -		0x00001cf6, 0xffffc200, 0x00001cff, 0xffffe200
  1.1863 +    0x00000000, 0xff000000, 0x00000008, 0xff002000,
  1.1864 +    0x00000010, 0xff004000, 0x00000018, 0xff006100,
  1.1865 +    0x00000020, 0xff008100, 0x00000029, 0xff00a100,
  1.1866 +    0x00000031, 0xff00c200, 0x00000039, 0xff00e200,
  1.1867 +    0x00000041, 0xff080000, 0x0000004a, 0xff082000,
  1.1868 +    0x00000052, 0xff084000, 0x0000005a, 0xff086100,
  1.1869 +    0x00000062, 0xff088100, 0x0000006a, 0xff08a100,
  1.1870 +    0x00000073, 0xff08c200, 0x0000007b, 0xff08e200,
  1.1871 +    0x00000083, 0xff100000, 0x0000008b, 0xff102000,
  1.1872 +    0x00000094, 0xff104000, 0x0000009c, 0xff106100,
  1.1873 +    0x000000a4, 0xff108100, 0x000000ac, 0xff10a100,
  1.1874 +    0x000000b4, 0xff10c200, 0x000000bd, 0xff10e200,
  1.1875 +    0x000000c5, 0xff180000, 0x000000cd, 0xff182000,
  1.1876 +    0x000000d5, 0xff184000, 0x000000de, 0xff186100,
  1.1877 +    0x000000e6, 0xff188100, 0x000000ee, 0xff18a100,
  1.1878 +    0x000000f6, 0xff18c200, 0x000000ff, 0xff18e200,
  1.1879 +    0x00000400, 0xff200000, 0x00000408, 0xff202000,
  1.1880 +    0x00000410, 0xff204000, 0x00000418, 0xff206100,
  1.1881 +    0x00000420, 0xff208100, 0x00000429, 0xff20a100,
  1.1882 +    0x00000431, 0xff20c200, 0x00000439, 0xff20e200,
  1.1883 +    0x00000441, 0xff290000, 0x0000044a, 0xff292000,
  1.1884 +    0x00000452, 0xff294000, 0x0000045a, 0xff296100,
  1.1885 +    0x00000462, 0xff298100, 0x0000046a, 0xff29a100,
  1.1886 +    0x00000473, 0xff29c200, 0x0000047b, 0xff29e200,
  1.1887 +    0x00000483, 0xff310000, 0x0000048b, 0xff312000,
  1.1888 +    0x00000494, 0xff314000, 0x0000049c, 0xff316100,
  1.1889 +    0x000004a4, 0xff318100, 0x000004ac, 0xff31a100,
  1.1890 +    0x000004b4, 0xff31c200, 0x000004bd, 0xff31e200,
  1.1891 +    0x000004c5, 0xff390000, 0x000004cd, 0xff392000,
  1.1892 +    0x000004d5, 0xff394000, 0x000004de, 0xff396100,
  1.1893 +    0x000004e6, 0xff398100, 0x000004ee, 0xff39a100,
  1.1894 +    0x000004f6, 0xff39c200, 0x000004ff, 0xff39e200,
  1.1895 +    0x00000800, 0xff410000, 0x00000808, 0xff412000,
  1.1896 +    0x00000810, 0xff414000, 0x00000818, 0xff416100,
  1.1897 +    0x00000820, 0xff418100, 0x00000829, 0xff41a100,
  1.1898 +    0x00000831, 0xff41c200, 0x00000839, 0xff41e200,
  1.1899 +    0x00000841, 0xff4a0000, 0x0000084a, 0xff4a2000,
  1.1900 +    0x00000852, 0xff4a4000, 0x0000085a, 0xff4a6100,
  1.1901 +    0x00000862, 0xff4a8100, 0x0000086a, 0xff4aa100,
  1.1902 +    0x00000873, 0xff4ac200, 0x0000087b, 0xff4ae200,
  1.1903 +    0x00000883, 0xff520000, 0x0000088b, 0xff522000,
  1.1904 +    0x00000894, 0xff524000, 0x0000089c, 0xff526100,
  1.1905 +    0x000008a4, 0xff528100, 0x000008ac, 0xff52a100,
  1.1906 +    0x000008b4, 0xff52c200, 0x000008bd, 0xff52e200,
  1.1907 +    0x000008c5, 0xff5a0000, 0x000008cd, 0xff5a2000,
  1.1908 +    0x000008d5, 0xff5a4000, 0x000008de, 0xff5a6100,
  1.1909 +    0x000008e6, 0xff5a8100, 0x000008ee, 0xff5aa100,
  1.1910 +    0x000008f6, 0xff5ac200, 0x000008ff, 0xff5ae200,
  1.1911 +    0x00000c00, 0xff620000, 0x00000c08, 0xff622000,
  1.1912 +    0x00000c10, 0xff624000, 0x00000c18, 0xff626100,
  1.1913 +    0x00000c20, 0xff628100, 0x00000c29, 0xff62a100,
  1.1914 +    0x00000c31, 0xff62c200, 0x00000c39, 0xff62e200,
  1.1915 +    0x00000c41, 0xff6a0000, 0x00000c4a, 0xff6a2000,
  1.1916 +    0x00000c52, 0xff6a4000, 0x00000c5a, 0xff6a6100,
  1.1917 +    0x00000c62, 0xff6a8100, 0x00000c6a, 0xff6aa100,
  1.1918 +    0x00000c73, 0xff6ac200, 0x00000c7b, 0xff6ae200,
  1.1919 +    0x00000c83, 0xff730000, 0x00000c8b, 0xff732000,
  1.1920 +    0x00000c94, 0xff734000, 0x00000c9c, 0xff736100,
  1.1921 +    0x00000ca4, 0xff738100, 0x00000cac, 0xff73a100,
  1.1922 +    0x00000cb4, 0xff73c200, 0x00000cbd, 0xff73e200,
  1.1923 +    0x00000cc5, 0xff7b0000, 0x00000ccd, 0xff7b2000,
  1.1924 +    0x00000cd5, 0xff7b4000, 0x00000cde, 0xff7b6100,
  1.1925 +    0x00000ce6, 0xff7b8100, 0x00000cee, 0xff7ba100,
  1.1926 +    0x00000cf6, 0xff7bc200, 0x00000cff, 0xff7be200,
  1.1927 +    0x00001000, 0xff830000, 0x00001008, 0xff832000,
  1.1928 +    0x00001010, 0xff834000, 0x00001018, 0xff836100,
  1.1929 +    0x00001020, 0xff838100, 0x00001029, 0xff83a100,
  1.1930 +    0x00001031, 0xff83c200, 0x00001039, 0xff83e200,
  1.1931 +    0x00001041, 0xff8b0000, 0x0000104a, 0xff8b2000,
  1.1932 +    0x00001052, 0xff8b4000, 0x0000105a, 0xff8b6100,
  1.1933 +    0x00001062, 0xff8b8100, 0x0000106a, 0xff8ba100,
  1.1934 +    0x00001073, 0xff8bc200, 0x0000107b, 0xff8be200,
  1.1935 +    0x00001083, 0xff940000, 0x0000108b, 0xff942000,
  1.1936 +    0x00001094, 0xff944000, 0x0000109c, 0xff946100,
  1.1937 +    0x000010a4, 0xff948100, 0x000010ac, 0xff94a100,
  1.1938 +    0x000010b4, 0xff94c200, 0x000010bd, 0xff94e200,
  1.1939 +    0x000010c5, 0xff9c0000, 0x000010cd, 0xff9c2000,
  1.1940 +    0x000010d5, 0xff9c4000, 0x000010de, 0xff9c6100,
  1.1941 +    0x000010e6, 0xff9c8100, 0x000010ee, 0xff9ca100,
  1.1942 +    0x000010f6, 0xff9cc200, 0x000010ff, 0xff9ce200,
  1.1943 +    0x00001400, 0xffa40000, 0x00001408, 0xffa42000,
  1.1944 +    0x00001410, 0xffa44000, 0x00001418, 0xffa46100,
  1.1945 +    0x00001420, 0xffa48100, 0x00001429, 0xffa4a100,
  1.1946 +    0x00001431, 0xffa4c200, 0x00001439, 0xffa4e200,
  1.1947 +    0x00001441, 0xffac0000, 0x0000144a, 0xffac2000,
  1.1948 +    0x00001452, 0xffac4000, 0x0000145a, 0xffac6100,
  1.1949 +    0x00001462, 0xffac8100, 0x0000146a, 0xffaca100,
  1.1950 +    0x00001473, 0xffacc200, 0x0000147b, 0xfface200,
  1.1951 +    0x00001483, 0xffb40000, 0x0000148b, 0xffb42000,
  1.1952 +    0x00001494, 0xffb44000, 0x0000149c, 0xffb46100,
  1.1953 +    0x000014a4, 0xffb48100, 0x000014ac, 0xffb4a100,
  1.1954 +    0x000014b4, 0xffb4c200, 0x000014bd, 0xffb4e200,
  1.1955 +    0x000014c5, 0xffbd0000, 0x000014cd, 0xffbd2000,
  1.1956 +    0x000014d5, 0xffbd4000, 0x000014de, 0xffbd6100,
  1.1957 +    0x000014e6, 0xffbd8100, 0x000014ee, 0xffbda100,
  1.1958 +    0x000014f6, 0xffbdc200, 0x000014ff, 0xffbde200,
  1.1959 +    0x00001800, 0xffc50000, 0x00001808, 0xffc52000,
  1.1960 +    0x00001810, 0xffc54000, 0x00001818, 0xffc56100,
  1.1961 +    0x00001820, 0xffc58100, 0x00001829, 0xffc5a100,
  1.1962 +    0x00001831, 0xffc5c200, 0x00001839, 0xffc5e200,
  1.1963 +    0x00001841, 0xffcd0000, 0x0000184a, 0xffcd2000,
  1.1964 +    0x00001852, 0xffcd4000, 0x0000185a, 0xffcd6100,
  1.1965 +    0x00001862, 0xffcd8100, 0x0000186a, 0xffcda100,
  1.1966 +    0x00001873, 0xffcdc200, 0x0000187b, 0xffcde200,
  1.1967 +    0x00001883, 0xffd50000, 0x0000188b, 0xffd52000,
  1.1968 +    0x00001894, 0xffd54000, 0x0000189c, 0xffd56100,
  1.1969 +    0x000018a4, 0xffd58100, 0x000018ac, 0xffd5a100,
  1.1970 +    0x000018b4, 0xffd5c200, 0x000018bd, 0xffd5e200,
  1.1971 +    0x000018c5, 0xffde0000, 0x000018cd, 0xffde2000,
  1.1972 +    0x000018d5, 0xffde4000, 0x000018de, 0xffde6100,
  1.1973 +    0x000018e6, 0xffde8100, 0x000018ee, 0xffdea100,
  1.1974 +    0x000018f6, 0xffdec200, 0x000018ff, 0xffdee200,
  1.1975 +    0x00001c00, 0xffe60000, 0x00001c08, 0xffe62000,
  1.1976 +    0x00001c10, 0xffe64000, 0x00001c18, 0xffe66100,
  1.1977 +    0x00001c20, 0xffe68100, 0x00001c29, 0xffe6a100,
  1.1978 +    0x00001c31, 0xffe6c200, 0x00001c39, 0xffe6e200,
  1.1979 +    0x00001c41, 0xffee0000, 0x00001c4a, 0xffee2000,
  1.1980 +    0x00001c52, 0xffee4000, 0x00001c5a, 0xffee6100,
  1.1981 +    0x00001c62, 0xffee8100, 0x00001c6a, 0xffeea100,
  1.1982 +    0x00001c73, 0xffeec200, 0x00001c7b, 0xffeee200,
  1.1983 +    0x00001c83, 0xfff60000, 0x00001c8b, 0xfff62000,
  1.1984 +    0x00001c94, 0xfff64000, 0x00001c9c, 0xfff66100,
  1.1985 +    0x00001ca4, 0xfff68100, 0x00001cac, 0xfff6a100,
  1.1986 +    0x00001cb4, 0xfff6c200, 0x00001cbd, 0xfff6e200,
  1.1987 +    0x00001cc5, 0xffff0000, 0x00001ccd, 0xffff2000,
  1.1988 +    0x00001cd5, 0xffff4000, 0x00001cde, 0xffff6100,
  1.1989 +    0x00001ce6, 0xffff8100, 0x00001cee, 0xffffa100,
  1.1990 +    0x00001cf6, 0xffffc200, 0x00001cff, 0xffffe200
  1.1991  };
  1.1992 -static void Blit_RGB565_ARGB8888(SDL_BlitInfo *info)
  1.1993 +static void
  1.1994 +Blit_RGB565_ARGB8888 (SDL_BlitInfo * info)
  1.1995  {
  1.1996 -    Blit_RGB565_32(info, RGB565_ARGB8888_LUT);
  1.1997 +    Blit_RGB565_32 (info, RGB565_ARGB8888_LUT);
  1.1998  }
  1.1999  
  1.2000  /* Special optimized blit for RGB 5-6-5 --> ABGR 8-8-8-8 */
  1.2001  static const Uint32 RGB565_ABGR8888_LUT[512] = {
  1.2002 -		0xff000000, 0x00000000, 0xff080000, 0x00002000,
  1.2003 -		0xff100000, 0x00004000, 0xff180000, 0x00006100,
  1.2004 -		0xff200000, 0x00008100, 0xff290000, 0x0000a100,
  1.2005 -		0xff310000, 0x0000c200, 0xff390000, 0x0000e200,
  1.2006 -		0xff410000, 0x00000008, 0xff4a0000, 0x00002008,
  1.2007 -		0xff520000, 0x00004008, 0xff5a0000, 0x00006108,
  1.2008 -		0xff620000, 0x00008108, 0xff6a0000, 0x0000a108,
  1.2009 -		0xff730000, 0x0000c208, 0xff7b0000, 0x0000e208,
  1.2010 -		0xff830000, 0x00000010, 0xff8b0000, 0x00002010,
  1.2011 -		0xff940000, 0x00004010, 0xff9c0000, 0x00006110,
  1.2012 -		0xffa40000, 0x00008110, 0xffac0000, 0x0000a110,
  1.2013 -		0xffb40000, 0x0000c210, 0xffbd0000, 0x0000e210,
  1.2014 -		0xffc50000, 0x00000018, 0xffcd0000, 0x00002018,
  1.2015 -		0xffd50000, 0x00004018, 0xffde0000, 0x00006118,
  1.2016 -		0xffe60000, 0x00008118, 0xffee0000, 0x0000a118,
  1.2017 -		0xfff60000, 0x0000c218, 0xffff0000, 0x0000e218,
  1.2018 -		0xff000400, 0x00000020, 0xff080400, 0x00002020,
  1.2019 -		0xff100400, 0x00004020, 0xff180400, 0x00006120,
  1.2020 -		0xff200400, 0x00008120, 0xff290400, 0x0000a120,
  1.2021 -		0xff310400, 0x0000c220, 0xff390400, 0x0000e220,
  1.2022 -		0xff410400, 0x00000029, 0xff4a0400, 0x00002029,
  1.2023 -		0xff520400, 0x00004029, 0xff5a0400, 0x00006129,
  1.2024 -		0xff620400, 0x00008129, 0xff6a0400, 0x0000a129,
  1.2025 -		0xff730400, 0x0000c229, 0xff7b0400, 0x0000e229,
  1.2026 -		0xff830400, 0x00000031, 0xff8b0400, 0x00002031,
  1.2027 -		0xff940400, 0x00004031, 0xff9c0400, 0x00006131,
  1.2028 -		0xffa40400, 0x00008131, 0xffac0400, 0x0000a131,
  1.2029 -		0xffb40400, 0x0000c231, 0xffbd0400, 0x0000e231,
  1.2030 -		0xffc50400, 0x00000039, 0xffcd0400, 0x00002039,
  1.2031 -		0xffd50400, 0x00004039, 0xffde0400, 0x00006139,
  1.2032 -		0xffe60400, 0x00008139, 0xffee0400, 0x0000a139,
  1.2033 -		0xfff60400, 0x0000c239, 0xffff0400, 0x0000e239,
  1.2034 -		0xff000800, 0x00000041, 0xff080800, 0x00002041,
  1.2035 -		0xff100800, 0x00004041, 0xff180800, 0x00006141,
  1.2036 -		0xff200800, 0x00008141, 0xff290800, 0x0000a141,
  1.2037 -		0xff310800, 0x0000c241, 0xff390800, 0x0000e241,
  1.2038 -		0xff410800, 0x0000004a, 0xff4a0800, 0x0000204a,
  1.2039 -		0xff520800, 0x0000404a, 0xff5a0800, 0x0000614a,
  1.2040 -		0xff620800, 0x0000814a, 0xff6a0800, 0x0000a14a,
  1.2041 -		0xff730800, 0x0000c24a, 0xff7b0800, 0x0000e24a,
  1.2042 -		0xff830800, 0x00000052, 0xff8b0800, 0x00002052,
  1.2043 -		0xff940800, 0x00004052, 0xff9c0800, 0x00006152,
  1.2044 -		0xffa40800, 0x00008152, 0xffac0800, 0x0000a152,
  1.2045 -		0xffb40800, 0x0000c252, 0xffbd0800, 0x0000e252,
  1.2046 -		0xffc50800, 0x0000005a, 0xffcd0800, 0x0000205a,
  1.2047 -		0xffd50800, 0x0000405a, 0xffde0800, 0x0000615a,
  1.2048 -		0xffe60800, 0x0000815a, 0xffee0800, 0x0000a15a,
  1.2049 -		0xfff60800, 0x0000c25a, 0xffff0800, 0x0000e25a,
  1.2050 -		0xff000c00, 0x00000062, 0xff080c00, 0x00002062,
  1.2051 -		0xff100c00, 0x00004062, 0xff180c00, 0x00006162,
  1.2052 -		0xff200c00, 0x00008162, 0xff290c00, 0x0000a162,
  1.2053 -		0xff310c00, 0x0000c262, 0xff390c00, 0x0000e262,
  1.2054 -		0xff410c00, 0x0000006a, 0xff4a0c00, 0x0000206a,
  1.2055 -		0xff520c00, 0x0000406a, 0xff5a0c00, 0x0000616a,
  1.2056 -		0xff620c00, 0x0000816a, 0xff6a0c00, 0x0000a16a,
  1.2057 -		0xff730c00, 0x0000c26a, 0xff7b0c00, 0x0000e26a,
  1.2058 -		0xff830c00, 0x00000073, 0xff8b0c00, 0x00002073,
  1.2059 -		0xff940c00, 0x00004073, 0xff9c0c00, 0x00006173,
  1.2060 -		0xffa40c00, 0x00008173, 0xffac0c00, 0x0000a173,
  1.2061 -		0xffb40c00, 0x0000c273, 0xffbd0c00, 0x0000e273,
  1.2062 -		0xffc50c00, 0x0000007b, 0xffcd0c00, 0x0000207b,
  1.2063 -		0xffd50c00, 0x0000407b, 0xffde0c00, 0x0000617b,
  1.2064 -		0xffe60c00, 0x0000817b, 0xffee0c00, 0x0000a17b,
  1.2065 -		0xfff60c00, 0x0000c27b, 0xffff0c00, 0x0000e27b,
  1.2066 -		0xff001000, 0x00000083, 0xff081000, 0x00002083,
  1.2067 -		0xff101000, 0x00004083, 0xff181000, 0x00006183,
  1.2068 -		0xff201000, 0x00008183, 0xff291000, 0x0000a183,
  1.2069 -		0xff311000, 0x0000c283, 0xff391000, 0x0000e283,
  1.2070 -		0xff411000, 0x0000008b, 0xff4a1000, 0x0000208b,
  1.2071 -		0xff521000, 0x0000408b, 0xff5a1000, 0x0000618b,
  1.2072 -		0xff621000, 0x0000818b, 0xff6a1000, 0x0000a18b,
  1.2073 -		0xff731000, 0x0000c28b, 0xff7b1000, 0x0000e28b,
  1.2074 -		0xff831000, 0x00000094, 0xff8b1000, 0x00002094,
  1.2075 -		0xff941000, 0x00004094, 0xff9c1000, 0x00006194,
  1.2076 -		0xffa41000, 0x00008194, 0xffac1000, 0x0000a194,
  1.2077 -		0xffb41000, 0x0000c294, 0xffbd1000, 0x0000e294,
  1.2078 -		0xffc51000, 0x0000009c, 0xffcd1000, 0x0000209c,
  1.2079 -		0xffd51000, 0x0000409c, 0xffde1000, 0x0000619c,
  1.2080 -		0xffe61000, 0x0000819c, 0xffee1000, 0x0000a19c,
  1.2081 -		0xfff61000, 0x0000c29c, 0xffff1000, 0x0000e29c,
  1.2082 -		0xff001400, 0x000000a4, 0xff081400, 0x000020a4,
  1.2083 -		0xff101400, 0x000040a4, 0xff181400, 0x000061a4,
  1.2084 -		0xff201400, 0x000081a4, 0xff291400, 0x0000a1a4,
  1.2085 -		0xff311400, 0x0000c2a4, 0xff391400, 0x0000e2a4,
  1.2086 -		0xff411400, 0x000000ac, 0xff4a1400, 0x000020ac,
  1.2087 -		0xff521400, 0x000040ac, 0xff5a1400, 0x000061ac,
  1.2088 -		0xff621400, 0x000081ac, 0xff6a1400, 0x0000a1ac,
  1.2089 -		0xff731400, 0x0000c2ac, 0xff7b1400, 0x0000e2ac,
  1.2090 -		0xff831400, 0x000000b4, 0xff8b1400, 0x000020b4,
  1.2091 -		0xff941400, 0x000040b4, 0xff9c1400, 0x000061b4,
  1.2092 -		0xffa41400, 0x000081b4, 0xffac1400, 0x0000a1b4,
  1.2093 -		0xffb41400, 0x0000c2b4, 0xffbd1400, 0x0000e2b4,
  1.2094 -		0xffc51400, 0x000000bd, 0xffcd1400, 0x000020bd,
  1.2095 -		0xffd51400, 0x000040bd, 0xffde1400, 0x000061bd,
  1.2096 -		0xffe61400, 0x000081bd, 0xffee1400, 0x0000a1bd,
  1.2097 -		0xfff61400, 0x0000c2bd, 0xffff1400, 0x0000e2bd,
  1.2098 -		0xff001800, 0x000000c5, 0xff081800, 0x000020c5,
  1.2099 -		0xff101800, 0x000040c5, 0xff181800, 0x000061c5,
  1.2100 -		0xff201800, 0x000081c5, 0xff291800, 0x0000a1c5,
  1.2101 -		0xff311800, 0x0000c2c5, 0xff391800, 0x0000e2c5,
  1.2102 -		0xff411800, 0x000000cd, 0xff4a1800, 0x000020cd,
  1.2103 -		0xff521800, 0x000040cd, 0xff5a1800, 0x000061cd,
  1.2104 -		0xff621800, 0x000081cd, 0xff6a1800, 0x0000a1cd,
  1.2105 -		0xff731800, 0x0000c2cd, 0xff7b1800, 0x0000e2cd,
  1.2106 -		0xff831800, 0x000000d5, 0xff8b1800, 0x000020d5,
  1.2107 -		0xff941800, 0x000040d5, 0xff9c1800, 0x000061d5,
  1.2108 -		0xffa41800, 0x000081d5, 0xffac1800, 0x0000a1d5,
  1.2109 -		0xffb41800, 0x0000c2d5, 0xffbd1800, 0x0000e2d5,
  1.2110 -		0xffc51800, 0x000000de, 0xffcd1800, 0x000020de,
  1.2111 -		0xffd51800, 0x000040de, 0xffde1800, 0x000061de,
  1.2112 -		0xffe61800, 0x000081de, 0xffee1800, 0x0000a1de,
  1.2113 -		0xfff61800, 0x0000c2de, 0xffff1800, 0x0000e2de,
  1.2114 -		0xff001c00, 0x000000e6, 0xff081c00, 0x000020e6,
  1.2115 -		0xff101c00, 0x000040e6, 0xff181c00, 0x000061e6,
  1.2116 -		0xff201c00, 0x000081e6, 0xff291c00, 0x0000a1e6,
  1.2117 -		0xff311c00, 0x0000c2e6, 0xff391c00, 0x0000e2e6,
  1.2118 -		0xff411c00, 0x000000ee, 0xff4a1c00, 0x000020ee,
  1.2119 -		0xff521c00, 0x000040ee, 0xff5a1c00, 0x000061ee,
  1.2120 -		0xff621c00, 0x000081ee, 0xff6a1c00, 0x0000a1ee,
  1.2121 -		0xff731c00, 0x0000c2ee, 0xff7b1c00, 0x0000e2ee,
  1.2122 -		0xff831c00, 0x000000f6, 0xff8b1c00, 0x000020f6,
  1.2123 -		0xff941c00, 0x000040f6, 0xff9c1c00, 0x000061f6,
  1.2124 -		0xffa41c00, 0x000081f6, 0xffac1c00, 0x0000a1f6,
  1.2125 -		0xffb41c00, 0x0000c2f6, 0xffbd1c00, 0x0000e2f6,
  1.2126 -		0xffc51c00, 0x000000ff, 0xffcd1c00, 0x000020ff,
  1.2127 -		0xffd51c00, 0x000040ff, 0xffde1c00, 0x000061ff,
  1.2128 -		0xffe61c00, 0x000081ff, 0xffee1c00, 0x0000a1ff,
  1.2129 -		0xfff61c00, 0x0000c2ff, 0xffff1c00, 0x0000e2ff
  1.2130 +    0xff000000, 0x00000000, 0xff080000, 0x00002000,
  1.2131 +    0xff100000, 0x00004000, 0xff180000, 0x00006100,
  1.2132 +    0xff200000, 0x00008100, 0xff290000, 0x0000a100,
  1.2133 +    0xff310000, 0x0000c200, 0xff390000, 0x0000e200,
  1.2134 +    0xff410000, 0x00000008, 0xff4a0000, 0x00002008,
  1.2135 +    0xff520000, 0x00004008, 0xff5a0000, 0x00006108,
  1.2136 +    0xff620000, 0x00008108, 0xff6a0000, 0x0000a108,
  1.2137 +    0xff730000, 0x0000c208, 0xff7b0000, 0x0000e208,
  1.2138 +    0xff830000, 0x00000010, 0xff8b0000, 0x00002010,
  1.2139 +    0xff940000, 0x00004010, 0xff9c0000, 0x00006110,
  1.2140 +    0xffa40000, 0x00008110, 0xffac0000, 0x0000a110,
  1.2141 +    0xffb40000, 0x0000c210, 0xffbd0000, 0x0000e210,
  1.2142 +    0xffc50000, 0x00000018, 0xffcd0000, 0x00002018,
  1.2143 +    0xffd50000, 0x00004018, 0xffde0000, 0x00006118,
  1.2144 +    0xffe60000, 0x00008118, 0xffee0000, 0x0000a118,
  1.2145 +    0xfff60000, 0x0000c218, 0xffff0000, 0x0000e218,
  1.2146 +    0xff000400, 0x00000020, 0xff080400, 0x00002020,
  1.2147 +    0xff100400, 0x00004020, 0xff180400, 0x00006120,
  1.2148 +    0xff200400, 0x00008120, 0xff290400, 0x0000a120,
  1.2149 +    0xff310400, 0x0000c220, 0xff390400, 0x0000e220,
  1.2150 +    0xff410400, 0x00000029, 0xff4a0400, 0x00002029,
  1.2151 +    0xff520400, 0x00004029, 0xff5a0400, 0x00006129,
  1.2152 +    0xff620400, 0x00008129, 0xff6a0400, 0x0000a129,
  1.2153 +    0xff730400, 0x0000c229, 0xff7b0400, 0x0000e229,
  1.2154 +    0xff830400, 0x00000031, 0xff8b0400, 0x00002031,
  1.2155 +    0xff940400, 0x00004031, 0xff9c0400, 0x00006131,
  1.2156 +    0xffa40400, 0x00008131, 0xffac0400, 0x0000a131,
  1.2157 +    0xffb40400, 0x0000c231, 0xffbd0400, 0x0000e231,
  1.2158 +    0xffc50400, 0x00000039, 0xffcd0400, 0x00002039,
  1.2159 +    0xffd50400, 0x00004039, 0xffde0400, 0x00006139,
  1.2160 +    0xffe60400, 0x00008139, 0xffee0400, 0x0000a139,
  1.2161 +    0xfff60400, 0x0000c239, 0xffff0400, 0x0000e239,
  1.2162 +    0xff000800, 0x00000041, 0xff080800, 0x00002041,
  1.2163 +    0xff100800, 0x00004041, 0xff180800, 0x00006141,
  1.2164 +    0xff200800, 0x00008141, 0xff290800, 0x0000a141,
  1.2165 +    0xff310800, 0x0000c241, 0xff390800, 0x0000e241,
  1.2166 +    0xff410800, 0x0000004a, 0xff4a0800, 0x0000204a,
  1.2167 +    0xff520800, 0x0000404a, 0xff5a0800, 0x0000614a,
  1.2168 +    0xff620800, 0x0000814a, 0xff6a0800, 0x0000a14a,
  1.2169 +    0xff730800, 0x0000c24a, 0xff7b0800, 0x0000e24a,
  1.2170 +    0xff830800, 0x00000052, 0xff8b0800, 0x00002052,
  1.2171 +    0xff940800, 0x00004052, 0xff9c0800, 0x00006152,
  1.2172 +    0xffa40800, 0x00008152, 0xffac0800, 0x0000a152,
  1.2173 +    0xffb40800, 0x0000c252, 0xffbd0800, 0x0000e252,
  1.2174 +    0xffc50800, 0x0000005a, 0xffcd0800, 0x0000205a,
  1.2175 +    0xffd50800, 0x0000405a, 0xffde0800, 0x0000615a,
  1.2176 +    0xffe60800, 0x0000815a, 0xffee0800, 0x0000a15a,
  1.2177 +    0xfff60800, 0x0000c25a, 0xffff0800, 0x0000e25a,
  1.2178 +    0xff000c00, 0x00000062, 0xff080c00, 0x00002062,
  1.2179 +    0xff100c00, 0x00004062, 0xff180c00, 0x00006162,
  1.2180 +    0xff200c00, 0x00008162, 0xff290c00, 0x0000a162,
  1.2181 +    0xff310c00, 0x0000c262, 0xff390c00, 0x0000e262,
  1.2182 +    0xff410c00, 0x0000006a, 0xff4a0c00, 0x0000206a,
  1.2183 +    0xff520c00, 0x0000406a, 0xff5a0c00, 0x0000616a,
  1.2184 +    0xff620c00, 0x0000816a, 0xff6a0c00, 0x0000a16a,
  1.2185 +    0xff730c00, 0x0000c26a, 0xff7b0c00, 0x0000e26a,
  1.2186 +    0xff830c00, 0x00000073, 0xff8b0c00, 0x00002073,
  1.2187 +    0xff940c00, 0x00004073, 0xff9c0c00, 0x00006173,
  1.2188 +    0xffa40c00, 0x00008173, 0xffac0c00, 0x0000a173,
  1.2189 +    0xffb40c00, 0x0000c273, 0xffbd0c00, 0x0000e273,
  1.2190 +    0xffc50c00, 0x0000007b, 0xffcd0c00, 0x0000207b,
  1.2191 +    0xffd50c00, 0x0000407b, 0xffde0c00, 0x0000617b,
  1.2192 +    0xffe60c00, 0x0000817b, 0xffee0c00, 0x0000a17b,
  1.2193 +    0xfff60c00, 0x0000c27b, 0xffff0c00, 0x0000e27b,
  1.2194 +    0xff001000, 0x00000083, 0xff081000, 0x00002083,
  1.2195 +    0xff101000, 0x00004083, 0xff181000, 0x00006183,
  1.2196 +    0xff201000, 0x00008183, 0xff291000, 0x0000a183,
  1.2197 +    0xff311000, 0x0000c283, 0xff391000, 0x0000e283,
  1.2198 +    0xff411000, 0x0000008b, 0xff4a1000, 0x0000208b,
  1.2199 +    0xff521000, 0x0000408b, 0xff5a1000, 0x0000618b,
  1.2200 +    0xff621000, 0x0000818b, 0xff6a1000, 0x0000a18b,
  1.2201 +    0xff731000, 0x0000c28b, 0xff7b1000, 0x0000e28b,
  1.2202 +    0xff831000, 0x00000094, 0xff8b1000, 0x00002094,
  1.2203 +    0xff941000, 0x00004094, 0xff9c1000, 0x00006194,
  1.2204 +    0xffa41000, 0x00008194, 0xffac1000, 0x0000a194,
  1.2205 +    0xffb41000, 0x0000c294, 0xffbd1000, 0x0000e294,
  1.2206 +    0xffc51000, 0x0000009c, 0xffcd1000, 0x0000209c,
  1.2207 +    0xffd51000, 0x0000409c, 0xffde1000, 0x0000619c,
  1.2208 +    0xffe61000, 0x0000819c, 0xffee1000, 0x0000a19c,
  1.2209 +    0xfff61000, 0x0000c29c, 0xffff1000, 0x0000e29c,
  1.2210 +    0xff001400, 0x000000a4, 0xff081400, 0x000020a4,
  1.2211 +    0xff101400, 0x000040a4, 0xff181400, 0x000061a4,
  1.2212 +    0xff201400, 0x000081a4, 0xff291400, 0x0000a1a4,
  1.2213 +    0xff311400, 0x0000c2a4, 0xff391400, 0x0000e2a4,
  1.2214 +    0xff411400, 0x000000ac, 0xff4a1400, 0x000020ac,
  1.2215 +    0xff521400, 0x000040ac, 0xff5a1400, 0x000061ac,
  1.2216 +    0xff621400, 0x000081ac, 0xff6a1400, 0x0000a1ac,
  1.2217 +    0xff731400, 0x0000c2ac, 0xff7b1400, 0x0000e2ac,
  1.2218 +    0xff831400, 0x000000b4, 0xff8b1400, 0x000020b4,
  1.2219 +    0xff941400, 0x000040b4, 0xff9c1400, 0x000061b4,
  1.2220 +    0xffa41400, 0x000081b4, 0xffac1400, 0x0000a1b4,
  1.2221 +    0xffb41400, 0x0000c2b4, 0xffbd1400, 0x0000e2b4,
  1.2222 +    0xffc51400, 0x000000bd, 0xffcd1400, 0x000020bd,
  1.2223 +    0xffd51400, 0x000040bd, 0xffde1400, 0x000061bd,
  1.2224 +    0xffe61400, 0x000081bd, 0xffee1400, 0x0000a1bd,
  1.2225 +    0xfff61400, 0x0000c2bd, 0xffff1400, 0x0000e2bd,
  1.2226 +    0xff001800, 0x000000c5, 0xff081800, 0x000020c5,
  1.2227 +    0xff101800, 0x000040c5, 0xff181800, 0x000061c5,
  1.2228 +    0xff201800, 0x000081c5, 0xff291800, 0x0000a1c5,
  1.2229 +    0xff311800, 0x0000c2c5, 0xff391800, 0x0000e2c5,
  1.2230 +    0xff411800, 0x000000cd, 0xff4a1800, 0x000020cd,
  1.2231 +    0xff521800, 0x000040cd, 0xff5a1800, 0x000061cd,
  1.2232 +    0xff621800, 0x000081cd, 0xff6a1800, 0x0000a1cd,
  1.2233 +    0xff731800, 0x0000c2cd, 0xff7b1800, 0x0000e2cd,
  1.2234 +    0xff831800, 0x000000d5, 0xff8b1800, 0x000020d5,
  1.2235 +    0xff941800, 0x000040d5, 0xff9c1800, 0x000061d5,
  1.2236 +    0xffa41800, 0x000081d5, 0xffac1800, 0x0000a1d5,
  1.2237 +    0xffb41800, 0x0000c2d5, 0xffbd1800, 0x0000e2d5,
  1.2238 +    0xffc51800, 0x000000de, 0xffcd1800, 0x000020de,
  1.2239 +    0xffd51800, 0x000040de, 0xffde1800, 0x000061de,
  1.2240 +    0xffe61800, 0x000081de, 0xffee1800, 0x0000a1de,
  1.2241 +    0xfff61800, 0x0000c2de, 0xffff1800, 0x0000e2de,
  1.2242 +    0xff001c00, 0x000000e6, 0xff081c00, 0x000020e6,
  1.2243 +    0xff101c00, 0x000040e6, 0xff181c00, 0x000061e6,
  1.2244 +    0xff201c00, 0x000081e6, 0xff291c00, 0x0000a1e6,
  1.2245 +    0xff311c00, 0x0000c2e6, 0xff391c00, 0x0000e2e6,
  1.2246 +    0xff411c00, 0x000000ee, 0xff4a1c00, 0x000020ee,
  1.2247 +    0xff521c00, 0x000040ee, 0xff5a1c00, 0x000061ee,
  1.2248 +    0xff621c00, 0x000081ee, 0xff6a1c00, 0x0000a1ee,
  1.2249 +    0xff731c00, 0x0000c2ee, 0xff7b1c00, 0x0000e2ee,
  1.2250 +    0xff831c00, 0x000000f6, 0xff8b1c00, 0x000020f6,
  1.2251 +    0xff941c00, 0x000040f6, 0xff9c1c00, 0x000061f6,
  1.2252 +    0xffa41c00, 0x000081f6, 0xffac1c00, 0x0000a1f6,
  1.2253 +    0xffb41c00, 0x0000c2f6, 0xffbd1c00, 0x0000e2f6,
  1.2254 +    0xffc51c00, 0x000000ff, 0xffcd1c00, 0x000020ff,
  1.2255 +    0xffd51c00, 0x000040ff, 0xffde1c00, 0x000061ff,
  1.2256 +    0xffe61c00, 0x000081ff, 0xffee1c00, 0x0000a1ff,
  1.2257 +    0xfff61c00, 0x0000c2ff, 0xffff1c00, 0x0000e2ff
  1.2258  };
  1.2259 -static void Blit_RGB565_ABGR8888(SDL_BlitInfo *info)
  1.2260 +static void
  1.2261 +Blit_RGB565_ABGR8888 (SDL_BlitInfo * info)
  1.2262  {
  1.2263 -    Blit_RGB565_32(info, RGB565_ABGR8888_LUT);
  1.2264 +    Blit_RGB565_32 (info, RGB565_ABGR8888_LUT);
  1.2265  }
  1.2266  
  1.2267  /* Special optimized blit for RGB 5-6-5 --> RGBA 8-8-8-8 */
  1.2268  static const Uint32 RGB565_RGBA8888_LUT[512] = {
  1.2269 -		0x000000ff, 0x00000000, 0x000008ff, 0x00200000,
  1.2270 -		0x000010ff, 0x00400000, 0x000018ff, 0x00610000,
  1.2271 -		0x000020ff, 0x00810000, 0x000029ff, 0x00a10000,
  1.2272 -		0x000031ff, 0x00c20000, 0x000039ff, 0x00e20000,
  1.2273 -		0x000041ff, 0x08000000, 0x00004aff, 0x08200000,
  1.2274 -		0x000052ff, 0x08400000, 0x00005aff, 0x08610000,
  1.2275 -		0x000062ff, 0x08810000, 0x00006aff, 0x08a10000,
  1.2276 -		0x000073ff, 0x08c20000, 0x00007bff, 0x08e20000,
  1.2277 -		0x000083ff, 0x10000000, 0x00008bff, 0x10200000,
  1.2278 -		0x000094ff, 0x10400000, 0x00009cff, 0x10610000,
  1.2279 -		0x0000a4ff, 0x10810000, 0x0000acff, 0x10a10000,
  1.2280 -		0x0000b4ff, 0x10c20000, 0x0000bdff, 0x10e20000,
  1.2281 -		0x0000c5ff, 0x18000000, 0x0000cdff, 0x18200000,
  1.2282 -		0x0000d5ff, 0x18400000, 0x0000deff, 0x18610000,
  1.2283 -		0x0000e6ff, 0x18810000, 0x0000eeff, 0x18a10000,
  1.2284 -		0x0000f6ff, 0x18c20000, 0x0000ffff, 0x18e20000,
  1.2285 -		0x000400ff, 0x20000000, 0x000408ff, 0x20200000,
  1.2286 -		0x000410ff, 0x20400000, 0x000418ff, 0x20610000,
  1.2287 -		0x000420ff, 0x20810000, 0x000429ff, 0x20a10000,
  1.2288 -		0x000431ff, 0x20c20000, 0x000439ff, 0x20e20000,
  1.2289 -		0x000441ff, 0x29000000, 0x00044aff, 0x29200000,
  1.2290 -		0x000452ff, 0x29400000, 0x00045aff, 0x29610000,
  1.2291 -		0x000462ff, 0x29810000, 0x00046aff, 0x29a10000,
  1.2292 -		0x000473ff, 0x29c20000, 0x00047bff, 0x29e20000,
  1.2293 -		0x000483ff, 0x31000000, 0x00048bff, 0x31200000,
  1.2294 -		0x000494ff, 0x31400000, 0x00049cff, 0x31610000,
  1.2295 -		0x0004a4ff, 0x31810000, 0x0004acff, 0x31a10000,
  1.2296 -		0x0004b4ff, 0x31c20000, 0x0004bdff, 0x31e20000,
  1.2297 -		0x0004c5ff, 0x39000000, 0x0004cdff, 0x39200000,
  1.2298 -		0x0004d5ff, 0x39400000, 0x0004deff, 0x39610000,
  1.2299 -		0x0004e6ff, 0x39810000, 0x0004eeff, 0x39a10000,
  1.2300 -		0x0004f6ff, 0x39c20000, 0x0004ffff, 0x39e20000,
  1.2301 -		0x000800ff, 0x41000000, 0x000808ff, 0x41200000,
  1.2302 -		0x000810ff, 0x41400000, 0x000818ff, 0x41610000,
  1.2303 -		0x000820ff, 0x41810000, 0x000829ff, 0x41a10000,
  1.2304 -		0x000831ff, 0x41c20000, 0x000839ff, 0x41e20000,
  1.2305 -		0x000841ff, 0x4a000000, 0x00084aff, 0x4a200000,
  1.2306 -		0x000852ff, 0x4a400000, 0x00085aff, 0x4a610000,
  1.2307 -		0x000862ff, 0x4a810000, 0x00086aff, 0x4aa10000,
  1.2308 -		0x000873ff, 0x4ac20000, 0x00087bff, 0x4ae20000,
  1.2309 -		0x000883ff, 0x52000000, 0x00088bff, 0x52200000,
  1.2310 -		0x000894ff, 0x52400000, 0x00089cff, 0x52610000,
  1.2311 -		0x0008a4ff, 0x52810000, 0x0008acff, 0x52a10000,
  1.2312 -		0x0008b4ff, 0x52c20000, 0x0008bdff, 0x52e20000,
  1.2313 -		0x0008c5ff, 0x5a000000, 0x0008cdff, 0x5a200000,
  1.2314 -		0x0008d5ff, 0x5a400000, 0x0008deff, 0x5a610000,
  1.2315 -		0x0008e6ff, 0x5a810000, 0x0008eeff, 0x5aa10000,
  1.2316 -		0x0008f6ff, 0x5ac20000, 0x0008ffff, 0x5ae20000,
  1.2317 -		0x000c00ff, 0x62000000, 0x000c08ff, 0x62200000,
  1.2318 -		0x000c10ff, 0x62400000, 0x000c18ff, 0x62610000,
  1.2319 -		0x000c20ff, 0x62810000, 0x000c29ff, 0x62a10000,
  1.2320 -		0x000c31ff, 0x62c20000, 0x000c39ff, 0x62e20000,
  1.2321 -		0x000c41ff, 0x6a000000, 0x000c4aff, 0x6a200000,
  1.2322 -		0x000c52ff, 0x6a400000, 0x000c5aff, 0x6a610000,
  1.2323 -		0x000c62ff, 0x6a810000, 0x000c6aff, 0x6aa10000,
  1.2324 -		0x000c73ff, 0x6ac20000, 0x000c7bff, 0x6ae20000,
  1.2325 -		0x000c83ff, 0x73000000, 0x000c8bff, 0x73200000,
  1.2326 -		0x000c94ff, 0x73400000, 0x000c9cff, 0x73610000,
  1.2327 -		0x000ca4ff, 0x73810000, 0x000cacff, 0x73a10000,
  1.2328 -		0x000cb4ff, 0x73c20000, 0x000cbdff, 0x73e20000,
  1.2329 -		0x000cc5ff, 0x7b000000, 0x000ccdff, 0x7b200000,
  1.2330 -		0x000cd5ff, 0x7b400000, 0x000cdeff, 0x7b610000,
  1.2331 -		0x000ce6ff, 0x7b810000, 0x000ceeff, 0x7ba10000,
  1.2332 -		0x000cf6ff, 0x7bc20000, 0x000cffff, 0x7be20000,
  1.2333 -		0x001000ff, 0x83000000, 0x001008ff, 0x83200000,
  1.2334 -		0x001010ff, 0x83400000, 0x001018ff, 0x83610000,
  1.2335 -		0x001020ff, 0x83810000, 0x001029ff, 0x83a10000,
  1.2336 -		0x001031ff, 0x83c20000, 0x001039ff, 0x83e20000,
  1.2337 -		0x001041ff, 0x8b000000, 0x00104aff, 0x8b200000,
  1.2338 -		0x001052ff, 0x8b400000, 0x00105aff, 0x8b610000,
  1.2339 -		0x001062ff, 0x8b810000, 0x00106aff, 0x8ba10000,
  1.2340 -		0x001073ff, 0x8bc20000, 0x00107bff, 0x8be20000,
  1.2341 -		0x001083ff, 0x94000000, 0x00108bff, 0x94200000,
  1.2342 -		0x001094ff, 0x94400000, 0x00109cff, 0x94610000,
  1.2343 -		0x0010a4ff, 0x94810000, 0x0010acff, 0x94a10000,
  1.2344 -		0x0010b4ff, 0x94c20000, 0x0010bdff, 0x94e20000,
  1.2345 -		0x0010c5ff, 0x9c000000, 0x0010cdff, 0x9c200000,
  1.2346 -		0x0010d5ff, 0x9c400000, 0x0010deff, 0x9c610000,
  1.2347 -		0x0010e6ff, 0x9c810000, 0x0010eeff, 0x9ca10000,
  1.2348 -		0x0010f6ff, 0x9cc20000, 0x0010ffff, 0x9ce20000,
  1.2349 -		0x001400ff, 0xa4000000, 0x001408ff, 0xa4200000,
  1.2350 -		0x001410ff, 0xa4400000, 0x001418ff, 0xa4610000,
  1.2351 -		0x001420ff, 0xa4810000, 0x001429ff, 0xa4a10000,
  1.2352 -		0x001431ff, 0xa4c20000, 0x001439ff, 0xa4e20000,
  1.2353 -		0x001441ff, 0xac000000, 0x00144aff, 0xac200000,
  1.2354 -		0x001452ff, 0xac400000, 0x00145aff, 0xac610000,
  1.2355 -		0x001462ff, 0xac810000, 0x00146aff, 0xaca10000,
  1.2356 -		0x001473ff, 0xacc20000, 0x00147bff, 0xace20000,
  1.2357 -		0x001483ff, 0xb4000000, 0x00148bff, 0xb4200000,
  1.2358 -		0x001494ff, 0xb4400000, 0x00149cff, 0xb4610000,
  1.2359 -		0x0014a4ff, 0xb4810000, 0x0014acff, 0xb4a10000,
  1.2360 -		0x0014b4ff, 0xb4c20000, 0x0014bdff, 0xb4e20000,
  1.2361 -		0x0014c5ff, 0xbd000000, 0x0014cdff, 0xbd200000,
  1.2362 -		0x0014d5ff, 0xbd400000, 0x0014deff, 0xbd610000,
  1.2363 -		0x0014e6ff, 0xbd810000, 0x0014eeff, 0xbda10000,
  1.2364 -		0x0014f6ff, 0xbdc20000, 0x0014ffff, 0xbde20000,
  1.2365 -		0x001800ff, 0xc5000000, 0x001808ff, 0xc5200000,
  1.2366 -		0x001810ff, 0xc5400000, 0x001818ff, 0xc5610000,
  1.2367 -		0x001820ff, 0xc5810000, 0x001829ff, 0xc5a10000,
  1.2368 -		0x001831ff, 0xc5c20000, 0x001839ff, 0xc5e20000,
  1.2369 -		0x001841ff, 0xcd000000, 0x00184aff, 0xcd200000,
  1.2370 -		0x001852ff, 0xcd400000, 0x00185aff, 0xcd610000,
  1.2371 -		0x001862ff, 0xcd810000, 0x00186aff, 0xcda10000,
  1.2372 -		0x001873ff, 0xcdc20000, 0x00187bff, 0xcde20000,
  1.2373 -		0x001883ff, 0xd5000000, 0x00188bff, 0xd5200000,
  1.2374 -		0x001894ff, 0xd5400000, 0x00189cff, 0xd5610000,
  1.2375 -		0x0018a4ff, 0xd5810000, 0x0018acff, 0xd5a10000,
  1.2376 -		0x0018b4ff, 0xd5c20000, 0x0018bdff, 0xd5e20000,
  1.2377 -		0x0018c5ff, 0xde000000, 0x0018cdff, 0xde200000,
  1.2378 -		0x0018d5ff, 0xde400000, 0x0018deff, 0xde610000,
  1.2379 -		0x0018e6ff, 0xde810000, 0x0018eeff, 0xdea10000,
  1.2380 -		0x0018f6ff, 0xdec20000, 0x0018ffff, 0xdee20000,
  1.2381 -		0x001c00ff, 0xe6000000, 0x001c08ff, 0xe6200000,
  1.2382 -		0x001c10ff, 0xe6400000, 0x001c18ff, 0xe6610000,
  1.2383 -		0x001c20ff, 0xe6810000, 0x001c29ff, 0xe6a10000,
  1.2384 -		0x001c31ff, 0xe6c20000, 0x001c39ff, 0xe6e20000,
  1.2385 -		0x001c41ff, 0xee000000, 0x001c4aff, 0xee200000,
  1.2386 -		0x001c52ff, 0xee400000, 0x001c5aff, 0xee610000,
  1.2387 -		0x001c62ff, 0xee810000, 0x001c6aff, 0xeea10000,
  1.2388 -		0x001c73ff, 0xeec20000, 0x001c7bff, 0xeee20000,
  1.2389 -		0x001c83ff, 0xf6000000, 0x001c8bff, 0xf6200000,
  1.2390 -		0x001c94ff, 0xf6400000, 0x001c9cff, 0xf6610000,
  1.2391 -		0x001ca4ff, 0xf6810000, 0x001cacff, 0xf6a10000,
  1.2392 -		0x001cb4ff, 0xf6c20000, 0x001cbdff, 0xf6e20000,
  1.2393 -		0x001cc5ff, 0xff000000, 0x001ccdff, 0xff200000,
  1.2394 -		0x001cd5ff, 0xff400000, 0x001cdeff, 0xff610000,
  1.2395 -		0x001ce6ff, 0xff810000, 0x001ceeff, 0xffa10000,
  1.2396 -		0x001cf6ff, 0xffc20000, 0x001cffff, 0xffe20000,
  1.2397 +    0x000000ff, 0x00000000, 0x000008ff, 0x00200000,
  1.2398 +    0x000010ff, 0x00400000, 0x000018ff, 0x00610000,
  1.2399 +    0x000020ff, 0x00810000, 0x000029ff, 0x00a10000,
  1.2400 +    0x000031ff, 0x00c20000, 0x000039ff, 0x00e20000,
  1.2401 +    0x000041ff, 0x08000000, 0x00004aff, 0x08200000,
  1.2402 +    0x000052ff, 0x08400000, 0x00005aff, 0x08610000,
  1.2403 +    0x000062ff, 0x08810000, 0x00006aff, 0x08a10000,
  1.2404 +    0x000073ff, 0x08c20000, 0x00007bff, 0x08e20000,
  1.2405 +    0x000083ff, 0x10000000, 0x00008bff, 0x10200000,
  1.2406 +    0x000094ff, 0x10400000, 0x00009cff, 0x10610000,
  1.2407 +    0x0000a4ff, 0x10810000, 0x0000acff, 0x10a10000,
  1.2408 +    0x0000b4ff, 0x10c20000, 0x0000bdff, 0x10e20000,
  1.2409 +    0x0000c5ff, 0x18000000, 0x0000cdff, 0x18200000,
  1.2410 +    0x0000d5ff, 0x18400000, 0x0000deff, 0x18610000,
  1.2411 +    0x0000e6ff, 0x18810000, 0x0000eeff, 0x18a10000,
  1.2412 +    0x0000f6ff, 0x18c20000, 0x0000ffff, 0x18e20000,
  1.2413 +    0x000400ff, 0x20000000, 0x000408ff, 0x20200000,
  1.2414 +    0x000410ff, 0x20400000, 0x000418ff, 0x20610000,
  1.2415 +    0x000420ff, 0x20810000, 0x000429ff, 0x20a10000,
  1.2416 +    0x000431ff, 0x20c20000, 0x000439ff, 0x20e20000,
  1.2417 +    0x000441ff, 0x29000000, 0x00044aff, 0x29200000,
  1.2418 +    0x000452ff, 0x29400000, 0x00045aff, 0x29610000,
  1.2419 +    0x000462ff, 0x29810000, 0x00046aff, 0x29a10000,
  1.2420 +    0x000473ff, 0x29c20000, 0x00047bff, 0x29e20000,
  1.2421 +    0x000483ff, 0x31000000, 0x00048bff, 0x31200000,
  1.2422 +    0x000494ff, 0x31400000, 0x00049cff, 0x31610000,
  1.2423 +    0x0004a4ff, 0x31810000, 0x0004acff, 0x31a10000,
  1.2424 +    0x0004b4ff, 0x31c20000, 0x0004bdff, 0x31e20000,
  1.2425 +    0x0004c5ff, 0x39000000, 0x0004cdff, 0x39200000,
  1.2426 +    0x0004d5ff, 0x39400000, 0x0004deff, 0x39610000,
  1.2427 +    0x0004e6ff, 0x39810000, 0x0004eeff, 0x39a10000,
  1.2428 +    0x0004f6ff, 0x39c20000, 0x0004ffff, 0x39e20000,
  1.2429 +    0x000800ff, 0x41000000, 0x000808ff, 0x41200000,
  1.2430 +    0x000810ff, 0x41400000, 0x000818ff, 0x41610000,
  1.2431 +    0x000820ff, 0x41810000, 0x000829ff, 0x41a10000,
  1.2432 +    0x000831ff, 0x41c20000, 0x000839ff, 0x41e20000,
  1.2433 +    0x000841ff, 0x4a000000, 0x00084aff, 0x4a200000,
  1.2434 +    0x000852ff, 0x4a400000, 0x00085aff, 0x4a610000,
  1.2435 +    0x000862ff, 0x4a810000, 0x00086aff, 0x4aa10000,
  1.2436 +    0x000873ff, 0x4ac20000, 0x00087bff, 0x4ae20000,
  1.2437 +    0x000883ff, 0x52000000, 0x00088bff, 0x52200000,
  1.2438 +    0x000894ff, 0x52400000, 0x00089cff, 0x52610000,
  1.2439 +    0x0008a4ff, 0x52810000, 0x0008acff, 0x52a10000,
  1.2440 +    0x0008b4ff, 0x52c20000, 0x0008bdff, 0x52e20000,
  1.2441 +    0x0008c5ff, 0x5a000000, 0x0008cdff, 0x5a200000,
  1.2442 +    0x0008d5ff, 0x5a400000, 0x0008deff, 0x5a610000,
  1.2443 +    0x0008e6ff, 0x5a810000, 0x0008eeff, 0x5aa10000,
  1.2444 +    0x0008f6ff, 0x5ac20000, 0x0008ffff, 0x5ae20000,
  1.2445 +    0x000c00ff, 0x62000000, 0x000c08ff, 0x62200000,
  1.2446 +    0x000c10ff, 0x62400000, 0x000c18ff, 0x62610000,
  1.2447 +    0x000c20ff, 0x62810000, 0x000c29ff, 0x62a10000,
  1.2448 +    0x000c31ff, 0x62c20000, 0x000c39ff, 0x62e20000,
  1.2449 +    0x000c41ff, 0x6a000000, 0x000c4aff, 0x6a200000,
  1.2450 +    0x000c52ff, 0x6a400000, 0x000c5aff, 0x6a610000,
  1.2451 +    0x000c62ff, 0x6a810000, 0x000c6aff, 0x6aa10000,
  1.2452 +    0x000c73ff, 0x6ac20000, 0x000c7bff, 0x6ae20000,
  1.2453 +    0x000c83ff, 0x73000000, 0x000c8bff, 0x73200000,
  1.2454 +    0x000c94ff, 0x73400000, 0x000c9cff, 0x73610000,
  1.2455 +    0x000ca4ff, 0x73810000, 0x000cacff, 0x73a10000,
  1.2456 +    0x000cb4ff, 0x73c20000, 0x000cbdff, 0x73e20000,
  1.2457 +    0x000cc5ff, 0x7b000000, 0x000ccdff, 0x7b200000,
  1.2458 +    0x000cd5ff, 0x7b400000, 0x000cdeff, 0x7b610000,
  1.2459 +    0x000ce6ff, 0x7b810000, 0x000ceeff, 0x7ba10000,
  1.2460 +    0x000cf6ff, 0x7bc20000, 0x000cffff, 0x7be20000,
  1.2461 +    0x001000ff, 0x83000000, 0x001008ff, 0x83200000,
  1.2462 +    0x001010ff, 0x83400000, 0x001018ff, 0x83610000,
  1.2463 +    0x001020ff, 0x83810000, 0x001029ff, 0x83a10000,
  1.2464 +    0x001031ff, 0x83c20000, 0x001039ff, 0x83e20000,
  1.2465 +    0x001041ff, 0x8b000000, 0x00104aff, 0x8b200000,
  1.2466 +    0x001052ff, 0x8b400000, 0x00105aff, 0x8b610000,
  1.2467 +    0x001062ff, 0x8b810000, 0x00106aff, 0x8ba10000,
  1.2468 +    0x001073ff, 0x8bc20000, 0x00107bff, 0x8be20000,
  1.2469 +    0x001083ff, 0x94000000, 0x00108bff, 0x94200000,
  1.2470 +    0x001094ff, 0x94400000, 0x00109cff, 0x94610000,
  1.2471 +    0x0010a4ff, 0x94810000, 0x0010acff, 0x94a10000,
  1.2472 +    0x0010b4ff, 0x94c20000, 0x0010bdff, 0x94e20000,
  1.2473 +    0x0010c5ff, 0x9c000000, 0x0010cdff, 0x9c200000,
  1.2474 +    0x0010d5ff, 0x9c400000, 0x0010deff, 0x9c610000,
  1.2475 +    0x0010e6ff, 0x9c810000, 0x0010eeff, 0x9ca10000,
  1.2476 +    0x0010f6ff, 0x9cc20000, 0x0010ffff, 0x9ce20000,
  1.2477 +    0x001400ff, 0xa4000000, 0x001408ff, 0xa4200000,
  1.2478 +    0x001410ff, 0xa4400000, 0x001418ff, 0xa4610000,
  1.2479 +    0x001420ff, 0xa4810000, 0x001429ff, 0xa4a10000,
  1.2480 +    0x001431ff, 0xa4c20000, 0x001439ff, 0xa4e20000,
  1.2481 +    0x001441ff, 0xac000000, 0x00144aff, 0xac200000,
  1.2482 +    0x001452ff, 0xac400000, 0x00145aff, 0xac610000,
  1.2483 +    0x001462ff, 0xac810000, 0x00146aff, 0xaca10000,
  1.2484 +    0x001473ff, 0xacc20000, 0x00147bff, 0xace20000,
  1.2485 +    0x001483ff, 0xb4000000, 0x00148bff, 0xb4200000,
  1.2486 +    0x001494ff, 0xb4400000, 0x00149cff, 0xb4610000,
  1.2487 +    0x0014a4ff, 0xb4810000, 0x0014acff, 0xb4a10000,
  1.2488 +    0x0014b4ff, 0xb4c20000, 0x0014bdff, 0xb4e20000,
  1.2489 +    0x0014c5ff, 0xbd000000, 0x0014cdff, 0xbd200000,
  1.2490 +    0x0014d5ff, 0xbd400000, 0x0014deff, 0xbd610000,
  1.2491 +    0x0014e6ff, 0xbd810000, 0x0014eeff, 0xbda10000,
  1.2492 +    0x0014f6ff, 0xbdc20000, 0x0014ffff, 0xbde20000,
  1.2493 +    0x001800ff, 0xc5000000, 0x001808ff, 0xc5200000,
  1.2494 +    0x001810ff, 0xc5400000, 0x001818ff, 0xc5610000,
  1.2495 +    0x001820ff, 0xc5810000, 0x001829ff, 0xc5a10000,
  1.2496 +    0x001831ff, 0xc5c20000, 0x001839ff, 0xc5e20000,
  1.2497 +    0x001841ff, 0xcd000000, 0x00184aff, 0xcd200000,
  1.2498 +    0x001852ff, 0xcd400000, 0x00185aff, 0xcd610000,
  1.2499 +    0x001862ff, 0xcd810000, 0x00186aff, 0xcda10000,
  1.2500 +    0x001873ff, 0xcdc20000, 0x00187bff, 0xcde20000,
  1.2501 +    0x001883ff, 0xd5000000, 0x00188bff, 0xd5200000,
  1.2502 +    0x001894ff, 0xd5400000, 0x00189cff, 0xd5610000,
  1.2503 +    0x0018a4ff, 0xd5810000, 0x0018acff, 0xd5a10000,
  1.2504 +    0x0018b4ff, 0xd5c20000, 0x0018bdff, 0xd5e20000,
  1.2505 +    0x0018c5ff, 0xde000000, 0x0018cdff, 0xde200000,
  1.2506 +    0x0018d5ff, 0xde400000, 0x0018deff, 0xde610000,
  1.2507 +    0x0018e6ff, 0xde810000, 0x0018eeff, 0xdea10000,
  1.2508 +    0x0018f6ff, 0xdec20000, 0x0018ffff, 0xdee20000,
  1.2509 +    0x001c00ff, 0xe6000000, 0x001c08ff, 0xe6200000,
  1.2510 +    0x001c10ff, 0xe6400000, 0x001c18ff, 0xe6610000,
  1.2511 +    0x001c20ff, 0xe6810000, 0x001c29ff, 0xe6a10000,
  1.2512 +    0x001c31ff, 0xe6c20000, 0x001c39ff, 0xe6e20000,
  1.2513 +    0x001c41ff, 0xee000000, 0x001c4aff, 0xee200000,
  1.2514 +    0x001c52ff, 0xee400000, 0x001c5aff, 0xee610000,
  1.2515 +    0x001c62ff, 0xee810000, 0x001c6aff, 0xeea10000,
  1.2516 +    0x001c73ff, 0xeec20000, 0x001c7bff, 0xeee20000,
  1.2517 +    0x001c83ff, 0xf6000000, 0x001c8bff, 0xf6200000,
  1.2518 +    0x001c94ff, 0xf6400000, 0x001c9cff, 0xf6610000,
  1.2519 +    0x001ca4ff, 0xf6810000, 0x001cacff, 0xf6a10000,
  1.2520 +    0x001cb4ff, 0xf6c20000, 0x001cbdff, 0xf6e20000,
  1.2521 +    0x001cc5ff, 0xff000000, 0x001ccdff, 0xff200000,
  1.2522 +    0x001cd5ff, 0xff400000, 0x001cdeff, 0xff610000,
  1.2523 +    0x001ce6ff, 0xff810000, 0x001ceeff, 0xffa10000,
  1.2524 +    0x001cf6ff, 0xffc20000, 0x001cffff, 0xffe20000,
  1.2525  };
  1.2526 -static void Blit_RGB565_RGBA8888(SDL_BlitInfo *info)
  1.2527 +static void
  1.2528 +Blit_RGB565_RGBA8888 (SDL_BlitInfo * info)
  1.2529  {
  1.2530 -    Blit_RGB565_32(info, RGB565_RGBA8888_LUT);
  1.2531 +    Blit_RGB565_32 (info, RGB565_RGBA8888_LUT);
  1.2532  }
  1.2533  
  1.2534  /* Special optimized blit for RGB 5-6-5 --> BGRA 8-8-8-8 */
  1.2535  static const Uint32 RGB565_BGRA8888_LUT[512] = {
  1.2536 -		0x00000000, 0x000000ff, 0x08000000, 0x002000ff,
  1.2537 -		0x10000000, 0x004000ff, 0x18000000, 0x006100ff,
  1.2538 -		0x20000000, 0x008100ff, 0x29000000, 0x00a100ff,
  1.2539 -		0x31000000, 0x00c200ff, 0x39000000, 0x00e200ff,
  1.2540 -		0x41000000, 0x000008ff, 0x4a000000, 0x002008ff,
  1.2541 -		0x52000000, 0x004008ff, 0x5a000000, 0x006108ff,
  1.2542 -		0x62000000, 0x008108ff, 0x6a000000, 0x00a108ff,
  1.2543 -		0x73000000, 0x00c208ff, 0x7b000000, 0x00e208ff,
  1.2544 -		0x83000000, 0x000010ff, 0x8b000000, 0x002010ff,
  1.2545 -		0x94000000, 0x004010ff, 0x9c000000, 0x006110ff,
  1.2546 -		0xa4000000, 0x008110ff, 0xac000000, 0x00a110ff,
  1.2547 -		0xb4000000, 0x00c210ff, 0xbd000000, 0x00e210ff,
  1.2548 -		0xc5000000, 0x000018ff, 0xcd000000, 0x002018ff,
  1.2549 -		0xd5000000, 0x004018ff, 0xde000000, 0x006118ff,
  1.2550 -		0xe6000000, 0x008118ff, 0xee000000, 0x00a118ff,
  1.2551 -		0xf6000000, 0x00c218ff, 0xff000000, 0x00e218ff,
  1.2552 -		0x00040000, 0x000020ff, 0x08040000, 0x002020ff,
  1.2553 -		0x10040000, 0x004020ff, 0x18040000, 0x006120ff,
  1.2554 -		0x20040000, 0x008120ff, 0x29040000, 0x00a120ff,
  1.2555 -		0x31040000, 0x00c220ff, 0x39040000, 0x00e220ff,
  1.2556 -		0x41040000, 0x000029ff, 0x4a040000, 0x002029ff,
  1.2557 -		0x52040000, 0x004029ff, 0x5a040000, 0x006129ff,
  1.2558 -		0x62040000, 0x008129ff, 0x6a040000, 0x00a129ff,
  1.2559 -		0x73040000, 0x00c229ff, 0x7b040000, 0x00e229ff,
  1.2560 -		0x83040000, 0x000031ff, 0x8b040000, 0x002031ff,
  1.2561 -		0x94040000, 0x004031ff, 0x9c040000, 0x006131ff,
  1.2562 -		0xa4040000, 0x008131ff, 0xac040000, 0x00a131ff,
  1.2563 -		0xb4040000, 0x00c231ff, 0xbd040000, 0x00e231ff,
  1.2564 -		0xc5040000, 0x000039ff, 0xcd040000, 0x002039ff,
  1.2565 -		0xd5040000, 0x004039ff, 0xde040000, 0x006139ff,
  1.2566 -		0xe6040000, 0x008139ff, 0xee040000, 0x00a139ff,
  1.2567 -		0xf6040000, 0x00c239ff, 0xff040000, 0x00e239ff,
  1.2568 -		0x00080000, 0x000041ff, 0x08080000, 0x002041ff,
  1.2569 -		0x10080000, 0x004041ff, 0x18080000, 0x006141ff,
  1.2570 -		0x20080000, 0x008141ff, 0x29080000, 0x00a141ff,
  1.2571 -		0x31080000, 0x00c241ff, 0x39080000, 0x00e241ff,
  1.2572 -		0x41080000, 0x00004aff, 0x4a080000, 0x00204aff,
  1.2573 -		0x52080000, 0x00404aff, 0x5a080000, 0x00614aff,
  1.2574 -		0x62080000, 0x00814aff, 0x6a080000, 0x00a14aff,
  1.2575 -		0x73080000, 0x00c24aff, 0x7b080000, 0x00e24aff,
  1.2576 -		0x83080000, 0x000052ff, 0x8b080000, 0x002052ff,
  1.2577 -		0x94080000, 0x004052ff, 0x9c080000, 0x006152ff,
  1.2578 -		0xa4080000, 0x008152ff, 0xac080000, 0x00a152ff,
  1.2579 -		0xb4080000, 0x00c252ff, 0xbd080000, 0x00e252ff,
  1.2580 -		0xc5080000, 0x00005aff, 0xcd080000, 0x00205aff,
  1.2581 -		0xd5080000, 0x00405aff, 0xde080000, 0x00615aff,
  1.2582 -		0xe6080000, 0x00815aff, 0xee080000, 0x00a15aff,
  1.2583 -		0xf6080000, 0x00c25aff, 0xff080000, 0x00e25aff,
  1.2584 -		0x000c0000, 0x000062ff, 0x080c0000, 0x002062ff,
  1.2585 -		0x100c0000, 0x004062ff, 0x180c0000, 0x006162ff,
  1.2586 -		0x200c0000, 0x008162ff, 0x290c0000, 0x00a162ff,
  1.2587 -		0x310c0000, 0x00c262ff, 0x390c0000, 0x00e262ff,
  1.2588 -		0x410c0000, 0x00006aff, 0x4a0c0000, 0x00206aff,
  1.2589 -		0x520c0000, 0x00406aff, 0x5a0c0000, 0x00616aff,
  1.2590 -		0x620c0000, 0x00816aff, 0x6a0c0000, 0x00a16aff,
  1.2591 -		0x730c0000, 0x00c26aff, 0x7b0c0000, 0x00e26aff,
  1.2592 -		0x830c0000, 0x000073ff, 0x8b0c0000, 0x002073ff,
  1.2593 -		0x940c0000, 0x004073ff, 0x9c0c0000, 0x006173ff,
  1.2594 -		0xa40c0000, 0x008173ff, 0xac0c0000, 0x00a173ff,
  1.2595 -		0xb40c0000, 0x00c273ff, 0xbd0c0000, 0x00e273ff,
  1.2596 -		0xc50c0000, 0x00007bff, 0xcd0c0000, 0x00207bff,
  1.2597 -		0xd50c0000, 0x00407bff, 0xde0c0000, 0x00617bff,
  1.2598 -		0xe60c0000, 0x00817bff, 0xee0c0000, 0x00a17bff,
  1.2599 -		0xf60c0000, 0x00c27bff, 0xff0c0000, 0x00e27bff,
  1.2600 -		0x00100000, 0x000083ff, 0x08100000, 0x002083ff,
  1.2601 -		0x10100000, 0x004083ff, 0x18100000, 0x006183ff,
  1.2602 -		0x20100000, 0x008183ff, 0x29100000, 0x00a183ff,
  1.2603 -		0x31100000, 0x00c283ff, 0x39100000, 0x00e283ff,
  1.2604 -		0x41100000, 0x00008bff, 0x4a100000, 0x00208bff,
  1.2605 -		0x52100000, 0x00408bff, 0x5a100000, 0x00618bff,
  1.2606 -		0x62100000, 0x00818bff, 0x6a100000, 0x00a18bff,
  1.2607 -		0x73100000, 0x00c28bff, 0x7b100000, 0x00e28bff,
  1.2608 -		0x83100000, 0x000094ff, 0x8b100000, 0x002094ff,
  1.2609 -		0x94100000, 0x004094ff, 0x9c100000, 0x006194ff,
  1.2610 -		0xa4100000, 0x008194ff, 0xac100000, 0x00a194ff,
  1.2611 -		0xb4100000, 0x00c294ff, 0xbd100000, 0x00e294ff,
  1.2612 -		0xc5100000, 0x00009cff, 0xcd100000, 0x00209cff,
  1.2613 -		0xd5100000, 0x00409cff, 0xde100000, 0x00619cff,
  1.2614 -		0xe6100000, 0x00819cff, 0xee100000, 0x00a19cff,
  1.2615 -		0xf6100000, 0x00c29cff, 0xff100000, 0x00e29cff,
  1.2616 -		0x00140000, 0x0000a4ff, 0x08140000, 0x0020a4ff,
  1.2617 -		0x10140000, 0x0040a4ff, 0x18140000, 0x0061a4ff,
  1.2618 -		0x20140000, 0x0081a4ff, 0x29140000, 0x00a1a4ff,
  1.2619 -		0x31140000, 0x00c2a4ff, 0x39140000, 0x00e2a4ff,
  1.2620 -		0x41140000, 0x0000acff, 0x4a140000, 0x0020acff,
  1.2621 -		0x52140000, 0x0040acff, 0x5a140000, 0x0061acff,
  1.2622 -		0x62140000, 0x0081acff, 0x6a140000, 0x00a1acff,
  1.2623 -		0x73140000, 0x00c2acff, 0x7b140000, 0x00e2acff,
  1.2624 -		0x83140000, 0x0000b4ff, 0x8b140000, 0x0020b4ff,
  1.2625 -		0x94140000, 0x0040b4ff, 0x9c140000, 0x0061b4ff,
  1.2626 -		0xa4140000, 0x0081b4ff, 0xac140000, 0x00a1b4ff,
  1.2627 -		0xb4140000, 0x00c2b4ff, 0xbd140000, 0x00e2b4ff,
  1.2628 -		0xc5140000, 0x0000bdff, 0xcd140000, 0x0020bdff,
  1.2629 -		0xd5140000, 0x0040bdff, 0xde140000, 0x0061bdff,
  1.2630 -		0xe6140000, 0x0081bdff, 0xee140000, 0x00a1bdff,
  1.2631 -		0xf6140000, 0x00c2bdff, 0xff140000, 0x00e2bdff,
  1.2632 -		0x00180000, 0x0000c5ff, 0x08180000, 0x0020c5ff,
  1.2633 -		0x10180000, 0x0040c5ff, 0x18180000, 0x0061c5ff,
  1.2634 -		0x20180000, 0x0081c5ff, 0x29180000, 0x00a1c5ff,
  1.2635 -		0x31180000, 0x00c2c5ff, 0x39180000, 0x00e2c5ff,
  1.2636 -		0x41180000, 0x0000cdff, 0x4a180000, 0x0020cdff,
  1.2637 -		0x52180000, 0x0040cdff, 0x5a180000, 0x0061cdff,
  1.2638 -		0x62180000, 0x0081cdff, 0x6a180000, 0x00a1cdff,
  1.2639 -		0x73180000, 0x00c2cdff, 0x7b180000, 0x00e2cdff,
  1.2640 -		0x83180000, 0x0000d5ff, 0x8b180000, 0x0020d5ff,
  1.2641 -		0x94180000, 0x0040d5ff, 0x9c180000, 0x0061d5ff,
  1.2642 -		0xa4180000, 0x0081d5ff, 0xac180000, 0x00a1d5ff,
  1.2643 -		0xb4180000, 0x00c2d5ff, 0xbd180000, 0x00e2d5ff,
  1.2644 -		0xc5180000, 0x0000deff, 0xcd180000, 0x0020deff,
  1.2645 -		0xd5180000, 0x0040deff, 0xde180000, 0x0061deff,
  1.2646 -		0xe6180000, 0x0081deff, 0xee180000, 0x00a1deff,
  1.2647 -		0xf6180000, 0x00c2deff, 0xff180000, 0x00e2deff,
  1.2648 -		0x001c0000, 0x0000e6ff, 0x081c0000, 0x0020e6ff,
  1.2649 -		0x101c0000, 0x0040e6ff, 0x181c0000, 0x0061e6ff,
  1.2650 -		0x201c0000, 0x0081e6ff, 0x291c0000, 0x00a1e6ff,
  1.2651 -		0x311c0000, 0x00c2e6ff, 0x391c0000, 0x00e2e6ff,
  1.2652 -		0x411c0000, 0x0000eeff, 0x4a1c0000, 0x0020eeff,
  1.2653 -		0x521c0000, 0x0040eeff, 0x5a1c0000, 0x0061eeff,
  1.2654 -		0x621c0000, 0x0081eeff, 0x6a1c0000, 0x00a1eeff,
  1.2655 -		0x731c0000, 0x00c2eeff, 0x7b1c0000, 0x00e2eeff,
  1.2656 -		0x831c0000, 0x0000f6ff, 0x8b1c0000, 0x0020f6ff,
  1.2657 -		0x941c0000, 0x0040f6ff, 0x9c1c0000, 0x0061f6ff,
  1.2658 -		0xa41c0000, 0x0081f6ff, 0xac1c0000, 0x00a1f6ff,
  1.2659 -		0xb41c0000, 0x00c2f6ff, 0xbd1c0000, 0x00e2f6ff,
  1.2660 -		0xc51c0000, 0x0000ffff, 0xcd1c0000, 0x0020ffff,
  1.2661 -		0xd51c0000, 0x0040ffff, 0xde1c0000, 0x0061ffff,
  1.2662 -		0xe61c0000, 0x0081ffff, 0xee1c0000, 0x00a1ffff,
  1.2663 -		0xf61c0000, 0x00c2ffff, 0xff1c0000, 0x00e2ffff
  1.2664 +    0x00000000, 0x000000ff, 0x08000000, 0x002000ff,
  1.2665 +    0x10000000, 0x004000ff, 0x18000000, 0x006100ff,
  1.2666 +    0x20000000, 0x008100ff, 0x29000000, 0x00a100ff,
  1.2667 +    0x31000000, 0x00c200ff, 0x39000000, 0x00e200ff,
  1.2668 +    0x41000000, 0x000008ff, 0x4a000000, 0x002008ff,
  1.2669 +    0x52000000, 0x004008ff, 0x5a000000, 0x006108ff,
  1.2670 +    0x62000000, 0x008108ff, 0x6a000000, 0x00a108ff,
  1.2671 +    0x73000000, 0x00c208ff, 0x7b000000, 0x00e208ff,
  1.2672 +    0x83000000, 0x000010ff, 0x8b000000, 0x002010ff,
  1.2673 +    0x94000000, 0x004010ff, 0x9c000000, 0x006110ff,
  1.2674 +    0xa4000000, 0x008110ff, 0xac000000, 0x00a110ff,
  1.2675 +    0xb4000000, 0x00c210ff, 0xbd000000, 0x00e210ff,
  1.2676 +    0xc5000000, 0x000018ff, 0xcd000000, 0x002018ff,
  1.2677 +    0xd5000000, 0x004018ff, 0xde000000, 0x006118ff,
  1.2678 +    0xe6000000, 0x008118ff, 0xee000000, 0x00a118ff,
  1.2679 +    0xf6000000, 0x00c218ff, 0xff000000, 0x00e218ff,
  1.2680 +    0x00040000, 0x000020ff, 0x08040000, 0x002020ff,
  1.2681 +    0x10040000, 0x004020ff, 0x18040000, 0x006120ff,
  1.2682 +    0x20040000, 0x008120ff, 0x29040000, 0x00a120ff,
  1.2683 +    0x31040000, 0x00c220ff, 0x39040000, 0x00e220ff,
  1.2684 +    0x41040000, 0x000029ff, 0x4a040000, 0x002029ff,
  1.2685 +    0x52040000, 0x004029ff, 0x5a040000, 0x006129ff,
  1.2686 +    0x62040000, 0x008129ff, 0x6a040000, 0x00a129ff,
  1.2687 +    0x73040000, 0x00c229ff, 0x7b040000, 0x00e229ff,
  1.2688 +    0x83040000, 0x000031ff, 0x8b040000, 0x002031ff,
  1.2689 +    0x94040000, 0x004031ff, 0x9c040000, 0x006131ff,
  1.2690 +    0xa4040000, 0x008131ff, 0xac040000, 0x00a131ff,
  1.2691 +    0xb4040000, 0x00c231ff, 0xbd040000, 0x00e231ff,
  1.2692 +    0xc5040000, 0x000039ff, 0xcd040000, 0x002039ff,
  1.2693 +    0xd5040000, 0x004039ff, 0xde040000, 0x006139ff,
  1.2694 +    0xe6040000, 0x008139ff, 0xee040000, 0x00a139ff,
  1.2695 +    0xf6040000, 0x00c239ff, 0xff040000, 0x00e239ff,
  1.2696 +    0x00080000, 0x000041ff, 0x08080000, 0x002041ff,
  1.2697 +    0x10080000, 0x004041ff, 0x18080000, 0x006141ff,
  1.2698 +    0x20080000, 0x008141ff, 0x29080000, 0x00a141ff,
  1.2699 +    0x31080000, 0x00c241ff, 0x39080000, 0x00e241ff,
  1.2700 +    0x41080000, 0x00004aff, 0x4a080000, 0x00204aff,
  1.2701 +    0x52080000, 0x00404aff, 0x5a080000, 0x00614aff,
  1.2702 +    0x62080000, 0x00814aff, 0x6a080000, 0x00a14aff,
  1.2703 +    0x73080000, 0x00c24aff, 0x7b080000, 0x00e24aff,
  1.2704 +    0x83080000, 0x000052ff, 0x8b080000, 0x002052ff,
  1.2705 +    0x94080000, 0x004052ff, 0x9c080000, 0x006152ff,
  1.2706 +    0xa4080000, 0x008152ff, 0xac080000, 0x00a152ff,
  1.2707 +    0xb4080000, 0x00c252ff, 0xbd080000, 0x00e252ff,
  1.2708 +    0xc5080000, 0x00005aff, 0xcd080000, 0x00205aff,
  1.2709 +    0xd5080000, 0x00405aff, 0xde080000, 0x00615aff,
  1.2710 +    0xe6080000, 0x00815aff, 0xee080000, 0x00a15aff,
  1.2711 +    0xf6080000, 0x00c25aff, 0xff080000, 0x00e25aff,
  1.2712 +    0x000c0000, 0x000062ff, 0x080c0000, 0x002062ff,
  1.2713 +    0x100c0000, 0x004062ff, 0x180c0000, 0x006162ff,
  1.2714 +    0x200c0000, 0x008162ff, 0x290c0000, 0x00a162ff,
  1.2715 +    0x310c0000, 0x00c262ff, 0x390c0000, 0x00e262ff,
  1.2716 +    0x410c0000, 0x00006aff, 0x4a0c0000, 0x00206aff,
  1.2717 +    0x520c0000, 0x00406aff, 0x5a0c0000, 0x00616aff,
  1.2718 +    0x620c0000, 0x00816aff, 0x6a0c0000, 0x00a16aff,
  1.2719 +    0x730c0000, 0x00c26aff, 0x7b0c0000, 0x00e26aff,
  1.2720 +    0x830c0000, 0x000073ff, 0x8b0c0000, 0x002073ff,
  1.2721 +    0x940c0000, 0x004073ff, 0x9c0c0000, 0x006173ff,
  1.2722 +    0xa40c0000, 0x008173ff, 0xac0c0000, 0x00a173ff,
  1.2723 +    0xb40c0000, 0x00c273ff, 0xbd0c0000, 0x00e273ff,
  1.2724 +    0xc50c0000, 0x00007bff, 0xcd0c0000, 0x00207bff,
  1.2725 +    0xd50c0000, 0x00407bff, 0xde0c0000, 0x00617bff,
  1.2726 +    0xe60c0000, 0x00817bff, 0xee0c0000, 0x00a17bff,
  1.2727 +    0xf60c0000, 0x00c27bff, 0xff0c0000, 0x00e27bff,
  1.2728 +    0x00100000, 0x000083ff, 0x08100000, 0x002083ff,
  1.2729 +    0x10100000, 0x004083ff, 0x18100000, 0x006183ff,
  1.2730 +    0x20100000, 0x008183ff, 0x29100000, 0x00a183ff,
  1.2731 +    0x31100000, 0x00c283ff, 0x39100000, 0x00e283ff,
  1.2732 +    0x41100000, 0x00008bff, 0x4a100000, 0x00208bff,
  1.2733 +    0x52100000, 0x00408bff, 0x5a100000, 0x00618bff,
  1.2734 +    0x62100000, 0x00818bff, 0x6a100000, 0x00a18bff,
  1.2735 +    0x73100000, 0x00c28bff, 0x7b100000, 0x00e28bff,
  1.2736 +    0x83100000, 0x000094ff, 0x8b100000, 0x002094ff,
  1.2737 +    0x94100000, 0x004094ff, 0x9c100000, 0x006194ff,
  1.2738 +    0xa4100000, 0x008194ff, 0xac100000, 0x00a194ff,
  1.2739 +    0xb4100000, 0x00c294ff, 0xbd100000, 0x00e294ff,
  1.2740 +    0xc5100000, 0x00009cff, 0xcd100000, 0x00209cff,
  1.2741 +    0xd5100000, 0x00409cff, 0xde100000, 0x00619cff,
  1.2742 +    0xe6100000, 0x00819cff, 0xee100000, 0x00a19cff,
  1.2743 +    0xf6100000, 0x00c29cff, 0xff100000, 0x00e29cff,
  1.2744 +    0x00140000, 0x0000a4ff, 0x08140000, 0x0020a4ff,
  1.2745 +    0x10140000, 0x0040a4ff, 0x18140000, 0x0061a4ff,
  1.2746 +    0x20140000, 0x0081a4ff, 0x29140000, 0x00a1a4ff,
  1.2747 +    0x31140000, 0x00c2a4ff, 0x39140000, 0x00e2a4ff,
  1.2748 +    0x41140000, 0x0000acff, 0x4a140000, 0x0020acff,
  1.2749 +    0x52140000, 0x0040acff, 0x5a140000, 0x0061acff,
  1.2750 +    0x62140000, 0x0081acff, 0x6a140000, 0x00a1acff,
  1.2751 +    0x73140000, 0x00c2acff, 0x7b140000, 0x00e2acff,
  1.2752 +    0x83140000, 0x0000b4ff, 0x8b140000, 0x0020b4ff,
  1.2753 +    0x94140000, 0x0040b4ff, 0x9c140000, 0x0061b4ff,
  1.2754 +    0xa4140000, 0x0081b4ff, 0xac140000, 0x00a1b4ff,
  1.2755 +    0xb4140000, 0x00c2b4ff, 0xbd140000, 0x00e2b4ff,
  1.2756 +    0xc5140000, 0x0000bdff, 0xcd140000, 0x0020bdff,
  1.2757 +    0xd5140000, 0x0040bdff, 0xde140000, 0x0061bdff,
  1.2758 +    0xe6140000, 0x0081bdff, 0xee140000, 0x00a1bdff,
  1.2759 +    0xf6140000, 0x00c2bdff, 0xff140000, 0x00e2bdff,
  1.2760 +    0x00180000, 0x0000c5ff, 0x08180000, 0x0020c5ff,
  1.2761 +    0x10180000, 0x0040c5ff, 0x18180000, 0x0061c5ff,
  1.2762 +    0x20180000, 0x0081c5ff, 0x29180000, 0x00a1c5ff,
  1.2763 +    0x31180000, 0x00c2c5ff, 0x39180000, 0x00e2c5ff,
  1.2764 +    0x41180000, 0x0000cdff, 0x4a180000, 0x0020cdff,
  1.2765 +    0x52180000, 0x0040cdff, 0x5a180000, 0x0061cdff,
  1.2766 +    0x62180000, 0x0081cdff, 0x6a180000, 0x00a1cdff,
  1.2767 +    0x73180000, 0x00c2cdff, 0x7b180000, 0x00e2cdff,
  1.2768 +    0x83180000, 0x0000d5ff, 0x8b180000, 0x0020d5ff,
  1.2769 +    0x94180000, 0x0040d5ff, 0x9c180000, 0x0061d5ff,
  1.2770 +    0xa4180000, 0x0081d5ff, 0xac180000, 0x00a1d5ff,
  1.2771 +    0xb4180000, 0x00c2d5ff, 0xbd180000, 0x00e2d5ff,
  1.2772 +    0xc5180000, 0x0000deff, 0xcd180000, 0x0020deff,
  1.2773 +    0xd5180000, 0x0040deff, 0xde180000, 0x0061deff,
  1.2774 +    0xe6180000, 0x0081deff, 0xee180000, 0x00a1deff,
  1.2775 +    0xf6180000, 0x00c2deff, 0xff180000, 0x00e2deff,
  1.2776 +    0x001c0000, 0x0000e6ff, 0x081c0000, 0x0020e6ff,
  1.2777 +    0x101c0000, 0x0040e6ff, 0x181c0000, 0x0061e6ff,
  1.2778 +    0x201c0000, 0x0081e6ff, 0x291c0000, 0x00a1e6ff,
  1.2779 +    0x311c0000, 0x00c2e6ff, 0x391c0000, 0x00e2e6ff,
  1.2780 +    0x411c0000, 0x0000eeff, 0x4a1c0000, 0x0020eeff,
  1.2781 +    0x521c0000, 0x0040eeff, 0x5a1c0000, 0x0061eeff,
  1.2782 +    0x621c0000, 0x0081eeff, 0x6a1c0000, 0x00a1eeff,
  1.2783 +    0x731c0000, 0x00c2eeff, 0x7b1c0000, 0x00e2eeff,
  1.2784 +    0x831c0000, 0x0000f6ff, 0x8b1c0000, 0x0020f6ff,
  1.2785 +    0x941c0000, 0x0040f6ff, 0x9c1c0000, 0x0061f6ff,
  1.2786 +    0xa41c0000, 0x0081f6ff, 0xac1c0000, 0x00a1f6ff,
  1.2787 +    0xb41c0000, 0x00c2f6ff, 0xbd1c0000, 0x00e2f6ff,
  1.2788 +    0xc51c0000, 0x0000ffff, 0xcd1c0000, 0x0020ffff,
  1.2789 +    0xd51c0000, 0x0040ffff, 0xde1c0000, 0x0061ffff,
  1.2790 +    0xe61c0000, 0x0081ffff, 0xee1c0000, 0x00a1ffff,
  1.2791 +    0xf61c0000, 0x00c2ffff, 0xff1c0000, 0x00e2ffff
  1.2792  };
  1.2793 -static void Blit_RGB565_BGRA8888(SDL_BlitInfo *info)
  1.2794 +static void
  1.2795 +Blit_RGB565_BGRA8888 (SDL_BlitInfo * info)
  1.2796  {
  1.2797 -    Blit_RGB565_32(info, RGB565_BGRA8888_LUT);
  1.2798 +    Blit_RGB565_32 (info, RGB565_BGRA8888_LUT);
  1.2799  }
  1.2800  
  1.2801  /* Special optimized blit for RGB 8-8-8 --> RGB 3-3-2 */
  1.2802 @@ -1826,102 +1878,107 @@
  1.2803  	      (((src)&0x000000C0)>>6); \
  1.2804  }
  1.2805  #endif
  1.2806 -static void Blit_RGB888_index8_map(SDL_BlitInfo *info)
  1.2807 +static void
  1.2808 +Blit_RGB888_index8_map (SDL_BlitInfo * info)
  1.2809  {
  1.2810  #ifndef USE_DUFFS_LOOP
  1.2811 -	int c;
  1.2812 +    int c;
  1.2813  #endif
  1.2814 -	int Pixel;
  1.2815 -	int width, height;
  1.2816 -	Uint32 *src;
  1.2817 -	const Uint8 *map;
  1.2818 -	Uint8 *dst;
  1.2819 -	int srcskip, dstskip;
  1.2820 +    int Pixel;
  1.2821 +    int width, height;
  1.2822 +    Uint32 *src;
  1.2823 +    const Uint8 *map;
  1.2824 +    Uint8 *dst;
  1.2825 +    int srcskip, dstskip;
  1.2826  
  1.2827 -	/* Set up some basic variables */
  1.2828 -	width = info->d_width;
  1.2829 -	height = info->d_height;
  1.2830 -	src = (Uint32 *)info->s_pixels;
  1.2831 -	srcskip = info->s_skip/4;
  1.2832 -	dst = info->d_pixels;
  1.2833 -	dstskip = info->d_skip;
  1.2834 -	map = info->table;
  1.2835 +    /* Set up some basic variables */
  1.2836 +    width = info->d_width;
  1.2837 +    height = info->d_height;
  1.2838 +    src = (Uint32 *) info->s_pixels;
  1.2839 +    srcskip = info->s_skip / 4;
  1.2840 +    dst = info->d_pixels;
  1.2841 +    dstskip = info->d_skip;
  1.2842 +    map = info->table;
  1.2843  
  1.2844  #ifdef USE_DUFFS_LOOP
  1.2845 -	while ( height-- ) {
  1.2846 +    while (height--) {
  1.2847 +		/* *INDENT-OFF* */
  1.2848  		DUFFS_LOOP(
  1.2849  			RGB888_RGB332(Pixel, *src);
  1.2850  			*dst++ = map[Pixel];
  1.2851  			++src;
  1.2852  		, width);
  1.2853 -		src += srcskip;
  1.2854 -		dst += dstskip;
  1.2855 -	}
  1.2856 +		/* *INDENT-ON* */
  1.2857 +        src += srcskip;
  1.2858 +        dst += dstskip;
  1.2859 +    }
  1.2860  #else
  1.2861 -	while ( height-- ) {
  1.2862 -		for ( c=width/4; c; --c ) {
  1.2863 -			/* Pack RGB into 8bit pixel */
  1.2864 -			RGB888_RGB332(Pixel, *src);
  1.2865 -			*dst++ = map[Pixel];
  1.2866 -			++src;
  1.2867 -			RGB888_RGB332(Pixel, *src);
  1.2868 -			*dst++ = map[Pixel];
  1.2869 -			++src;
  1.2870 -			RGB888_RGB332(Pixel, *src);
  1.2871 -			*dst++ = map[Pixel];
  1.2872 -			++src;
  1.2873 -			RGB888_RGB332(Pixel, *src);
  1.2874 -			*dst++ = map[Pixel];
  1.2875 -			++src;
  1.2876 -		}
  1.2877 -		switch ( width & 3 ) {
  1.2878 -			case 3:
  1.2879 -				RGB888_RGB332(Pixel, *src);
  1.2880 -				*dst++ = map[Pixel];
  1.2881 -				++src;
  1.2882 -			case 2:
  1.2883 -				RGB888_RGB332(Pixel, *src);
  1.2884 -				*dst++ = map[Pixel];
  1.2885 -				++src;
  1.2886 -			case 1:
  1.2887 -				RGB888_RGB332(Pixel, *src);
  1.2888 -				*dst++ = map[Pixel];
  1.2889 -				++src;
  1.2890 -		}
  1.2891 -		src += srcskip;
  1.2892 -		dst += dstskip;
  1.2893 -	}
  1.2894 +    while (height--) {
  1.2895 +        for (c = width / 4; c; --c) {
  1.2896 +            /* Pack RGB into 8bit pixel */
  1.2897 +            RGB888_RGB332 (Pixel, *src);
  1.2898 +            *dst++ = map[Pixel];
  1.2899 +            ++src;
  1.2900 +            RGB888_RGB332 (Pixel, *src);
  1.2901 +            *dst++ = map[Pixel];
  1.2902 +            ++src;
  1.2903 +            RGB888_RGB332 (Pixel, *src);
  1.2904 +            *dst++ = map[Pixel];
  1.2905 +            ++src;
  1.2906 +            RGB888_RGB332 (Pixel, *src);
  1.2907 +            *dst++ = map[Pixel];
  1.2908 +            ++src;
  1.2909 +        }
  1.2910 +        switch (width & 3) {
  1.2911 +        case 3:
  1.2912 +            RGB888_RGB332 (Pixel, *src);
  1.2913 +            *dst++ = map[Pixel];
  1.2914 +            ++src;
  1.2915 +        case 2:
  1.2916 +            RGB888_RGB332 (Pixel, *src);
  1.2917 +            *dst++ = map[Pixel];
  1.2918 +            ++src;
  1.2919 +        case 1:
  1.2920 +            RGB888_RGB332 (Pixel, *src);
  1.2921 +            *dst++ = map[Pixel];
  1.2922 +            ++src;
  1.2923 +        }
  1.2924 +        src += srcskip;
  1.2925 +        dst += dstskip;
  1.2926 +    }
  1.2927  #endif /* USE_DUFFS_LOOP */
  1.2928  }
  1.2929 -static void BlitNto1(SDL_BlitInfo *info)
  1.2930 +static void
  1.2931 +BlitNto1 (SDL_BlitInfo * info)
  1.2932  {
  1.2933  #ifndef USE_DUFFS_LOOP
  1.2934 -	int c;
  1.2935 +    int c;
  1.2936  #endif
  1.2937 -	int width, height;
  1.2938 -	Uint8 *src;
  1.2939 -	const Uint8 *map;
  1.2940 -	Uint8 *dst;
  1.2941 -	int srcskip, dstskip;
  1.2942 -	int srcbpp;
  1.2943 -	Uint32 Pixel;
  1.2944 -	int  sR, sG, sB;
  1.2945 -	SDL_PixelFormat *srcfmt;
  1.2946 +    int width, height;
  1.2947 +    Uint8 *src;
  1.2948 +    const Uint8 *map;
  1.2949 +    Uint8 *dst;
  1.2950 +    int srcskip, dstskip;
  1.2951 +    int srcbpp;
  1.2952 +    Uint32 Pixel;
  1.2953 +    int sR, sG, sB;
  1.2954 +    SDL_PixelFormat *srcfmt;
  1.2955  
  1.2956 -	/* Set up some basic variables */
  1.2957 -	width = info->d_width;
  1.2958 -	height = info->d_height;
  1.2959 -	src = info->s_pixels;
  1.2960 -	srcskip = info->s_skip;
  1.2961 -	dst = info->d_pixels;
  1.2962 -	dstskip = info->d_skip;
  1.2963 -	map = info->table;
  1.2964 -	srcfmt = info->src;
  1.2965 -	srcbpp = srcfmt->BytesPerPixel;
  1.2966 +    /* Set up some basic variables */
  1.2967 +    width = info->d_width;
  1.2968 +    height = info->d_height;
  1.2969 +    src = info->s_pixels;
  1.2970 +    srcskip = info->s_skip;
  1.2971 +    dst = info->d_pixels;
  1.2972 +    dstskip = info->d_skip;
  1.2973 +    map = info->table;
  1.2974 +    srcfmt = info->src;
  1.2975 +    srcbpp = srcfmt->BytesPerPixel;
  1.2976  
  1.2977 -	if ( map == NULL ) {
  1.2978 -		while ( height-- ) {
  1.2979 +    if (map == NULL) {
  1.2980 +        while (height--) {
  1.2981  #ifdef USE_DUFFS_LOOP
  1.2982 +			/* *INDENT-OFF* */
  1.2983  			DUFFS_LOOP(
  1.2984  				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
  1.2985  								sR, sG, sB);
  1.2986 @@ -1934,26 +1991,26 @@
  1.2987  				dst++;
  1.2988  				src += srcbpp;
  1.2989  			, width);
  1.2990 +			/* *INDENT-ON* */
  1.2991  #else
  1.2992 -			for ( c=width; c; --c ) {
  1.2993 -				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
  1.2994 -								sR, sG, sB);
  1.2995 -				if ( 1 ) {
  1.2996 -				  	/* Pack RGB into 8bit pixel */
  1.2997 -				  	*dst = ((sR>>5)<<(3+2))|
  1.2998 -					        ((sG>>5)<<(2)) |
  1.2999 -					        ((sB>>6)<<(0)) ;
  1.3000 -				}
  1.3001 -				dst++;
  1.3002 -				src += srcbpp;
  1.3003 -			}
  1.3004 +            for (c = width; c; --c) {
  1.3005 +                DISEMBLE_RGB (src, srcbpp, srcfmt, Pixel, sR, sG, sB);
  1.3006 +                if (1) {
  1.3007 +                    /* Pack RGB into 8bit pixel */
  1.3008 +                    *dst = ((sR >> 5) << (3 + 2)) |
  1.3009 +                        ((sG >> 5) << (2)) | ((sB >> 6) << (0));
  1.3010 +                }
  1.3011 +                dst++;
  1.3012 +                src += srcbpp;
  1.3013 +            }
  1.3014  #endif
  1.3015 -			src += srcskip;
  1.3016 -			dst += dstskip;
  1.3017 -		}
  1.3018 -	} else {
  1.3019 -		while ( height-- ) {
  1.3020 +            src += srcskip;
  1.3021 +            dst += dstskip;
  1.3022 +        }
  1.3023 +    } else {
  1.3024 +        while (height--) {
  1.3025  #ifdef USE_DUFFS_LOOP
  1.3026 +			/* *INDENT-OFF* */
  1.3027  			DUFFS_LOOP(
  1.3028  				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
  1.3029  								sR, sG, sB);
  1.3030 @@ -1966,43 +2023,44 @@
  1.3031  				dst++;
  1.3032  				src += srcbpp;
  1.3033  			, width);
  1.3034 +			/* *INDENT-ON* */
  1.3035  #else
  1.3036 -			for ( c=width; c; --c ) {
  1.3037 -				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
  1.3038 -								sR, sG, sB);
  1.3039 -				if ( 1 ) {
  1.3040 -				  	/* Pack RGB into 8bit pixel */
  1.3041 -				  	*dst = map[((sR>>5)<<(3+2))|
  1.3042 -						   ((sG>>5)<<(2))  |
  1.3043 -						   ((sB>>6)<<(0))  ];
  1.3044 -				}
  1.3045 -				dst++;
  1.3046 -				src += srcbpp;
  1.3047 -			}
  1.3048 +            for (c = width; c; --c) {
  1.3049 +                DISEMBLE_RGB (src, srcbpp, srcfmt, Pixel, sR, sG, sB);
  1.3050 +                if (1) {
  1.3051 +                    /* Pack RGB into 8bit pixel */
  1.3052 +                    *dst = map[((sR >> 5) << (3 + 2)) |
  1.3053 +                               ((sG >> 5) << (2)) | ((sB >> 6) << (0))];
  1.3054 +                }
  1.3055 +                dst++;
  1.3056 +                src += srcbpp;
  1.3057 +            }
  1.3058  #endif /* USE_DUFFS_LOOP */
  1.3059 -			src += srcskip;
  1.3060 -			dst += dstskip;
  1.3061 -		}
  1.3062 -	}
  1.3063 +            src += srcskip;
  1.3064 +            dst += dstskip;
  1.3065 +        }
  1.3066 +    }
  1.3067  }
  1.3068  
  1.3069  /* blits 32 bit RGB<->RGBA with both surfaces having the same R,G,B fields */
  1.3070 -static void Blit4to4MaskAlpha(SDL_BlitInfo *info)
  1.3071 +static void
  1.3072 +Blit4to4MaskAlpha (SDL_BlitInfo * info)
  1.3073  {
  1.3074 -	int width = info->d_width;
  1.3075 -	int height = info->d_height;
  1.3076 -	Uint32 *src = (Uint32 *)info->s_pixels;
  1.3077 -	int srcskip = info->s_skip;
  1.3078 -	Uint32 *dst = (Uint32 *)info->d_pixels;
  1.3079 -	int dstskip = info->d_skip;
  1.3080 -	SDL_PixelFormat *srcfmt = info->src;
  1.3081 -	SDL_PixelFormat *dstfmt = info->dst;
  1.3082 +    int width = info->d_width;
  1.3083 +    int height = info->d_height;
  1.3084 +    Uint32 *src = (Uint32 *) info->s_pixels;
  1.3085 +    int srcskip = info->s_skip;
  1.3086 +    Uint32 *dst = (Uint32 *) info->d_pixels;
  1.3087 +    int dstskip = info->d_skip;
  1.3088 +    SDL_PixelFormat *srcfmt = info->src;
  1.3089 +    SDL_PixelFormat *dstfmt = info->dst;
  1.3090  
  1.3091 -	if (dstfmt->Amask) {
  1.3092 -		/* RGB->RGBA, SET_ALPHA */
  1.3093 -		Uint32 mask = (srcfmt->alpha >> dstfmt->Aloss) << dstfmt->Ashift;
  1.3094 +    if (dstfmt->Amask) {
  1.3095 +        /* RGB->RGBA, SET_ALPHA */
  1.3096 +        Uint32 mask = (srcfmt->alpha >> dstfmt->Aloss) << dstfmt->Ashift;
  1.3097  
  1.3098 -		while ( height-- ) {
  1.3099 +        while (height--) {
  1.3100 +			/* *INDENT-OFF* */
  1.3101  			DUFFS_LOOP(
  1.3102  			{
  1.3103  				*dst = *src | mask;
  1.3104 @@ -2010,14 +2068,16 @@
  1.3105  				++src;
  1.3106  			},
  1.3107  			width);
  1.3108 -			src = (Uint32*)((Uint8*)src + srcskip);
  1.3109 -			dst = (Uint32*)((Uint8*)dst + dstskip);
  1.3110 -		}
  1.3111 -	} else {
  1.3112 -		/* RGBA->RGB, NO_ALPHA */
  1.3113 -		Uint32 mask = srcfmt->Rmask | srcfmt->Gmask | srcfmt->Bmask;
  1.3114 +			/* *INDENT-ON* */
  1.3115 +            src = (Uint32 *) ((Uint8 *) src + srcskip);
  1.3116 +            dst = (Uint32 *) ((Uint8 *) dst + dstskip);
  1.3117 +        }
  1.3118 +    } else {
  1.3119 +        /* RGBA->RGB, NO_ALPHA */
  1.3120 +        Uint32 mask = srcfmt->Rmask | srcfmt->Gmask | srcfmt->Bmask;
  1.3121  
  1.3122 -		while ( height-- ) {
  1.3123 +        while (height--) {
  1.3124 +			/* *INDENT-OFF* */
  1.3125  			DUFFS_LOOP(
  1.3126  			{
  1.3127  				*dst = *src & mask;
  1.3128 @@ -2025,27 +2085,30 @@
  1.3129  				++src;
  1.3130  			},
  1.3131  			width);
  1.3132 -			src = (Uint32*)((Uint8*)src + srcskip);
  1.3133 -			dst = (Uint32*)((Uint8*)dst + dstskip);
  1.3134 -		}
  1.3135 -	}
  1.3136 +			/* *INDENT-ON* */
  1.3137 +            src = (Uint32 *) ((Uint8 *) src + srcskip);
  1.3138 +            dst = (Uint32 *) ((Uint8 *) dst + dstskip);
  1.3139 +        }
  1.3140 +    }
  1.3141  }
  1.3142  
  1.3143 -static void BlitNtoN(SDL_BlitInfo *info)
  1.3144 +static void
  1.3145 +BlitNtoN (SDL_BlitInfo * info)
  1.3146  {
  1.3147 -	int width = info->d_width;
  1.3148 -	int height = info->d_height;
  1.3149 -	Uint8 *src = info->s_pixels;
  1.3150 -	int srcskip = info->s_skip;
  1.3151 -	Uint8 *dst = info->d_pixels;
  1.3152 -	int dstskip = info->d_skip;
  1.3153 -	SDL_PixelFormat *srcfmt = info->src;
  1.3154 -	int srcbpp = srcfmt->BytesPerPixel;
  1.3155 -	SDL_PixelFormat *dstfmt = info->dst;
  1.3156 -	int dstbpp = dstfmt->BytesPerPixel;
  1.3157 -	unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
  1.3158 +    int width = info->d_width;
  1.3159 +    int height = info->d_height;
  1.3160 +    Uint8 *src = info->s_pixels;
  1.3161 +    int srcskip = info->s_skip;
  1.3162 +    Uint8 *dst = info->d_pixels;
  1.3163 +    int dstskip = info->d_skip;
  1.3164 +    SDL_PixelFormat *srcfmt = info->src;
  1.3165 +    int srcbpp = srcfmt->BytesPerPixel;
  1.3166 +    SDL_PixelFormat *dstfmt = info->dst;
  1.3167 +    int dstbpp = dstfmt->BytesPerPixel;
  1.3168 +    unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
  1.3169  
  1.3170 -	while ( height-- ) {
  1.3171 +    while (height--) {
  1.3172 +		/* *INDENT-OFF* */
  1.3173  		DUFFS_LOOP(
  1.3174  		{
  1.3175  		        Uint32 Pixel;
  1.3176 @@ -2058,64 +2121,66 @@
  1.3177  			src += srcbpp;
  1.3178  		},
  1.3179  		width);
  1.3180 -		src += srcskip;
  1.3181 -		dst += dstskip;
  1.3182 -	}
  1.3183 +		/* *INDENT-ON* */
  1.3184 +        src += srcskip;
  1.3185 +        dst += dstskip;
  1.3186 +    }
  1.3187  }
  1.3188  
  1.3189 -static void BlitNtoNCopyAlpha(SDL_BlitInfo *info)
  1.3190 +static void
  1.3191 +BlitNtoNCopyAlpha (SDL_BlitInfo * info)
  1.3192  {
  1.3193 -	int width = info->d_width;
  1.3194 -	int height = info->d_height;
  1.3195 -	Uint8 *src = info->s_pixels;
  1.3196 -	int srcskip = info->s_skip;
  1.3197 -	Uint8 *dst = info->d_pixels;
  1.3198 -	int dstskip = info->d_skip;
  1.3199 -	SDL_PixelFormat *srcfmt = info->src;
  1.3200 -	int srcbpp = srcfmt->BytesPerPixel;
  1.3201 -	SDL_PixelFormat *dstfmt = info->dst;
  1.3202 -	int dstbpp = dstfmt->BytesPerPixel;
  1.3203 -	int c;
  1.3204 +    int width = info->d_width;
  1.3205 +    int height = info->d_height;
  1.3206 +    Uint8 *src = info->s_pixels;
  1.3207 +    int srcskip = info->s_skip;
  1.3208 +    Uint8 *dst = info->d_pixels;
  1.3209 +    int dstskip = info->d_skip;
  1.3210 +    SDL_PixelFormat *srcfmt = info->src;
  1.3211 +    int srcbpp = srcfmt->BytesPerPixel;
  1.3212 +    SDL_PixelFormat *dstfmt = info->dst;
  1.3213 +    int dstbpp = dstfmt->BytesPerPixel;
  1.3214 +    int c;
  1.3215  
  1.3216 -	/* FIXME: should map alpha to [0..255] correctly! */
  1.3217 -	while ( height-- ) {
  1.3218 -		for ( c=width; c; --c ) {
  1.3219 -		        Uint32 Pixel;
  1.3220 -			unsigned sR, sG, sB, sA;
  1.3221 -			DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel,
  1.3222 -				      sR, sG, sB, sA);
  1.3223 -			ASSEMBLE_RGBA(dst, dstbpp, dstfmt,
  1.3224 -				      sR, sG, sB, sA);
  1.3225 -			dst += dstbpp;
  1.3226 -			src += srcbpp;
  1.3227 -		}
  1.3228 -		src += srcskip;
  1.3229 -		dst += dstskip;
  1.3230 -	}
  1.3231 +    /* FIXME: should map alpha to [0..255] correctly! */
  1.3232 +    while (height--) {
  1.3233 +        for (c = width; c; --c) {
  1.3234 +            Uint32 Pixel;
  1.3235 +            unsigned sR, sG, sB, sA;
  1.3236 +            DISEMBLE_RGBA (src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA);
  1.3237 +            ASSEMBLE_RGBA (dst, dstbpp, dstfmt, sR, sG, sB, sA);
  1.3238 +            dst += dstbpp;
  1.3239 +            src += srcbpp;
  1.3240 +        }
  1.3241 +        src += srcskip;
  1.3242 +        dst += dstskip;
  1.3243 +    }
  1.3244  }
  1.3245  
  1.3246 -static void BlitNto1Key(SDL_BlitInfo *info)
  1.3247 +static void
  1.3248 +BlitNto1Key (SDL_BlitInfo * info)
  1.3249  {
  1.3250 -	int width = info->d_width;
  1.3251 -	int height = info->d_height;
  1.3252 -	Uint8 *src = info->s_pixels;
  1.3253 -	int srcskip = info->s_skip;
  1.3254 -	Uint8 *dst = info->d_pixels;
  1.3255 -	int dstskip = info->d_skip;
  1.3256 -	SDL_PixelFormat *srcfmt = info->src;
  1.3257 -	const Uint8 *palmap = info->table;
  1.3258 -	Uint32 ckey = srcfmt->colorkey;
  1.3259 -	Uint32 rgbmask = ~srcfmt->Amask;
  1.3260 -	int srcbpp;
  1.3261 -	Uint32 Pixel;
  1.3262 -	unsigned sR, sG, sB;
  1.3263 +    int width = info->d_width;
  1.3264 +    int height = info->d_height;
  1.3265 +    Uint8 *src = info->s_pixels;
  1.3266 +    int srcskip = info->s_skip;
  1.3267 +    Uint8 *dst = info->d_pixels;
  1.3268 +    int dstskip = info->d_skip;
  1.3269 +    SDL_PixelFormat *srcfmt = info->src;
  1.3270 +    const Uint8 *palmap = info->table;
  1.3271 +    Uint32 ckey = srcfmt->colorkey;
  1.3272 +    Uint32 rgbmask = ~srcfmt->Amask;
  1.3273 +    int srcbpp;
  1.3274 +    Uint32 Pixel;
  1.3275 +    unsigned sR, sG, sB;
  1.3276  
  1.3277 -	/* Set up some basic variables */
  1.3278 -	srcbpp = srcfmt->BytesPerPixel;
  1.3279 -	ckey &= rgbmask;
  1.3280 +    /* Set up some basic variables */
  1.3281 +    srcbpp = srcfmt->BytesPerPixel;
  1.3282 +    ckey &= rgbmask;
  1.3283  
  1.3284 -	if ( palmap == NULL ) {
  1.3285 -		while ( height-- ) {
  1.3286 +    if (palmap == NULL) {
  1.3287 +        while (height--) {
  1.3288 +			/* *INDENT-OFF* */
  1.3289  			DUFFS_LOOP(
  1.3290  			{
  1.3291  				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
  1.3292 @@ -2130,11 +2195,13 @@
  1.3293  				src += srcbpp;
  1.3294  			},
  1.3295  			width);
  1.3296 -			src += srcskip;
  1.3297 -			dst += dstskip;
  1.3298 -		}
  1.3299 -	} else {
  1.3300 -		while ( height-- ) {
  1.3301 +			/* *INDENT-ON* */
  1.3302 +            src += srcskip;
  1.3303 +            dst += dstskip;
  1.3304 +        }
  1.3305 +    } else {
  1.3306 +        while (height--) {
  1.3307 +			/* *INDENT-OFF* */
  1.3308  			DUFFS_LOOP(
  1.3309  			{
  1.3310  				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
  1.3311 @@ -2149,29 +2216,32 @@
  1.3312  				src += srcbpp;
  1.3313  			},
  1.3314  			width);
  1.3315 -			src += srcskip;
  1.3316 -			dst += dstskip;
  1.3317 -		}
  1.3318 -	}
  1.3319 +			/* *INDENT-ON* */
  1.3320 +            src += srcskip;
  1.3321 +            dst += dstskip;
  1.3322 +        }
  1.3323 +    }
  1.3324  }
  1.3325  
  1.3326 -static void Blit2to2Key(SDL_BlitInfo *info)
  1.3327 +static void
  1.3328 +Blit2to2Key (SDL_BlitInfo * info)
  1.3329  {
  1.3330 -	int width = info->d_width;
  1.3331 -	int height = info->d_height;
  1.3332 -	Uint16 *srcp = (Uint16 *)info->s_pixels;
  1.3333 -	int srcskip = info->s_skip;
  1.3334 -	Uint16 *dstp = (Uint16 *)info->d_pixels;
  1.3335 -	int dstskip = info->d_skip;
  1.3336 -	Uint32 ckey = info->src->colorkey;
  1.3337 -	Uint32 rgbmask = ~info->src->Amask;
  1.3338 +    int width = info->d_width;
  1.3339 +    int height = info->d_height;
  1.3340 +    Uint16 *srcp = (Uint16 *) info->s_pixels;
  1.3341 +    int srcskip = info->s_skip;
  1.3342 +    Uint16 *dstp = (Uint16 *) info->d_pixels;
  1.3343 +    int dstskip = info->d_skip;
  1.3344 +    Uint32 ckey = info->src->colorkey;
  1.3345 +    Uint32 rgbmask = ~info->src->Amask;
  1.3346  
  1.3347 -	/* Set up some basic variables */
  1.3348 -        srcskip /= 2;
  1.3349 -        dstskip /= 2;
  1.3350 -	ckey &= rgbmask;
  1.3351 +    /* Set up some basic variables */
  1.3352 +    srcskip /= 2;
  1.3353 +    dstskip /= 2;
  1.3354 +    ckey &= rgbmask;
  1.3355  
  1.3356 -	while ( height-- ) {
  1.3357 +    while (height--) {
  1.3358 +		/* *INDENT-OFF* */
  1.3359  		DUFFS_LOOP(
  1.3360  		{
  1.3361  			if ( (*srcp & rgbmask) != ckey ) {
  1.3362 @@ -2181,31 +2251,34 @@
  1.3363  			srcp++;
  1.3364  		},
  1.3365  		width);
  1.3366 -		srcp += srcskip;
  1.3367 -		dstp += dstskip;
  1.3368 -	}
  1.3369 +		/* *INDENT-ON* */
  1.3370 +        srcp += srcskip;
  1.3371 +        dstp += dstskip;
  1.3372 +    }
  1.3373  }
  1.3374  
  1.3375 -static void BlitNtoNKey(SDL_BlitInfo *info)
  1.3376 +static void
  1.3377 +BlitNtoNKey (SDL_BlitInfo * info)
  1.3378  {
  1.3379 -	int width = info->d_width;
  1.3380 -	int height = info->d_height;
  1.3381 -	Uint8 *src = info->s_pixels;
  1.3382 -	int srcskip = info->s_skip;
  1.3383 -	Uint8 *dst = info->d_pixels;
  1.3384 -	int dstskip = info->d_skip;
  1.3385 -	Uint32 ckey = info->src->colorkey;
  1.3386 -	SDL_PixelFormat *srcfmt = info->src;
  1.3387 -	SDL_PixelFormat *dstfmt = info->dst;
  1.3388 -	int srcbpp = srcfmt->BytesPerPixel;
  1.3389 -	int dstbpp = dstfmt->BytesPerPixel;
  1.3390 -	unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
  1.3391 -	Uint32 rgbmask = ~srcfmt->Amask;
  1.3392 +    int width = info->d_width;
  1.3393 +    int height = info->d_height;
  1.3394 +    Uint8 *src = info->s_pixels;
  1.3395 +    int srcskip = info->s_skip;
  1.3396 +    Uint8 *dst = info->d_pixels;
  1.3397 +    int dstskip = info->d_skip;
  1.3398 +    Uint32 ckey = info->src->colorkey;
  1.3399 +    SDL_PixelFormat *srcfmt = info->src;
  1.3400 +    SDL_PixelFormat *dstfmt = info->dst;
  1.3401 +    int srcbpp = srcfmt->BytesPerPixel;
  1.3402 +    int dstbpp = dstfmt->BytesPerPixel;
  1.3403 +    unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
  1.3404 +    Uint32 rgbmask = ~srcfmt->Amask;
  1.3405  
  1.3406 -	/* Set up some basic variables */
  1.3407 -	ckey &= rgbmask;
  1.3408 +    /* Set up some basic variables */
  1.3409 +    ckey &= rgbmask;
  1.3410  
  1.3411 -	while ( height-- ) {
  1.3412 +    while (height--) {
  1.3413 +		/* *INDENT-OFF* */
  1.3414  		DUFFS_LOOP(
  1.3415  		{
  1.3416  		        Uint32 Pixel;
  1.3417 @@ -2222,36 +2295,39 @@
  1.3418  			src += srcbpp;
  1.3419  		},
  1.3420  		width);
  1.3421 -		src += srcskip;
  1.3422 -		dst += dstskip;
  1.3423 -	}
  1.3424 +		/* *INDENT-ON* */
  1.3425 +        src += srcskip;
  1.3426 +        dst += dstskip;
  1.3427 +    }
  1.3428  }
  1.3429  
  1.3430 -static void BlitNtoNKeyCopyAlpha(SDL_BlitInfo *info)
  1.3431 +static void
  1.3432 +BlitNtoNKeyCopyAlpha (SDL_BlitInfo * info)
  1.3433  {
  1.3434 -	int width = info->d_width;
  1.3435 -	int height = info->d_height;
  1.3436 -	Uint8 *src = info->s_pixels;
  1.3437 -	int srcskip = info->s_skip;
  1.3438 -	Uint8 *dst = info->d_pixels;
  1.3439 -	int dstskip = info->d_skip;
  1.3440 -	Uint32 ckey = info->src->colorkey;
  1.3441 -	SDL_PixelFormat *srcfmt = info->src;
  1.3442 -	SDL_PixelFormat *dstfmt = info->dst;
  1.3443 -	Uint32 rgbmask = ~srcfmt->Amask;
  1.3444 +    int width = info->d_width;
  1.3445 +    int height = info->d_height;
  1.3446 +    Uint8 *src = info->s_pixels;
  1.3447 +    int srcskip = info->s_skip;
  1.3448 +    Uint8 *dst = info->d_pixels;
  1.3449 +    int dstskip = info->d_skip;
  1.3450 +    Uint32 ckey = info->src->colorkey;
  1.3451 +    SDL_PixelFormat *srcfmt = info->src;
  1.3452 +    SDL_PixelFormat *dstfmt = info->dst;
  1.3453 +    Uint32 rgbmask = ~srcfmt->Amask;
  1.3454  
  1.3455 -	Uint8 srcbpp;
  1.3456 -	Uint8 dstbpp;
  1.3457 -	Uint32 Pixel;
  1.3458 -	unsigned sR, sG, sB, sA;
  1.3459 +    Uint8 srcbpp;
  1.3460 +    Uint8 dstbpp;
  1.3461 +    Uint32 Pixel;
  1.3462 +    unsigned sR, sG, sB, sA;
  1.3463  
  1.3464 -	/* Set up some basic variables */
  1.3465 -	srcbpp = srcfmt->BytesPerPixel;
  1.3466 -	dstbpp = dstfmt->BytesPerPixel;
  1.3467 -	ckey &= rgbmask;
  1.3468 +    /* Set up some basic variables */
  1.3469 +    srcbpp = srcfmt->BytesPerPixel;
  1.3470 +    dstbpp = dstfmt->BytesPerPixel;
  1.3471 +    ckey &= rgbmask;
  1.3472  
  1.3473 -	/* FIXME: should map alpha to [0..255] correctly! */
  1.3474 -	while ( height-- ) {
  1.3475 +    /* FIXME: should map alpha to [0..255] correctly! */
  1.3476 +    while (height--) {
  1.3477 +		/* *INDENT-OFF* */
  1.3478  		DUFFS_LOOP(
  1.3479  		{
  1.3480  			DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel,
  1.3481 @@ -2264,227 +2340,261 @@
  1.3482  			src += srcbpp;
  1.3483  		},
  1.3484  		width);
  1.3485 -		src += srcskip;
  1.3486 -		dst += dstskip;
  1.3487 -	}
  1.3488 +		/* *INDENT-ON* */
  1.3489 +        src += srcskip;
  1.3490 +        dst += dstskip;
  1.3491 +    }
  1.3492  }
  1.3493  
  1.3494  /* Normal N to N optimized blitters */
  1.3495 -struct blit_table {
  1.3496 -	Uint32 srcR, srcG, srcB;
  1.3497 -	int dstbpp;
  1.3498 -	Uint32 dstR, dstG, dstB;
  1.3499 -	Uint32 blit_features;
  1.3500 -	void *aux_data;
  1.3501 -	SDL_loblit blitfunc;
  1.3502 -	enum { NO_ALPHA=1, SET_ALPHA=2, COPY_ALPHA=4 } alpha;
  1.3503 +struct blit_table
  1.3504 +{
  1.3505 +    Uint32 srcR, srcG, srcB;
  1.3506 +    int dstbpp;
  1.3507 +    Uint32 dstR, dstG, dstB;
  1.3508 +    Uint32 blit_features;
  1.3509 +    void *aux_data;
  1.3510 +    SDL_loblit blitfunc;
  1.3511 +    enum
  1.3512 +    { NO_ALPHA = 1, SET_ALPHA = 2, COPY_ALPHA = 4 } alpha;
  1.3513  };
  1.3514  static const struct blit_table normal_blit_1[] = {
  1.3515 -	/* Default for 8-bit RGB source, an invalid combination */
  1.3516 -	{ 0,0,0, 0, 0,0,0, 0, NULL, NULL },
  1.3517 +    /* Default for 8-bit RGB source, an invalid combination */
  1.3518 +    {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL},
  1.3519  };
  1.3520  static const struct blit_table normal_blit_2[] = {
  1.3521  #if SDL_HERMES_BLITTERS
  1.3522 -    { 0x0000F800,0x000007E0,0x0000001F, 2, 0x0000001F,0x000007E0,0x0000F800,
  1.3523 -      0, ConvertX86p16_16BGR565, ConvertX86, NO_ALPHA },
  1.3524 -    { 0x0000F800,0x000007E0,0x0000001F, 2, 0x00007C00,0x000003E0,0x0000001F,
  1.3525 -      0, ConvertX86p16_16RGB555, ConvertX86, NO_ALPHA },
  1.3526 -    { 0x0000F800,0x000007E0,0x0000001F, 2, 0x0000001F,0x000003E0,0x00007C00,
  1.3527 -      0, ConvertX86p16_16BGR555, ConvertX86, NO_ALPHA },
  1.3528 +    {0x0000F800, 0x000007E0, 0x0000001F, 2, 0x0000001F, 0x000007E0,
  1.3529 +     0x0000F800,
  1.3530 +     0, ConvertX86p16_16BGR565, ConvertX86, NO_ALPHA},
  1.3531 +    {0x0000F800, 0x000007E0, 0x0000001F, 2, 0x00007C00, 0x000003E0,
  1.3532 +     0x0000001F,
  1.3533 +     0, ConvertX86p16_16RGB555, ConvertX86, NO_ALPHA},
  1.3534 +    {0x0000F800, 0x000007E0, 0x0000001F, 2, 0x0000001F, 0x000003E0,
  1.3535 +     0x00007C00,
  1.3536 +     0, ConvertX86p16_16BGR555, ConvertX86, NO_ALPHA},
  1.3537  #elif SDL_ALTIVEC_BLITTERS
  1.3538      /* has-altivec */
  1.3539 -    { 0x0000F800,0x000007E0,0x0000001F, 4, 0x00000000,0x00000000,0x00000000,
  1.3540 -      2, NULL, Blit_RGB565_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA },
  1.3541 -    { 0x00007C00,0x000003E0,0x0000001F, 4, 0x00000000,0x00000000,0x00000000,
  1.3542 -      2, NULL, Blit_RGB555_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA },
  1.3543 +    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00000000, 0x00000000,
  1.3544 +     0x00000000,
  1.3545 +     2, NULL, Blit_RGB565_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
  1.3546 +    {0x00007C00, 0x000003E0, 0x0000001F, 4, 0x00000000, 0x00000000,
  1.3547 +     0x00000000,
  1.3548 +     2, NULL, Blit_RGB555_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
  1.3549  #endif
  1.3550 -    { 0x0000F800,0x000007E0,0x0000001F, 4, 0x00FF0000,0x0000FF00,0x000000FF,
  1.3551 -      0, NULL, Blit_RGB565_ARGB8888, SET_ALPHA },
  1.3552 -    { 0x0000F800,0x000007E0,0x0000001F, 4, 0x000000FF,0x0000FF00,0x00FF0000,
  1.3553 -      0, NULL, Blit_RGB565_ABGR8888, SET_ALPHA },
  1.3554 -    { 0x0000F800,0x000007E0,0x0000001F, 4, 0xFF000000,0x00FF0000,0x0000FF00,
  1.3555 -      0, NULL, Blit_RGB565_RGBA8888, SET_ALPHA },
  1.3556 -    { 0x0000F800,0x000007E0,0x0000001F, 4, 0x0000FF00,0x00FF0000,0xFF000000,
  1.3557 -      0, NULL, Blit_RGB565_BGRA8888, SET_ALPHA },
  1.3558 +    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00FF0000, 0x0000FF00,
  1.3559 +     0x000000FF,
  1.3560 +     0, NULL, Blit_RGB565_ARGB8888, SET_ALPHA},
  1.3561 +    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x000000FF, 0x0000FF00,
  1.3562 +     0x00FF0000,
  1.3563 +     0, NULL, Blit_RGB565_ABGR8888, SET_ALPHA},
  1.3564 +    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0xFF000000, 0x00FF0000,
  1.3565 +     0x0000FF00,
  1.3566 +     0, NULL, Blit_RGB565_RGBA8888, SET_ALPHA},
  1.3567 +    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x0000FF00, 0x00FF0000,
  1.3568 +     0xFF000000,
  1.3569 +     0, NULL, Blit_RGB565_BGRA8888, SET_ALPHA},
  1.3570  
  1.3571      /* Default for 16-bit RGB source, used if no other blitter matches */
  1.3572 -    { 0,0,0, 0, 0,0,0, 0, NULL, BlitNtoN, 0 }
  1.3573 +    {0, 0, 0, 0, 0, 0, 0, 0, NULL, BlitNtoN, 0}
  1.3574  };
  1.3575  static const struct blit_table normal_blit_3[] = {
  1.3576 -	/* Default for 24-bit RGB source, never optimized */
  1.3577 -    { 0,0,0, 0, 0,0,0, 0, NULL, BlitNtoN, 0 }
  1.3578 +    /* Default for 24-bit RGB source, never optimized */
  1.3579 +    {0, 0, 0, 0, 0, 0, 0, 0, NULL, BlitNtoN, 0}
  1.3580  };
  1.3581  static const struct blit_table normal_blit_4[] = {
  1.3582  #if SDL_HERMES_BLITTERS
  1.3583 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000F800,0x000007E0,0x0000001F,
  1.3584 -      1, ConvertMMXpII32_16RGB565, ConvertMMX, NO_ALPHA },
  1.3585 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000F800,0x000007E0,0x0000001F,
  1.3586 -      0, ConvertX86p32_16RGB565, ConvertX86, NO_ALPHA },
  1.3587 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000001F,0x000007E0,0x0000F800,
  1.3588 -      1, ConvertMMXpII32_16BGR565, ConvertMMX, NO_ALPHA },
  1.3589 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000001F,0x000007E0,0x0000F800,
  1.3590 -      0, ConvertX86p32_16BGR565, ConvertX86, NO_ALPHA },
  1.3591 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x00007C00,0x000003E0,0x0000001F,
  1.3592 -      1, ConvertMMXpII32_16RGB555, ConvertMMX, NO_ALPHA },
  1.3593 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x00007C00,0x000003E0,0x0000001F,
  1.3594 -      0, ConvertX86p32_16RGB555, ConvertX86, NO_ALPHA },
  1.3595 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000001F,0x000003E0,0x00007C00,
  1.3596 -      1, ConvertMMXpII32_16BGR555, ConvertMMX, NO_ALPHA },
  1.3597 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000001F,0x000003E0,0x00007C00,
  1.3598 -      0, ConvertX86p32_16BGR555, ConvertX86, NO_ALPHA },
  1.3599 -    { 0x00FF0000,0x0000FF00,0x000000FF, 3, 0x00FF0000,0x0000FF00,0x000000FF,
  1.3600 -      0, ConvertX86p32_24RGB888, ConvertX86, NO_ALPHA },
  1.3601 -    { 0x00FF0000,0x0000FF00,0x000000FF, 3, 0x000000FF,0x0000FF00,0x00FF0000,
  1.3602 -      0, ConvertX86p32_24BGR888, ConvertX86, NO_ALPHA },
  1.3603 -    { 0x00FF0000,0x0000FF00,0x000000FF, 4, 0x000000FF,0x0000FF00,0x00FF0000,
  1.3604 -      0, ConvertX86p32_32BGR888, ConvertX86, NO_ALPHA },
  1.3605 -    { 0x00FF0000,0x0000FF00,0x000000FF, 4, 0xFF000000,0x00FF0000,0x0000FF00,
  1.3606 -      0, ConvertX86p32_32RGBA888, ConvertX86, NO_ALPHA },
  1.3607 -    { 0x00FF0000,0x0000FF00,0x000000FF, 4, 0x0000FF00,0x00FF0000,0xFF000000,
  1.3608 -      0, ConvertX86p32_32BGRA888, ConvertX86, NO_ALPHA },
  1.3609 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000F800, 0x000007E0,
  1.3610 +     0x0000001F,
  1.3611 +     1, ConvertMMXpII32_16RGB565, ConvertMMX, NO_ALPHA},
  1.3612 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000F800, 0x000007E0,
  1.3613 +     0x0000001F,
  1.3614 +     0, ConvertX86p32_16RGB565, ConvertX86, NO_ALPHA},
  1.3615 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000001F, 0x000007E0,
  1.3616 +     0x0000F800,
  1.3617 +     1, ConvertMMXpII32_16BGR565, ConvertMMX, NO_ALPHA},
  1.3618 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000001F, 0x000007E0,
  1.3619 +     0x0000F800,
  1.3620 +     0, ConvertX86p32_16BGR565, ConvertX86, NO_ALPHA},
  1.3621 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x00007C00, 0x000003E0,
  1.3622 +     0x0000001F,
  1.3623 +     1, ConvertMMXpII32_16RGB555, ConvertMMX, NO_ALPHA},
  1.3624 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x00007C00, 0x000003E0,
  1.3625 +     0x0000001F,
  1.3626 +     0, ConvertX86p32_16RGB555, ConvertX86, NO_ALPHA},
  1.3627 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000001F, 0x000003E0,
  1.3628 +     0x00007C00,
  1.3629 +     1, ConvertMMXpII32_16BGR555, ConvertMMX, NO_ALPHA},
  1.3630 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000001F, 0x000003E0,
  1.3631 +     0x00007C00,
  1.3632 +     0, ConvertX86p32_16BGR555, ConvertX86, NO_ALPHA},
  1.3633 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 3, 0x00FF0000, 0x0000FF00,
  1.3634 +     0x000000FF,
  1.3635 +     0, ConvertX86p32_24RGB888, ConvertX86, NO_ALPHA},
  1.3636 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 3, 0x000000FF, 0x0000FF00,
  1.3637 +     0x00FF0000,
  1.3638 +     0, ConvertX86p32_24BGR888, ConvertX86, NO_ALPHA},
  1.3639 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x000000FF, 0x0000FF00,
  1.3640 +     0x00FF0000,
  1.3641 +     0, ConvertX86p32_32BGR888, ConvertX86, NO_ALPHA},
  1.3642 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0xFF000000, 0x00FF0000,
  1.3643 +     0x0000FF00,
  1.3644 +     0, ConvertX86p32_32RGBA888, ConvertX86, NO_ALPHA},
  1.3645 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x0000FF00, 0x00FF0000,
  1.3646 +     0xFF000000,
  1.3647 +     0, ConvertX86p32_32BGRA888, ConvertX86, NO_ALPHA},
  1.3648  #else
  1.3649  #if SDL_ALTIVEC_BLITTERS
  1.3650      /* has-altivec | dont-use-prefetch */
  1.3651 -    { 0x00000000,0x00000000,0x00000000, 4, 0x00000000,0x00000000,0x00000000,
  1.3652 -      6, NULL, ConvertAltivec32to32_noprefetch, NO_ALPHA | COPY_ALPHA | SET_ALPHA },
  1.3653 +    {0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000,
  1.3654 +     0x00000000,
  1.3655 +     6, NULL, ConvertAltivec32to32_noprefetch,
  1.3656 +     NO_ALPHA | COPY_ALPHA | SET_ALPHA},
  1.3657      /* has-altivec */
  1.3658 -    { 0x00000000,0x00000000,0x00000000, 4, 0x00000000,0x00000000,0x00000000,
  1.3659 -      2, NULL, ConvertAltivec32to32_prefetch, NO_ALPHA | COPY_ALPHA | SET_ALPHA },
  1.3660 +    {0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000,
  1.3661 +     0x00000000,
  1.3662 +     2, NULL, ConvertAltivec32to32_prefetch,
  1.3663 +     NO_ALPHA | COPY_ALPHA | SET_ALPHA},
  1.3664      /* has-altivec */
  1.3665 -    { 0x00000000,0x00000000,0x00000000, 2, 0x0000F800,0x000007E0,0x0000001F,
  1.3666 -      2, NULL, Blit_RGB888_RGB565Altivec, NO_ALPHA },
  1.3667 +    {0x00000000, 0x00000000, 0x00000000, 2, 0x0000F800, 0x000007E0,
  1.3668 +     0x0000001F,
  1.3669 +     2, NULL, Blit_RGB888_RGB565Altivec, NO_ALPHA},
  1.3670  #endif
  1.3671 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000F800,0x000007E0,0x0000001F,
  1.3672 -      0, NULL, Blit_RGB888_RGB565, NO_ALPHA },
  1.3673 -    { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x00007C00,0x000003E0,0x0000001F,
  1.3674 -      0, NULL, Blit_RGB888_RGB555, NO_ALPHA },
  1.3675 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000F800, 0x000007E0,
  1.3676 +     0x0000001F,
  1.3677 +     0, NULL, Blit_RGB888_RGB565, NO_ALPHA},
  1.3678 +    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x00007C00, 0x000003E0,
  1.3679 +     0x0000001F,
  1.3680 +     0, NULL, Blit_RGB888_RGB555, NO_ALPHA},
  1.3681  #endif
  1.3682 -	/* Default for 32-bit RGB source, used if no other blitter matches */
  1.3683 -	{ 0,0,0, 0, 0,0,0, 0, NULL, BlitNtoN, 0 }
  1.3684 +    /* Default for 32-bit RGB source, used if no other blitter matches */
  1.3685 +    {0, 0, 0, 0, 0, 0, 0, 0, NULL, BlitNtoN, 0}
  1.3686  };
  1.3687  static const struct blit_table *normal_blit[] = {
  1.3688 -	normal_blit_1, normal_blit_2, normal_blit_3, normal_blit_4
  1.3689 +    normal_blit_1, normal_blit_2, normal_blit_3, normal_blit_4
  1.3690  };
  1.3691  
  1.3692  /* Mask matches table, or table entry is zero */
  1.3693  #define MASKOK(x, y) (((x) == (y)) || ((y) == 0x00000000))
  1.3694  
  1.3695 -SDL_loblit SDL_CalculateBlitN(SDL_Surface *surface, int blit_index)
  1.3696 +SDL_loblit
  1.3697 +SDL_CalculateBlitN (SDL_Surface * surface, int blit_index)
  1.3698  {
  1.3699 -	struct private_swaccel *sdata;
  1.3700 -	SDL_PixelFormat *srcfmt;
  1.3701 -	SDL_PixelFormat *dstfmt;
  1.3702 -	const struct blit_table *table;
  1.3703 -	int which;
  1.3704 -	SDL_loblit blitfun;
  1.3705 +    struct private_swaccel *sdata;
  1.3706 +    SDL_PixelFormat *srcfmt;
  1.3707 +    SDL_PixelFormat *dstfmt;
  1.3708 +    const struct blit_table *table;
  1.3709 +    int which;
  1.3710 +    SDL_loblit blitfun;
  1.3711  
  1.3712 -	/* Set up data for choosing the blit */
  1.3713 -	sdata = surface->map->sw_data;
  1.3714 -	srcfmt = surface->format;
  1.3715 -	dstfmt = surface->map->dst->format;
  1.3716 +    /* Set up data for choosing the blit */
  1.3717 +    sdata = surface->map->sw_data;
  1.3718 +    srcfmt = surface->format;
  1.3719 +    dstfmt = surface->map->dst->format;
  1.3720  
  1.3721 -	if ( blit_index & 2 ) {
  1.3722 -	        /* alpha or alpha+colorkey */
  1.3723 -	        return SDL_CalculateAlphaBlit(surface, blit_index);
  1.3724 -	}
  1.3725 +    if (blit_index & 2) {
  1.3726 +        /* alpha or alpha+colorkey */
  1.3727 +        return SDL_CalculateAlphaBlit (surface, blit_index);
  1.3728 +    }
  1.3729  
  1.3730 -	/* We don't support destinations less than 8-bits */
  1.3731 -	if ( dstfmt->BitsPerPixel < 8 ) {
  1.3732 -		return(NULL);
  1.3733 -	}
  1.3734 -	
  1.3735 -	if(blit_index == 1) {
  1.3736 -	    /* colorkey blit: Here we don't have too many options, mostly
  1.3737 -	       because RLE is the preferred fast way to deal with this.
  1.3738 -	       If a particular case turns out to be useful we'll add it. */
  1.3739 +    /* We don't support destinations less than 8-bits */
  1.3740 +    if (dstfmt->BitsPerPixel < 8) {
  1.3741 +        return (NULL);
  1.3742 +    }
  1.3743  
  1.3744 -	    if(srcfmt->BytesPerPixel == 2
  1.3745 -	       && surface->map->identity)
  1.3746 -		return Blit2to2Key;
  1.3747 -	    else if(dstfmt->BytesPerPixel == 1)
  1.3748 -		return BlitNto1Key;
  1.3749 -	    else {
  1.3750 +    if (blit_index == 1) {
  1.3751 +        /* colorkey blit: Here we don't have too many options, mostly
  1.3752 +           because RLE is the preferred fast way to deal with this.
  1.3753 +           If a particular case turns out to be useful we'll add it. */
  1.3754 +
  1.3755 +        if (srcfmt->BytesPerPixel == 2 && surface->map->identity)
  1.3756 +            return Blit2to2Key;
  1.3757 +        else if (dstfmt->BytesPerPixel == 1)
  1.3758 +            return BlitNto1Key;
  1.3759 +        else {
  1.3760  #if SDL_ALTIVEC_BLITTERS
  1.3761 -        if((srcfmt->BytesPerPixel == 4) && (dstfmt->BytesPerPixel == 4) && SDL_HasAltiVec()) {
  1.3762 -            return Blit32to32KeyAltivec;
  1.3763 -        } else
  1.3764 +            if ((srcfmt->BytesPerPixel == 4) && (dstfmt->BytesPerPixel == 4)
  1.3765 +                && SDL_HasAltiVec ()) {
  1.3766 +                return Blit32to32KeyAltivec;
  1.3767 +            } else
  1.3768  #endif
  1.3769  
  1.3770 -		if(srcfmt->Amask && dstfmt->Amask)
  1.3771 -		    return BlitNtoNKeyCopyAlpha;
  1.3772 -		else
  1.3773 -		    return BlitNtoNKey;
  1.3774 -	    }
  1.3775 -	}
  1.3776 +            if (srcfmt->Amask && dstfmt->Amask)
  1.3777 +                return BlitNtoNKeyCopyAlpha;
  1.3778 +            else
  1.3779 +                return BlitNtoNKey;
  1.3780 +        }
  1.3781 +    }
  1.3782  
  1.3783 -	blitfun = NULL;
  1.3784 -	if ( dstfmt->BitsPerPixel == 8 ) {
  1.3785 -		/* We assume 8-bit destinations are palettized */
  1.3786 -		if ( (srcfmt->BytesPerPixel == 4) &&
  1.3787 -		     (srcfmt->Rmask == 0x00FF0000) &&
  1.3788 -		     (srcfmt->Gmask == 0x0000FF00) &&
  1.3789 -		     (srcfmt->Bmask == 0x000000FF) ) {
  1.3790 -			if ( surface->map->table ) {
  1.3791 -				blitfun = Blit_RGB888_index8_map;
  1.3792 -			} else {
  1.3793 +    blitfun = NULL;
  1.3794 +    if (dstfmt->BitsPerPixel == 8) {
  1.3795 +        /* We assume 8-bit destinations are palettized */
  1.3796 +        if ((srcfmt->BytesPerPixel == 4) &&
  1.3797 +            (srcfmt->Rmask == 0x00FF0000) &&
  1.3798 +            (srcfmt->Gmask == 0x0000FF00) && (srcfmt->Bmask == 0x000000FF)) {
  1.3799 +            if (surface->map->table) {
  1.3800 +                blitfun = Blit_RGB888_index8_map;
  1.3801 +            } else {
  1.3802  #if SDL_HERMES_BLITTERS
  1.3803 -				sdata->aux_data = ConvertX86p32_8RGB332;
  1.3804 -				blitfun = ConvertX86;
  1.3805 +                sdata->aux_data = ConvertX86p32_8RGB332;
  1.3806 +                blitfun = ConvertX86;
  1.3807  #else
  1.3808 -				blitfun = Blit_RGB888_index8;
  1.3809 +                blitfun = Blit_RGB888_index8;
  1.3810  #endif
  1.3811 -			}
  1.3812 -		} else {
  1.3813 -			blitfun = BlitNto1;
  1.3814 -		}
  1.3815 -	} else {
  1.3816 -		/* Now the meat, choose the blitter we want */
  1.3817 -		int a_need = NO_ALPHA;
  1.3818 -		if(dstfmt->Amask)
  1.3819 -		    a_need = srcfmt->Amask ? COPY_ALPHA : SET_ALPHA;
  1.3820 -		table = normal_blit[srcfmt->BytesPerPixel-1];
  1.3821 -		for ( which=0; table[which].dstbpp; ++which ) {
  1.3822 -			if ( MASKOK(srcfmt->Rmask, table[which].srcR) &&
  1.3823 -			    MASKOK(srcfmt->Gmask, table[which].srcG) &&
  1.3824 -			    MASKOK(srcfmt->Bmask, table[which].srcB) &&
  1.3825 -			    MASKOK(dstfmt->Rmask, table[which].dstR) &&
  1.3826 -			    MASKOK(dstfmt->Gmask, table[which].dstG) &&
  1.3827 -			    MASKOK(dstfmt->Bmask, table[which].dstB) &&
  1.3828 -			    dstfmt->BytesPerPixel == table[which].dstbpp &&
  1.3829 -			    (a_need & table[which].alpha) == a_need &&
  1.3830 -			    ((table[which].blit_features & GetBlitFeatures()) == table[which].blit_features) )
  1.3831 -				break;
  1.3832 -		}
  1.3833 -		sdata->aux_data = table[which].aux_data;
  1.3834 -		blitfun = table[which].blitfunc;
  1.3835 +            }
  1.3836 +        } else {
  1.3837 +            blitfun = BlitNto1;
  1.3838 +        }
  1.3839 +    } else {
  1.3840 +        /* Now the meat, choose the blitter we want */
  1.3841 +        int a_need = NO_ALPHA;
  1.3842 +        if (dstfmt->Amask)
  1.3843 +            a_need = srcfmt->Amask ? COPY_ALPHA : SET_ALPHA;
  1.3844 +        table = normal_blit[srcfmt->BytesPerPixel - 1];
  1.3845 +        for (which = 0; table[which].dstbpp; ++which) {
  1.3846 +            if (MASKOK (srcfmt->Rmask, table[which].srcR) &&
  1.3847 +                MASKOK (srcfmt->Gmask, table[which].srcG) &&
  1.3848 +                MASKOK (srcfmt->Bmask, table[which].srcB) &&
  1.3849 +                MASKOK (dstfmt->Rmask, table[which].dstR) &&
  1.3850 +                MASKOK (dstfmt->Gmask, table[which].dstG) &&
  1.3851 +                MASKOK (dstfmt->Bmask, table[which].dstB) &&
  1.3852 +                dstfmt->BytesPerPixel == table[which].dstbpp &&
  1.3853 +                (a_need & table[which].alpha) == a_need &&
  1.3854 +                ((table[which].blit_features & GetBlitFeatures ()) ==
  1.3855 +                 table[which].blit_features))
  1.3856 +                break;
  1.3857 +        }
  1.3858 +        sdata->aux_data = table[which].aux_data;
  1.3859 +        blitfun = table[which].blitfunc;
  1.3860  
  1.3861 -		if(blitfun == BlitNtoN) {  /* default C fallback catch-all. Slow! */
  1.3862 -			/* Fastpath C fallback: 32bit RGB<->RGBA blit with matching RGB */
  1.3863 -			if ( srcfmt->BytesPerPixel == 4 && dstfmt->BytesPerPixel == 4 &&
  1.3864 -			     srcfmt->Rmask == dstfmt->Rmask &&
  1.3865 -			     srcfmt->Gmask == dstfmt->Gmask &&
  1.3866 -			     srcfmt->Bmask == dstfmt->Bmask ) {
  1.3867 -				blitfun = Blit4to4MaskAlpha;
  1.3868 -			} else if ( a_need == COPY_ALPHA ) {
  1.3869 -			    blitfun = BlitNtoNCopyAlpha;
  1.3870 -			}
  1.3871 -		}
  1.3872 -	}
  1.3873 +        if (blitfun == BlitNtoN) {      /* default C fallback catch-all. Slow! */
  1.3874 +            /* Fastpath C fallback: 32bit RGB<->RGBA blit with matching RGB */
  1.3875 +            if (srcfmt->BytesPerPixel == 4 && dstfmt->BytesPerPixel == 4 &&
  1.3876 +                srcfmt->Rmask == dstfmt->Rmask &&
  1.3877 +                srcfmt->Gmask == dstfmt->Gmask &&
  1.3878 +                srcfmt->Bmask == dstfmt->Bmask) {
  1.3879 +                blitfun = Blit4to4MaskAlpha;
  1.3880 +            } else if (a_need == COPY_ALPHA) {
  1.3881 +                blitfun = BlitNtoNCopyAlpha;
  1.3882 +            }
  1.3883 +        }
  1.3884 +    }
  1.3885  
  1.3886  #ifdef DEBUG_ASM
  1.3887  #if SDL_HERMES_BLITTERS
  1.3888 -	if ( blitfun == ConvertMMX )
  1.3889 -		fprintf(stderr, "Using mmx blit\n");
  1.3890 -	else
  1.3891 -	if ( blitfun == ConvertX86 )
  1.3892 -		fprintf(stderr, "Using asm blit\n");
  1.3893 -	else
  1.3894 +    if (blitfun == ConvertMMX)
  1.3895 +        fprintf (stderr, "Using mmx blit\n");
  1.3896 +    else if (blitfun == ConvertX86)
  1.3897 +        fprintf (stderr, "Using asm blit\n");
  1.3898 +    else
  1.3899  #endif
  1.3900 -	if ( (blitfun == BlitNtoN) || (blitfun == BlitNto1) )
  1.3901 -		fprintf(stderr, "Using C blit\n");
  1.3902 -	else
  1.3903 -		fprintf(stderr, "Using optimized C blit\n");
  1.3904 +    if ((blitfun == BlitNtoN) || (blitfun == BlitNto1))
  1.3905 +        fprintf (stderr, "Using C blit\n");
  1.3906 +    else
  1.3907 +        fprintf (stderr, "Using optimized C blit\n");
  1.3908  #endif /* DEBUG_ASM */
  1.3909  
  1.3910 -	return(blitfun);
  1.3911 +    return (blitfun);
  1.3912  }
  1.3913 +
  1.3914 +/* vi: set ts=4 sw=4 expandtab: */