aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx/antialias.cpp
diff options
context:
space:
mode:
authorPaweł Kołodziejski2009-02-21 07:42:23 +0000
committerPaweł Kołodziejski2009-02-21 07:42:23 +0000
commit30848dec141c40c0f2f3793de329913903443396 (patch)
tree28be33123afa6581396614820af778afb430eb06 /engines/sci/gfx/antialias.cpp
parent3874465bdbb6d4449f0bb803e8d8db955757c872 (diff)
downloadscummvm-rg350-30848dec141c40c0f2f3793de329913903443396.tar.gz
scummvm-rg350-30848dec141c40c0f2f3793de329913903443396.tar.bz2
scummvm-rg350-30848dec141c40c0f2f3793de329913903443396.zip
formating
svn-id: r38666
Diffstat (limited to 'engines/sci/gfx/antialias.cpp')
-rw-r--r--engines/sci/gfx/antialias.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/engines/sci/gfx/antialias.cpp b/engines/sci/gfx/antialias.cpp
index 63aa62678d..a730868ca1 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;
}