Gave ordering to all Artistic magic tools
This commit is contained in:
parent
b13674017a
commit
0353c5670d
7 changed files with 67 additions and 11 deletions
|
|
@ -2,9 +2,9 @@
|
|||
flower.c
|
||||
|
||||
Flower Magic Tool Plugin
|
||||
// Tux Paint - A simple drawing program for children.
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2024 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
https://tuxpaint.org/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -78,6 +78,7 @@ int flower_get_tool_count(magic_api * api);
|
|||
SDL_Surface *flower_get_icon(magic_api * api, int which);
|
||||
char *flower_get_name(magic_api * api, int which);
|
||||
int flower_get_group(magic_api * api, int which);
|
||||
int flower_get_order(int which);
|
||||
char *flower_get_description(magic_api * api, int which, int mode);
|
||||
static void flower_predrag(magic_api * api, SDL_Surface * canvas, SDL_Surface * last, int ox, int oy, int x, int y);
|
||||
void flower_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
|
|
@ -206,6 +207,12 @@ int flower_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSE
|
|||
return MAGIC_TYPE_ARTISTIC;
|
||||
}
|
||||
|
||||
// Return our orders:
|
||||
int flower_get_order(int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *flower_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Draws a googly eye at the click position, and looks
|
||||
towards where you drag+release.
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -47,6 +47,7 @@ int googlyeyes_get_tool_count(magic_api * api);
|
|||
SDL_Surface *googlyeyes_get_icon(magic_api * api, int which);
|
||||
char *googlyeyes_get_name(magic_api * api, int which);
|
||||
int googlyeyes_get_group(magic_api * api, int which);
|
||||
int googlyeyes_get_order(int which);
|
||||
char *googlyeyes_get_description(magic_api * api, int which, int mode);
|
||||
int googlyeyes_requires_colors(magic_api * api, int which);
|
||||
int googlyeyes_modes(magic_api * api, int which);
|
||||
|
|
@ -210,6 +211,11 @@ int googlyeyes_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_U
|
|||
return MAGIC_TYPE_ARTISTIC;
|
||||
}
|
||||
|
||||
int googlyeyes_get_order(int which)
|
||||
{
|
||||
return 200 + which;
|
||||
}
|
||||
|
||||
char *googlyeyes_get_description(magic_api * api ATTRIBUTE_UNUSED,
|
||||
int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
|
@ -219,7 +225,7 @@ char *googlyeyes_get_description(magic_api * api ATTRIBUTE_UNUSED,
|
|||
}
|
||||
else
|
||||
{
|
||||
return strdup(gettext_noop("Click to place a googly eye, then drag and release to make it look that direction."));
|
||||
return strdup(gettext("Click to place a googly eye, then drag and release to make it look that direction."));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Draws a lightning strike between the click
|
||||
and drag+release positions.
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -26,6 +26,7 @@ int lightning_get_tool_count(magic_api * api);
|
|||
SDL_Surface *lightning_get_icon(magic_api * api, int which);
|
||||
char *lightning_get_name(magic_api * api, int which);
|
||||
int lightning_get_group(magic_api * api, int which);
|
||||
int lightning_get_order(int which);
|
||||
char *lightning_get_description(magic_api * api, int which, int mode);
|
||||
int lightning_requires_colors(magic_api * api, int which);
|
||||
int lightning_modes(magic_api * api, int which);
|
||||
|
|
@ -89,6 +90,11 @@ int lightning_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UN
|
|||
return MAGIC_TYPE_ARTISTIC;
|
||||
}
|
||||
|
||||
int lightning_get_order(int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 400;
|
||||
}
|
||||
|
||||
char *lightning_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return strdup(gettext("Click, drag, and release to draw a lightning bolt between two points."));
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
Math assistance by Jeff Newmiller <jdnewmil@dcn.davis.ca.us>
|
||||
|
||||
First created: 2009.04.02
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
|
||||
FIXME:
|
||||
* Color/alpha art needs improvement.
|
||||
|
|
@ -37,6 +37,7 @@ int realrainbow_get_tool_count(magic_api * api);
|
|||
SDL_Surface *realrainbow_get_icon(magic_api * api, int which);
|
||||
char *realrainbow_get_name(magic_api * api, int which);
|
||||
int realrainbow_get_group(magic_api * api, int which);
|
||||
int realrainbow_get_order(int which);
|
||||
char *realrainbow_get_description(magic_api * api, int which, int mode);
|
||||
int realrainbow_modes(magic_api * api, int which);
|
||||
int realrainbow_requires_colors(magic_api * api, int which);
|
||||
|
|
@ -112,6 +113,11 @@ int realrainbow_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_
|
|||
return MAGIC_TYPE_ARTISTIC;
|
||||
}
|
||||
|
||||
int realrainbow_get_order(int which)
|
||||
{
|
||||
return 300 + which;
|
||||
}
|
||||
|
||||
char *realrainbow_get_description(magic_api * api ATTRIBUTE_UNUSED,
|
||||
int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Strings -- draws string art.
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
#include "tp_magic_api.h"
|
||||
#include "SDL_image.h"
|
||||
|
|
@ -60,6 +60,7 @@ int string_get_tool_count(magic_api * api);
|
|||
SDL_Surface *string_get_icon(magic_api * api, int which);
|
||||
char *string_get_name(magic_api * api, int which);
|
||||
int string_get_group(magic_api * api, int which);
|
||||
int string_get_order(int which);
|
||||
char *string_get_description(magic_api * api, int which, int mode);
|
||||
int string_requires_colors(magic_api * api, int which);
|
||||
void string_release(magic_api * api, int which,
|
||||
|
|
@ -148,6 +149,22 @@ int string_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSE
|
|||
return MAGIC_TYPE_ARTISTIC;
|
||||
}
|
||||
|
||||
int string_get_order(int which)
|
||||
{
|
||||
switch (which)
|
||||
{
|
||||
case STRING_TOOL_FULL_BY_OFFSET:
|
||||
return 9000;
|
||||
break;
|
||||
case STRING_TOOL_TRIANGLE:
|
||||
return 9001;
|
||||
break;
|
||||
default:
|
||||
return 9002;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
char *string_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
switch (which)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
Tornado Magic Tool Plugin
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2024 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
https://tuxpaint.org/
|
||||
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: December 29, 2023
|
||||
Last updated: January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -79,6 +79,7 @@ int tornado_get_tool_count(magic_api * api);
|
|||
SDL_Surface *tornado_get_icon(magic_api * api, int which);
|
||||
char *tornado_get_name(magic_api * api, int which);
|
||||
int tornado_get_group(magic_api * api, int which);
|
||||
int tornado_get_order(int which);
|
||||
char *tornado_get_description(magic_api * api, int which, int mode);
|
||||
void tornado_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect);
|
||||
|
|
@ -158,6 +159,12 @@ int tornado_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUS
|
|||
return MAGIC_TYPE_ARTISTIC;
|
||||
}
|
||||
|
||||
// Return our orders:
|
||||
int tornado_get_order(int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 500;
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *tornado_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
by Bill Kendrick <bill@newbreedsoftware.com>
|
||||
with help from Pere Pujal Carabantes
|
||||
|
||||
January 6, 2024 - January 15, 2024
|
||||
January 6, 2024 - January 16, 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -159,6 +159,7 @@ int trochoids_get_tool_count(magic_api * api);
|
|||
SDL_Surface *trochoids_get_icon(magic_api * api, int which);
|
||||
char *trochoids_get_name(magic_api * api, int which);
|
||||
int trochoids_get_group(magic_api * api, int which);
|
||||
int trochoids_get_order(int which);
|
||||
char *trochoids_get_description(magic_api * api, int which, int mode);
|
||||
int trochoids_requires_colors(magic_api * api, int which);
|
||||
int trochoids_modes(magic_api * api, int which);
|
||||
|
|
@ -258,6 +259,12 @@ int trochoids_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UN
|
|||
return (MAGIC_TYPE_ARTISTIC);
|
||||
}
|
||||
|
||||
int trochoids_get_order(int which)
|
||||
{
|
||||
/* Group in their own spot, ordered the way the appear in the "TOOL_..." `enum` */
|
||||
return 10000 + which;
|
||||
}
|
||||
|
||||
|
||||
char *trochoids_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue