Removing warnings in magic ripples nd rosette by finaiized
This commit is contained in:
parent
bd4b940374
commit
97d5871537
2 changed files with 84 additions and 36 deletions
|
|
@ -48,16 +48,39 @@ Mix_Chunk * rosette_snd;
|
|||
|
||||
// Housekeeping functions
|
||||
|
||||
Uint32 rosette_api_version(void);
|
||||
void rosette_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
|
||||
int rosette_init(magic_api * api);
|
||||
int rosette_get_tool_count(magic_api * api);
|
||||
SDL_Surface * rosette_get_icon(magic_api * api, int which);
|
||||
char * rosette_get_name(magic_api * api, int which);
|
||||
char * rosette_get_description(magic_api * api, int which, int mode);
|
||||
int rosette_requires_colors(magic_api * api, int which);
|
||||
void rosette_release(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot,
|
||||
int x, int y, SDL_Rect * update_rect);
|
||||
void rosette_shutdown(magic_api * api);
|
||||
void rosette_draw(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y);
|
||||
void rosette_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * snapshot, int ox, int oy, int x, int y,
|
||||
SDL_Rect * update_rect);
|
||||
|
||||
void rosette_click(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect);
|
||||
void rosette_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
void rosette_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
int rosette_modes(magic_api * api, int which);
|
||||
void rosette_circle(void * ptr, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot,
|
||||
int x, int y);
|
||||
|
||||
Uint32 rosette_api_version(void)
|
||||
{
|
||||
return(TP_MAGIC_API_VERSION);
|
||||
}
|
||||
|
||||
void rosette_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b) //get the colors from API and store it in structure
|
||||
void rosette_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, Uint8 b) //get the colors from API and store it in structure
|
||||
{
|
||||
rosette_colors.r=r;
|
||||
rosette_colors.g=g;
|
||||
|
|
@ -74,7 +97,7 @@ int rosette_init(magic_api * api)
|
|||
return(1);
|
||||
}
|
||||
|
||||
int rosette_get_tool_count(magic_api * api)
|
||||
int rosette_get_tool_count(magic_api * api ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
|
@ -90,9 +113,9 @@ SDL_Surface * rosette_get_icon(magic_api * api, int which)
|
|||
return(IMG_Load(fname));
|
||||
}
|
||||
|
||||
char * rosette_get_name(magic_api * api, int which) { if (!which) return strdup(gettext_noop("Rosette")); else return strdup(gettext_noop("Picasso"));}
|
||||
char * rosette_get_name(magic_api * api ATTRIBUTE_UNUSED, int which) { if (!which) return strdup(gettext_noop("Rosette")); else return strdup(gettext_noop("Picasso"));}
|
||||
|
||||
char * rosette_get_description(magic_api * api, int which, int mode)
|
||||
char * rosette_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (!which)
|
||||
return strdup(gettext_noop("Click and start drawing your rosette.")); //just k'scope with 3 bits?
|
||||
|
|
@ -100,20 +123,20 @@ char * rosette_get_description(magic_api * api, int which, int mode)
|
|||
return strdup(gettext_noop("You can draw just like Picasso!")); //what is this actually doing?
|
||||
}
|
||||
|
||||
int rosette_requires_colors(magic_api * api, int which) { return 1; }
|
||||
int rosette_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED) { return 1; }
|
||||
|
||||
void rosette_release(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot,
|
||||
int x, int y, SDL_Rect * update_rect)
|
||||
{}
|
||||
void rosette_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * snapshot ATTRIBUTE_UNUSED,
|
||||
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void rosette_shutdown(magic_api * api)
|
||||
{ Mix_FreeChunk(rosette_snd); }
|
||||
void rosette_shutdown(magic_api * api ATTRIBUTE_UNUSED) { Mix_FreeChunk(rosette_snd); }
|
||||
|
||||
// Interactivity functions
|
||||
|
||||
void rosette_circle(void * ptr, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot,
|
||||
void rosette_circle(void * ptr, int which ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot ATTRIBUTE_UNUSED,
|
||||
int x, int y)
|
||||
{
|
||||
magic_api * api = (magic_api *) ptr;
|
||||
|
|
@ -131,7 +154,7 @@ void rosette_draw(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * sna
|
|||
{
|
||||
magic_api * api = (magic_api *) ptr;
|
||||
|
||||
double angle, angle_ph;
|
||||
double angle;
|
||||
double xx, yy; //distance to the center of the image
|
||||
int x1, y1, x2, y2;
|
||||
|
||||
|
|
@ -184,25 +207,25 @@ void rosette_drag(magic_api * api, int which, SDL_Surface * canvas,
|
|||
update_rect->h=canvas->h;
|
||||
}
|
||||
|
||||
void rosette_click(magic_api * api, int which, int mode,
|
||||
void rosette_click(magic_api * api, int which, int mode ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas, SDL_Surface * last,
|
||||
int x, int y, SDL_Rect * update_rect)
|
||||
{
|
||||
rosette_drag(api, which, canvas, last, x, y, x, y, update_rect);
|
||||
}
|
||||
|
||||
void rosette_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
||||
void rosette_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
xmid=canvas->w/2;
|
||||
ymid=canvas->h/2;
|
||||
}
|
||||
|
||||
void rosette_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
||||
void rosette_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int rosette_modes(magic_api * api, int which)
|
||||
int rosette_modes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return(MODE_PAINT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue