Removing warnings in half of magic tools by some GCI students.
This commit is contained in:
parent
5a85cef991
commit
0a2072e334
24 changed files with 924 additions and 377 deletions
|
|
@ -38,6 +38,30 @@
|
|||
static Mix_Chunk * metalpaint_snd;
|
||||
static Uint8 metalpaint_r, metalpaint_g, metalpaint_b;
|
||||
|
||||
Uint32 metalpaint_api_version(void);
|
||||
int metalpaint_init(magic_api * api);
|
||||
int metalpaint_get_tool_count(magic_api * api);
|
||||
SDL_Surface * metalpaint_get_icon(magic_api * api, int which);
|
||||
char * metalpaint_get_name(magic_api * api, int which);
|
||||
char * metalpaint_get_description(magic_api * api, int which, int mode);
|
||||
static void do_metalpaint(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y);
|
||||
void metalpaint_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 metalpaint_click(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect);
|
||||
void metalpaint_release(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect);
|
||||
void metalpaint_shutdown(magic_api * api);
|
||||
void metalpaint_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
|
||||
int metalpaint_requires_colors(magic_api * api, int which);
|
||||
void metalpaint_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
void metalpaint_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
int metalpaint_modes(magic_api * api, int which);
|
||||
|
||||
|
||||
Uint32 metalpaint_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
||||
|
||||
|
|
@ -55,13 +79,13 @@ int metalpaint_init(magic_api * api)
|
|||
}
|
||||
|
||||
// We have multiple tools:
|
||||
int metalpaint_get_tool_count(magic_api * api)
|
||||
int metalpaint_get_tool_count(magic_api * api ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
|
||||
// Load our icons:
|
||||
SDL_Surface * metalpaint_get_icon(magic_api * api, int which)
|
||||
SDL_Surface * metalpaint_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char fname[1024];
|
||||
|
||||
|
|
@ -72,13 +96,13 @@ SDL_Surface * metalpaint_get_icon(magic_api * api, int which)
|
|||
}
|
||||
|
||||
// Return our names, localized:
|
||||
char * metalpaint_get_name(magic_api * api, int which)
|
||||
char * metalpaint_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return(strdup(gettext_noop("Metal Paint")));
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char * metalpaint_get_description(magic_api * api, int which, int mode)
|
||||
char * metalpaint_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return(strdup(gettext_noop("Click and drag the mouse to paint with a metallic color.")));
|
||||
}
|
||||
|
|
@ -96,7 +120,7 @@ static int metalpaint_gradient[METALPAINT_CYCLE] = {
|
|||
|
||||
// Do the effect:
|
||||
|
||||
static void do_metalpaint(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last,
|
||||
static void do_metalpaint(void * ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas, SDL_Surface * last ATTRIBUTE_UNUSED,
|
||||
int x, int y)
|
||||
{
|
||||
magic_api * api = (magic_api *) ptr;
|
||||
|
|
@ -138,7 +162,7 @@ void metalpaint_drag(magic_api * api, int which, SDL_Surface * canvas,
|
|||
}
|
||||
|
||||
// Affect the canvas on click:
|
||||
void metalpaint_click(magic_api * api, int which, int mode,
|
||||
void metalpaint_click(magic_api * api, int which, int mode ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect)
|
||||
{
|
||||
|
|
@ -146,21 +170,21 @@ void metalpaint_click(magic_api * api, int which, int mode,
|
|||
}
|
||||
|
||||
// Affect the canvas on release:
|
||||
void metalpaint_release(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect)
|
||||
void metalpaint_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED,
|
||||
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
// No setup happened:
|
||||
void metalpaint_shutdown(magic_api * api)
|
||||
void metalpaint_shutdown(magic_api * api ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (metalpaint_snd != NULL)
|
||||
Mix_FreeChunk(metalpaint_snd);
|
||||
}
|
||||
|
||||
// Record the color from Tux Paint:
|
||||
void metalpaint_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b)
|
||||
void metalpaint_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, Uint8 b)
|
||||
{
|
||||
metalpaint_r = min(255, r + 64);
|
||||
metalpaint_g = min(255, g + 64);
|
||||
|
|
@ -168,20 +192,20 @@ void metalpaint_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b)
|
|||
}
|
||||
|
||||
// Use colors:
|
||||
int metalpaint_requires_colors(magic_api * api, int which)
|
||||
int metalpaint_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void metalpaint_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
||||
void metalpaint_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void metalpaint_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
||||
void metalpaint_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
int metalpaint_modes(magic_api * api, int which)
|
||||
int metalpaint_modes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return(MODE_PAINT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue