diff --git a/magic/src/alien.c b/magic/src/alien.c index 150461e3e..afc1fe564 100644 --- a/magic/src/alien.c +++ b/magic/src/alien.c @@ -6,7 +6,7 @@ Credits: Andrew Corcoran inspired by the Alien Map GIMP plugin - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 20, 2021 - $Id$ + Last updated: January 25, 2023 */ #include @@ -96,7 +95,8 @@ void alien_click(magic_api * api, int which, int mode, void alien_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void alien_shutdown(magic_api * api); -void alien_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void alien_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int alien_requires_colors(magic_api * api, int which); void alien_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -312,9 +312,8 @@ void alien_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void alien_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void alien_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED, + SDL_Surface * last ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED) { } diff --git a/magic/src/blind.c b/magic/src/blind.c index 6c5bc139b..eda8995e1 100644 --- a/magic/src/blind.c +++ b/magic/src/blind.c @@ -6,7 +6,7 @@ By Pere Pujal Carabantes - Copyright (c) 2009-2022 + Copyright (c) 2009-2023 https://tuxpaint.org/ This program is free software; you can redistribute it and/or modify @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 + Last updated: January 25, 2023 */ #include "tp_magic_api.h" @@ -55,7 +55,8 @@ Mix_Chunk *blind_snd; // Prototypes Uint32 blind_api_version(void); -void blind_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void blind_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int blind_init(magic_api * api); int blind_get_tool_count(magic_api * api); SDL_Surface *blind_get_icon(magic_api * api, int which); @@ -87,8 +88,10 @@ Uint32 blind_api_version(void) return (TP_MAGIC_API_VERSION); } -void blind_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, Uint8 b) //get the colors from API and store it in structure +void blind_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { + //get the colors from API and store it in structure blind_r = r; blind_g = g; blind_b = b; diff --git a/magic/src/blocks_chalk_drip.c b/magic/src/blocks_chalk_drip.c index 190b2454c..d72d11e11 100644 --- a/magic/src/blocks_chalk_drip.c +++ b/magic/src/blocks_chalk_drip.c @@ -4,7 +4,7 @@ Blocks, Chalk and Drip Magic Tools Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -73,7 +72,8 @@ void blocks_chalk_drip_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void blocks_chalk_drip_shutdown(magic_api * api); -void blocks_chalk_drip_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void blocks_chalk_drip_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int blocks_chalk_drip_requires_colors(magic_api * api, int which); void blocks_chalk_drip_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -432,10 +432,8 @@ void blocks_chalk_drip_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void blocks_chalk_drip_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, - Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void blocks_chalk_drip_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/blur.c b/magic/src/blur.c index cce99be03..f84bd362b 100644 --- a/magic/src/blur.c +++ b/magic/src/blur.c @@ -6,7 +6,7 @@ Credits: Bill Kendrick & Andrew Corcoran - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -54,7 +53,8 @@ void blur_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void blur_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void blur_shutdown(magic_api * api); -void blur_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void blur_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int blur_requires_colors(magic_api * api, int which); void blur_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -310,9 +310,8 @@ void blur_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void blur_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void blur_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/bricks.c b/magic/src/bricks.c index 436d151fb..7311996b4 100644 --- a/magic/src/bricks.c +++ b/magic/src/bricks.c @@ -6,7 +6,7 @@ Albert Cahalan - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -70,7 +69,8 @@ void bricks_click(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void bricks_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); //An empty function. Is there a purpose to this? Ask moderator. void bricks_shutdown(magic_api * api); -void bricks_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void bricks_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int bricks_requires_colors(magic_api * api, int which); void bricks_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -296,8 +296,8 @@ void bricks_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void bricks_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void bricks_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { bricks_r = r; bricks_g = g; diff --git a/magic/src/calligraphy.c b/magic/src/calligraphy.c index cd9cd67fc..a6477ee30 100644 --- a/magic/src/calligraphy.c +++ b/magic/src/calligraphy.c @@ -4,7 +4,7 @@ Calligraphy Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -70,7 +69,8 @@ void calligraphy_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void calligraphy_shutdown(magic_api * api); -void calligraphy_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void calligraphy_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int calligraphy_requires_colors(magic_api * api, int which); void calligraphy_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -320,7 +320,8 @@ void calligraphy_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // We don't use colors -void calligraphy_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b) +void calligraphy_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { int x, y; Uint8 a; diff --git a/magic/src/cartoon.c b/magic/src/cartoon.c index e3867e232..1fa28f684 100644 --- a/magic/src/cartoon.c +++ b/magic/src/cartoon.c @@ -4,7 +4,7 @@ Cartoon Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -65,7 +64,8 @@ void cartoon_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void cartoon_shutdown(magic_api * api); -void cartoon_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void cartoon_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int cartoon_requires_colors(magic_api * api, int which); void cartoon_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -313,9 +313,8 @@ void cartoon_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void cartoon_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void cartoon_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/checkerboard.c b/magic/src/checkerboard.c index b4966f4f7..1c04766d9 100644 --- a/magic/src/checkerboard.c +++ b/magic/src/checkerboard.c @@ -7,7 +7,7 @@ By Bill Kendrick Based on `blind.c` by Pere Pujal Carabantes - Copyright (c) 2021-2022 + Copyright (c) 2021-2023 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 11, 2022 + Last updated: January 25, 2023 */ #include "tp_magic_api.h" @@ -39,7 +39,8 @@ Mix_Chunk *checkerboard_snd; // Prototypes Uint32 checkerboard_api_version(void); -void checkerboard_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void checkerboard_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int checkerboard_init(magic_api * api); int checkerboard_get_tool_count(magic_api * api); SDL_Surface *checkerboard_get_icon(magic_api * api, int which); @@ -73,8 +74,10 @@ Uint32 checkerboard_api_version(void) return (TP_MAGIC_API_VERSION); } -void checkerboard_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, Uint8 b) //get the colors from API and store it in structure +void checkerboard_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { + //get the colors from API and store it in structure checkerboard_r = r; checkerboard_g = g; checkerboard_b = b; diff --git a/magic/src/clone.c b/magic/src/clone.c index faaf24a94..2e3531f60 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) 2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -83,7 +82,8 @@ void clone_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void clone_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void clone_shutdown(magic_api * api); -void clone_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void clone_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int clone_requires_colors(magic_api * api, int which); void clone_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -346,9 +346,8 @@ void clone_shutdown(magic_api * api ATTRIBUTE_UNUSED) Mix_FreeChunk(clone_start_snd); } -void clone_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 ATTRIBUTE_UNUSED r, Uint8 ATTRIBUTE_UNUSED g, - Uint8 ATTRIBUTE_UNUSED b) +void clone_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/confetti.c b/magic/src/confetti.c index 084ee5dc8..1b6ec24c2 100644 --- a/magic/src/confetti.c +++ b/magic/src/confetti.c @@ -1,4 +1,6 @@ -/* Last updated 2021-09-21 */ +/* + Last updated: January 25, 2023 +*/ #include //For time() @@ -24,7 +26,8 @@ Mix_Chunk *confetti_snd; /* Local function prototypes: */ Uint32 confetti_api_version(void); -void confetti_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void confetti_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int confetti_init(magic_api * api); int confetti_get_tool_count(magic_api * api); SDL_Surface *confetti_get_icon(magic_api * api, int which); @@ -59,8 +62,10 @@ Uint32 confetti_api_version(void) return (TP_MAGIC_API_VERSION); } -void confetti_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, Uint8 b) //get the colors from API and store it in structure +void confetti_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { + //get the colors from API and store it in structure confetti_colors.r = r; confetti_colors.g = g; confetti_colors.b = b; diff --git a/magic/src/distortion.c b/magic/src/distortion.c index 26a035c9b..3bc4cf0f6 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-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ /* Inclusion of header files: */ @@ -71,7 +70,8 @@ void distortion_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect); -void distortion_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void distortion_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); void distortion_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); void distortion_switchout(magic_api * api, int which, int mode, @@ -245,9 +245,8 @@ void distortion_release(magic_api * api ATTRIBUTE_UNUSED, } -void distortion_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void distortion_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/emboss.c b/magic/src/emboss.c index c0d7a94a9..5044243b0 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-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -59,7 +58,8 @@ void emboss_release(magic_api * api, int which, SDL_Rect * update_rect); void emboss_shutdown(magic_api * api); -void emboss_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void emboss_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int emboss_requires_colors(magic_api * api, int which); void emboss_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -264,9 +264,8 @@ void emboss_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void emboss_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void emboss_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/fade_darken.c b/magic/src/fade_darken.c index 91913a2f0..df8211a41 100644 --- a/magic/src/fade_darken.c +++ b/magic/src/fade_darken.c @@ -4,7 +4,7 @@ Fade and Darken Magic Tools Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -66,7 +65,8 @@ void fade_darken_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void fade_darken_shutdown(magic_api * api); -void fade_darken_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void fade_darken_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int fade_darken_requires_colors(magic_api * api, int which); void fade_darken_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -289,9 +289,8 @@ void fade_darken_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // We don't use colors -void fade_darken_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void fade_darken_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/fisheye.c b/magic/src/fisheye.c index 277d089bd..efd18724f 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-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -24,6 +24,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) + + Last updated: January 25, 2023 */ #include @@ -36,7 +38,8 @@ int last_x, last_y; /* Local function prototypes */ Uint32 fisheye_api_version(void); -void fisheye_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void fisheye_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int fisheye_init(magic_api * api); int fisheye_get_tool_count(magic_api * api); SDL_Surface *fisheye_get_icon(magic_api * api, int which); @@ -73,9 +76,8 @@ Uint32 fisheye_api_version(void) return (TP_MAGIC_API_VERSION); } -void fisheye_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void fisheye_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/flower.c b/magic/src/flower.c index 9629dc66d..8ad111832 100644 --- a/magic/src/flower.c +++ b/magic/src/flower.c @@ -4,7 +4,7 @@ Flower Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -91,7 +90,8 @@ static void flower_drawstalk(magic_api * api, SDL_Surface * canvas, int top_x, int top_y, int minx, int maxx, int bottom_x, int bottom_y, int final); void flower_shutdown(magic_api * api); -void flower_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void flower_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int flower_requires_colors(magic_api * api, int which); static Point2D flower_PointOnCubicBezier(Point2D * cp, float t); static void flower_ComputeBezier(Point2D * cp, int numberOfPoints, @@ -516,7 +516,8 @@ void flower_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void flower_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b) +void flower_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { flower_r = r; flower_g = g; diff --git a/magic/src/foam.c b/magic/src/foam.c index 57b5ac1ad..453f52a88 100644 --- a/magic/src/foam.c +++ b/magic/src/foam.c @@ -4,7 +4,7 @@ Foam Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -62,7 +61,8 @@ void foam_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); void foam_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas); -void foam_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void foam_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); void foam_shutdown(magic_api * api); int foam_get_tool_count(magic_api * api); int foam_modes(magic_api * api, int which); @@ -460,8 +460,8 @@ void foam_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void foam_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void foam_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { foam_r = r; foam_g = g; diff --git a/magic/src/fold.c b/magic/src/fold.c index 0e8ed31f9..d74ece1b6 100644 --- a/magic/src/fold.c +++ b/magic/src/fold.c @@ -1,8 +1,8 @@ /* - * Folds the picture down from the corners. - * - * Last updated: 2021-09-20 - */ + Folds the picture down from the corners. + + Last updated: January 25, 2023 +*/ //optimized version soon :) //when "folding" same corner many times it gives strange results. Now it's allowed. Let me know @@ -48,7 +48,8 @@ static void fold_print_dark_line(void *ptr, int which, SDL_Surface * canvas, void translate_xy(SDL_Surface * canvas, int x, int y, int *a, int *b, int rotation); Uint32 fold_api_version(void); -void fold_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void fold_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int fold_init(magic_api * api); int fold_get_tool_count(magic_api * api); SDL_Surface *fold_get_icon(magic_api * api, int which); @@ -84,8 +85,10 @@ Uint32 fold_api_version(void) return (TP_MAGIC_API_VERSION); } -void fold_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, Uint8 b) //get the colors from API and store it in structure +void fold_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { + //get the colors from API and store it in structure fold_r = r; fold_g = g; fold_b = b; diff --git a/magic/src/fretwork.c b/magic/src/fretwork.c index 4bb1c9a93..f6fac92ea 100644 --- a/magic/src/fretwork.c +++ b/magic/src/fretwork.c @@ -1,8 +1,8 @@ /* - * Draws fretwork - * - * Last updated: 2022-05-19 - */ + Draws fretwork + + Last updated: January 25, 2023 +*/ #include "tp_magic_api.h" #include "SDL_image.h" @@ -57,7 +57,8 @@ static SDL_Surface *fretwork_one_back, *fretwork_three_back, Uint32 fretwork_api_version(void); int fretwork_modes(magic_api * api, int which); -void fretwork_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void fretwork_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); static void fretwork_colorize(magic_api * api, SDL_Surface * dest, SDL_Surface * src); int fretwork_init(magic_api * api); @@ -106,7 +107,8 @@ int fretwork_modes(magic_api * api ATTRIBUTE_UNUSED, return (MODE_PAINT | MODE_FULLSCREEN); } -void fretwork_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b) +void fretwork_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { fretwork_r = r; fretwork_g = g; diff --git a/magic/src/glasstile.c b/magic/src/glasstile.c index ded3ede8e..0e3f84d05 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-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -58,7 +57,8 @@ 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); +void glasstile_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int glasstile_requires_colors(magic_api * api, int which); void glasstile_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -329,9 +329,8 @@ void glasstile_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void glasstile_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void glasstile_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/googlyeyes.c b/magic/src/googlyeyes.c index ca19f736d..db4f57a24 100644 --- a/magic/src/googlyeyes.c +++ b/magic/src/googlyeyes.c @@ -3,7 +3,7 @@ Draws a googly eye at the click position, and looks towards where you drag+release. - Last modified: 2023.01.16 + Last updated: January 25, 2023 */ #include @@ -41,7 +41,8 @@ void googlyeyes_shutdown(magic_api * api); void googlyeyes_click(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect); -void googlyeyes_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void googlyeyes_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); void googlyeyes_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect); @@ -290,8 +291,8 @@ googlyeyes_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, } -void googlyeyes_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED) +void googlyeyes_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/grass.c b/magic/src/grass.c index 62a52e557..469327857 100644 --- a/magic/src/grass.c +++ b/magic/src/grass.c @@ -5,7 +5,7 @@ Tux Paint - A simple drawing program for children. by Albert Cahalan - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -24,8 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -57,7 +56,8 @@ void grass_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void grass_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void grass_shutdown(magic_api * api); -void grass_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void grass_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int grass_requires_colors(magic_api * api, int which); static void do_grass(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y); @@ -189,8 +189,8 @@ void grass_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void grass_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void grass_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { grass_r = r; grass_g = g; diff --git a/magic/src/halftone.c b/magic/src/halftone.c index b82bc71dc..e8365fbe5 100644 --- a/magic/src/halftone.c +++ b/magic/src/halftone.c @@ -1,6 +1,6 @@ /* halftone.c - Last modified: 2021.11.07 + Last updated: January 25, 2023 */ @@ -79,7 +79,8 @@ void halftone_click(magic_api * api, int which, int mode, void halftone_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect); -void halftone_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void halftone_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); void halftone_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); void halftone_switchout(magic_api * api, int which, int mode, @@ -277,9 +278,8 @@ void halftone_release(magic_api * api ATTRIBUTE_UNUSED, { } -void halftone_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void halftone_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/kalidescope.c b/magic/src/kalidescope.c index 6c53f3305..33b9391ec 100644 --- a/magic/src/kalidescope.c +++ b/magic/src/kalidescope.c @@ -4,7 +4,7 @@ Kaleidoscope Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -80,7 +79,8 @@ void kalidescope_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Rect * update_rect); void kalidescope_shutdown(magic_api * api); int kalidescope_requires_colors(magic_api * api, int which); -void kalidescope_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void kalidescope_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); void kalidescope_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); void kalidescope_switchout(magic_api * api, int which, int mode, @@ -283,8 +283,8 @@ void kalidescope_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void kalidescope_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void kalidescope_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { kalidescope_r = r; kalidescope_g = g; diff --git a/magic/src/light.c b/magic/src/light.c index fb26acdb6..f2ce5ee61 100644 --- a/magic/src/light.c +++ b/magic/src/light.c @@ -4,7 +4,7 @@ Light Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -57,7 +56,8 @@ void light_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void light_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void light_shutdown(magic_api * api); -void light_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void light_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int light_requires_colors(magic_api * api, int which); void light_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -249,7 +249,8 @@ void light_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void light_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b) +void light_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { api->rgbtohsv(r, g, b, &light_h, &light_s, &light_v); } diff --git a/magic/src/lightning.c b/magic/src/lightning.c index 688324ad0..b379367fc 100644 --- a/magic/src/lightning.c +++ b/magic/src/lightning.c @@ -1,9 +1,9 @@ /* lightning.c - Draws a lightning strike between the click - and drag+release positions. + Draws a lightning strike between the click + and drag+release positions. - Last modified: 2021.11.07 + Last updated: January 25, 2023 */ #include @@ -33,7 +33,8 @@ void lightning_shutdown(magic_api * api); void lightning_click(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect); -void lightning_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void lightning_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); void lightning_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect); @@ -300,7 +301,8 @@ void lightning_draw_bolt(void *ptr, SDL_Surface * canvas, } -void lightning_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b) +void lightning_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { api->rgbtohsv(r, g, b, &lightning_h, &lightning_s, &lightning_v); } diff --git a/magic/src/maze.c b/magic/src/maze.c index d26d4b0ff..ff45325f5 100644 --- a/magic/src/maze.c +++ b/magic/src/maze.c @@ -1,15 +1,8 @@ /* maze.c - Applys a lense effect like mazes of water dripping - down a pane of glass. Applies an additive brush at - the mouse pointer, and a subtractive brush slightly - above (to simulate the water breaking up due to - evaporation), only allowing the draw path to go downwards, - and the left/right delta to change slightly (will not - follow the mouse precisely). Upon release, the lense - effect will be applied. + Allows painting generated maze puzzles on your picture. - Last modified: 2023.01.25 + Last updated: January 25, 2023 */ #include @@ -61,7 +54,8 @@ void maze_shutdown(magic_api * api); void maze_click(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect); -void maze_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void maze_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); void maze_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect); @@ -349,8 +343,8 @@ void maze_render(magic_api * api, SDL_Surface * canvas) } -void maze_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED) +void maze_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { maze_r = r; maze_g = g; diff --git a/magic/src/metalpaint.c b/magic/src/metalpaint.c index 1a8cf3757..40e81dbab 100644 --- a/magic/src/metalpaint.c +++ b/magic/src/metalpaint.c @@ -4,7 +4,7 @@ Metal Paint Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -57,7 +56,8 @@ void metalpaint_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void metalpaint_shutdown(magic_api * api); -void metalpaint_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void metalpaint_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int metalpaint_requires_colors(magic_api * api, int which); void metalpaint_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -220,8 +220,8 @@ void metalpaint_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void metalpaint_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void metalpaint_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { metalpaint_r = min(255, r + 64); metalpaint_g = min(255, g + 64); diff --git a/magic/src/mirror_flip.c b/magic/src/mirror_flip.c index 378456de1..fdde25224 100644 --- a/magic/src/mirror_flip.c +++ b/magic/src/mirror_flip.c @@ -4,7 +4,7 @@ Mirror and Flip Magic Tools Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2021 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -59,7 +58,8 @@ void mirror_flip_release(magic_api *, int, SDL_Surface *, SDL_Surface *, int, void mirror_flip_click(magic_api *, int, int, SDL_Surface *, SDL_Surface *, int, int, SDL_Rect *); void mirror_flip_shutdown(magic_api *); -void mirror_flip_set_color(magic_api *, Uint8, Uint8, Uint8); +void mirror_flip_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int mirror_flip_requires_colors(magic_api *, int); void mirror_flip_switchin(magic_api *, int, int, SDL_Surface *); void mirror_flip_switchout(magic_api *, int, int, SDL_Surface *); @@ -226,9 +226,8 @@ void mirror_flip_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // We don't use colors: -void mirror_flip_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void mirror_flip_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/mosaic.c b/magic/src/mosaic.c index 3179d8111..d93b74aff 100644 --- a/magic/src/mosaic.c +++ b/magic/src/mosaic.c @@ -7,7 +7,7 @@ Credits: Andrew Corcoran - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -26,8 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -69,7 +68,8 @@ void mosaic_click(magic_api *, int, int, SDL_Surface *, SDL_Surface *, int, void mosaic_release(magic_api *, int, SDL_Surface *, SDL_Surface *, int, int, SDL_Rect *); void mosaic_shutdown(magic_api *); -void mosaic_set_color(magic_api *, Uint8, Uint8, Uint8); +void mosaic_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int mosaic_requires_colors(magic_api *, int); void mosaic_switchin(magic_api *, int, int, SDL_Surface *); void mosaic_switchout(magic_api *, int, int, SDL_Surface *); @@ -319,9 +319,8 @@ void mosaic_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void mosaic_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void mosaic_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/mosaic_shaped.c b/magic/src/mosaic_shaped.c index 338adf6cb..8903ecc80 100644 --- a/magic/src/mosaic_shaped.c +++ b/magic/src/mosaic_shaped.c @@ -11,7 +11,7 @@ * Pere Pujal for joining all toghether * Caroline Ford for the text descriptions - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com http://tuxpaint.org/ @@ -30,8 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 22, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -87,7 +86,8 @@ void mosaic_shaped_release(magic_api * api, int which, void mosaic_shaped_shutdown(magic_api * api); -void mosaic_shaped_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void mosaic_shaped_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int mosaic_shaped_requires_colors(magic_api * api, int which); @@ -384,8 +384,8 @@ void mosaic_shaped_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void mosaic_shaped_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, - Uint8 g, Uint8 b) +void mosaic_shaped_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { mosaic_shaped_r = r; mosaic_shaped_g = g; diff --git a/magic/src/negative.c b/magic/src/negative.c index 00eaf8f97..64b552ac8 100644 --- a/magic/src/negative.c +++ b/magic/src/negative.c @@ -4,7 +4,7 @@ Negative Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -55,7 +54,8 @@ void negative_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void negative_shutdown(magic_api * api); -void negative_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void negative_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int negative_requires_colors(magic_api * api, int which); void negative_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -294,9 +294,8 @@ void negative_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // We don't use colors -void negative_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void negative_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/noise.c b/magic/src/noise.c index d7473748f..3f188366b 100644 --- a/magic/src/noise.c +++ b/magic/src/noise.c @@ -6,7 +6,7 @@ Credits: Andrew Corcoran - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -96,7 +95,8 @@ void noise_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void noise_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void noise_shutdown(magic_api * api); -void noise_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void noise_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int noise_requires_colors(magic_api * api, int which); void noise_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -296,9 +296,8 @@ void noise_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void noise_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void noise_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/pixels.c b/magic/src/pixels.c index dabf69783..ac91b062e 100644 --- a/magic/src/pixels.c +++ b/magic/src/pixels.c @@ -4,7 +4,7 @@ Pixel art paintbrush Magic Tools Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -65,7 +64,8 @@ void pixels_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void pixels_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void pixels_shutdown(magic_api * api); -void pixels_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void pixels_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int pixels_requires_colors(magic_api * api, int which); void pixels_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -206,8 +206,8 @@ void pixels_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void pixels_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void pixels_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { pixels_r = r; pixels_g = g; diff --git a/magic/src/puzzle.c b/magic/src/puzzle.c index 639f142e6..d84f07149 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-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 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 11, 2022 + Last updated: January 25, 2023 */ @@ -60,7 +60,8 @@ void puzzle_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void puzzle_shutdown(magic_api * api); -void puzzle_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void puzzle_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int puzzle_requires_colors(magic_api * api, int which); void puzzle_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -147,9 +148,8 @@ void puzzle_shutdown(magic_api * api ATTRIBUTE_UNUSED) Mix_FreeChunk(puzzle_snd); } -void puzzle_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void puzzle_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/rails.c b/magic/src/rails.c index a2d2b10f9..dd6e939a6 100644 --- a/magic/src/rails.c +++ b/magic/src/rails.c @@ -1,4 +1,10 @@ -/* Last modified: 2022-05-19 */ +/* + rails.c + + Draw train tracks. + + Last updated: January 25, 2023 +*/ #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -44,7 +50,8 @@ SDL_Surface *rails_one, *rails_three, *rails_four, *rails_corner; Uint32 rails_api_version(void); int rails_modes(magic_api * api, int which); -void rails_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void rails_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int rails_init(magic_api * api); int rails_get_tool_count(magic_api * api); SDL_Surface *rails_get_icon(magic_api * api, int which); @@ -92,9 +99,8 @@ int rails_modes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED) return (MODE_PAINT); } -void rails_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void rails_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/rain.c b/magic/src/rain.c index b8f36d52a..000154e3e 100644 --- a/magic/src/rain.c +++ b/magic/src/rain.c @@ -6,7 +6,7 @@ Credits: Andrew Corcoran - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -97,7 +96,8 @@ void rain_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void rain_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void rain_shutdown(magic_api * api); -void rain_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void rain_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int rain_requires_colors(magic_api * api, int which); void rain_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -305,9 +305,8 @@ void rain_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void rain_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void rain_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/rainbow.c b/magic/src/rainbow.c index d19966f33..7511a7153 100644 --- a/magic/src/rainbow.c +++ b/magic/src/rainbow.c @@ -4,7 +4,7 @@ Rainbow Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -93,7 +92,8 @@ void rainbow_release(magic_api * api, int which, void rainbow_shutdown(magic_api * api); -void rainbow_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void rainbow_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int rainbow_requires_colors(magic_api * api, int which); void rainbow_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -280,9 +280,8 @@ void rainbow_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void rainbow_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void rainbow_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/realrainbow.c b/magic/src/realrainbow.c index f3675ece6..c0c57b5ff 100644 --- a/magic/src/realrainbow.c +++ b/magic/src/realrainbow.c @@ -6,7 +6,8 @@ by Bill Kendrick Math assistance by Jeff Newmiller - 2009.04.02 - 2021.09.20 + 2009.04.02 + Last updated: January 25, 2023 FIXME: * Color/alpha art needs improvement. @@ -43,7 +44,8 @@ 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); void realrainbow_shutdown(magic_api * api); -void realrainbow_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void realrainbow_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); void realrainbow_click(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); @@ -152,9 +154,8 @@ void realrainbow_shutdown(magic_api * api ATTRIBUTE_UNUSED) Mix_FreeChunk(realrainbow_snd); } -void realrainbow_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void realrainbow_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/reflection.c b/magic/src/reflection.c index 2ef553204..81325ca50 100644 --- a/magic/src/reflection.c +++ b/magic/src/reflection.c @@ -4,7 +4,7 @@ Reflection Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2021-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2021-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -71,7 +70,8 @@ void reflection_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void reflection_shutdown(magic_api * api); -void reflection_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void reflection_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int reflection_requires_colors(magic_api * api, int which); void reflection_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -397,9 +397,8 @@ void reflection_shutdown(magic_api * api ATTRIBUTE_UNUSED) Mix_FreeChunk(reflection_snd); } -void reflection_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void reflection_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/ripples.c b/magic/src/ripples.c index 99bddc0b0..8dbd352be 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-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -59,7 +58,8 @@ void ripples_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void ripples_shutdown(magic_api * api); -void ripples_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void ripples_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int ripples_requires_colors(magic_api * api, int which); void ripples_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -215,9 +215,8 @@ void ripples_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void ripples_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void ripples_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/rivulet.c b/magic/src/rivulet.c index dcc588d0d..2b71051ef 100644 --- a/magic/src/rivulet.c +++ b/magic/src/rivulet.c @@ -9,7 +9,7 @@ follow the mouse precisely). Upon release, the lense effect will be applied. - Last modified: 2023.01.16 + Last updated: January 25, 2023 */ #include @@ -49,7 +49,8 @@ void rivulet_shutdown(magic_api * api); void rivulet_click(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect); -void rivulet_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void rivulet_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); void rivulet_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect); @@ -335,8 +336,8 @@ rivulet_release(magic_api * api, int which ATTRIBUTE_UNUSED, } -void rivulet_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED) +void rivulet_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/rosette.c b/magic/src/rosette.c index 486bd6d3b..cac43cff3 100644 --- a/magic/src/rosette.c +++ b/magic/src/rosette.c @@ -6,7 +6,7 @@ Credits: Adam 'foo-script' Rakowski - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 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 11, 2022 + Last updated: January 25, 2023 */ // sound only plays on release @@ -51,7 +51,8 @@ Mix_Chunk *rosette_snd; // Housekeeping functions Uint32 rosette_api_version(void); -void rosette_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void rosette_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int rosette_init(magic_api * api); int rosette_get_tool_count(magic_api * api); SDL_Surface *rosette_get_icon(magic_api * api, int which); @@ -85,8 +86,10 @@ Uint32 rosette_api_version(void) return (TP_MAGIC_API_VERSION); } -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 +void rosette_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { + //get the colors from API and store it in structure rosette_colors.r = r; rosette_colors.g = g; rosette_colors.b = b; diff --git a/magic/src/sharpen.c b/magic/src/sharpen.c index 3f2319d10..361e091f6 100644 --- a/magic/src/sharpen.c +++ b/magic/src/sharpen.c @@ -6,7 +6,7 @@ Credits: Andrew Corcoran - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -115,7 +114,8 @@ void sharpen_release(magic_api * api, int which, SDL_Rect * update_rect); void sharpen_shutdown(magic_api * api); -void sharpen_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void sharpen_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int sharpen_requires_colors(magic_api * api, int which); void sharpen_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -371,9 +371,8 @@ void sharpen_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void sharpen_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void sharpen_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/shift.c b/magic/src/shift.c index 9d2a41cc6..3b27e97e5 100644 --- a/magic/src/shift.c +++ b/magic/src/shift.c @@ -4,7 +4,7 @@ Shift Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -61,7 +60,8 @@ void shift_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void shift_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void shift_shutdown(magic_api * api); -void shift_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void shift_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int shift_requires_colors(magic_api * api, int which); void shift_switchin(magic_api * api, int which, int mode, @@ -336,9 +336,8 @@ void shift_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void shift_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void shift_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/smudge.c b/magic/src/smudge.c index a8b2d8dc5..86d9a4d26 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-2022 + Copyright (c) 2002-2023 https://tuxpaint.org/ This program is free software; you can redistribute it and/or modify @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -56,7 +55,8 @@ void smudge_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void smudge_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void smudge_shutdown(magic_api * api); -void smudge_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void smudge_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int smudge_requires_colors(magic_api * api, int which); void smudge_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -255,8 +255,8 @@ void smudge_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void smudge_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void smudge_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { smudge_r = r; smudge_g = g; diff --git a/magic/src/snow.c b/magic/src/snow.c index f2e9a867d..4d68b9cd0 100644 --- a/magic/src/snow.c +++ b/magic/src/snow.c @@ -6,7 +6,7 @@ Credits: Andrew Corcoran - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -96,7 +95,8 @@ void snow_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void snow_shutdown(magic_api * api); -void snow_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void snow_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int snow_requires_colors(magic_api * api, int which); void snow_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -285,9 +285,8 @@ void snow_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void snow_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void snow_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/stretch.c b/magic/src/stretch.c index d9e897e2c..ec5482c20 100644 --- a/magic/src/stretch.c +++ b/magic/src/stretch.c @@ -7,7 +7,7 @@ By Bill Kendrick Some parts based on "Blind" Magic Tool by Pere Pujal Carabantes - Copyright (c) 2021-2022 + Copyright (c) 2021-2023 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 11, 2022 + Last updated: January 25, 2023 */ #include "tp_magic_api.h" @@ -50,7 +50,8 @@ Mix_Chunk *stretch_snd; // Prototypes Uint32 stretch_api_version(void); -void stretch_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void stretch_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int stretch_init(magic_api * api); int stretch_get_tool_count(magic_api * api); SDL_Surface *stretch_get_icon(magic_api * api, int which); @@ -82,9 +83,8 @@ Uint32 stretch_api_version(void) return (TP_MAGIC_API_VERSION); } -void stretch_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void stretch_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/string.c b/magic/src/string.c index 4e878df7f..767f609f2 100644 --- a/magic/src/string.c +++ b/magic/src/string.c @@ -1,8 +1,8 @@ /* - * Strings -- draws string art. - * - * Last modified: 2021-09-21 - */ + Strings -- draws string art. + + Last updated: January 25, 2023 +*/ #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -60,7 +60,8 @@ void string_drag(magic_api * api, int which, SDL_Surface * canvas, Uint32 string_api_version(void); int string_modes(magic_api * api, int which); -void string_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void string_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); 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); @@ -95,8 +96,8 @@ int string_modes(magic_api * api ATTRIBUTE_UNUSED, int which) return (MODE_PAINT_WITH_PREVIEW); } -void string_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void string_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { string_r = r; string_g = g; diff --git a/magic/src/tint.c b/magic/src/tint.c index c23d9605e..0d71e1310 100644 --- a/magic/src/tint.c +++ b/magic/src/tint.c @@ -10,7 +10,7 @@ Credits: Andrew Corcoran - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -29,8 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -107,7 +106,8 @@ void tint_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void tint_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void tint_shutdown(magic_api * api); -void tint_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void tint_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int tint_requires_colors(magic_api * api, int which); void tint_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -323,8 +323,8 @@ void tint_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void tint_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void tint_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { tint_r = r; tint_g = g; diff --git a/magic/src/toothpaste.c b/magic/src/toothpaste.c index e39531f2b..10599223a 100644 --- a/magic/src/toothpaste.c +++ b/magic/src/toothpaste.c @@ -6,7 +6,7 @@ Credits: Andrew Corcoran - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -96,7 +95,8 @@ void toothpaste_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void toothpaste_shutdown(magic_api * api); -void toothpaste_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void toothpaste_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int toothpaste_requires_colors(magic_api * api, int which); void toothpaste_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -282,8 +282,8 @@ void toothpaste_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void toothpaste_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, - Uint8 b) +void toothpaste_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { toothpaste_r = r; toothpaste_g = g; diff --git a/magic/src/tornado.c b/magic/src/tornado.c index 22a8bb5f5..fbec41b1e 100644 --- a/magic/src/tornado.c +++ b/magic/src/tornado.c @@ -4,7 +4,7 @@ Tornado Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -27,8 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: December 11, 2022 - $Id$ + Last updated: January 25, 2023 */ #include @@ -102,7 +101,8 @@ void tornado_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Rect * update_rect); void tornado_shutdown(magic_api * api); -void tornado_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void tornado_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int tornado_requires_colors(magic_api * api, int which); void tornado_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -483,7 +483,8 @@ void tornado_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void tornado_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b) +void tornado_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { tornado_r = r; tornado_g = g; diff --git a/magic/src/tv.c b/magic/src/tv.c index d17df3c93..5244b3ea4 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-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 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 11, 2022 + Last updated: January 25, 2023 */ #include "tp_magic_api.h" @@ -39,7 +39,8 @@ int RADIUS = 16; Mix_Chunk *tv_snd; Uint32 tv_api_version(void); -void tv_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void tv_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int tv_init(magic_api * api); int tv_get_tool_count(magic_api * api); SDL_Surface *tv_get_icon(magic_api * api, int which); @@ -71,8 +72,10 @@ Uint32 tv_api_version(void) return (TP_MAGIC_API_VERSION); } -void tv_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED) //get the colors from API and store it in structure +void tv_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { + //get the colors from API and store it in structure } diff --git a/magic/src/waves.c b/magic/src/waves.c index 79bce7e49..093d7694b 100644 --- a/magic/src/waves.c +++ b/magic/src/waves.c @@ -4,7 +4,7 @@ Waves Magic Tool Plugin Tux Paint - A simple drawing program for children. - Copyright (c) 2002-2022 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2023 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com https://tuxpaint.org/ @@ -22,6 +22,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) + + Last updated: January 25, 2023 */ #include @@ -53,7 +55,8 @@ void waves_click(magic_api * api, int which, int mode, SDL_Surface * canvas, void waves_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); void waves_shutdown(magic_api * api); -void waves_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void waves_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int waves_requires_colors(magic_api * api, int which); void waves_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); @@ -223,9 +226,8 @@ void waves_shutdown(magic_api * api ATTRIBUTE_UNUSED) } // Record the color from Tux Paint: -void waves_set_color(magic_api * api ATTRIBUTE_UNUSED, - Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED, - Uint8 b ATTRIBUTE_UNUSED) +void waves_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { } diff --git a/magic/src/xor.c b/magic/src/xor.c index 60d365c3e..565da541a 100644 --- a/magic/src/xor.c +++ b/magic/src/xor.c @@ -6,7 +6,7 @@ Tux Paint - A simple drawing program for children. - Copyright (c) 2013-2022 by Lukasz Dmitrowski + Copyright (c) 2013-2023 by Lukasz Dmitrowski 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 @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: October 19, 2022 + Last updated: January 25, 2023 */ #include @@ -55,7 +55,8 @@ void xor_release(magic_api * api, int which, SDL_Rect * update_rect); void xor_shutdown(magic_api * api); -void xor_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b); +void xor_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect); int xor_requires_colors(magic_api * api, int which); void xor_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas); void xor_switchout(magic_api * api, int which, int mode, @@ -222,8 +223,8 @@ void xor_shutdown(magic_api * api ATTRIBUTE_UNUSED) Mix_FreeChunk(xor_snd); } -void xor_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, - Uint8 g ATTRIBUTE_UNUSED, Uint8 b ATTRIBUTE_UNUSED) +void xor_set_color(magic_api * api, int which, SDL_Surface * canvas, + SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect) { }