From 30848dec141c40c0f2f3793de329913903443396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Sat, 21 Feb 2009 07:42:23 +0000 Subject: [PATCH] formating svn-id: r38666 --- engines/sci/gfx/antialias.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/engines/sci/gfx/antialias.cpp b/engines/sci/gfx/antialias.cpp index 63aa62678d9..a730868ca16 100644 --- a/engines/sci/gfx/antialias.cpp +++ b/engines/sci/gfx/antialias.cpp @@ -28,17 +28,16 @@ #include "sci/include/gfx_system.h" #include "sci/include/gfx_tools.h" -static void -antialiase_simple(gfx_pixmap_t *pixmap, int mask[], int shift_const, gfx_mode_t *mode) { +static void antialiase_simple(gfx_pixmap_t *pixmap, int mask[], int shift_const, gfx_mode_t *mode) { int x, y, c; int bytespp = mode->bytespp; int line_size = bytespp * pixmap->xl; char *lastline[2]; char *lastline_p = NULL; - char *data_p = (char *) pixmap->data; + char *data_p = (char *)pixmap->data; - lastline[0] = (char*)sci_malloc(line_size); - lastline[1] = (char*)sci_malloc(line_size); + lastline[0] = (char *)sci_malloc(line_size); + lastline[1] = (char *)sci_malloc(line_size); for (y = 0; y < pixmap->yl; y++) { int visimode = (y > 0 && y + 1 < pixmap->yl) ? 1 : 0; @@ -100,11 +99,11 @@ antialiase_simple(gfx_pixmap_t *pixmap, int mask[], int shift_const, gfx_mode_t switch (visimode) { case 0: - accum /= 9; /* Only happens twelve times */ + accum /= 9; // Only happens twelve times break; case 1: - accum = (accum >> 6) + (accum >> 4); /* 15/16 intensity */ + accum = (accum >> 6) + (accum >> 4); // 15/16 intensity break; case 2: @@ -112,7 +111,7 @@ antialiase_simple(gfx_pixmap_t *pixmap, int mask[], int shift_const, gfx_mode_t break; default: - accum = (c == 0) ? 0xffffffff : 0; /* Error: mark as red */ + accum = (c == 0) ? 0xffffffff : 0; // Error: mark as red } result |= (accum & mask[c]); @@ -130,14 +129,13 @@ antialiase_simple(gfx_pixmap_t *pixmap, int mask[], int shift_const, gfx_mode_t free(lastline[1]); } -void -gfxr_antialiase(gfx_pixmap_t *pixmap, gfx_mode_t *mode, gfxr_antialiasing_t type) { +void gfxr_antialiase(gfx_pixmap_t *pixmap, gfx_mode_t *mode, gfxr_antialiasing_t type) { int masks[3]; int shift_const = 0; #ifdef WORDS_BIGENDIAN shift_const = (sizeof(unsigned long) - mode->bytespp) << 3; -#endif /* WORDS_BIGENDIAN */ +#endif masks[0] = mode->red_mask; masks[1] = mode->green_mask; @@ -158,6 +156,4 @@ gfxr_antialiase(gfx_pixmap_t *pixmap, gfx_mode_t *mode, gfxr_antialiasing_t type default: GFXERROR("Invalid antialiasing mode %d (internal error)\n", type); } - - return; }