From 0532b35f31912f77cf7a5bfebaddcf68dddbeb32 Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Tue, 16 Jan 2024 21:31:07 -0800 Subject: [PATCH] Gave ordering to all Distorts magic tools --- magic/src/blocks_etc.c | 24 ++++++++++++++++++++++-- magic/src/blur.c | 15 +++++++++++++-- magic/src/clone.c | 11 +++++++++-- magic/src/distortion.c | 13 +++++++++++-- magic/src/emboss.c | 11 +++++++++-- magic/src/fisheye.c | 10 ++++++++-- magic/src/glasstile.c | 11 +++++++++-- magic/src/halftone.c | 14 ++++++++++++-- magic/src/mosaic.c | 15 +++++++++++++-- magic/src/mosaic_shaped.c | 19 ++++++++++++++++--- magic/src/noise.c | 15 +++++++++++++-- magic/src/puzzle.c | 11 +++++++++-- magic/src/ripples.c | 11 +++++++++-- magic/src/sharpen.c | 17 +++++++++++++++-- magic/src/smudge.c | 14 ++++++++++++-- magic/src/swirls.c | 16 ++++++++++++++-- magic/src/tv.c | 15 +++++++++++++-- 17 files changed, 207 insertions(+), 35 deletions(-) diff --git a/magic/src/blocks_etc.c b/magic/src/blocks_etc.c index f50ebeb22..ccfdecb3d 100644 --- a/magic/src/blocks_etc.c +++ b/magic/src/blocks_etc.c @@ -4,7 +4,7 @@ Blocks, Chalk and Drip Magic Tools 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/ @@ -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 @@ -58,6 +58,7 @@ int blocks_etc_get_tool_count(magic_api * api); SDL_Surface *blocks_etc_get_icon(magic_api * api, int which); char *blocks_etc_get_name(magic_api * api, int which); int blocks_etc_get_group(magic_api * api, int which); +int blocks_etc_get_order(int which); char *blocks_etc_get_description(magic_api * api, int which, int mode); static void blocks_etc_linecb(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y); void blocks_etc_drag(magic_api * api, int which, SDL_Surface * canvas, @@ -148,6 +149,25 @@ int blocks_etc_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_U return MAGIC_TYPE_DISTORTS; } +// Return our order +int blocks_etc_get_order(int which) +{ + switch (which) { + case TOOL_BLOCKS: + return 4; + break; + case TOOL_CHALK: + return 5; + break; + case TOOL_DRIP: + return 6; + break; + default: + return 0; + break; + } +} + // Return our descriptions, localized: char *blocks_etc_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode) { diff --git a/magic/src/blur.c b/magic/src/blur.c index 2d271611a..7bf676735 100644 --- a/magic/src/blur.c +++ b/magic/src/blur.c @@ -6,7 +6,7 @@ Credits: Bill Kendrick & Andrew Corcoran - 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/ @@ -25,7 +25,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 @@ -44,6 +44,7 @@ int blur_get_tool_count(magic_api * api); SDL_Surface *blur_get_icon(magic_api * api, int which); char *blur_get_name(magic_api * api, int which); int blur_get_group(magic_api * api, int which); +int blur_get_order(int which); char *blur_get_description(magic_api * api, int which, int mode); void blur_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect); @@ -89,6 +90,10 @@ const int blur_groups[blur_NUM_TOOLS] = { MAGIC_TYPE_DISTORTS, }; +const int blur_orders[blur_NUM_TOOLS] = { + 1, +}; + const char *blur_descs[blur_NUM_TOOLS][2] = { {gettext_noop("Click and drag the mouse around to blur the image."), gettext_noop("Click to blur the entire image.")}, @@ -139,6 +144,12 @@ int blur_get_group(magic_api * api ATTRIBUTE_UNUSED, int which) return blur_groups[which]; } +// Return our order +int blur_get_order(int which) +{ + return blur_orders[which]; +} + // Return our descriptions, localized: char *blur_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode) { diff --git a/magic/src/clone.c b/magic/src/clone.c index 12aafa803..d0d2258fe 100644 --- a/magic/src/clone.c +++ b/magic/src/clone.c @@ -4,7 +4,7 @@ Clone tool paintbrush Magic Tools Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2023 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 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 @@ -71,6 +71,7 @@ int clone_get_tool_count(magic_api * api); SDL_Surface *clone_get_icon(magic_api * api, int which); char *clone_get_name(magic_api * api, int which); int clone_get_group(magic_api * api, int which); +int clone_get_order(int which); char *clone_get_description(magic_api * api, int which, int mode); void clone_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect); @@ -149,6 +150,12 @@ int clone_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED return MAGIC_TYPE_DISTORTS; } +// Return our order: +int clone_get_order(int which ATTRIBUTE_UNUSED) +{ + return 100; +} + // Return our descriptions, localized: char *clone_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED) { diff --git a/magic/src/distortion.c b/magic/src/distortion.c index 613a9565a..bfd6d9ac8 100644 --- a/magic/src/distortion.c +++ b/magic/src/distortion.c @@ -4,7 +4,7 @@ Distortion 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/ @@ -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 */ /* Inclusion of header files: */ @@ -60,6 +60,7 @@ int distortion_get_tool_count(magic_api * api); SDL_Surface *distortion_get_icon(magic_api * api, int which); char *distortion_get_name(magic_api * api, int which); int distortion_get_group(magic_api * api, int which); +int distortion_get_order(int which); char *distortion_get_description(magic_api * api, int which, int mode); int distortion_requires_colors(magic_api * api, int which); void distortion_shutdown(magic_api * api); @@ -150,6 +151,14 @@ int distortion_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_U } +// Report our "Magic" tool order + +int distortion_get_order(int which ATTRIBUTE_UNUSED) +{ + return 101; +} + + // Report our "Magic" tool descriptions char *distortion_get_description(magic_api * api ATTRIBUTE_UNUSED, diff --git a/magic/src/emboss.c b/magic/src/emboss.c index 4523d8b47..be2af71cc 100644 --- a/magic/src/emboss.c +++ b/magic/src/emboss.c @@ -4,7 +4,7 @@ Emboss 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/ @@ -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 @@ -44,6 +44,7 @@ int emboss_get_tool_count(magic_api * api); SDL_Surface *emboss_get_icon(magic_api * api, int which); char *emboss_get_name(magic_api * api, int which); int emboss_get_group(magic_api * api, int which); +int emboss_get_order(int which); char *emboss_get_description(magic_api * api, int which, int mode); void emboss_drag(magic_api * api, int which, SDL_Surface * canvas, @@ -113,6 +114,12 @@ int emboss_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSE return MAGIC_TYPE_DISTORTS; } +// Return our order: +int emboss_get_order(int which ATTRIBUTE_UNUSED) +{ + return 301; +} + // Return our descriptions, localized: char *emboss_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode) { diff --git a/magic/src/fisheye.c b/magic/src/fisheye.c index c113d5610..dfc88339d 100644 --- a/magic/src/fisheye.c +++ b/magic/src/fisheye.c @@ -6,7 +6,7 @@ Credits: Adam 'foo-script' Rakowski ; foo-script@o2.pl - 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/ @@ -25,7 +25,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 @@ -46,6 +46,7 @@ int fisheye_get_tool_count(magic_api * api); SDL_Surface *fisheye_get_icon(magic_api * api, int which); char *fisheye_get_name(magic_api * api, int which); int fisheye_get_group(magic_api * api, int which); +int fisheye_get_order(int which); char *fisheye_get_description(magic_api * api, int which, int mode); int fisheye_requires_colors(magic_api * api, int which); void fisheye_release(magic_api * api, int which, @@ -116,6 +117,11 @@ int fisheye_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUS return MAGIC_TYPE_DISTORTS; } +int fisheye_get_order(int which ATTRIBUTE_UNUSED) +{ + return 400; +} + char *fisheye_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED) { return strdup(gettext_noop("Click on part of your picture to create a fisheye effect.")); diff --git a/magic/src/glasstile.c b/magic/src/glasstile.c index 7980f336d..1828fbb66 100644 --- a/magic/src/glasstile.c +++ b/magic/src/glasstile.c @@ -4,7 +4,7 @@ Glass Tile 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/ @@ -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 TODO: * Support sizing options @@ -47,6 +47,7 @@ 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); int glasstile_get_group(magic_api * api, int which); +int glasstile_get_order(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, @@ -117,6 +118,12 @@ int glasstile_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UN return MAGIC_TYPE_DISTORTS; } +// Return our order +int glasstile_get_order(int which ATTRIBUTE_UNUSED) +{ + return 402; +} + // Return our descriptions, localized: char *glasstile_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode) { diff --git a/magic/src/halftone.c b/magic/src/halftone.c index 9c2516477..f29d5dda9 100644 --- a/magic/src/halftone.c +++ b/magic/src/halftone.c @@ -1,6 +1,6 @@ /* halftone.c - Last updated: December 29, 2023 + Last updated: January 16, 2024 */ @@ -45,11 +45,15 @@ const int groups[NUM_TOOLS] = { MAGIC_TYPE_DISTORTS, }; +const int orders[NUM_TOOLS] = { + 2200, +}; + const char *descs[NUM_TOOLS][2] = { { gettext_noop("Click and drag to turn your drawing into a newspaper."), gettext_noop("Click to turn your drawing into a newspaper."), - }, + }, }; Mix_Chunk *snd_effect[NUM_TOOLS]; @@ -67,6 +71,7 @@ int halftone_get_tool_count(magic_api * api); SDL_Surface *halftone_get_icon(magic_api * api, int which); char *halftone_get_name(magic_api * api, int which); int halftone_get_group(magic_api * api, int which); +int halftone_get_order(int which); char *halftone_get_description(magic_api * api, int which, int mode); int halftone_requires_colors(magic_api * api, int which); int halftone_modes(magic_api * api, int which); @@ -141,6 +146,11 @@ int halftone_get_group(magic_api * api ATTRIBUTE_UNUSED, int which) return groups[which]; } +int halftone_get_order(int which) +{ + return orders[which]; +} + char *halftone_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode) { const char *our_desc_english; diff --git a/magic/src/mosaic.c b/magic/src/mosaic.c index 323b3dfa0..ec5713993 100644 --- a/magic/src/mosaic.c +++ b/magic/src/mosaic.c @@ -7,7 +7,7 @@ Credits: Andrew Corcoran - 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/ @@ -26,7 +26,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 @@ -56,6 +56,7 @@ 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); +int mosaic_get_order(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 *); @@ -106,6 +107,10 @@ const int mosaic_groups[mosaic_NUM_TOOLS] = { MAGIC_TYPE_DISTORTS, }; +const int mosaic_orders[mosaic_NUM_TOOLS] = { + 1100, +}; + 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."),}, @@ -158,6 +163,12 @@ int mosaic_get_group(magic_api * api ATTRIBUTE_UNUSED, int which) return mosaic_groups[which]; } +// Return our orders: +int mosaic_get_order(int which) +{ + return mosaic_orders[which]; +} + // Return our descriptions, localized: char *mosaic_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode) { diff --git a/magic/src/mosaic_shaped.c b/magic/src/mosaic_shaped.c index a984bda86..9cee337a1 100644 --- a/magic/src/mosaic_shaped.c +++ b/magic/src/mosaic_shaped.c @@ -11,9 +11,9 @@ * Pere Pujal for joining all toghether * Caroline Ford for the text descriptions - 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 - http://tuxpaint.org/ + https://tuxpaint.org/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,7 +30,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 @@ -63,6 +63,7 @@ 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); +int mosaic_shaped_get_order(int which); char *mosaic_shaped_get_description(magic_api * api, int which, int mode); @@ -111,6 +112,12 @@ enum mosaic_shaped_NUM_TOOLS }; +int magic_shaped_order[mosaic_shaped_NUM_TOOLS] = { + 1002, + 1001, + 1000, +}; + static Mix_Chunk *mosaic_shaped_snd_effect[mosaic_shaped_NUM_TOOLS]; static SDL_Surface *canvas_shaped; static SDL_Surface *canvas_back; @@ -206,6 +213,12 @@ int mosaic_shaped_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUT return MAGIC_TYPE_DISTORTS; } +// Return our order +int mosaic_shaped_get_order(int which) +{ + return magic_shaped_order[which]; +} + // Return our descriptions, localized: char *mosaic_shaped_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode) { diff --git a/magic/src/noise.c b/magic/src/noise.c index 81688d37a..f67fa4b4f 100644 --- a/magic/src/noise.c +++ b/magic/src/noise.c @@ -6,7 +6,7 @@ Credits: Andrew Corcoran - 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/ @@ -25,7 +25,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 @@ -69,6 +69,10 @@ const int noise_groups[noise_NUM_TOOLS] = { MAGIC_TYPE_DISTORTS, }; +const int noise_orders[noise_NUM_TOOLS] = { + 2100, +}; + 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."),}, @@ -79,6 +83,7 @@ int noise_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level) 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); +int noise_get_order(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); @@ -150,6 +155,12 @@ int noise_get_group(magic_api * api ATTRIBUTE_UNUSED, int which) return noise_groups[which]; } +// Return our orders +int noise_get_order(int which) +{ + return noise_orders[which]; +} + // Return our descriptions, localized: char *noise_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode) { diff --git a/magic/src/puzzle.c b/magic/src/puzzle.c index 5e39f9901..101fca048 100644 --- a/magic/src/puzzle.c +++ b/magic/src/puzzle.c @@ -6,7 +6,7 @@ Author: Adam 'foo-script' Rakowski ; foo-script@o2.pl - 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/ @@ -25,7 +25,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 */ @@ -55,6 +55,7 @@ int puzzle_get_tool_count(magic_api * api); SDL_Surface *puzzle_get_icon(magic_api * api, int which); char *puzzle_get_name(magic_api * api, int which); int puzzle_get_group(magic_api * api, int which); +int puzzle_get_order(int which); char *puzzle_get_description(magic_api * api, int which, int mode); void puzzle_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); @@ -117,6 +118,12 @@ int puzzle_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSE } +int puzzle_get_order(int which ATTRIBUTE_UNUSED) +{ + return 102; +} + + char *puzzle_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode) { if (mode == MODE_PAINT) diff --git a/magic/src/ripples.c b/magic/src/ripples.c index f4a249c40..5b8671073 100644 --- a/magic/src/ripples.c +++ b/magic/src/ripples.c @@ -4,7 +4,7 @@ Ripples 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/ @@ -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 @@ -47,6 +47,7 @@ int ripples_get_tool_count(magic_api * api); SDL_Surface *ripples_get_icon(magic_api * api, int which); char *ripples_get_name(magic_api * api, int which); int ripples_get_group(magic_api * api, int which); +int ripples_get_order(int which); char *ripples_get_description(magic_api * api, int which, int mode); void ripples_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect); @@ -113,6 +114,12 @@ int ripples_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUS return MAGIC_TYPE_DISTORTS; } +// Return our order: +int ripples_get_order(int which ATTRIBUTE_UNUSED) +{ + return 401; +} + // Return our descriptions, localized: char *ripples_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED) { diff --git a/magic/src/sharpen.c b/magic/src/sharpen.c index ca5d2d08f..74292c1b6 100644 --- a/magic/src/sharpen.c +++ b/magic/src/sharpen.c @@ -6,7 +6,7 @@ Credits: Andrew Corcoran - 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/ @@ -25,7 +25,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 @@ -71,6 +71,12 @@ const char *sharpen_icon_filenames[sharpen_NUM_TOOLS] = { "silhouette.png" }; +int sharpen_orders[sharpen_NUM_TOOLS] = { + 300, + 2, + 302, +}; + const char *sharpen_names[sharpen_NUM_TOOLS] = { gettext_noop("Edges"), gettext_noop("Sharpen"), @@ -92,6 +98,7 @@ int sharpen_get_tool_count(magic_api * api); SDL_Surface *sharpen_get_icon(magic_api * api, int which); char *sharpen_get_name(magic_api * api, int which); int sharpen_get_group(magic_api * api, int which); +int sharpen_get_order(int which); char *sharpen_get_description(magic_api * api, int which, int mode); static int sharpen_grey(Uint8 r1, Uint8 g1, Uint8 b1); static void do_sharpen_pixel(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y); @@ -168,6 +175,12 @@ int sharpen_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUS return MAGIC_TYPE_DISTORTS; } +// Return our order +int sharpen_get_order(int which) +{ + return sharpen_orders[which]; +} + // Return our descriptions, localized: char *sharpen_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode) { diff --git a/magic/src/smudge.c b/magic/src/smudge.c index 2330b3dd7..5f7171b98 100644 --- a/magic/src/smudge.c +++ b/magic/src/smudge.c @@ -7,7 +7,7 @@ Smudge by Albert Cahalan Wet Paint addition by Bill Kendrick - Copyright (c) 2002-2023 + Copyright (c) 2002-2024 https://tuxpaint.org/ This program is free software; you can redistribute it and/or modify @@ -25,7 +25,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 FIXME: "Wet Paint" doesn't smudge enough -bjk 2023.04.23 */ @@ -47,6 +47,7 @@ Uint32 smudge_api_version(void); SDL_Surface *smudge_get_icon(magic_api * api, int which); char *smudge_get_name(magic_api * api, int which); int smudge_get_group(magic_api * api, int which); +int smudge_get_order(int which); char *smudge_get_description(magic_api * api, int which, int mode); static void do_smudge(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y); void smudge_drag(magic_api * api, int which, SDL_Surface * canvas, @@ -121,6 +122,15 @@ int smudge_get_group(magic_api * api ATTRIBUTE_UNUSED, int which) return MAGIC_TYPE_PAINTING; /* Wet Paint */ } +// Return our order +int smudge_get_order(int which) +{ + if (which == 0) + return 3; /* within MAGIC_TYPE_DISTORTS */ + else + return 0; /* FIXME */ /* within MAGIC_TYPE_PAINTING */ +} + // Return our descriptions, localized: char *smudge_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode ATTRIBUTE_UNUSED) { diff --git a/magic/src/swirls.c b/magic/src/swirls.c index a22485e31..8423d3afb 100644 --- a/magic/src/swirls.c +++ b/magic/src/swirls.c @@ -7,7 +7,7 @@ Inspired by "Night Sky Scene [Pen Parallax]" Scratch Project by -HexaScape- - Last updated: December 29, 2023 + Last updated: January 16, 2024 */ #include @@ -33,6 +33,12 @@ char *swirl_names[NUM_SWIRL_TOOLS] = { gettext_noop("Fur") }; +int swirls_orders[NUM_SWIRL_TOOLS] = { + 200, /* within MAGIC_TYPE_DISTORTS */ + 201, /* within MAGIC_TYPE_DISTORTS */ + 0, /* FIXME */ /* within MAGIC_TYPE_PAINTING */ +}; + char *swirl_descriptions[NUM_SWIRL_TOOLS][2] = { { gettext_noop("Click and drag to transform parts of your picture to circular brushstrokes."), @@ -87,6 +93,7 @@ int swirls_get_tool_count(magic_api * api); SDL_Surface *swirls_get_icon(magic_api * api, int which); char *swirls_get_name(magic_api * api, int which); int swirls_get_group(magic_api * api, int which); +int swirls_get_order(int which); char *swirls_get_description(magic_api * api, int which, int mode); int swirls_requires_colors(magic_api * api, int which); int swirls_modes(magic_api * api, int which); @@ -151,7 +158,7 @@ char *swirls_get_name(magic_api * api ATTRIBUTE_UNUSED, int which) return strdup(gettext(swirl_names[which])); } -int swirls_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED) +int swirls_get_group(magic_api * api ATTRIBUTE_UNUSED, int which) { if (which == SWIRL_TOOL_FUR) { @@ -163,6 +170,11 @@ int swirls_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSE } } +int swirls_get_order(int which) +{ + return swirls_orders[which]; +} + char *swirls_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode) { return strdup(gettext(swirl_descriptions[which][mode - 1])); diff --git a/magic/src/tv.c b/magic/src/tv.c index d5255fd69..2b0cb79be 100644 --- a/magic/src/tv.c +++ b/magic/src/tv.c @@ -7,7 +7,7 @@ Credits: Adam 'foo-script' Rakowski and Bill Kendrick - 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/ @@ -26,7 +26,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 "tp_magic_api.h" @@ -43,6 +43,11 @@ enum NUM_TV_TOOLS }; +int tv_orders[NUM_TV_TOOLS] = { + 2000, + 2001, +}; + Mix_Chunk *tv_snd; Uint32 tv_api_version(void); @@ -53,6 +58,7 @@ int tv_get_tool_count(magic_api * api); SDL_Surface *tv_get_icon(magic_api * api, int which); char *tv_get_name(magic_api * api, int which); int tv_get_group(magic_api * api, int which); +int tv_get_order(int which); char *tv_get_description(magic_api * api, int which, int mode); int tv_requires_colors(magic_api * api, int which); void tv_release(magic_api * api, int which, @@ -124,6 +130,11 @@ int tv_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED) return MAGIC_TYPE_DISTORTS; } +int tv_get_order(int which) +{ + return tv_orders[which]; +} + char *tv_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode) { if (mode == MODE_PAINT)