indent
authorSam Lantinga <slouken@libsdl.org>
Sat, 07 Feb 2009 18:03:46 +0000
changeset 3055cd863dd2082b
parent 3054 8d93bfecb9dc
child 3056 a434fe6360df
indent
src/video/SDL_alphamult.c
src/video/SDL_alphamult.h
src/video/win32/SDL_gdirender.c
     1.1 --- a/src/video/SDL_alphamult.c	Sat Feb 07 17:56:08 2009 +0000
     1.2 +++ b/src/video/SDL_alphamult.c	Sat Feb 07 18:03:46 2009 +0000
     1.3 @@ -50,9 +50,11 @@
     1.4      } \
     1.5  }
     1.6  
     1.7 +/* *INDENT-OFF* */
     1.8  DEFINE_PREMULTIPLY_FUNC(ARGB8888)
     1.9  DEFINE_PREMULTIPLY_FUNC(RGBA8888)
    1.10  DEFINE_PREMULTIPLY_FUNC(ABGR8888)
    1.11  DEFINE_PREMULTIPLY_FUNC(BGRA8888)
    1.12 +/* *INDENT-ON* */
    1.13  
    1.14  /* vi: set ts=4 sw=4 expandtab: */
     2.1 --- a/src/video/SDL_alphamult.h	Sat Feb 07 17:56:08 2009 +0000
     2.2 +++ b/src/video/SDL_alphamult.h	Sat Feb 07 18:03:46 2009 +0000
     2.3 @@ -26,10 +26,12 @@
     2.4  void \
     2.5  SDL_PreMultiplyAlpha##fmt(int w, int h, Uint32 *pixels, int pitch);
     2.6  
     2.7 +/* *INDENT-OFF* */
     2.8  DEFINE_PREMULTIPLY_FUNC(ARGB8888)
     2.9  DEFINE_PREMULTIPLY_FUNC(RGBA8888)
    2.10  DEFINE_PREMULTIPLY_FUNC(ABGR8888)
    2.11  DEFINE_PREMULTIPLY_FUNC(BGRA8888)
    2.12 +/* *INDENT-ON* */
    2.13  
    2.14  #undef DEFINE_PREMULTIPLY_FUNC
    2.15  
     3.1 --- a/src/video/win32/SDL_gdirender.c	Sat Feb 07 17:56:08 2009 +0000
     3.2 +++ b/src/video/win32/SDL_gdirender.c	Sat Feb 07 18:03:46 2009 +0000
     3.3 @@ -478,19 +478,27 @@
     3.4          if (!data->premultiplied && data->pixels) {
     3.5              switch (texture->format) {
     3.6              case SDL_PIXELFORMAT_ARGB8888:
     3.7 -                SDL_PreMultiplyAlphaARGB8888(texture->w, texture->h, (Uint32 *)data->pixels, data->pitch);
     3.8 +                SDL_PreMultiplyAlphaARGB8888(texture->w, texture->h,
     3.9 +                                             (Uint32 *) data->pixels,
    3.10 +                                             data->pitch);
    3.11                  data->premultiplied = SDL_TRUE;
    3.12                  break;
    3.13              case SDL_PIXELFORMAT_RGBA8888:
    3.14 -                SDL_PreMultiplyAlphaRGBA8888(texture->w, texture->h, (Uint32 *)data->pixels, data->pitch);
    3.15 +                SDL_PreMultiplyAlphaRGBA8888(texture->w, texture->h,
    3.16 +                                             (Uint32 *) data->pixels,
    3.17 +                                             data->pitch);
    3.18                  data->premultiplied = SDL_TRUE;
    3.19                  break;
    3.20              case SDL_PIXELFORMAT_ABGR8888:
    3.21 -                SDL_PreMultiplyAlphaABGR8888(texture->w, texture->h, (Uint32 *)data->pixels, data->pitch);
    3.22 +                SDL_PreMultiplyAlphaABGR8888(texture->w, texture->h,
    3.23 +                                             (Uint32 *) data->pixels,
    3.24 +                                             data->pitch);
    3.25                  data->premultiplied = SDL_TRUE;
    3.26                  break;
    3.27              case SDL_PIXELFORMAT_BGRA8888:
    3.28 -                SDL_PreMultiplyAlphaBGRA8888(texture->w, texture->h, (Uint32 *)data->pixels, data->pitch);
    3.29 +                SDL_PreMultiplyAlphaBGRA8888(texture->w, texture->h,
    3.30 +                                             (Uint32 *) data->pixels,
    3.31 +                                             data->pitch);
    3.32                  data->premultiplied = SDL_TRUE;
    3.33                  break;
    3.34              }
    3.35 @@ -554,19 +562,25 @@
    3.36                  dst += data->pitch;
    3.37              }
    3.38              if (data->premultiplied) {
    3.39 -                Uint32 *pixels = (Uint32 *) data->pixels + rect->y * (data->pitch / 4) + rect->x;
    3.40 +                Uint32 *pixels =
    3.41 +                    (Uint32 *) data->pixels + rect->y * (data->pitch / 4) +
    3.42 +                    rect->x;
    3.43                  switch (texture->format) {
    3.44                  case SDL_PIXELFORMAT_ARGB8888:
    3.45 -                    SDL_PreMultiplyAlphaARGB8888(rect->w, rect->h, pixels, data->pitch);
    3.46 +                    SDL_PreMultiplyAlphaARGB8888(rect->w, rect->h, pixels,
    3.47 +                                                 data->pitch);
    3.48                      break;
    3.49                  case SDL_PIXELFORMAT_RGBA8888:
    3.50 -                    SDL_PreMultiplyAlphaRGBA8888(rect->w, rect->h, pixels, data->pitch);
    3.51 +                    SDL_PreMultiplyAlphaRGBA8888(rect->w, rect->h, pixels,
    3.52 +                                                 data->pitch);
    3.53                      break;
    3.54                  case SDL_PIXELFORMAT_ABGR8888:
    3.55 -                    SDL_PreMultiplyAlphaABGR8888(rect->w, rect->h, pixels, data->pitch);
    3.56 +                    SDL_PreMultiplyAlphaABGR8888(rect->w, rect->h, pixels,
    3.57 +                                                 data->pitch);
    3.58                      break;
    3.59                  case SDL_PIXELFORMAT_BGRA8888:
    3.60 -                    SDL_PreMultiplyAlphaBGRA8888(rect->w, rect->h, pixels, data->pitch);
    3.61 +                    SDL_PreMultiplyAlphaBGRA8888(rect->w, rect->h, pixels,
    3.62 +                                                 data->pitch);
    3.63                      break;
    3.64                  }
    3.65              }
    3.66 @@ -745,7 +759,7 @@
    3.67          SelectPalette(data->memory_hdc, texturedata->hpal, TRUE);
    3.68          RealizePalette(data->memory_hdc);
    3.69      }
    3.70 -    if (texture->blendMode & (SDL_BLENDMODE_MASK|SDL_BLENDMODE_BLEND)) {
    3.71 +    if (texture->blendMode & (SDL_BLENDMODE_MASK | SDL_BLENDMODE_BLEND)) {
    3.72          BLENDFUNCTION blendFunc = {
    3.73              AC_SRC_OVER,
    3.74              0,