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,13 +38,37 @@
|
|||
|
||||
static Mix_Chunk * glasstile_snd;
|
||||
|
||||
// Prototypes
|
||||
Uint32 glasstile_api_version(void);
|
||||
int glasstile_init(magic_api * api);
|
||||
int glasstile_get_tool_count(magic_api * api);
|
||||
SDL_Surface * glasstile_get_icon(magic_api * api, int which);
|
||||
char * glasstile_get_name(magic_api * api, int which);
|
||||
char * glasstile_get_description(magic_api * api, int which, int mode);
|
||||
static void do_glasstile(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y);
|
||||
void glasstile_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 glasstile_click(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect);
|
||||
void glasstile_release(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect);
|
||||
void glasstile_shutdown(magic_api * api);
|
||||
void glasstile_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
|
||||
int glasstile_requires_colors(magic_api * api, int which);
|
||||
void glasstile_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
void glasstile_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
int glasstile_modes(magic_api * api, int which);
|
||||
|
||||
Uint32 glasstile_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
||||
|
||||
static int * * glasstile_hit;
|
||||
static int glasstile_hit_xsize;
|
||||
static int glasstile_hit_ysize;
|
||||
|
||||
|
||||
// No setup required:
|
||||
int glasstile_init(magic_api * api)
|
||||
{
|
||||
|
|
@ -61,13 +85,13 @@ int glasstile_init(magic_api * api)
|
|||
}
|
||||
|
||||
// We have multiple tools:
|
||||
int glasstile_get_tool_count(magic_api * api)
|
||||
int glasstile_get_tool_count(magic_api * api ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
|
||||
// Load our icons:
|
||||
SDL_Surface * glasstile_get_icon(magic_api * api, int which)
|
||||
SDL_Surface * glasstile_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char fname[1024];
|
||||
|
||||
|
|
@ -78,13 +102,13 @@ SDL_Surface * glasstile_get_icon(magic_api * api, int which)
|
|||
}
|
||||
|
||||
// Return our names, localized:
|
||||
char * glasstile_get_name(magic_api * api, int which)
|
||||
char * glasstile_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return(strdup(gettext_noop("Glass Tile")));
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char * glasstile_get_description(magic_api * api, int which, int mode)
|
||||
char * glasstile_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode)
|
||||
{
|
||||
if (mode == MODE_PAINT)
|
||||
return(strdup(gettext_noop("Click and drag the mouse to put glass tile over your picture.")));
|
||||
|
|
@ -94,7 +118,7 @@ char * glasstile_get_description(magic_api * api, int which, int mode)
|
|||
|
||||
// Do the effect:
|
||||
|
||||
static void do_glasstile(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last,
|
||||
static void do_glasstile(void * ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y)
|
||||
{
|
||||
magic_api * api = (magic_api *) ptr;
|
||||
|
|
@ -260,14 +284,14 @@ void glasstile_click(magic_api * api, int which, int mode,
|
|||
}
|
||||
|
||||
// Affect the canvas on release:
|
||||
void glasstile_release(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect)
|
||||
void glasstile_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 glasstile_shutdown(magic_api * api)
|
||||
void glasstile_shutdown(magic_api * api ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int y;
|
||||
|
||||
|
|
@ -286,25 +310,25 @@ void glasstile_shutdown(magic_api * api)
|
|||
}
|
||||
|
||||
// Record the color from Tux Paint:
|
||||
void glasstile_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b)
|
||||
void glasstile_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
// Use colors:
|
||||
int glasstile_requires_colors(magic_api * api, int which)
|
||||
int glasstile_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void glasstile_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
||||
void glasstile_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void glasstile_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
||||
void glasstile_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
int glasstile_modes(magic_api * api, int which)
|
||||
int glasstile_modes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return(MODE_PAINT | MODE_FULLSCREEN);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue