From 3252287d3002e4c3800ce5138eb97160fbb6230d Mon Sep 17 00:00:00 2001 From: Albert Cahalan Date: Sun, 4 May 2008 18:29:28 +0000 Subject: [PATCH] mark internal functions static --- magic/src/blocks_chalk_drip.c | 4 ++-- magic/src/blur.c | 4 ++-- magic/src/bricks.c | 10 ++++----- magic/src/calligraphy.c | 24 ++++++++++----------- magic/src/cartoon.c | 4 ++-- magic/src/distortion.c | 6 +++--- magic/src/emboss.c | 4 ++-- magic/src/fade_darken.c | 4 ++-- magic/src/fill.c | 10 ++++----- magic/src/flower.c | 40 +++++++++++++++++------------------ magic/src/foam.c | 14 ++++++------ magic/src/glasstile.c | 10 ++++----- magic/src/grass.c | 10 ++++----- magic/src/kalidescope.c | 6 +++--- magic/src/light.c | 6 +++--- magic/src/metalpaint.c | 8 +++---- magic/src/mirror_flip.c | 2 +- magic/src/negative.c | 4 ++-- magic/src/rainbow.c | 10 ++++----- magic/src/ripples.c | 6 +++--- magic/src/shift.c | 8 +++---- magic/src/smudge.c | 4 ++-- magic/src/tint.c | 6 +++--- magic/src/waves.c | 2 +- 24 files changed, 103 insertions(+), 103 deletions(-) diff --git a/magic/src/blocks_chalk_drip.c b/magic/src/blocks_chalk_drip.c index a96534eed..8cb5b29a8 100644 --- a/magic/src/blocks_chalk_drip.c +++ b/magic/src/blocks_chalk_drip.c @@ -46,7 +46,7 @@ enum { /* Our globals: */ -Mix_Chunk * snd_effect[NUM_TOOLS]; +static Mix_Chunk * snd_effect[NUM_TOOLS]; int blocks_chalk_drip_init(magic_api * api) @@ -132,7 +132,7 @@ char * blocks_chalk_drip_get_description(magic_api * api, int which) // Do the effect: -void blocks_chalk_drip_linecb(void * ptr, int which, +static void blocks_chalk_drip_linecb(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { diff --git a/magic/src/blur.c b/magic/src/blur.c index e8406a6e9..117b3a3c5 100644 --- a/magic/src/blur.c +++ b/magic/src/blur.c @@ -39,7 +39,7 @@ /* Our globals: */ -Mix_Chunk * blur_snd; +static Mix_Chunk * blur_snd; int blur_init(magic_api * api) @@ -86,7 +86,7 @@ char * blur_get_description(magic_api * api, int which) // Do the effect: -void do_blur(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_blur(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; diff --git a/magic/src/bricks.c b/magic/src/bricks.c index 4c78c6c5b..2cfecfc14 100644 --- a/magic/src/bricks.c +++ b/magic/src/bricks.c @@ -48,13 +48,13 @@ enum { /* Our globals: */ -Mix_Chunk * brick_snd; -Uint8 bricks_r, bricks_g, bricks_b; +static Mix_Chunk * brick_snd; +static Uint8 bricks_r, bricks_g, bricks_b; /* Local function prototype: */ -void do_brick(magic_api * api, SDL_Surface * canvas, +static void do_brick(magic_api * api, SDL_Surface * canvas, int x, int y, int w, int h); @@ -118,7 +118,7 @@ char * bricks_get_description(magic_api * api, int which) // Do the effect: -void do_bricks(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_bricks(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; @@ -259,7 +259,7 @@ int bricks_requires_colors(magic_api * api, int which) return 1; } -void do_brick(magic_api * api, SDL_Surface * canvas, +static void do_brick(magic_api * api, SDL_Surface * canvas, int x, int y, int w, int h) { SDL_Rect dest; diff --git a/magic/src/calligraphy.c b/magic/src/calligraphy.c index 463b16645..bd949e04b 100644 --- a/magic/src/calligraphy.c +++ b/magic/src/calligraphy.c @@ -42,17 +42,17 @@ typedef struct float x, y; } Point2D; -Mix_Chunk * calligraphy_snd; -Point2D calligraphy_control_points[4]; -int calligraphy_r, calligraphy_g, calligraphy_b; -int calligraphy_old_thick; -Uint32 calligraphy_last_time; -SDL_Surface * calligraphy_brush, * calligraphy_colored_brush; +static Mix_Chunk * calligraphy_snd; +static Point2D calligraphy_control_points[4]; +static int calligraphy_r, calligraphy_g, calligraphy_b; +static int calligraphy_old_thick; +static Uint32 calligraphy_last_time; +static SDL_Surface * calligraphy_brush, * calligraphy_colored_brush; -Point2D calligraphy_PointOnCubicBezier(Point2D* cp, float t); -void calligraphy_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve); -float calligraphy_dist(float x1, float y1, float x2, float y2); +static Point2D calligraphy_PointOnCubicBezier(Point2D* cp, float t); +static void calligraphy_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve); +static float calligraphy_dist(float x1, float y1, float x2, float y2); @@ -366,7 +366,7 @@ cp[3] is the end point, or P3 in the above diagram t is the parameter value, 0 <= t <= 1 */ -Point2D calligraphy_PointOnCubicBezier( Point2D* cp, float t ) +static Point2D calligraphy_PointOnCubicBezier( Point2D* cp, float t ) { float ax, bx, cx; float ay, by, cy; @@ -402,7 +402,7 @@ Point2D calligraphy_PointOnCubicBezier( Point2D* cp, float t ) */ -void calligraphy_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve) +static void calligraphy_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve) { float dt; int i; @@ -413,7 +413,7 @@ void calligraphy_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve) curve[i] = calligraphy_PointOnCubicBezier( cp, i*dt ); } -float calligraphy_dist(float x1, float y1, float x2, float y2) +static float calligraphy_dist(float x1, float y1, float x2, float y2) { float d; d = (sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))); diff --git a/magic/src/cartoon.c b/magic/src/cartoon.c index d0c58bb5a..e4bfec2f3 100644 --- a/magic/src/cartoon.c +++ b/magic/src/cartoon.c @@ -39,7 +39,7 @@ /* Our globals: */ -Mix_Chunk * cartoon_snd; +static Mix_Chunk * cartoon_snd; #define OUTLINE_THRESH 48 @@ -90,7 +90,7 @@ char * cartoon_get_description(magic_api * api, int which) // Do the effect: -void do_cartoon(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_cartoon(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; diff --git a/magic/src/distortion.c b/magic/src/distortion.c index 0638cd77e..68c2dc0bc 100644 --- a/magic/src/distortion.c +++ b/magic/src/distortion.c @@ -44,7 +44,7 @@ /* --------------------- */ /* Sound effects: */ -Mix_Chunk * snd_effect; +static Mix_Chunk * snd_effect; /* Our local function prototypes: */ @@ -59,7 +59,7 @@ void distortion_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect); -void distortion_line_callback(void * ptr, int which, +static void distortion_line_callback(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y); @@ -201,7 +201,7 @@ void distortion_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b) // Our "callback" function -void distortion_line_callback(void * ptr, int which, +static void distortion_line_callback(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y) { diff --git a/magic/src/emboss.c b/magic/src/emboss.c index b2da481a0..377fe8ebe 100644 --- a/magic/src/emboss.c +++ b/magic/src/emboss.c @@ -36,7 +36,7 @@ /* Our globals: */ -Mix_Chunk * emboss_snd; +static Mix_Chunk * emboss_snd; Uint32 emboss_api_version(void) { return(TP_MAGIC_API_VERSION); } @@ -85,7 +85,7 @@ char * emboss_get_description(magic_api * api, int which) // Do the effect: -void do_emboss(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_emboss(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; diff --git a/magic/src/fade_darken.c b/magic/src/fade_darken.c index e804c27bc..bccfe49e5 100644 --- a/magic/src/fade_darken.c +++ b/magic/src/fade_darken.c @@ -40,7 +40,7 @@ enum { NUM_TOOLS }; -Mix_Chunk * snd_effects[NUM_TOOLS]; +static Mix_Chunk * snd_effects[NUM_TOOLS]; int fade_darken_init(magic_api * api) @@ -110,7 +110,7 @@ char * fade_darken_get_description(magic_api * api, int which) } // Callback that does the fade_darken color effect on a circle centered around x,y -void do_fade_darken(void * ptr, int which, +static void do_fade_darken(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { diff --git a/magic/src/fill.c b/magic/src/fill.c index 790573196..5e3710814 100644 --- a/magic/src/fill.c +++ b/magic/src/fill.c @@ -40,14 +40,14 @@ /* Our globals: */ -Mix_Chunk * fill_snd; -Uint8 fill_r, fill_g, fill_b; +static Mix_Chunk * fill_snd; +static Uint8 fill_r, fill_g, fill_b; /* Local function prototypes: */ -static int colors_close(magic_api * api, SDL_Surface * canvas, +static static int colors_close(magic_api * api, SDL_Surface * canvas, Uint32 c1, Uint32 c2); -void do_flood_fill(magic_api * api, SDL_Surface * canvas, int x, int y, +static void do_flood_fill(magic_api * api, SDL_Surface * canvas, int x, int y, Uint32 cur_colr, Uint32 old_colr); @@ -178,7 +178,7 @@ static int colors_close(magic_api * api, SDL_Surface * canvas, } -void do_flood_fill(magic_api * api, SDL_Surface * canvas, int x, int y, +static void do_flood_fill(magic_api * api, SDL_Surface * canvas, int x, int y, Uint32 cur_colr, Uint32 old_colr) { int fillL, fillR, i, in_line; diff --git a/magic/src/flower.c b/magic/src/flower.c index 140a79c5d..560fc998d 100644 --- a/magic/src/flower.c +++ b/magic/src/flower.c @@ -43,12 +43,12 @@ enum { LEAFSIDE_RIGHT_DOWN, LEAFSIDE_RIGHT_UP, LEAFSIDE_LEFT_UP }; -Mix_Chunk * flower_click_snd, * flower_release_snd; -Uint8 flower_r, flower_g, flower_b; -int flower_min_x, flower_max_x, flower_bottom_x, flower_bottom_y; -int flower_side_first; -int flower_side_decided; -SDL_Surface * flower_base, * flower_leaf, * flower_petals, +static Mix_Chunk * flower_click_snd, * flower_release_snd; +static Uint8 flower_r, flower_g, flower_b; +static int flower_min_x, flower_max_x, flower_bottom_x, flower_bottom_y; +static int flower_side_first; +static int flower_side_decided; +static SDL_Surface * flower_base, * flower_leaf, * flower_petals, * flower_petals_colorized; /* Local function prototypes: */ @@ -58,16 +58,16 @@ typedef struct float x, y; } Point2D; -void flower_predrag(magic_api * api, SDL_Surface * canvas, +static void flower_predrag(magic_api * api, SDL_Surface * canvas, SDL_Surface * last, int ox, int oy, int x, int y); -void flower_drawbase(magic_api * api, SDL_Surface * canvas); -void flower_drawstalk(magic_api * api, SDL_Surface * canvas, +static void flower_drawbase(magic_api * api, SDL_Surface * canvas); +static void flower_drawstalk(magic_api * api, SDL_Surface * canvas, int top_x, int top_y, int minx, int maxx, int bottom_x, int bottom_y, int final); -void flower_drawflower(magic_api * api, SDL_Surface * canvas, int x, int y); -Point2D flower_PointOnCubicBezier(Point2D* cp, float t); -void flower_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve); -void flower_colorize_petals(magic_api * api); +static void flower_drawflower(magic_api * api, SDL_Surface * canvas, int x, int y); +static Point2D flower_PointOnCubicBezier(Point2D* cp, float t); +static void flower_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve); +static void flower_colorize_petals(magic_api * api); @@ -132,7 +132,7 @@ char * flower_get_description(magic_api * api, int which) } // Affect the canvas on drag: -void flower_predrag(magic_api * api, SDL_Surface * canvas, +static void flower_predrag(magic_api * api, SDL_Surface * canvas, SDL_Surface * last, int ox, int oy, int x, int y) { if (x < flower_min_x) @@ -251,7 +251,7 @@ void flower_release(magic_api * api, int which, } -void flower_drawflower(magic_api * api, SDL_Surface * canvas, int x, int y) +static void flower_drawflower(magic_api * api, SDL_Surface * canvas, int x, int y) { SDL_Rect dest; @@ -261,7 +261,7 @@ void flower_drawflower(magic_api * api, SDL_Surface * canvas, int x, int y) SDL_BlitSurface(flower_petals_colorized, NULL, canvas, &dest); } -void flower_drawbase(magic_api * api, SDL_Surface * canvas) +static void flower_drawbase(magic_api * api, SDL_Surface * canvas) { SDL_Rect dest; @@ -271,7 +271,7 @@ void flower_drawbase(magic_api * api, SDL_Surface * canvas) SDL_BlitSurface(flower_base, NULL, canvas, &dest); } -void flower_drawstalk(magic_api * api, SDL_Surface * canvas, +static void flower_drawstalk(magic_api * api, SDL_Surface * canvas, int top_x, int top_y, int minx, int maxx, int bottom_x, int bottom_y, int final) { @@ -493,7 +493,7 @@ cp[3] is the end point, or P3 in the above diagram t is the parameter value, 0 <= t <= 1 */ -Point2D flower_PointOnCubicBezier( Point2D* cp, float t ) +static Point2D flower_PointOnCubicBezier( Point2D* cp, float t ) { float ax, bx, cx; float ay, by, cy; @@ -528,7 +528,7 @@ Point2D flower_PointOnCubicBezier( Point2D* cp, float t ) */ -void flower_ComputeBezier( Point2D* cp, int numberOfPoints, Point2D* curve ) +static void flower_ComputeBezier( Point2D* cp, int numberOfPoints, Point2D* curve ) { float dt; int i; @@ -540,7 +540,7 @@ void flower_ComputeBezier( Point2D* cp, int numberOfPoints, Point2D* curve ) } -void flower_colorize_petals(magic_api * api) +static void flower_colorize_petals(magic_api * api) { Uint32 amask; int x, y; diff --git a/magic/src/foam.c b/magic/src/foam.c index d0598c228..6cce32e32 100644 --- a/magic/src/foam.c +++ b/magic/src/foam.c @@ -37,11 +37,11 @@ /* Our globals: */ -Mix_Chunk * foam_snd; -Uint8 foam_r, foam_g, foam_b; -int foam_mask_w, foam_mask_h; -int * foam_mask, * foam_mask_tmp; -SDL_Surface * foam_7, * foam_5, * foam_3, * foam_1; +static Mix_Chunk * foam_snd; +static Uint8 foam_r, foam_g, foam_b; +static int foam_mask_w, foam_mask_h; +static int * foam_mask, * foam_mask_tmp; +static SDL_Surface * foam_7, * foam_5, * foam_3, * foam_1; void foam_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, @@ -113,7 +113,7 @@ char * foam_get_description(magic_api * api, int which) // Do the effect: -void do_foam(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_foam(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; @@ -183,7 +183,7 @@ void foam_click(magic_api * api, int which, foam_drag(api, which, canvas, last, x, y, x, y, update_rect); } -int foam_mask_test(int r, int x, int y) +static int foam_mask_test(int r, int x, int y) { int xx, yy; int tot, bub_r; diff --git a/magic/src/glasstile.c b/magic/src/glasstile.c index c9b6130f7..483257164 100644 --- a/magic/src/glasstile.c +++ b/magic/src/glasstile.c @@ -37,13 +37,13 @@ /* Our globals: */ -Mix_Chunk * glasstile_snd; +static Mix_Chunk * glasstile_snd; Uint32 glasstile_api_version(void) { return(TP_MAGIC_API_VERSION); } -int * * glasstile_hit; -int glasstile_hit_xsize; -int glasstile_hit_ysize; +static int * * glasstile_hit; +static int glasstile_hit_xsize; +static int glasstile_hit_ysize; // No setup required: @@ -92,7 +92,7 @@ char * glasstile_get_description(magic_api * api, int which) // Do the effect: -void do_glasstile(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_glasstile(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; diff --git a/magic/src/grass.c b/magic/src/grass.c index c1ecbb79a..f62f10671 100644 --- a/magic/src/grass.c +++ b/magic/src/grass.c @@ -38,14 +38,14 @@ /* Our globals: */ -Mix_Chunk * grass_snd; -Uint8 grass_r, grass_g, grass_b; -SDL_Surface * img_grass; +static Mix_Chunk * grass_snd; +static Uint8 grass_r, grass_g, grass_b; +static SDL_Surface * img_grass; /* Local prototypes: */ -void do_grass(void * ptr, int which, +static void do_grass(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y); @@ -154,7 +154,7 @@ int grass_requires_colors(magic_api * api, int which) return 1; } -void do_grass(void * ptr, int which, +static void do_grass(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { diff --git a/magic/src/kalidescope.c b/magic/src/kalidescope.c index 307e17611..f0f24a7f7 100644 --- a/magic/src/kalidescope.c +++ b/magic/src/kalidescope.c @@ -36,8 +36,8 @@ /* Our globals: */ -Mix_Chunk * kalidescope_snd; -Uint8 kalidescope_r, kalidescope_g, kalidescope_b; +static Mix_Chunk * kalidescope_snd; +static Uint8 kalidescope_r, kalidescope_g, kalidescope_b; Uint32 kalidescope_api_version(void) { return(TP_MAGIC_API_VERSION); } @@ -86,7 +86,7 @@ char * kalidescope_get_description(magic_api * api, int which) // Do the effect: -void do_kalidescope(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_kalidescope(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; diff --git a/magic/src/light.c b/magic/src/light.c index 7538bc2db..741aa3af6 100644 --- a/magic/src/light.c +++ b/magic/src/light.c @@ -39,8 +39,8 @@ /* Our globals: */ -Mix_Chunk * light1_snd, * light2_snd; -float light_h, light_s, light_v; +static Mix_Chunk * light1_snd, * light2_snd; +static float light_h, light_s, light_v; Uint32 light_api_version(void) { return(TP_MAGIC_API_VERSION); } @@ -93,7 +93,7 @@ char * light_get_description(magic_api * api, int which) // Do the effect: -void do_light(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_light(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; diff --git a/magic/src/metalpaint.c b/magic/src/metalpaint.c index 9f563d887..dab36097d 100644 --- a/magic/src/metalpaint.c +++ b/magic/src/metalpaint.c @@ -36,8 +36,8 @@ /* Our globals: */ -Mix_Chunk * metalpaint_snd; -Uint8 metalpaint_r, metalpaint_g, metalpaint_b; +static Mix_Chunk * metalpaint_snd; +static Uint8 metalpaint_r, metalpaint_g, metalpaint_b; Uint32 metalpaint_api_version(void) { return(TP_MAGIC_API_VERSION); } @@ -88,7 +88,7 @@ char * metalpaint_get_description(magic_api * api, int which) /* Based on 'Golden' gradient in The GIMP: */ -int metalpaint_gradient[METALPAINT_CYCLE] = { +static int metalpaint_gradient[METALPAINT_CYCLE] = { 56, 64, 73, 83, 93, 102, 113, 123, 139, 154, 168, 180, 185, 189, 183, 174, 164, 152, 142, 135, 129, 138, 149, 158, @@ -97,7 +97,7 @@ int metalpaint_gradient[METALPAINT_CYCLE] = { // Do the effect: -void do_metalpaint(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_metalpaint(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; diff --git a/magic/src/mirror_flip.c b/magic/src/mirror_flip.c index 5cf9d7bc3..9c32c10cf 100644 --- a/magic/src/mirror_flip.c +++ b/magic/src/mirror_flip.c @@ -42,7 +42,7 @@ enum { NUM_TOOLS }; -Mix_Chunk * snd_effects[NUM_TOOLS]; +static Mix_Chunk * snd_effects[NUM_TOOLS]; // No setup required: diff --git a/magic/src/negative.c b/magic/src/negative.c index 6be2007ba..93b39fc60 100644 --- a/magic/src/negative.c +++ b/magic/src/negative.c @@ -34,7 +34,7 @@ #include "SDL_image.h" #include "SDL_mixer.h" -Mix_Chunk * negative_snd; +static Mix_Chunk * negative_snd; // No setup required: int negative_init(magic_api * api) @@ -81,7 +81,7 @@ char * negative_get_description(magic_api * api, int which) } // Callback that does the negative color effect on a circle centered around x,y -void do_negative(void * ptr, int which, +static void do_negative(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { diff --git a/magic/src/rainbow.c b/magic/src/rainbow.c index 05d6cafae..3e6cc99b1 100644 --- a/magic/src/rainbow.c +++ b/magic/src/rainbow.c @@ -38,7 +38,7 @@ #define NUM_RAINBOW_COLORS 23 -const int rainbow_hexes[NUM_RAINBOW_COLORS][3] = { +static const int rainbow_hexes[NUM_RAINBOW_COLORS][3] = { {255, 0, 0}, {255, 64, 0}, {255, 128, 0}, @@ -64,9 +64,9 @@ const int rainbow_hexes[NUM_RAINBOW_COLORS][3] = { {255, 0, 64} }; -int rainbow_color; -Uint32 rainbow_rgb; -Mix_Chunk * rainbow_snd; +static int rainbow_color; +static Uint32 rainbow_rgb; +static Mix_Chunk * rainbow_snd; // Load our sfx: int rainbow_init(magic_api * api) @@ -117,7 +117,7 @@ char * rainbow_get_description(magic_api * api, int which) // Do the effect: -void rainbow_linecb(void * ptr, int which, +static void rainbow_linecb(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { diff --git a/magic/src/ripples.c b/magic/src/ripples.c index fc9ae383b..b2100a5c5 100644 --- a/magic/src/ripples.c +++ b/magic/src/ripples.c @@ -38,9 +38,9 @@ /* Our globals: */ -Mix_Chunk * ripples_snd; +static Mix_Chunk * ripples_snd; -int ripples_z, ripples_brite; +static int ripples_z, ripples_brite; Uint32 ripples_api_version(void) { return(TP_MAGIC_API_VERSION); } @@ -95,7 +95,7 @@ void ripples_drag(magic_api * api, int which, SDL_Surface * canvas, { } -void ripples_linecb(void * ptr, int which, +static void ripples_linecb(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { diff --git a/magic/src/shift.c b/magic/src/shift.c index 45dc4f37b..20261277d 100644 --- a/magic/src/shift.c +++ b/magic/src/shift.c @@ -38,11 +38,11 @@ /* Our globals: */ -int shift_x, shift_y; -Mix_Chunk * shift_snd; +static int shift_x, shift_y; +static Mix_Chunk * shift_snd; -void shift_doit(magic_api * api, int which, SDL_Surface * canvas, +static void shift_doit(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect, int crosshairs); @@ -104,7 +104,7 @@ void shift_drag(magic_api * api, int which, SDL_Surface * canvas, shift_doit(api, which, canvas, last, ox, oy, x, y, update_rect, 1); } -void shift_doit(magic_api * api, int which, SDL_Surface * canvas, +static void shift_doit(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect, int crosshairs) { diff --git a/magic/src/smudge.c b/magic/src/smudge.c index 6a081db16..2f5639bd4 100644 --- a/magic/src/smudge.c +++ b/magic/src/smudge.c @@ -37,7 +37,7 @@ /* Our globals: */ -Mix_Chunk * smudge_snd; +static Mix_Chunk * smudge_snd; @@ -87,7 +87,7 @@ char * smudge_get_description(magic_api * api, int which) // Do the effect: -void do_smudge(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_smudge(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; diff --git a/magic/src/tint.c b/magic/src/tint.c index 8f761e629..07097feb1 100644 --- a/magic/src/tint.c +++ b/magic/src/tint.c @@ -37,8 +37,8 @@ /* Our globals: */ -Mix_Chunk * tint_snd; -Uint8 tint_r, tint_g, tint_b; +static Mix_Chunk * tint_snd; +static Uint8 tint_r, tint_g, tint_b; // No setup required: @@ -87,7 +87,7 @@ char * tint_get_description(magic_api * api, int which) // Do the effect: -void do_tint(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, +static void do_tint(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { magic_api * api = (magic_api *) ptr; diff --git a/magic/src/waves.c b/magic/src/waves.c index be07195a7..14ac47c6e 100644 --- a/magic/src/waves.c +++ b/magic/src/waves.c @@ -38,7 +38,7 @@ /* Our globals: */ -Mix_Chunk * waves_snd; +static Mix_Chunk * waves_snd; Uint32 waves_api_version(void) { return(TP_MAGIC_API_VERSION); }