Removing warnings on rain and rainbow by finaiized as a task in GCI
This commit is contained in:
parent
a1ebbd5a14
commit
bd4b940374
2 changed files with 90 additions and 32 deletions
|
|
@ -69,6 +69,32 @@ const char * rain_descs[rain_NUM_TOOLS][2] = {
|
||||||
gettext_noop("Click to cover your picture with rain drops."),},
|
gettext_noop("Click to cover your picture with rain drops."),},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Uint32 rain_api_version(void);
|
||||||
|
int rain_init(magic_api * api);
|
||||||
|
int rain_get_tool_count(magic_api * api);
|
||||||
|
SDL_Surface * rain_get_icon(magic_api * api, int which);
|
||||||
|
char * rain_get_name(magic_api * api, int which);
|
||||||
|
char * rain_get_description(magic_api * api, int which, int mode);
|
||||||
|
static void do_rain_drop(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last,
|
||||||
|
int x, int y);
|
||||||
|
static void rain_linecb(void * ptr, int which,
|
||||||
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
|
int x, int y);
|
||||||
|
void rain_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||||
|
SDL_Surface * last, int ox, int oy, int x, int y,
|
||||||
|
SDL_Rect * update_rect);
|
||||||
|
void rain_click(magic_api * api, int which, int mode,
|
||||||
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
|
int x, int y, SDL_Rect * update_rect);
|
||||||
|
void rain_release(magic_api * api, int which,
|
||||||
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
|
int x, int y, SDL_Rect * update_rect);
|
||||||
|
void rain_shutdown(magic_api * api);
|
||||||
|
void rain_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
|
||||||
|
int rain_requires_colors(magic_api * api, int which);
|
||||||
|
void rain_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||||
|
void rain_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||||
|
int rain_modes(magic_api * api, int which);
|
||||||
|
|
||||||
Uint32 rain_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
Uint32 rain_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
||||||
|
|
||||||
|
|
@ -93,7 +119,7 @@ int rain_init(magic_api * api){
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int rain_get_tool_count(magic_api * api){
|
int rain_get_tool_count(magic_api * api ATTRIBUTE_UNUSED){
|
||||||
return(rain_NUM_TOOLS);
|
return(rain_NUM_TOOLS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,17 +131,17 @@ SDL_Surface * rain_get_icon(magic_api * api, int which){
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return our names, localized:
|
// Return our names, localized:
|
||||||
char * rain_get_name(magic_api * api, int which){
|
char * rain_get_name(magic_api * api ATTRIBUTE_UNUSED, int which){
|
||||||
return(strdup(gettext_noop(rain_names[which])));
|
return(strdup(gettext_noop(rain_names[which])));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return our descriptions, localized:
|
// Return our descriptions, localized:
|
||||||
char * rain_get_description(magic_api * api, int which, int mode){
|
char * rain_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode){
|
||||||
return(strdup(gettext_noop(rain_descs[which][mode-1])));
|
return(strdup(gettext_noop(rain_descs[which][mode-1])));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do the effect:
|
// Do the effect:
|
||||||
static void do_rain_drop(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last,
|
static void do_rain_drop(void * ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas, SDL_Surface * last ATTRIBUTE_UNUSED,
|
||||||
int x, int y){
|
int x, int y){
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
||||||
|
|
@ -198,14 +224,14 @@ void rain_click(magic_api * api, int which, int mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Affect the canvas on release:
|
// Affect the canvas on release:
|
||||||
void rain_release(magic_api * api, int which,
|
void rain_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED,
|
||||||
SDL_Surface * canvas, SDL_Surface * last,
|
SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED,
|
||||||
int x, int y, SDL_Rect * update_rect)
|
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// No setup happened:
|
// No setup happened:
|
||||||
void rain_shutdown(magic_api * api)
|
void rain_shutdown(magic_api * api ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
//Clean up sounds
|
//Clean up sounds
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -217,26 +243,26 @@ void rain_shutdown(magic_api * api)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Record the color from Tux Paint:
|
// Record the color from Tux Paint:
|
||||||
void rain_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b)
|
void rain_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use colors:
|
// Use colors:
|
||||||
int rain_requires_colors(magic_api * api, int which)
|
int rain_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rain_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
void rain_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void rain_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
void rain_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int rain_modes(magic_api * api, int which)
|
int rain_modes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return(MODE_FULLSCREEN|MODE_PAINT);
|
return(MODE_FULLSCREEN|MODE_PAINT);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,40 @@ static int rainbow_color;
|
||||||
static Uint32 rainbow_rgb;
|
static Uint32 rainbow_rgb;
|
||||||
static Mix_Chunk * rainbow_snd;
|
static Mix_Chunk * rainbow_snd;
|
||||||
|
|
||||||
|
int rainbow_init(magic_api * api);
|
||||||
|
Uint32 rainbow_api_version(void);
|
||||||
|
int rainbow_get_tool_count(magic_api * api);
|
||||||
|
SDL_Surface * rainbow_get_icon(magic_api * api, int which);
|
||||||
|
char * rainbow_get_name(magic_api * api, int which);
|
||||||
|
char * rainbow_get_description(magic_api * api, int which, int mode);
|
||||||
|
static void rainbow_linecb(void * ptr, int which,
|
||||||
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
|
int x, int y);
|
||||||
|
|
||||||
|
void rainbow_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||||
|
SDL_Surface * last, int ox, int oy, int x, int y,
|
||||||
|
SDL_Rect * update_rect);
|
||||||
|
|
||||||
|
void rainbow_click(magic_api * api, int which, int mode,
|
||||||
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
|
int x, int y,
|
||||||
|
SDL_Rect * update_rect);
|
||||||
|
|
||||||
|
void rainbow_release(magic_api * api, int which,
|
||||||
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
|
int x, int y,
|
||||||
|
SDL_Rect * update_rect);
|
||||||
|
|
||||||
|
|
||||||
|
void rainbow_shutdown(magic_api * api);
|
||||||
|
void rainbow_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
|
||||||
|
int rainbow_requires_colors(magic_api * api, int which);
|
||||||
|
void rainbow_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||||
|
void rainbow_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||||
|
int rainbow_modes(magic_api * api, int which);
|
||||||
|
|
||||||
|
Uint32 rainbow_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
||||||
|
|
||||||
// Load our sfx:
|
// Load our sfx:
|
||||||
int rainbow_init(magic_api * api)
|
int rainbow_init(magic_api * api)
|
||||||
{
|
{
|
||||||
|
|
@ -82,16 +116,14 @@ int rainbow_init(magic_api * api)
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Uint32 rainbow_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
|
||||||
|
|
||||||
// We have multiple tools:
|
// We have multiple tools:
|
||||||
int rainbow_get_tool_count(magic_api * api)
|
int rainbow_get_tool_count(magic_api * api ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load our icons:
|
// Load our icons:
|
||||||
SDL_Surface * rainbow_get_icon(magic_api * api, int which)
|
SDL_Surface * rainbow_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
char fname[1024];
|
char fname[1024];
|
||||||
|
|
||||||
|
|
@ -102,13 +134,13 @@ SDL_Surface * rainbow_get_icon(magic_api * api, int which)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return our names, localized:
|
// Return our names, localized:
|
||||||
char * rainbow_get_name(magic_api * api, int which)
|
char * rainbow_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return(strdup(gettext_noop("Rainbow")));
|
return(strdup(gettext_noop("Rainbow")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return our descriptions, localized:
|
// Return our descriptions, localized:
|
||||||
char * rainbow_get_description(magic_api * api, int which, int mode)
|
char * rainbow_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return(strdup(
|
return(strdup(
|
||||||
gettext_noop("You can draw in rainbow colors!")));
|
gettext_noop("You can draw in rainbow colors!")));
|
||||||
|
|
@ -116,8 +148,8 @@ char * rainbow_get_description(magic_api * api, int which, int mode)
|
||||||
|
|
||||||
// Do the effect:
|
// Do the effect:
|
||||||
|
|
||||||
static void rainbow_linecb(void * ptr, int which,
|
static void rainbow_linecb(void * ptr, int which ATTRIBUTE_UNUSED,
|
||||||
SDL_Surface * canvas, SDL_Surface * last,
|
SDL_Surface * canvas, SDL_Surface * last ATTRIBUTE_UNUSED,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
magic_api * api = (magic_api *) ptr;
|
magic_api * api = (magic_api *) ptr;
|
||||||
|
|
@ -160,7 +192,7 @@ void rainbow_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Affect the canvas on click:
|
// Affect the canvas on click:
|
||||||
void rainbow_click(magic_api * api, int which, int mode,
|
void rainbow_click(magic_api * api, int which, int mode ATTRIBUTE_UNUSED,
|
||||||
SDL_Surface * canvas, SDL_Surface * last,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
int x, int y,
|
int x, int y,
|
||||||
SDL_Rect * update_rect)
|
SDL_Rect * update_rect)
|
||||||
|
|
@ -168,40 +200,40 @@ void rainbow_click(magic_api * api, int which, int mode,
|
||||||
rainbow_drag(api, which, canvas, last, x, y, x, y, update_rect);
|
rainbow_drag(api, which, canvas, last, x, y, x, y, update_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rainbow_release(magic_api * api, int which,
|
void rainbow_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED,
|
||||||
SDL_Surface * canvas, SDL_Surface * last,
|
SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED,
|
||||||
int x, int y,
|
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED,
|
||||||
SDL_Rect * update_rect)
|
SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
void rainbow_shutdown(magic_api * api)
|
void rainbow_shutdown(magic_api * api ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
if (rainbow_snd != NULL)
|
if (rainbow_snd != NULL)
|
||||||
Mix_FreeChunk(rainbow_snd);
|
Mix_FreeChunk(rainbow_snd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Record the color from Tux Paint:
|
// Record the color from Tux Paint:
|
||||||
void rainbow_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b)
|
void rainbow_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use colors:
|
// Use colors:
|
||||||
int rainbow_requires_colors(magic_api * api, int which)
|
int rainbow_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rainbow_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
void rainbow_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void rainbow_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
void rainbow_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int rainbow_modes(magic_api * api, int which)
|
int rainbow_modes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return(MODE_PAINT);
|
return(MODE_PAINT);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue