diff options
Diffstat (limited to 'engines/sci/gfx/resource')
-rw-r--r-- | engines/sci/gfx/resource/sci_pic_0.cpp | 56 | ||||
-rw-r--r-- | engines/sci/gfx/resource/sci_picfill.cpp | 4 | ||||
-rw-r--r-- | engines/sci/gfx/resource/sci_picfill_aux.cpp | 4 | ||||
-rw-r--r-- | engines/sci/gfx/resource/sci_resmgr.cpp | 2 | ||||
-rw-r--r-- | engines/sci/gfx/resource/sci_view_1.cpp | 8 |
5 files changed, 37 insertions, 37 deletions
diff --git a/engines/sci/gfx/resource/sci_pic_0.cpp b/engines/sci/gfx/resource/sci_pic_0.cpp index 392996d4e5..d64e46f32d 100644 --- a/engines/sci/gfx/resource/sci_pic_0.cpp +++ b/engines/sci/gfx/resource/sci_pic_0.cpp @@ -45,7 +45,7 @@ int sci0_palette = 0; // Copied from include/kernel.h #define SCI0_PRIORITY_BAND_FIRST_14_ZONES(nr) ((((nr) == 0)? 0 : \ - ((first) + (((nr)-1) * (last - first)) / 14))) + ((first) + (((nr)-1) * (last - first)) / 14))) // Default color maps gfx_pixmap_color_t gfx_sci0_image_colors[SCI0_MAX_PALETTE+1][GFX_SCI0_IMAGE_COLORS_NR] = { @@ -202,22 +202,22 @@ void gfxr_clear_pic0(gfxr_pic_t *pic, int sci_titlebar_size) { #define LINEMACRO(startx, starty, deltalinear, deltanonlinear, linearvar, nonlinearvar, \ linearend, nonlinearstart, linearmod, nonlinearmod, operation) \ - x = (startx); y = (starty); \ - incrNE = ((deltalinear) > 0)? (deltalinear) : -(deltalinear); \ - incrNE <<= 1; \ - deltanonlinear <<= 1; \ - incrE = ((deltanonlinear) > 0) ? -(deltanonlinear) : (deltanonlinear); \ - d = nonlinearstart-1; \ - while (linearvar != (linearend)) { \ - buffer[linewidth * y + x] operation color; \ + x = (startx); y = (starty); \ + incrNE = ((deltalinear) > 0)? (deltalinear) : -(deltalinear); \ + incrNE <<= 1; \ + deltanonlinear <<= 1; \ + incrE = ((deltanonlinear) > 0) ? -(deltanonlinear) : (deltanonlinear); \ + d = nonlinearstart-1; \ + while (linearvar != (linearend)) { \ + buffer[linewidth * y + x] operation color; \ /* color ^= color2; color2 ^= color; color ^= color2; */ /* Swap colors */ \ - linearvar += linearmod; \ - if ((d+=incrE) < 0) { \ - d += incrNE; \ - nonlinearvar += nonlinearmod; \ - }; \ - }; \ - buffer[linewidth * y + x] operation color; + linearvar += linearmod; \ + if ((d+=incrE) < 0) { \ + d += incrNE; \ + nonlinearvar += nonlinearmod; \ + }; \ + }; \ + buffer[linewidth * y + x] operation color; static void _gfxr_auxbuf_line_draw(gfxr_pic_t *pic, rect_t line, int color, int color2, int sci_titlebar_size) { int dx, dy, incrE, incrNE, d, finalx, finaly; @@ -556,7 +556,7 @@ enum { }; static void _gfxr_fill_ellipse(gfxr_pic_t *pic, byte *buffer, int linewidth, int x, int y, - int rad_x, int rad_y, int color, int fillstyle) { + int rad_x, int rad_y, int color, int fillstyle) { int xx = 0, yy = rad_y; int i, x_i, y_i; int xr = 2 * rad_x * rad_x; @@ -621,7 +621,7 @@ static void _gfxr_fill_ellipse(gfxr_pic_t *pic, byte *buffer, int linewidth, int } static inline void _gfxr_auxplot_brush(gfxr_pic_t *pic, byte *buffer, int yoffset, int offset, int plot, - int color, gfx_brush_mode_t brush_mode, int randseed) { + int color, gfx_brush_mode_t brush_mode, int randseed) { // yoffset 63680, offset 320, plot 1, color 34, brush_mode 0, randseed 432)*/ // Auxplot: Used by plot_aux_pattern to plot to visual and priority int xc, yc; @@ -690,7 +690,7 @@ static inline void _gfxr_auxplot_brush(gfxr_pic_t *pic, byte *buffer, int yoffse #define PLOT_AUX_PATTERN_NO_RANDOM -1 static void _gfxr_plot_aux_pattern(gfxr_pic_t *pic, int x, int y, int size, int circle, int random, - int mask, int color, int priority, int control, gfx_brush_mode_t brush_mode, int map_nr) { + int mask, int color, int priority, int control, gfx_brush_mode_t brush_mode, int map_nr) { // Plots an appropriate pattern to the aux buffer and the control buffer, // if mask & GFX_MASK_CONTROL // random should be set to the random index, or -1 to disable @@ -813,7 +813,7 @@ static void _gfxr_plot_aux_pattern(gfxr_pic_t *pic, int x, int y, int size, int } static void _gfxr_draw_pattern(gfxr_pic_t *pic, int x, int y, int color, int priority, int control, int drawenable, - int pattern_code, int pattern_size, int pattern_nr, gfx_brush_mode_t brush_mode, int sci_titlebar_size) { + int pattern_code, int pattern_size, int pattern_nr, gfx_brush_mode_t brush_mode, int sci_titlebar_size) { int xsize = (pattern_size + 1) * pic->mode->xfact - 1; int ysize = (pattern_size + 1) * pic->mode->yfact - 1; int scaled_x, scaled_y; @@ -928,7 +928,7 @@ static inline void _gfxr_draw_subline(gfxr_pic_t *pic, int x, int y, int ex, int } static void _gfxr_draw_line(gfxr_pic_t *pic, int x, int y, int ex, int ey, int color, - int priority, int control, int drawenable, int line_mode, int cmd, int sci_titlebar_size) { + int priority, int control, int drawenable, int line_mode, int cmd, int sci_titlebar_size) { int scale_x = pic->mode->xfact; int scale_y = pic->mode->yfact; int xc, yc; @@ -1060,7 +1060,7 @@ static void _gfxr_draw_line(gfxr_pic_t *pic, int x, int y, int ex, int ey, int c } static inline int _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, int max_x, int max_y, int x_320, - int y_200, int color, int drawenable, int *x, int *y) { + int y_200, int color, int drawenable, int *x, int *y) { // returns -1 on failure, 0 on success int linewidth = pic->mode->xfact * 320; int mpos, ix, iy; @@ -1083,7 +1083,7 @@ static inline int _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, i test_map = pic->visual_map->index_data; if ((color & 0xf) == 0xf // When dithering with white, do more - // conservative checks + // conservative checks || (color & 0xf0) == 0xf0) legalcolor = 0xff; else @@ -1127,7 +1127,7 @@ static inline int _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, i #undef TEST_POINT } // End of namespace Sci - + // Now include the actual filling code (with scaling support) #define FILL_FUNCTION _gfxr_fill_any #define FILL_FUNCTION_RECURSIVE _gfxr_fill_any_recursive @@ -1145,9 +1145,9 @@ static inline int _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, i namespace Sci { #endif // defined(WITH_PIC_SCALING) - + } // End of namespace Sci - + // Include again, but this time without support for scaling #define FILL_FUNCTION _gfxr_fill_1 #define FILL_FUNCTION_RECURSIVE _gfxr_fill_1_recursive @@ -1175,7 +1175,7 @@ namespace Sci { x -= ((temp >> 4) & 0x7); \ else \ x += (temp >> 4); \ - \ + \ if (temp & 0x08) \ y -= (temp & 0x7); \ else \ @@ -1666,7 +1666,7 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, // we can only safely replace the palette if it's static // *if it's not for some reason, we should die - + if (!(view->flags & GFX_PIXMAP_FLAG_EXTERNAL_PALETTE) && !sci1) { sciprintf("gfx_draw_pic0(): can't set a non-static palette for an embedded view!\n"); } diff --git a/engines/sci/gfx/resource/sci_picfill.cpp b/engines/sci/gfx/resource/sci_picfill.cpp index 0867b84c6e..73b2b83e7d 100644 --- a/engines/sci/gfx/resource/sci_picfill.cpp +++ b/engines/sci/gfx/resource/sci_picfill.cpp @@ -62,7 +62,7 @@ namespace Sci { #endif static void FILL_FUNCTION_RECURSIVE(gfxr_pic_t *pic, int old_xl, int old_xr, int y, int dy, byte *bounds, - int legalcolor, int legalmask, int color, int priority, int drawenable, int sci_titlebar_size) { + int legalcolor, int legalmask, int color, int priority, int drawenable, int sci_titlebar_size) { int linewidth = pic->mode->xfact * 320; int miny = pic->mode->yfact * sci_titlebar_size; int maxy = pic->mode->yfact * 200; @@ -265,7 +265,7 @@ static void FILL_FUNCTION_RECURSIVE(gfxr_pic_t *pic, int old_xl, int old_xr, int static void FILL_FUNCTION(gfxr_pic_t *pic, int x_320, int y_200, int color, int priority, int control, int drawenable, - int sci_titlebar_size) { + int sci_titlebar_size) { int linewidth = pic->mode->xfact * 320; int x, y; int xl, xr; diff --git a/engines/sci/gfx/resource/sci_picfill_aux.cpp b/engines/sci/gfx/resource/sci_picfill_aux.cpp index f7deff27fa..98fd5bbb2a 100644 --- a/engines/sci/gfx/resource/sci_picfill_aux.cpp +++ b/engines/sci/gfx/resource/sci_picfill_aux.cpp @@ -40,7 +40,7 @@ namespace Sci { #define CLIPMASK_HARD_BOUND 0x80 /* ensures that we don't re-fill filled stuff */ static void AUXBUF_FILL_HELPER(gfxr_pic_t *pic, int old_xl, int old_xr, int y, int dy, - int clipmask, int control, int sci_titlebar_size) { + int clipmask, int control, int sci_titlebar_size) { int xl, xr; int oldytotal = y * 320; #ifdef DRAW_SCALED @@ -72,7 +72,7 @@ static void AUXBUF_FILL_HELPER(gfxr_pic_t *pic, int old_xl, int old_xr, int y, i if ((ytotal + xl) < 0) { fprintf(stderr, "AARGH-%d\n", __LINE__); - BREAKPOINT(); + BREAKPOINT(); } xr = xl; diff --git a/engines/sci/gfx/resource/sci_resmgr.cpp b/engines/sci/gfx/resource/sci_resmgr.cpp index 734c91e2c3..d64b777afa 100644 --- a/engines/sci/gfx/resource/sci_resmgr.cpp +++ b/engines/sci/gfx/resource/sci_resmgr.cpp @@ -69,7 +69,7 @@ void gfxr_interpreter_clear_pic(int version, gfxr_pic_t *pic, void *internal) { } int gfxr_interpreter_calculate_pic(gfx_resstate_t *state, gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic, - int flags, int default_palette, int nr, void *internal) { + int flags, int default_palette, int nr, void *internal) { ResourceManager *resmgr = (ResourceManager *)state->misc_payload; resource_t *res = scir_find_resource(resmgr, sci_pic, nr, 0); int need_unscaled = unscaled_pic != NULL; diff --git a/engines/sci/gfx/resource/sci_view_1.cpp b/engines/sci/gfx/resource/sci_view_1.cpp index 7af584bcfe..48c204cf43 100644 --- a/engines/sci/gfx/resource/sci_view_1.cpp +++ b/engines/sci/gfx/resource/sci_view_1.cpp @@ -51,7 +51,7 @@ namespace Sci { literal_pos += n; static int decompress_sci_view(int id, int loop, int cel, byte *resource, byte *dest, int mirrored, int pixmap_size, int size, - int runlength_pos, int literal_pos, int xl, int yl, int color_key) { + int runlength_pos, int literal_pos, int xl, int yl, int color_key) { int writepos = mirrored ? xl : 0; if (mirrored) { @@ -178,7 +178,7 @@ static int decompress_sci_view(int id, int loop, int cel, byte *resource, byte * } static int decompress_sci_view_amiga(int id, int loop, int cel, byte *resource, byte *dest, int mirrored, int pixmap_size, int size, - int pos, int xl, int yl, int color_key) { + int pos, int xl, int yl, int color_key) { int writepos = mirrored ? xl - 1 : 0; while (writepos < pixmap_size && pos < size) { @@ -315,7 +315,7 @@ static int gfxr_draw_loop1(gfxr_loop_t *dest, int id, int loop, int mirrored, by //static byte view_magics[V1_MAGICS_NR] = {0x80, 0x00, 0x00, 0x00, 0x00}; gfxr_view_t *gfxr_draw_view1(int id, byte *resource, int size, gfx_pixmap_color_t *static_pal, - int static_pal_nr) { + int static_pal_nr) { int i; int palette_offset; gfxr_view_t *view; @@ -457,7 +457,7 @@ gfx_pixmap_t *gfxr_draw_cel11(int id, int loop, int cel, int mirrored, byte *res } gfxr_loop_t *gfxr_draw_loop11(int id, int loop, int mirrored, byte *resource_base, byte *loop_base, int size, int cels_nr, - gfxr_loop_t *result, gfxr_view_t *view, int bytes_per_cel) { + gfxr_loop_t *result, gfxr_view_t *view, int bytes_per_cel) { byte *seeker = loop_base; int i; |