changeset 3055:cd863dd2082b

indent
author Sam Lantinga <slouken@libsdl.org>
date Sat, 07 Feb 2009 18:03:46 +0000
parents 8d93bfecb9dc
children a434fe6360df
files src/video/SDL_alphamult.c src/video/SDL_alphamult.h src/video/win32/SDL_gdirender.c
diffstat 3 files changed, 28 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/SDL_alphamult.c	Sat Feb 07 17:56:08 2009 +0000
+++ b/src/video/SDL_alphamult.c	Sat Feb 07 18:03:46 2009 +0000
@@ -50,9 +50,11 @@
     } \
 }
 
+/* *INDENT-OFF* */
 DEFINE_PREMULTIPLY_FUNC(ARGB8888)
 DEFINE_PREMULTIPLY_FUNC(RGBA8888)
 DEFINE_PREMULTIPLY_FUNC(ABGR8888)
 DEFINE_PREMULTIPLY_FUNC(BGRA8888)
+/* *INDENT-ON* */
 
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/video/SDL_alphamult.h	Sat Feb 07 17:56:08 2009 +0000
+++ b/src/video/SDL_alphamult.h	Sat Feb 07 18:03:46 2009 +0000
@@ -26,10 +26,12 @@
 void \
 SDL_PreMultiplyAlpha##fmt(int w, int h, Uint32 *pixels, int pitch);
 
+/* *INDENT-OFF* */
 DEFINE_PREMULTIPLY_FUNC(ARGB8888)
 DEFINE_PREMULTIPLY_FUNC(RGBA8888)
 DEFINE_PREMULTIPLY_FUNC(ABGR8888)
 DEFINE_PREMULTIPLY_FUNC(BGRA8888)
+/* *INDENT-ON* */
 
 #undef DEFINE_PREMULTIPLY_FUNC
 
--- a/src/video/win32/SDL_gdirender.c	Sat Feb 07 17:56:08 2009 +0000
+++ b/src/video/win32/SDL_gdirender.c	Sat Feb 07 18:03:46 2009 +0000
@@ -478,19 +478,27 @@
         if (!data->premultiplied && data->pixels) {
             switch (texture->format) {
             case SDL_PIXELFORMAT_ARGB8888:
-                SDL_PreMultiplyAlphaARGB8888(texture->w, texture->h, (Uint32 *)data->pixels, data->pitch);
+                SDL_PreMultiplyAlphaARGB8888(texture->w, texture->h,
+                                             (Uint32 *) data->pixels,
+                                             data->pitch);
                 data->premultiplied = SDL_TRUE;
                 break;
             case SDL_PIXELFORMAT_RGBA8888:
-                SDL_PreMultiplyAlphaRGBA8888(texture->w, texture->h, (Uint32 *)data->pixels, data->pitch);
+                SDL_PreMultiplyAlphaRGBA8888(texture->w, texture->h,
+                                             (Uint32 *) data->pixels,
+                                             data->pitch);
                 data->premultiplied = SDL_TRUE;
                 break;
             case SDL_PIXELFORMAT_ABGR8888:
-                SDL_PreMultiplyAlphaABGR8888(texture->w, texture->h, (Uint32 *)data->pixels, data->pitch);
+                SDL_PreMultiplyAlphaABGR8888(texture->w, texture->h,
+                                             (Uint32 *) data->pixels,
+                                             data->pitch);
                 data->premultiplied = SDL_TRUE;
                 break;
             case SDL_PIXELFORMAT_BGRA8888:
-                SDL_PreMultiplyAlphaBGRA8888(texture->w, texture->h, (Uint32 *)data->pixels, data->pitch);
+                SDL_PreMultiplyAlphaBGRA8888(texture->w, texture->h,
+                                             (Uint32 *) data->pixels,
+                                             data->pitch);
                 data->premultiplied = SDL_TRUE;
                 break;
             }
@@ -554,19 +562,25 @@
                 dst += data->pitch;
             }
             if (data->premultiplied) {
-                Uint32 *pixels = (Uint32 *) data->pixels + rect->y * (data->pitch / 4) + rect->x;
+                Uint32 *pixels =
+                    (Uint32 *) data->pixels + rect->y * (data->pitch / 4) +
+                    rect->x;
                 switch (texture->format) {
                 case SDL_PIXELFORMAT_ARGB8888:
-                    SDL_PreMultiplyAlphaARGB8888(rect->w, rect->h, pixels, data->pitch);
+                    SDL_PreMultiplyAlphaARGB8888(rect->w, rect->h, pixels,
+                                                 data->pitch);
                     break;
                 case SDL_PIXELFORMAT_RGBA8888:
-                    SDL_PreMultiplyAlphaRGBA8888(rect->w, rect->h, pixels, data->pitch);
+                    SDL_PreMultiplyAlphaRGBA8888(rect->w, rect->h, pixels,
+                                                 data->pitch);
                     break;
                 case SDL_PIXELFORMAT_ABGR8888:
-                    SDL_PreMultiplyAlphaABGR8888(rect->w, rect->h, pixels, data->pitch);
+                    SDL_PreMultiplyAlphaABGR8888(rect->w, rect->h, pixels,
+                                                 data->pitch);
                     break;
                 case SDL_PIXELFORMAT_BGRA8888:
-                    SDL_PreMultiplyAlphaBGRA8888(rect->w, rect->h, pixels, data->pitch);
+                    SDL_PreMultiplyAlphaBGRA8888(rect->w, rect->h, pixels,
+                                                 data->pitch);
                     break;
                 }
             }
@@ -745,7 +759,7 @@
         SelectPalette(data->memory_hdc, texturedata->hpal, TRUE);
         RealizePalette(data->memory_hdc);
     }
-    if (texture->blendMode & (SDL_BLENDMODE_MASK|SDL_BLENDMODE_BLEND)) {
+    if (texture->blendMode & (SDL_BLENDMODE_MASK | SDL_BLENDMODE_BLEND)) {
         BLENDFUNCTION blendFunc = {
             AC_SRC_OVER,
             0,