indent ripples.c
This commit is contained in:
parent
247be68e46
commit
fea1b424ba
1 changed files with 53 additions and 56 deletions
|
|
@ -48,17 +48,12 @@ SDL_Surface * ripples_get_icon(magic_api * api, int which);
|
|||
char *ripples_get_name(magic_api * api, int which);
|
||||
char *ripples_get_description(magic_api * api, int which, int mode);
|
||||
void ripples_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * last, int ox, int oy, int x, int y,
|
||||
SDL_Rect * update_rect);
|
||||
static void ripples_linecb(void * ptr, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y);
|
||||
SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect);
|
||||
static void ripples_linecb(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y);
|
||||
void ripples_click(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect);
|
||||
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
|
||||
void ripples_release(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect);
|
||||
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
|
||||
void ripples_shutdown(magic_api * api);
|
||||
void ripples_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
|
||||
int ripples_requires_colors(magic_api * api, int which);
|
||||
|
|
@ -66,7 +61,10 @@ void ripples_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas
|
|||
void ripples_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
int ripples_modes(magic_api * api, int which);
|
||||
|
||||
Uint32 ripples_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
||||
Uint32 ripples_api_version(void)
|
||||
{
|
||||
return (TP_MAGIC_API_VERSION);
|
||||
}
|
||||
|
||||
#define deg_cos(x) cos((x) * M_PI / 180.0)
|
||||
#define deg_sin(x) sin((x) * M_PI / 180.0)
|
||||
|
|
@ -76,8 +74,7 @@ int ripples_init(magic_api * api)
|
|||
{
|
||||
char fname[1024];
|
||||
|
||||
snprintf(fname, sizeof(fname), "%s/sounds/magic/ripples.ogg",
|
||||
api->data_directory);
|
||||
snprintf(fname, sizeof(fname), "%s/sounds/magic/ripples.ogg", api->data_directory);
|
||||
ripples_snd = Mix_LoadWAV(fname);
|
||||
|
||||
return (1);
|
||||
|
|
@ -94,8 +91,7 @@ SDL_Surface * ripples_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
|
|||
{
|
||||
char fname[1024];
|
||||
|
||||
snprintf(fname, sizeof(fname), "%s/images/magic/ripples.png",
|
||||
api->data_directory);
|
||||
snprintf(fname, sizeof(fname), "%s/images/magic/ripples.png", api->data_directory);
|
||||
|
||||
return (IMG_Load(fname));
|
||||
}
|
||||
|
|
@ -114,14 +110,13 @@ char * ripples_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRI
|
|||
|
||||
// Affect the canvas on drag:
|
||||
void ripples_drag(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * last ATTRIBUTE_UNUSED, int ox ATTRIBUTE_UNUSED, int oy ATTRIBUTE_UNUSED, int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED,
|
||||
SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||
SDL_Surface * last ATTRIBUTE_UNUSED, int ox ATTRIBUTE_UNUSED, int oy ATTRIBUTE_UNUSED,
|
||||
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
static void ripples_linecb(void *ptr, int which ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y)
|
||||
SDL_Surface * canvas, SDL_Surface * last, int x, int y)
|
||||
{
|
||||
magic_api *api = (magic_api *) ptr;
|
||||
Uint8 r, g, b;
|
||||
|
|
@ -139,8 +134,7 @@ static void ripples_linecb(void * ptr, int which ATTRIBUTE_UNUSED,
|
|||
|
||||
// Affect the canvas on click:
|
||||
void ripples_click(magic_api * api, int which, int mode ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect)
|
||||
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect)
|
||||
{
|
||||
float radius;
|
||||
float fli;
|
||||
|
|
@ -192,7 +186,8 @@ void ripples_shutdown(magic_api * api ATTRIBUTE_UNUSED)
|
|||
}
|
||||
|
||||
// Record the color from Tux Paint:
|
||||
void ripples_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED)
|
||||
void ripples_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED,
|
||||
Uint8 b ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -202,11 +197,13 @@ int ripples_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUT
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ripples_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
void ripples_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void ripples_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
void ripples_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue