Update all other Magic tools' "set_color()"

FIXME: This loses "ATTRIBUTE_UNUSED" where they existed, and also
all of the files committed here need that compiler hint added to
all of the new arguments ('canvas', 'last', etc.) since they
obviously don't use them either.
This commit is contained in:
Bill Kendrick 2023-01-25 02:15:19 -08:00
parent 34de8311db
commit 3b1c26c93d
54 changed files with 342 additions and 326 deletions

View file

@ -6,7 +6,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com> 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 <stdio.h>
@ -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)
{
}

View file

@ -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;

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -6,7 +6,7 @@
Credits: Bill Kendrick<bill@newbreedsoftware.com> & Andrew Corcoran <akanewbie@gmail.com>
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 <stdio.h>
@ -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)
{
}

View file

@ -6,7 +6,7 @@
Albert Cahalan <albert@users.sf.net>
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 <stdio.h>
@ -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;

View file

@ -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 <stdio.h>
@ -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;

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -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;

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -1,4 +1,6 @@
/* Last updated 2021-09-21 */
/*
Last updated: January 25, 2023
*/
#include <time.h> //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;

View file

@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -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 <math.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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;

View file

@ -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 <stdio.h>
@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -5,7 +5,7 @@
Tux Paint - A simple drawing program for children.
by Albert Cahalan <albert@users.sf.net>
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 <stdio.h>
@ -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;

View file

@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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;

View file

@ -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 <stdio.h>
@ -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);
}

View file

@ -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 <stdio.h>
@ -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);
}

View file

@ -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 <stdio.h>
@ -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;

View file

@ -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 <stdio.h>
@ -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);

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -7,7 +7,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
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 <stdio.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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;

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -6,7 +6,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
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 <stdio.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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;

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -6,7 +6,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
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 <stdio.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -6,7 +6,8 @@
by Bill Kendrick <bill@newbreedsoftware.com>
Math assistance by Jeff Newmiller <jdnewmil@dcn.davis.ca.us>
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)
{
}

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -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/
@ -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;

View file

@ -6,7 +6,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
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 <stdio.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -7,7 +7,7 @@
Smudge by Albert Cahalan <albert@users.sf.net>
Wet Paint addition by Bill Kendrick <bill@newbreedsoftware.com>
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 <stdio.h>
@ -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;

View file

@ -6,7 +6,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
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 <stdio.h>
@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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;

View file

@ -10,7 +10,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
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 <stdio.h>
@ -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;

View file

@ -6,7 +6,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
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 <stdio.h>
@ -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;

View file

@ -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 <stdio.h>
@ -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;

View file

@ -7,7 +7,7 @@
Credits: Adam 'foo-script' Rakowski <foo-script@o2.pl>
and Bill Kendrick <bill@newbreedsoftware.com>
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
}

View file

@ -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 <stdio.h>
@ -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)
{
}

View file

@ -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 <stdio.h>
@ -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)
{
}