Even more Magic tools to their groups...
Nearly done.
This commit is contained in:
parent
f381073d48
commit
5882a48412
5 changed files with 56 additions and 9 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
Credits: Andrew Corcoran <akanewbie@gmail.com>
|
||||
|
||||
Copyright (c) 2002-2009 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2021 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: May 6, 2009
|
||||
Last updated: September 21, 2021
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -56,6 +56,7 @@ int mosaic_init(magic_api *);
|
|||
int mosaic_get_tool_count(magic_api *);
|
||||
SDL_Surface *mosaic_get_icon(magic_api *, int);
|
||||
char *mosaic_get_name(magic_api *, int);
|
||||
int mosaic_get_group(magic_api *, int);
|
||||
char *mosaic_get_description(magic_api *, int, int);
|
||||
void mosaic_paint(void *, int, SDL_Surface *, SDL_Surface *, int, int);
|
||||
void mosaic_drag(magic_api *, int, SDL_Surface *, SDL_Surface *, int, int, int, int, SDL_Rect *);
|
||||
|
|
@ -96,6 +97,10 @@ const char *mosaic_names[mosaic_NUM_TOOLS] = {
|
|||
gettext_noop("Mosaic"),
|
||||
};
|
||||
|
||||
const int mosaic_groups[mosaic_NUM_TOOLS] = {
|
||||
MAGIC_TYPE_DISTORTS,
|
||||
};
|
||||
|
||||
const char *mosaic_descs[mosaic_NUM_TOOLS][2] = {
|
||||
{gettext_noop("Click and drag the mouse to add a mosaic effect to parts of your picture."),
|
||||
gettext_noop("Click to add a mosaic effect to your entire picture."),},
|
||||
|
|
@ -142,6 +147,12 @@ char *mosaic_get_name(magic_api * api ATTRIBUTE_UNUSED, int which)
|
|||
return (strdup(gettext_noop(mosaic_names[which])));
|
||||
}
|
||||
|
||||
// Return our groups:
|
||||
int mosaic_get_group(magic_api * api ATTRIBUTE_UNUSED, int which)
|
||||
{
|
||||
return mosaic_groups[which];
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *mosaic_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
* Pere Pujal for joining all toghether
|
||||
* Caroline Ford for the text descriptions
|
||||
|
||||
Copyright (c) 2002-2009 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2021 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: May 6, 2009
|
||||
Last updated: September 21, 2021
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -63,6 +63,7 @@ int mosaic_shaped_init(magic_api * api);
|
|||
int mosaic_shaped_get_tool_count(magic_api * api);
|
||||
SDL_Surface *mosaic_shaped_get_icon(magic_api * api, int which);
|
||||
char *mosaic_shaped_get_name(magic_api * api, int which);
|
||||
int mosaic_shaped_get_group(magic_api * api, int which);
|
||||
|
||||
char *mosaic_shaped_get_description(magic_api * api, int which, int mode);
|
||||
|
||||
|
|
@ -194,6 +195,12 @@ char *mosaic_shaped_get_name(magic_api * api ATTRIBUTE_UNUSED, int which)
|
|||
return (strdup(gettext_noop(mosaic_shaped_names[which])));
|
||||
}
|
||||
|
||||
// Return our groups (all the same!)
|
||||
int mosaic_shaped_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return MAGIC_TYPE_DISTORTS;
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *mosaic_shaped_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: September 6, 2021
|
||||
Last updated: September 21, 2021
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -40,6 +40,7 @@ Uint32 negative_api_version(void);
|
|||
int negative_get_tool_count(magic_api * api);
|
||||
SDL_Surface *negative_get_icon(magic_api * api, int which);
|
||||
char *negative_get_name(magic_api * api, int which);
|
||||
int negative_get_group(magic_api * api, int which);
|
||||
char *negative_get_description(magic_api * api, int which, int mode);
|
||||
static void do_negative(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y);
|
||||
void negative_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
|
|
@ -121,6 +122,12 @@ char *negative_get_name(magic_api * api ATTRIBUTE_UNUSED, int which)
|
|||
return (strdup(gettext_noop(negative_names[which])));
|
||||
}
|
||||
|
||||
// Return our group (both the same):
|
||||
int negative_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return MAGIC_TYPE_COLOR_FILTERS;
|
||||
}
|
||||
|
||||
// Return our description, localized:
|
||||
char *negative_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
Credits: Andrew Corcoran <akanewbie@gmail.com>
|
||||
|
||||
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2021 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: June 6, 2008
|
||||
Last updated: September 21, 2021
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -66,6 +66,10 @@ const char *noise_names[noise_NUM_TOOLS] = {
|
|||
gettext_noop("Noise"),
|
||||
};
|
||||
|
||||
const int noise_groups[noise_NUM_TOOLS] = {
|
||||
MAGIC_TYPE_DISTORTS,
|
||||
};
|
||||
|
||||
const char *noise_descs[noise_NUM_TOOLS][2] = {
|
||||
{gettext_noop("Click and drag the mouse to add noise to parts of your picture."),
|
||||
gettext_noop("Click to add noise to your entire picture."),},
|
||||
|
|
@ -75,6 +79,7 @@ Uint32 noise_api_version(void);
|
|||
int noise_init(magic_api * api);
|
||||
SDL_Surface *noise_get_icon(magic_api * api, int which);
|
||||
char *noise_get_name(magic_api * api, int which);
|
||||
int noise_get_group(magic_api * api, int which);
|
||||
char *noise_get_description(magic_api * api, int which, int mode);
|
||||
static void do_noise_pixel(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y);
|
||||
static void do_noise_full(void *ptr, SDL_Surface * canvas, SDL_Surface * last, int which);
|
||||
|
|
@ -134,6 +139,12 @@ char *noise_get_name(magic_api * api ATTRIBUTE_UNUSED, int which)
|
|||
return (strdup(gettext_noop(noise_names[which])));
|
||||
}
|
||||
|
||||
// Return our groups
|
||||
int noise_get_group(magic_api * api ATTRIBUTE_UNUSED, int which)
|
||||
{
|
||||
return noise_groups[which];
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *noise_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
Credits: Andrew Corcoran <akanewbie@gmail.com>
|
||||
|
||||
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2021 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: October 4, 2008
|
||||
Last updated: September 21, 2021
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -68,6 +68,10 @@ const char *rain_names[rain_NUM_TOOLS] = {
|
|||
gettext_noop("Rain"),
|
||||
};
|
||||
|
||||
const int rain_groups[rain_NUM_TOOLS] = {
|
||||
MAGIC_TYPE_PAINTING,
|
||||
};
|
||||
|
||||
const char *rain_descs[rain_NUM_TOOLS][2] = {
|
||||
{gettext_noop("Click to place a rain drop onto your picture."),
|
||||
gettext_noop("Click to cover your picture with rain drops."),},
|
||||
|
|
@ -78,6 +82,7 @@ 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);
|
||||
int rain_get_group(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);
|
||||
|
|
@ -145,6 +150,12 @@ char *rain_get_name(magic_api * api ATTRIBUTE_UNUSED, int which)
|
|||
return (strdup(gettext_noop(rain_names[which])));
|
||||
}
|
||||
|
||||
// Return our groups
|
||||
int rain_get_group(magic_api * api ATTRIBUTE_UNUSED, int which)
|
||||
{
|
||||
return rain_groups[which];
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *rain_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue