mark internal functions static
This commit is contained in:
parent
c8df236b92
commit
3252287d30
24 changed files with 103 additions and 103 deletions
|
|
@ -46,7 +46,7 @@ enum {
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * snd_effect[NUM_TOOLS];
|
static Mix_Chunk * snd_effect[NUM_TOOLS];
|
||||||
|
|
||||||
|
|
||||||
int blocks_chalk_drip_init(magic_api * api)
|
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:
|
// 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,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * blur_snd;
|
static Mix_Chunk * blur_snd;
|
||||||
|
|
||||||
|
|
||||||
int blur_init(magic_api * api)
|
int blur_init(magic_api * api)
|
||||||
|
|
@ -86,7 +86,7 @@ char * blur_get_description(magic_api * api, int which)
|
||||||
|
|
||||||
// Do the effect:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
|
||||||
|
|
@ -48,13 +48,13 @@ enum {
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * brick_snd;
|
static Mix_Chunk * brick_snd;
|
||||||
Uint8 bricks_r, bricks_g, bricks_b;
|
static Uint8 bricks_r, bricks_g, bricks_b;
|
||||||
|
|
||||||
|
|
||||||
/* Local function prototype: */
|
/* 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);
|
int x, int y, int w, int h);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -118,7 +118,7 @@ char * bricks_get_description(magic_api * api, int which)
|
||||||
|
|
||||||
// Do the effect:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
@ -259,7 +259,7 @@ int bricks_requires_colors(magic_api * api, int which)
|
||||||
return 1;
|
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)
|
int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
SDL_Rect dest;
|
SDL_Rect dest;
|
||||||
|
|
|
||||||
|
|
@ -42,17 +42,17 @@ typedef struct
|
||||||
float x, y;
|
float x, y;
|
||||||
} Point2D;
|
} Point2D;
|
||||||
|
|
||||||
Mix_Chunk * calligraphy_snd;
|
static Mix_Chunk * calligraphy_snd;
|
||||||
Point2D calligraphy_control_points[4];
|
static Point2D calligraphy_control_points[4];
|
||||||
int calligraphy_r, calligraphy_g, calligraphy_b;
|
static int calligraphy_r, calligraphy_g, calligraphy_b;
|
||||||
int calligraphy_old_thick;
|
static int calligraphy_old_thick;
|
||||||
Uint32 calligraphy_last_time;
|
static Uint32 calligraphy_last_time;
|
||||||
SDL_Surface * calligraphy_brush, * calligraphy_colored_brush;
|
static SDL_Surface * calligraphy_brush, * calligraphy_colored_brush;
|
||||||
|
|
||||||
|
|
||||||
Point2D calligraphy_PointOnCubicBezier(Point2D* cp, float t);
|
static 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 calligraphy_dist(float x1, float y1, float x2, float y2);
|
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
|
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 ax, bx, cx;
|
||||||
float ay, by, cy;
|
float ay, by, cy;
|
||||||
|
|
@ -402,7 +402,7 @@ Point2D calligraphy_PointOnCubicBezier( Point2D* cp, float t )
|
||||||
<sizeof(Point2D) numberOfPoints>
|
<sizeof(Point2D) numberOfPoints>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void calligraphy_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve)
|
static void calligraphy_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve)
|
||||||
{
|
{
|
||||||
float dt;
|
float dt;
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -413,7 +413,7 @@ void calligraphy_ComputeBezier(Point2D* cp, int numberOfPoints, Point2D* curve)
|
||||||
curve[i] = calligraphy_PointOnCubicBezier( cp, i*dt );
|
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;
|
float d;
|
||||||
d = (sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)));
|
d = (sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)));
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * cartoon_snd;
|
static Mix_Chunk * cartoon_snd;
|
||||||
|
|
||||||
#define OUTLINE_THRESH 48
|
#define OUTLINE_THRESH 48
|
||||||
|
|
||||||
|
|
@ -90,7 +90,7 @@ char * cartoon_get_description(magic_api * api, int which)
|
||||||
|
|
||||||
// Do the effect:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
/* --------------------- */
|
/* --------------------- */
|
||||||
|
|
||||||
/* Sound effects: */
|
/* Sound effects: */
|
||||||
Mix_Chunk * snd_effect;
|
static Mix_Chunk * snd_effect;
|
||||||
|
|
||||||
|
|
||||||
/* Our local function prototypes: */
|
/* 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_Surface * snapshot, int ox, int oy, int x, int y,
|
||||||
SDL_Rect * update_rect);
|
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,
|
SDL_Surface * canvas, SDL_Surface * snapshot,
|
||||||
int x, int y);
|
int x, int y);
|
||||||
|
|
||||||
|
|
@ -201,7 +201,7 @@ void distortion_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b)
|
||||||
|
|
||||||
// Our "callback" function
|
// 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,
|
SDL_Surface * canvas, SDL_Surface * snapshot,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * emboss_snd;
|
static Mix_Chunk * emboss_snd;
|
||||||
|
|
||||||
|
|
||||||
Uint32 emboss_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
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:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ enum {
|
||||||
NUM_TOOLS
|
NUM_TOOLS
|
||||||
};
|
};
|
||||||
|
|
||||||
Mix_Chunk * snd_effects[NUM_TOOLS];
|
static Mix_Chunk * snd_effects[NUM_TOOLS];
|
||||||
|
|
||||||
|
|
||||||
int fade_darken_init(magic_api * api)
|
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
|
// 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,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -40,14 +40,14 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * fill_snd;
|
static Mix_Chunk * fill_snd;
|
||||||
Uint8 fill_r, fill_g, fill_b;
|
static Uint8 fill_r, fill_g, fill_b;
|
||||||
|
|
||||||
/* Local function prototypes: */
|
/* 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);
|
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);
|
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)
|
Uint32 cur_colr, Uint32 old_colr)
|
||||||
{
|
{
|
||||||
int fillL, fillR, i, in_line;
|
int fillL, fillR, i, in_line;
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,12 @@ enum { LEAFSIDE_RIGHT_DOWN,
|
||||||
LEAFSIDE_RIGHT_UP,
|
LEAFSIDE_RIGHT_UP,
|
||||||
LEAFSIDE_LEFT_UP };
|
LEAFSIDE_LEFT_UP };
|
||||||
|
|
||||||
Mix_Chunk * flower_click_snd, * flower_release_snd;
|
static Mix_Chunk * flower_click_snd, * flower_release_snd;
|
||||||
Uint8 flower_r, flower_g, flower_b;
|
static Uint8 flower_r, flower_g, flower_b;
|
||||||
int flower_min_x, flower_max_x, flower_bottom_x, flower_bottom_y;
|
static int flower_min_x, flower_max_x, flower_bottom_x, flower_bottom_y;
|
||||||
int flower_side_first;
|
static int flower_side_first;
|
||||||
int flower_side_decided;
|
static int flower_side_decided;
|
||||||
SDL_Surface * flower_base, * flower_leaf, * flower_petals,
|
static SDL_Surface * flower_base, * flower_leaf, * flower_petals,
|
||||||
* flower_petals_colorized;
|
* flower_petals_colorized;
|
||||||
|
|
||||||
/* Local function prototypes: */
|
/* Local function prototypes: */
|
||||||
|
|
@ -58,16 +58,16 @@ typedef struct
|
||||||
float x, y;
|
float x, y;
|
||||||
} Point2D;
|
} 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);
|
SDL_Surface * last, int ox, int oy, int x, int y);
|
||||||
void flower_drawbase(magic_api * api, SDL_Surface * canvas);
|
static void flower_drawbase(magic_api * api, SDL_Surface * canvas);
|
||||||
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 top_x, int top_y, int minx, int maxx,
|
||||||
int bottom_x, int bottom_y, int final);
|
int bottom_x, int bottom_y, int final);
|
||||||
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);
|
||||||
Point2D flower_PointOnCubicBezier(Point2D* cp, float t);
|
static 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);
|
||||||
void flower_colorize_petals(magic_api * api);
|
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:
|
// 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)
|
SDL_Surface * last, int ox, int oy, int x, int y)
|
||||||
{
|
{
|
||||||
if (x < flower_min_x)
|
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;
|
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);
|
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;
|
SDL_Rect dest;
|
||||||
|
|
||||||
|
|
@ -271,7 +271,7 @@ void flower_drawbase(magic_api * api, SDL_Surface * canvas)
|
||||||
SDL_BlitSurface(flower_base, NULL, canvas, &dest);
|
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 top_x, int top_y, int minx, int maxx,
|
||||||
int bottom_x, int bottom_y, int final)
|
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
|
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 ax, bx, cx;
|
||||||
float ay, by, cy;
|
float ay, by, cy;
|
||||||
|
|
@ -528,7 +528,7 @@ Point2D flower_PointOnCubicBezier( Point2D* cp, float t )
|
||||||
<sizeof(Point2D) numberOfPoints>
|
<sizeof(Point2D) numberOfPoints>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void flower_ComputeBezier( Point2D* cp, int numberOfPoints, Point2D* curve )
|
static void flower_ComputeBezier( Point2D* cp, int numberOfPoints, Point2D* curve )
|
||||||
{
|
{
|
||||||
float dt;
|
float dt;
|
||||||
int i;
|
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;
|
Uint32 amask;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
|
||||||
|
|
@ -37,11 +37,11 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * foam_snd;
|
static Mix_Chunk * foam_snd;
|
||||||
Uint8 foam_r, foam_g, foam_b;
|
static Uint8 foam_r, foam_g, foam_b;
|
||||||
int foam_mask_w, foam_mask_h;
|
static int foam_mask_w, foam_mask_h;
|
||||||
int * foam_mask, * foam_mask_tmp;
|
static int * foam_mask, * foam_mask_tmp;
|
||||||
SDL_Surface * foam_7, * foam_5, * foam_3, * foam_1;
|
static SDL_Surface * foam_7, * foam_5, * foam_3, * foam_1;
|
||||||
|
|
||||||
void foam_release(magic_api * api, int which,
|
void foam_release(magic_api * api, int which,
|
||||||
SDL_Surface * canvas, SDL_Surface * last,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
|
|
@ -113,7 +113,7 @@ char * foam_get_description(magic_api * api, int which)
|
||||||
|
|
||||||
// Do the effect:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
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);
|
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 xx, yy;
|
||||||
int tot, bub_r;
|
int tot, bub_r;
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,13 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * glasstile_snd;
|
static Mix_Chunk * glasstile_snd;
|
||||||
|
|
||||||
Uint32 glasstile_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
Uint32 glasstile_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
||||||
|
|
||||||
int * * glasstile_hit;
|
static int * * glasstile_hit;
|
||||||
int glasstile_hit_xsize;
|
static int glasstile_hit_xsize;
|
||||||
int glasstile_hit_ysize;
|
static int glasstile_hit_ysize;
|
||||||
|
|
||||||
|
|
||||||
// No setup required:
|
// No setup required:
|
||||||
|
|
@ -92,7 +92,7 @@ char * glasstile_get_description(magic_api * api, int which)
|
||||||
|
|
||||||
// Do the effect:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,14 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * grass_snd;
|
static Mix_Chunk * grass_snd;
|
||||||
Uint8 grass_r, grass_g, grass_b;
|
static Uint8 grass_r, grass_g, grass_b;
|
||||||
SDL_Surface * img_grass;
|
static SDL_Surface * img_grass;
|
||||||
|
|
||||||
|
|
||||||
/* Local prototypes: */
|
/* Local prototypes: */
|
||||||
|
|
||||||
void do_grass(void * ptr, int which,
|
static void do_grass(void * ptr, int which,
|
||||||
SDL_Surface * canvas, SDL_Surface * last,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
int x, int y);
|
int x, int y);
|
||||||
|
|
||||||
|
|
@ -154,7 +154,7 @@ int grass_requires_colors(magic_api * api, int which)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_grass(void * ptr, int which,
|
static void do_grass(void * ptr, int which,
|
||||||
SDL_Surface * canvas, SDL_Surface * last,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * kalidescope_snd;
|
static Mix_Chunk * kalidescope_snd;
|
||||||
Uint8 kalidescope_r, kalidescope_g, kalidescope_b;
|
static Uint8 kalidescope_r, kalidescope_g, kalidescope_b;
|
||||||
|
|
||||||
|
|
||||||
Uint32 kalidescope_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
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:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * light1_snd, * light2_snd;
|
static Mix_Chunk * light1_snd, * light2_snd;
|
||||||
float light_h, light_s, light_v;
|
static float light_h, light_s, light_v;
|
||||||
|
|
||||||
|
|
||||||
Uint32 light_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
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:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * metalpaint_snd;
|
static Mix_Chunk * metalpaint_snd;
|
||||||
Uint8 metalpaint_r, metalpaint_g, metalpaint_b;
|
static Uint8 metalpaint_r, metalpaint_g, metalpaint_b;
|
||||||
|
|
||||||
|
|
||||||
Uint32 metalpaint_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
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: */
|
/* 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,
|
56, 64, 73, 83, 93, 102, 113, 123,
|
||||||
139, 154, 168, 180, 185, 189, 183, 174,
|
139, 154, 168, 180, 185, 189, 183, 174,
|
||||||
164, 152, 142, 135, 129, 138, 149, 158,
|
164, 152, 142, 135, 129, 138, 149, 158,
|
||||||
|
|
@ -97,7 +97,7 @@ int metalpaint_gradient[METALPAINT_CYCLE] = {
|
||||||
|
|
||||||
// Do the effect:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ enum {
|
||||||
NUM_TOOLS
|
NUM_TOOLS
|
||||||
};
|
};
|
||||||
|
|
||||||
Mix_Chunk * snd_effects[NUM_TOOLS];
|
static Mix_Chunk * snd_effects[NUM_TOOLS];
|
||||||
|
|
||||||
|
|
||||||
// No setup required:
|
// No setup required:
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
#include "SDL_image.h"
|
#include "SDL_image.h"
|
||||||
#include "SDL_mixer.h"
|
#include "SDL_mixer.h"
|
||||||
|
|
||||||
Mix_Chunk * negative_snd;
|
static Mix_Chunk * negative_snd;
|
||||||
|
|
||||||
// No setup required:
|
// No setup required:
|
||||||
int negative_init(magic_api * api)
|
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
|
// 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,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#define NUM_RAINBOW_COLORS 23
|
#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, 0, 0},
|
||||||
{255, 64, 0},
|
{255, 64, 0},
|
||||||
{255, 128, 0},
|
{255, 128, 0},
|
||||||
|
|
@ -64,9 +64,9 @@ const int rainbow_hexes[NUM_RAINBOW_COLORS][3] = {
|
||||||
{255, 0, 64}
|
{255, 0, 64}
|
||||||
};
|
};
|
||||||
|
|
||||||
int rainbow_color;
|
static int rainbow_color;
|
||||||
Uint32 rainbow_rgb;
|
static Uint32 rainbow_rgb;
|
||||||
Mix_Chunk * rainbow_snd;
|
static Mix_Chunk * rainbow_snd;
|
||||||
|
|
||||||
// Load our sfx:
|
// Load our sfx:
|
||||||
int rainbow_init(magic_api * api)
|
int rainbow_init(magic_api * api)
|
||||||
|
|
@ -117,7 +117,7 @@ char * rainbow_get_description(magic_api * api, int which)
|
||||||
|
|
||||||
// Do the effect:
|
// Do the effect:
|
||||||
|
|
||||||
void rainbow_linecb(void * ptr, int which,
|
static void rainbow_linecb(void * ptr, int which,
|
||||||
SDL_Surface * canvas, SDL_Surface * last,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,9 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* 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); }
|
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,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -38,11 +38,11 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
int shift_x, shift_y;
|
static int shift_x, shift_y;
|
||||||
Mix_Chunk * shift_snd;
|
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_Surface * last, int ox, int oy, int x, int y,
|
||||||
SDL_Rect * update_rect, int crosshairs);
|
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);
|
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_Surface * last, int ox, int oy, int x, int y,
|
||||||
SDL_Rect * update_rect, int crosshairs)
|
SDL_Rect * update_rect, int crosshairs)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* 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:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * tint_snd;
|
static Mix_Chunk * tint_snd;
|
||||||
Uint8 tint_r, tint_g, tint_b;
|
static Uint8 tint_r, tint_g, tint_b;
|
||||||
|
|
||||||
|
|
||||||
// No setup required:
|
// No setup required:
|
||||||
|
|
@ -87,7 +87,7 @@ char * tint_get_description(magic_api * api, int which)
|
||||||
|
|
||||||
// Do the effect:
|
// 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)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
/* Our globals: */
|
/* Our globals: */
|
||||||
|
|
||||||
Mix_Chunk * waves_snd;
|
static Mix_Chunk * waves_snd;
|
||||||
|
|
||||||
|
|
||||||
Uint32 waves_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
Uint32 waves_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue