diff --git a/magic/src/alien.c b/magic/src/alien.c index dd3925a67..92bf912a3 100644 --- a/magic/src/alien.c +++ b/magic/src/alien.c @@ -1,7 +1,7 @@ /* alien.c - alien, Modifies the colours of the image. + "Color Shift" aka "Alien": Modifies the colours of the image. Tux Paint - A simple drawing program for children. Credits: Andrew Corcoran inspired by the Alien Map GIMP plugin @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 23, 2023 + Last updated: December 29, 2023 */ #include @@ -78,7 +78,7 @@ const char *alien_descs[alien_NUM_TOOLS][2] = { // Prototypes Uint32 alien_api_version(void); -int alien_init(magic_api * api, Uint32 disabled_features); +int alien_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int alien_get_tool_count(magic_api * api); SDL_Surface *alien_get_icon(magic_api * api, int which); char *alien_get_name(magic_api * api, int which); @@ -110,7 +110,7 @@ Uint32 alien_api_version(void) } //Load sounds -int alien_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int alien_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/blind.c b/magic/src/blind.c index 26a6880c7..ec05f3b43 100644 --- a/magic/src/blind.c +++ b/magic/src/blind.c @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: May 1, 2023 + Last updated: December 29, 2023 */ #include "tp_magic_api.h" @@ -57,7 +57,7 @@ Mix_Chunk *blind_snd; Uint32 blind_api_version(void); 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, Uint32 disabled_features); +int blind_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int blind_get_tool_count(magic_api * api); SDL_Surface *blind_get_icon(magic_api * api, int which); char *blind_get_name(magic_api * api, int which); @@ -97,7 +97,7 @@ void blind_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSE blind_b = b; } -int blind_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int blind_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/blocks_etc.c b/magic/src/blocks_etc.c index 59d1209f3..f50ebeb22 100644 --- a/magic/src/blocks_etc.c +++ b/magic/src/blocks_etc.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 23, 2023 + Last updated: December 29, 2023 */ #include @@ -52,7 +52,7 @@ static Mix_Chunk *snd_effect[NUM_TOOLS]; /* Our function prototypes: */ -int blocks_etc_init(magic_api * api, Uint32 disabled_features); +int blocks_etc_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 blocks_etc_api_version(void); int blocks_etc_get_tool_count(magic_api * api); SDL_Surface *blocks_etc_get_icon(magic_api * api, int which); @@ -80,7 +80,7 @@ void blocks_etc_set_size(magic_api * api, int which, int mode, SDL_Surface * can -int blocks_etc_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int blocks_etc_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/bloom.c b/magic/src/bloom.c index 3c655427e..eb95bd6a7 100644 --- a/magic/src/bloom.c +++ b/magic/src/bloom.c @@ -3,7 +3,7 @@ Applies a "bloom" effect to the image. (https://en.wikipedia.org/wiki/Bloom_(shader_effect)) - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ #include @@ -42,7 +42,7 @@ Uint8 *bloom_mask = NULL; int bloom_scale; Uint32 bloom_api_version(void); -int bloom_init(magic_api * api, Uint32 disabled_features); +int bloom_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int bloom_get_tool_count(magic_api * api); SDL_Surface *bloom_get_icon(magic_api * api, int which); char *bloom_get_name(magic_api * api, int which); @@ -76,7 +76,7 @@ Uint32 bloom_api_version(void) return (TP_MAGIC_API_VERSION); } -int bloom_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int bloom_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/blur.c b/magic/src/blur.c index c070b3ad1..2d271611a 100644 --- a/magic/src/blur.c +++ b/magic/src/blur.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 12, 2023 + Last updated: December 29, 2023 */ #include @@ -39,7 +39,7 @@ // Prototypes Uint32 blur_api_version(void); -int blur_init(magic_api * api, Uint32 disabled_features); +int blur_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int blur_get_tool_count(magic_api * api); SDL_Surface *blur_get_icon(magic_api * api, int which); char *blur_get_name(magic_api * api, int which); @@ -100,7 +100,7 @@ Uint32 blur_api_version(void) } //Load sounds -int blur_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int blur_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/bricks.c b/magic/src/bricks.c index 2e87050a4..d30a3f590 100644 --- a/magic/src/bricks.c +++ b/magic/src/bricks.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include @@ -56,7 +56,7 @@ static int brick_size = TOOL_LARGEBRICKS; /* Local function prototype: */ static void do_brick(magic_api * api, SDL_Surface * canvas, int x, int y, int w, int h); -int bricks_init(magic_api * api, Uint32 disabled_features); +int bricks_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 bricks_api_version(void); int bricks_get_tool_count(magic_api * api); SDL_Surface *bricks_get_icon(magic_api * api, int which); @@ -81,7 +81,7 @@ void bricks_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Rect * update_rect); // No setup required: -int bricks_init(magic_api * api, Uint32 disabled_features) +int bricks_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/calligraphy.c b/magic/src/calligraphy.c index 9821062b9..3aa20f815 100644 --- a/magic/src/calligraphy.c +++ b/magic/src/calligraphy.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: July 1, 2023 + Last updated: December 29, 2023 */ #include @@ -52,7 +52,7 @@ static SDL_Surface *calligraphy_brush, *calligraphy_colored_brush; static Point2D calligraphy_PointOnCubicBezier(Point2D * cp, float t); static void calligraphy_ComputeBezier(Point2D * cp, int numberOfPoints, Point2D * curve); static float calligraphy_dist(float x1, float y1, float x2, float y2); -int calligraphy_init(magic_api * api, Uint32 disabled_features); +int calligraphy_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 calligraphy_api_version(void); int calligraphy_get_tool_count(magic_api * api); SDL_Surface *calligraphy_get_icon(magic_api * api, int which); @@ -79,7 +79,7 @@ void calligraphy_set_size(magic_api * api, int which, int mode, SDL_Surface * ca -int calligraphy_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int calligraphy_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/cartoon.c b/magic/src/cartoon.c index db6ecdc13..8680f9252 100644 --- a/magic/src/cartoon.c +++ b/magic/src/cartoon.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: May 16, 2023 + Last updated: December 29, 2023 */ #include @@ -44,7 +44,7 @@ static int cartoon_radius = 16; #define OUTLINE_THRESH 48 /* Local function prototypes: */ -int cartoon_init(magic_api * api, Uint32 disabled_features); +int cartoon_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 cartoon_api_version(void); int cartoon_get_tool_count(magic_api * api); SDL_Surface *cartoon_get_icon(magic_api * api, int which); @@ -74,7 +74,7 @@ void cartoon_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas // No setup required: -int cartoon_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int cartoon_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/checkerboard.c b/magic/src/checkerboard.c index d194b5b90..de6cc6b92 100644 --- a/magic/src/checkerboard.c +++ b/magic/src/checkerboard.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 18, 2023 + Last updated: December 29, 2023 */ #include "tp_magic_api.h" @@ -41,7 +41,7 @@ Mix_Chunk *checkerboard_snd; Uint32 checkerboard_api_version(void); 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, Uint32 disabled_features); +int checkerboard_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int checkerboard_get_tool_count(magic_api * api); SDL_Surface *checkerboard_get_icon(magic_api * api, int which); char *checkerboard_get_name(magic_api * api, int which); @@ -85,7 +85,7 @@ void checkerboard_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUT checkerboard_b = b; } -int checkerboard_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int checkerboard_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/clone.c b/magic/src/clone.c index 45b4c18e6..bf5a977e2 100644 --- a/magic/src/clone.c +++ b/magic/src/clone.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 20, 2023 + Last updated: December 29, 2023 */ #include @@ -65,7 +65,7 @@ int clone_radius = 16; /* Local function prototype: */ -int clone_init(magic_api * api, Uint32 disabled_features); +int clone_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 clone_api_version(void); int clone_get_tool_count(magic_api * api); SDL_Surface *clone_get_icon(magic_api * api, int which); @@ -95,7 +95,7 @@ void clone_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Rect * update_rect); // No setup required: -int clone_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int clone_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/colorsep.c b/magic/src/colorsep.c index c2052ecc9..c53a21735 100644 --- a/magic/src/colorsep.c +++ b/magic/src/colorsep.c @@ -3,7 +3,7 @@ Color separation effect (a la red/cyan aka red/blue 3D glasses). Bill Kendrick - Last updated: April 18, 2023 + Last updated: December 29, 2023 */ #include @@ -53,7 +53,7 @@ int colorsep_click_x, colorsep_click_y; float colorsep_r_pct, colorsep_g_pct, colorsep_b_pct; Uint32 colorsep_api_version(void); -int colorsep_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED); +int colorsep_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int colorsep_get_tool_count(magic_api * api); SDL_Surface *colorsep_get_icon(magic_api * api, int which); char *colorsep_get_name(magic_api * api, int which); @@ -86,7 +86,7 @@ Uint32 colorsep_api_version(void) return (TP_MAGIC_API_VERSION); } -int colorsep_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int colorsep_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/confetti.c b/magic/src/confetti.c index 25bfdbe39..a906385dc 100644 --- a/magic/src/confetti.c +++ b/magic/src/confetti.c @@ -1,5 +1,5 @@ /* - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include //For time() @@ -29,7 +29,7 @@ Mix_Chunk *confetti_snd; Uint32 confetti_api_version(void); 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, Uint32 disabled_features); +int confetti_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int confetti_get_tool_count(magic_api * api); SDL_Surface *confetti_get_icon(magic_api * api, int which); char *confetti_get_name(magic_api * api, int which); @@ -72,7 +72,7 @@ void confetti_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UN confetti_colors.b = b; } -int confetti_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int confetti_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/distortion.c b/magic/src/distortion.c index db398feef..613a9565a 100644 --- a/magic/src/distortion.c +++ b/magic/src/distortion.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ /* Inclusion of header files: */ @@ -55,7 +55,7 @@ static int distortion_radius = 8; // that are declared _before_ them. Uint32 distortion_api_version(void); -int distortion_init(magic_api * api, Uint32 disabled_features); +int distortion_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int distortion_get_tool_count(magic_api * api); SDL_Surface *distortion_get_icon(magic_api * api, int which); char *distortion_get_name(magic_api * api, int which); @@ -97,7 +97,7 @@ Uint32 distortion_api_version(void) // Initialization -int distortion_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int distortion_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/emboss.c b/magic/src/emboss.c index 2fb553d07..4523d8b47 100644 --- a/magic/src/emboss.c +++ b/magic/src/emboss.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: February 12, 2023 + Last updated: December 29, 2023 */ #include @@ -39,7 +39,7 @@ static int emboss_radius = 16; // Prototypes Uint32 emboss_api_version(void); -int emboss_init(magic_api * api, Uint32 disabled_features); +int emboss_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int emboss_get_tool_count(magic_api * api); SDL_Surface *emboss_get_icon(magic_api * api, int which); char *emboss_get_name(magic_api * api, int which); @@ -75,7 +75,7 @@ Uint32 emboss_api_version(void) // No setup required: -int emboss_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int emboss_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/fade_darken.c b/magic/src/fade_darken.c index 94dc99022..ed2113bf4 100644 --- a/magic/src/fade_darken.c +++ b/magic/src/fade_darken.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ #include @@ -107,7 +107,7 @@ static int fade_darken_radius = 16; /* Local function prototypes: */ -int fade_darken_init(magic_api * api, Uint32 disabled_features); +int fade_darken_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 fade_darken_api_version(void); int fade_darken_get_tool_count(magic_api * api); SDL_Surface *fade_darken_get_icon(magic_api * api, int which); @@ -135,7 +135,7 @@ void fade_darken_set_size(magic_api * api, int which, int mode, SDL_Surface * ca SDL_Rect * update_rect); -int fade_darken_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int fade_darken_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/fisheye.c b/magic/src/fisheye.c index 14b8c4f1b..c113d5610 100644 --- a/magic/src/fisheye.c +++ b/magic/src/fisheye.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ #include @@ -41,7 +41,7 @@ int fisheye_radius = 80; Uint32 fisheye_api_version(void); 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, Uint32 disabled_features); +int fisheye_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int fisheye_get_tool_count(magic_api * api); SDL_Surface *fisheye_get_icon(magic_api * api, int which); char *fisheye_get_name(magic_api * api, int which); @@ -82,7 +82,7 @@ void fisheye_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNU { } -int fisheye_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int fisheye_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/flower.c b/magic/src/flower.c index b0d90645e..6c4016d93 100644 --- a/magic/src/flower.c +++ b/magic/src/flower.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: November 12, 2023 + Last updated: December 29, 2023 */ #include @@ -73,7 +73,7 @@ static void flower_drawflower(magic_api * api, SDL_Surface * canvas, int x, int static Point2D flower_PointOnCubicBezier(Point2D * cp, float t); static void flower_ComputeBezier(Point2D * cp, int numberOfPoints, Point2D * curve); Uint32 flower_api_version(void); -int flower_init(magic_api * api, Uint32 disabled_features); +int flower_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int flower_get_tool_count(magic_api * api); SDL_Surface *flower_get_icon(magic_api * api, int which); char *flower_get_name(magic_api * api, int which); @@ -114,7 +114,7 @@ Uint32 flower_api_version(void) // No setup required: -int flower_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int flower_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; SDL_Surface *tmp_surf; diff --git a/magic/src/foam.c b/magic/src/foam.c index f9e21bb6d..e333478ac 100644 --- a/magic/src/foam.c +++ b/magic/src/foam.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: November 12, 2023 + Last updated: December 29, 2023 */ #include @@ -42,7 +42,7 @@ static int *foam_mask, *foam_mask_tmp; static SDL_Surface *foam_7, *foam_5, *foam_3, *foam_1; Uint32 foam_api_version(void); -int foam_init(magic_api * api, Uint32 disabled_features); +int foam_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); char *foam_get_description(magic_api * api, int which, int mode); void foam_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect); @@ -77,7 +77,7 @@ Uint32 foam_api_version(void) // No setup required: -int foam_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int foam_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; SDL_Surface *foam_data; diff --git a/magic/src/fold.c b/magic/src/fold.c index a3fa790a8..17971af8e 100644 --- a/magic/src/fold.c +++ b/magic/src/fold.c @@ -1,7 +1,7 @@ /* Folds the picture down from the corners. - Last updated: April 18, 2023 + Last updated: December 29, 2023 */ //optimized version soon :) @@ -42,7 +42,7 @@ void translate_xy(SDL_Surface * canvas, int x, int y, int *a, int *b, int rotati Uint32 fold_api_version(void); 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, Uint32 disabled_features); +int fold_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int fold_get_tool_count(magic_api * api); SDL_Surface *fold_get_icon(magic_api * api, int which); char *fold_get_name(magic_api * api, int which); @@ -85,7 +85,7 @@ void fold_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED fold_b = b; } -int fold_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int fold_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/fretwork.c b/magic/src/fretwork.c index e4eeffcaa..701afd9d8 100644 --- a/magic/src/fretwork.c +++ b/magic/src/fretwork.c @@ -1,7 +1,7 @@ /* Draws fretwork - Last updated: November 12, 2023 + Last updated: December 29, 2023 */ #include "tp_magic_api.h" @@ -59,7 +59,7 @@ int fretwork_modes(magic_api * api, int which); 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, Uint32 disabled_features ATTRIBUTE_UNUSED); +int fretwork_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int fretwork_get_tool_count(magic_api * api); SDL_Surface *fretwork_get_icon(magic_api * api, int which); char *fretwork_get_name(magic_api * api, int which); @@ -138,7 +138,7 @@ static void fretwork_colorize(magic_api * api, SDL_Surface * dest, SDL_Surface * } -int fretwork_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int fretwork_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; Uint8 i; //is always < 4, so Uint8 seems to be a good idea diff --git a/magic/src/glasstile.c b/magic/src/glasstile.c index f8b569409..7980f336d 100644 --- a/magic/src/glasstile.c +++ b/magic/src/glasstile.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: December 29, 2023 TODO: * Support sizing options @@ -42,7 +42,7 @@ static Mix_Chunk *glasstile_snd; // Prototypes Uint32 glasstile_api_version(void); -int glasstile_init(magic_api * api, Uint32 disabled_features); +int glasstile_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int glasstile_get_tool_count(magic_api * api); SDL_Surface *glasstile_get_icon(magic_api * api, int which); char *glasstile_get_name(magic_api * api, int which); @@ -77,8 +77,7 @@ static int **glasstile_hit; static int glasstile_hit_xsize; static int glasstile_hit_ysize; -// No setup required: -int glasstile_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int glasstile_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED /* FIXME */, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; @@ -91,7 +90,6 @@ int glasstile_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) return (1); } -// We have multiple tools: int glasstile_get_tool_count(magic_api * api ATTRIBUTE_UNUSED) { return (1); diff --git a/magic/src/googlyeyes.c b/magic/src/googlyeyes.c index 6508e755b..b1a7d2087 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 updated: November 12, 2023 + Last updated: December 29, 2023 */ #include @@ -42,7 +42,7 @@ SDL_Surface **googlyeyes_img_reflection = NULL; int eye_x, eye_y; Uint32 googlyeyes_api_version(void); -int googlyeyes_init(magic_api * api, Uint32 disabled_features); +int googlyeyes_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int googlyeyes_get_tool_count(magic_api * api); SDL_Surface *googlyeyes_get_icon(magic_api * api, int which); char *googlyeyes_get_name(magic_api * api, int which); @@ -73,7 +73,7 @@ Uint32 googlyeyes_api_version(void) return (TP_MAGIC_API_VERSION); } -int googlyeyes_init(magic_api * api, Uint32 disabled_features) +int googlyeyes_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; int i; diff --git a/magic/src/grass.c b/magic/src/grass.c index 528c1bc72..1126e4e83 100644 --- a/magic/src/grass.c +++ b/magic/src/grass.c @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 18, 2023 + Last updated: December 29, 2023 */ #include @@ -41,7 +41,7 @@ static Uint8 grass_r, grass_g, grass_b; static SDL_Surface *img_grass; // Prototypes -int grass_init(magic_api * api, Uint32 disabled_features); +int grass_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 grass_api_version(void); int grass_get_tool_count(magic_api * api); SDL_Surface *grass_get_icon(magic_api * api, int which); @@ -69,7 +69,7 @@ void grass_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Rect * update_rect); // No setup required: -int grass_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int grass_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/halftone.c b/magic/src/halftone.c index 544978d7f..9c2516477 100644 --- a/magic/src/halftone.c +++ b/magic/src/halftone.c @@ -1,6 +1,6 @@ /* halftone.c - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ @@ -62,7 +62,7 @@ void halftone_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect); void halftone_line_callback(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y); Uint32 halftone_api_version(void); -int halftone_init(magic_api * api, Uint32 disabled_features); +int halftone_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int halftone_get_tool_count(magic_api * api); SDL_Surface *halftone_get_icon(magic_api * api, int which); char *halftone_get_name(magic_api * api, int which); @@ -92,7 +92,7 @@ Uint32 halftone_api_version(void) return (TP_MAGIC_API_VERSION); } -int halftone_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int halftone_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/kaleidox.c b/magic/src/kaleidox.c index 99f3532c8..c9d693c00 100644 --- a/magic/src/kaleidox.c +++ b/magic/src/kaleidox.c @@ -4,7 +4,7 @@ kaleidoscope. Bill Kendrick - Last updated: April 20, 2023 + Last updated: December 29, 2023 */ #include @@ -51,7 +51,7 @@ char *kaleidox_descrs[NUM_TOOLS] = { Mix_Chunk *snd_effects[NUM_TOOLS]; Uint32 kaleidox_api_version(void); -int kaleidox_init(magic_api * api, Uint32 disabled_features); +int kaleidox_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int kaleidox_get_tool_count(magic_api * api); SDL_Surface *kaleidox_get_icon(magic_api * api, int which); char *kaleidox_get_name(magic_api * api, int which); @@ -83,7 +83,7 @@ Uint32 kaleidox_api_version(void) return (TP_MAGIC_API_VERSION); } -int kaleidox_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int kaleidox_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/kalidescope.c b/magic/src/kalidescope.c index 1cb8b57d4..44435c7af 100644 --- a/magic/src/kalidescope.c +++ b/magic/src/kalidescope.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 12, 2023 + Last updated: December 29, 2023 */ #include @@ -64,7 +64,7 @@ char *kal_icon_names[KAL_COUNT] = { /* Function Declarations: */ Uint32 kalidescope_api_version(void); -int kalidescope_init(magic_api * api, Uint32 disabled_features); +int kalidescope_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int kalidescope_get_tool_count(magic_api * api); SDL_Surface *kalidescope_get_icon(magic_api * api, int which); char *kalidescope_get_name(magic_api * api, int which); @@ -94,7 +94,7 @@ Uint32 kalidescope_api_version(void) return (TP_MAGIC_API_VERSION); } -int kalidescope_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int kalidescope_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/light.c b/magic/src/light.c index 5da0dc6f3..f568cc2bc 100644 --- a/magic/src/light.c +++ b/magic/src/light.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: May 8, 2023 + Last updated: December 29, 2023 */ #include @@ -44,7 +44,7 @@ static int light_radius = 8; /* Function prototypes: */ Uint32 light_api_version(void); -int light_init(magic_api * api, Uint32 disabled_features); +int light_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int light_get_tool_count(magic_api * api); SDL_Surface *light_get_icon(magic_api * api, int which); char *light_get_name(magic_api * api, int which); @@ -77,7 +77,7 @@ Uint32 light_api_version(void) // No setup required: -int light_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int light_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/lightning.c b/magic/src/lightning.c index 0adfee750..6e3a57d14 100644 --- a/magic/src/lightning.c +++ b/magic/src/lightning.c @@ -3,7 +3,7 @@ Draws a lightning strike between the click and drag+release positions. - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include @@ -21,7 +21,7 @@ int sx, sy; Uint32 lightning_api_version(void); -int lightning_init(magic_api * api, Uint32 disabled_features); +int lightning_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int lightning_get_tool_count(magic_api * api); SDL_Surface *lightning_get_icon(magic_api * api, int which); char *lightning_get_name(magic_api * api, int which); @@ -54,7 +54,7 @@ Uint32 lightning_api_version(void) return (TP_MAGIC_API_VERSION); } -int lightning_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int lightning_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/maze.c b/magic/src/maze.c index 22c4d1739..35496cc7a 100644 --- a/magic/src/maze.c +++ b/magic/src/maze.c @@ -2,7 +2,7 @@ Allows painting generated maze puzzles on your picture. - Last updated: February 5, 2023 + Last updated: December 29, 2023 */ #include @@ -43,7 +43,7 @@ int maze_start_x, maze_start_y; int num_maze_starts = 0, maze_starts_size = 0; Uint32 maze_api_version(void); -int maze_init(magic_api * api, Uint32 disabled_features); +int maze_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int maze_get_tool_count(magic_api * api); SDL_Surface *maze_get_icon(magic_api * api, int which); char *maze_get_name(magic_api * api, int which); @@ -80,7 +80,7 @@ Uint32 maze_api_version(void) return (TP_MAGIC_API_VERSION); } -int maze_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int maze_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/metalpaint.c b/magic/src/metalpaint.c index 47edb5274..f968a809a 100644 --- a/magic/src/metalpaint.c +++ b/magic/src/metalpaint.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 20, 2023 + Last updated: December 29, 2023 */ #include @@ -39,7 +39,7 @@ static Uint8 metalpaint_r, metalpaint_g, metalpaint_b; static int metalpaint_size = 8; Uint32 metalpaint_api_version(void); -int metalpaint_init(magic_api * api, Uint32 disabled_features); +int metalpaint_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int metalpaint_get_tool_count(magic_api * api); SDL_Surface *metalpaint_get_icon(magic_api * api, int which); char *metalpaint_get_name(magic_api * api, int which); @@ -72,7 +72,7 @@ Uint32 metalpaint_api_version(void) // No setup required: -int metalpaint_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int metalpaint_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/mirror_flip.c b/magic/src/mirror_flip.c index 525a87f7d..a3874df1e 100644 --- a/magic/src/mirror_flip.c +++ b/magic/src/mirror_flip.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 20, 2023 + Last updated: December 29, 2023 */ #include @@ -44,7 +44,7 @@ enum static Mix_Chunk *snd_effects[NUM_TOOLS]; /* Prototypes */ -int mirror_flip_init(magic_api *, Uint32 disabled_features); +int mirror_flip_init(magic_api *, Uint8 disabled_features, Uint8 complexity_level); Uint32 mirror_flip_api_version(void); int mirror_flip_get_tool_count(magic_api *); SDL_Surface *mirror_flip_get_icon(magic_api *, int); @@ -67,7 +67,7 @@ void mirror_flip_set_size(magic_api * api, int which, int mode, SDL_Surface * ca SDL_Rect * update_rect); // No setup required: -int mirror_flip_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int mirror_flip_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/mosaic.c b/magic/src/mosaic.c index bcf07d0b4..323b3dfa0 100644 --- a/magic/src/mosaic.c +++ b/magic/src/mosaic.c @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ #include @@ -51,7 +51,7 @@ static void reset_mosaic_blured(SDL_Surface * canvas); /* Prototypes */ Uint32 mosaic_api_version(void); -int mosaic_init(magic_api *, Uint32); +int mosaic_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int mosaic_get_tool_count(magic_api *); SDL_Surface *mosaic_get_icon(magic_api *, int); char *mosaic_get_name(magic_api *, int); @@ -117,7 +117,7 @@ Uint32 mosaic_api_version(void) } //Load sounds -int mosaic_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int mosaic_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; diff --git a/magic/src/mosaic_shaped.c b/magic/src/mosaic_shaped.c index 3e48b475b..a984bda86 100644 --- a/magic/src/mosaic_shaped.c +++ b/magic/src/mosaic_shaped.c @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 27, 2023 + Last updated: December 29, 2023 */ #include @@ -58,7 +58,7 @@ static void mosaic_shaped_fill(void *ptr_to_api, int which, SDL_Surface * canvas static void mosaic_shaped_paint(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y); Uint32 mosaic_shaped_api_version(void); -int mosaic_shaped_init(magic_api * api, Uint32 disabled_features); +int mosaic_shaped_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int mosaic_shaped_get_tool_count(magic_api * api); SDL_Surface *mosaic_shaped_get_icon(magic_api * api, int which); char *mosaic_shaped_get_name(magic_api * api, int which); @@ -164,7 +164,7 @@ Uint32 mosaic_shaped_api_version(void) } //Load sounds -int mosaic_shaped_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int mosaic_shaped_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/n_pt_persp.c b/magic/src/n_pt_persp.c index ff69a2698..9c39a1db9 100644 --- a/magic/src/n_pt_persp.c +++ b/magic/src/n_pt_persp.c @@ -5,7 +5,7 @@ by Bill Kendrick - December 12, 2023 - December 23, 2023 + December 12, 2023 - December 29, 2023 */ @@ -90,7 +90,7 @@ float a3_valid_angle[8]; /* Function prototypes: */ Uint32 n_pt_persp_api_version(void); -int n_pt_persp_init(magic_api * api, Uint32 disabled_features); +int n_pt_persp_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int n_pt_persp_get_tool_count(magic_api * api); SDL_Surface *n_pt_persp_get_icon(magic_api * api, int which); char *n_pt_persp_get_name(magic_api * api, int which); @@ -139,7 +139,7 @@ Uint32 n_pt_persp_api_version(void) } -int n_pt_persp_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int n_pt_persp_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level) { int i; char filename[1024]; diff --git a/magic/src/negative.c b/magic/src/negative.c index 6ead7c503..82884e6e9 100644 --- a/magic/src/negative.c +++ b/magic/src/negative.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: February 12, 2023 + Last updated: December 29, 2023 */ #include @@ -35,7 +35,7 @@ static Mix_Chunk *negative_snd; static int negative_radius = 16; -int negative_init(magic_api * api, Uint32 disabled_features); +int negative_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 negative_api_version(void); int negative_get_tool_count(magic_api * api); SDL_Surface *negative_get_icon(magic_api * api, int which); @@ -89,7 +89,7 @@ const char *negative_descs[negative_NUM_TOOLS][2] = { }; -int negative_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int negative_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/noise.c b/magic/src/noise.c index 9202165e8..81688d37a 100644 --- a/magic/src/noise.c +++ b/magic/src/noise.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ #include @@ -75,7 +75,7 @@ const char *noise_descs[noise_NUM_TOOLS][2] = { }; Uint32 noise_api_version(void); -int noise_init(magic_api * api, Uint32); +int noise_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); SDL_Surface *noise_get_icon(magic_api * api, int which); char *noise_get_name(magic_api * api, int which); int noise_get_group(magic_api * api, int which); @@ -109,7 +109,7 @@ Uint32 noise_api_version(void) } //Load sounds -int noise_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int noise_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/perspective.c b/magic/src/perspective.c index 87c57182c..6a5faaca3 100644 --- a/magic/src/perspective.c +++ b/magic/src/perspective.c @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include @@ -53,7 +53,7 @@ static void perspective_preview(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect, float step); Uint32 perspective_api_version(void); -int perspective_init(magic_api * api, Uint32 disabled_features); +int perspective_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int perspective_get_tool_count(magic_api * api); SDL_Surface *perspective_get_icon(magic_api * api, int which); char *perspective_get_name(magic_api * api, int which); @@ -187,7 +187,7 @@ Uint32 perspective_api_version(void) } //Load sounds -int perspective_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int perspective_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/pixels.c b/magic/src/pixels.c index 2361cc52f..5480731a1 100644 --- a/magic/src/pixels.c +++ b/magic/src/pixels.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 23, 2023 + Last updated: December 29, 2023 */ #include @@ -50,7 +50,7 @@ static int pixel_size = 8; /* Local function prototype: */ -int pixels_init(magic_api * api, Uint32 disabled_features); +int pixels_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 pixels_api_version(void); int pixels_get_tool_count(magic_api * api); SDL_Surface *pixels_get_icon(magic_api * api, int which); @@ -77,7 +77,7 @@ void pixels_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, // No setup required: -int pixels_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int pixels_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/puzzle.c b/magic/src/puzzle.c index cf2390b9c..5e39f9901 100644 --- a/magic/src/puzzle.c +++ b/magic/src/puzzle.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: February 12, 2023 + Last updated: December 29, 2023 */ @@ -50,7 +50,7 @@ static int rects_w, rects_h; SDL_Surface *canvas_backup; Uint32 puzzle_api_version(void); -int puzzle_init(magic_api * api, Uint32 disabled_features); +int puzzle_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int puzzle_get_tool_count(magic_api * api); SDL_Surface *puzzle_get_icon(magic_api * api, int which); char *puzzle_get_name(magic_api * api, int which); @@ -82,7 +82,7 @@ Uint32 puzzle_api_version(void) return (TP_MAGIC_API_VERSION); } -int puzzle_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int puzzle_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/rails.c b/magic/src/rails.c index 38d93b73a..8c7dd56f4 100644 --- a/magic/src/rails.c +++ b/magic/src/rails.c @@ -3,7 +3,7 @@ Draw train tracks. - Last updated: November 12, 2023 + Last updated: December 29, 2023 */ #include "tp_magic_api.h" #include "SDL_image.h" @@ -52,7 +52,7 @@ Uint32 rails_api_version(void); int rails_modes(magic_api * api, int which); 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, Uint32 disabled_features); +int rails_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int rails_get_tool_count(magic_api * api); SDL_Surface *rails_get_icon(magic_api * api, int which); char *rails_get_name(magic_api * api, int which); @@ -102,7 +102,7 @@ void rails_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSE { } -int rails_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int rails_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; Uint8 i; //is always < 3, so Uint8 seems to be a good idea diff --git a/magic/src/rain.c b/magic/src/rain.c index 53a570802..3ffd3a588 100644 --- a/magic/src/rain.c +++ b/magic/src/rain.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 23, 2023 + Last updated: December 29, 2023 */ #include @@ -77,7 +77,7 @@ const char *rain_descs[rain_NUM_TOOLS][2] = { }; Uint32 rain_api_version(void); -int rain_init(magic_api * api, Uint32 disabled_features); +int rain_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int rain_get_tool_count(magic_api * api); SDL_Surface *rain_get_icon(magic_api * api, int which); char *rain_get_name(magic_api * api, int which); @@ -119,7 +119,7 @@ static int rain_inRainShape(double x, double y, double r) return 0; } -int rain_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int rain_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; diff --git a/magic/src/rainbow.c b/magic/src/rainbow.c index 9bd729846..71078bea9 100644 --- a/magic/src/rainbow.c +++ b/magic/src/rainbow.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include @@ -77,7 +77,7 @@ static int rainbow_color, rainbow_mix; static Uint32 rainbow_rgb; static Mix_Chunk *rainbow_snd; -int rainbow_init(magic_api * api, Uint32 disabled_features); +int rainbow_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 rainbow_api_version(void); int rainbow_get_tool_count(magic_api * api); SDL_Surface *rainbow_get_icon(magic_api * api, int which); @@ -115,7 +115,7 @@ Uint32 rainbow_api_version(void) } // Load our sfx: -int rainbow_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int rainbow_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/realrainbow.c b/magic/src/realrainbow.c index b6bca3512..28243b891 100644 --- a/magic/src/realrainbow.c +++ b/magic/src/realrainbow.c @@ -6,8 +6,8 @@ by Bill Kendrick Math assistance by Jeff Newmiller - 2009.04.02 - Last updated: February 12, 2023 + First created: 2009.04.02 + Last updated: December 29, 2023 FIXME: * Color/alpha art needs improvement. @@ -32,7 +32,7 @@ void realrainbow_arc(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int x1, int y1, int x2, int y2, int fulldraw, SDL_Rect * update_rect); static void realrainbow_linecb(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y); Uint32 realrainbow_api_version(void); -int realrainbow_init(magic_api * api, Uint32 disabled_features); +int realrainbow_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int realrainbow_get_tool_count(magic_api * api); SDL_Surface *realrainbow_get_icon(magic_api * api, int which); char *realrainbow_get_name(magic_api * api, int which); @@ -62,7 +62,7 @@ Uint32 realrainbow_api_version(void) return (TP_MAGIC_API_VERSION); } -int realrainbow_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int realrainbow_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/reflection.c b/magic/src/reflection.c index 640e6074e..5fb2e4a53 100644 --- a/magic/src/reflection.c +++ b/magic/src/reflection.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include @@ -51,7 +51,7 @@ enum reflection_sides int reflection_side_old; /* Local function prototypes: */ -int reflection_init(magic_api * api, Uint32 disabled_features); +int reflection_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 reflection_api_version(void); int reflection_get_tool_count(magic_api * api); SDL_Surface *reflection_get_icon(magic_api * api, int which); @@ -80,7 +80,7 @@ void reflection_set_size(magic_api * api, int which, int mode, SDL_Surface * can -int reflection_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int reflection_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/ribbon.c b/magic/src/ribbon.c index 39bf234a9..9602237e7 100644 --- a/magic/src/ribbon.c +++ b/magic/src/ribbon.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: May 23, 2023 + Last updated: December 29, 2023 */ #include @@ -47,7 +47,7 @@ static int ribbon_tail = 0, ribbon_head = 0; static double ribbon_old_angle; static Mix_Chunk *ribbon_snd; -int ribbon_init(magic_api * api, Uint32 disabled_features); +int ribbon_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 ribbon_api_version(void); int ribbon_get_tool_count(magic_api * api); SDL_Surface *ribbon_get_icon(magic_api * api, int which); @@ -85,7 +85,7 @@ Uint32 ribbon_api_version(void) } // Load our sfx: -int ribbon_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int ribbon_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/ripples.c b/magic/src/ripples.c index f09835102..f4a249c40 100644 --- a/magic/src/ripples.c +++ b/magic/src/ripples.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include @@ -42,7 +42,7 @@ static int ripples_z, ripples_brite; static float ripples_radius = 100; Uint32 ripples_api_version(void); -int ripples_init(magic_api * api, Uint32 disabled_features); +int ripples_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int ripples_get_tool_count(magic_api * api); SDL_Surface *ripples_get_icon(magic_api * api, int which); char *ripples_get_name(magic_api * api, int which); @@ -76,8 +76,7 @@ Uint32 ripples_api_version(void) #define deg_cos(x) cos((x) * M_PI / 180.0) #define deg_sin(x) sin((x) * M_PI / 180.0) -// No setup required: -int ripples_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int ripples_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; @@ -87,7 +86,6 @@ int ripples_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) return (1); } -// We have multiple tools: int ripples_get_tool_count(magic_api * api ATTRIBUTE_UNUSED) { return (1); diff --git a/magic/src/rosette.c b/magic/src/rosette.c index cca8831ee..0e0328ac9 100644 --- a/magic/src/rosette.c +++ b/magic/src/rosette.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ // sound only plays on release @@ -54,7 +54,7 @@ Mix_Chunk *rosette_snd; Uint32 rosette_api_version(void); 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, Uint32 disabled_features); +int rosette_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int rosette_get_tool_count(magic_api * api); SDL_Surface *rosette_get_icon(magic_api * api, int which); char *rosette_get_name(magic_api * api, int which); @@ -95,7 +95,7 @@ void rosette_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNU rosette_colors.b = b; } -int rosette_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int rosette_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/sharpen.c b/magic/src/sharpen.c index 0bd21ce31..ca5d2d08f 100644 --- a/magic/src/sharpen.c +++ b/magic/src/sharpen.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include @@ -87,7 +87,7 @@ const char *sharpen_descs[sharpen_NUM_TOOLS][2] = { }; Uint32 sharpen_api_version(void); -int sharpen_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED); +int sharpen_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int sharpen_get_tool_count(magic_api * api); SDL_Surface *sharpen_get_icon(magic_api * api, int which); char *sharpen_get_name(magic_api * api, int which); @@ -126,7 +126,7 @@ Uint32 sharpen_api_version(void) // No setup required: -int sharpen_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int sharpen_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; diff --git a/magic/src/shift.c b/magic/src/shift.c index 015dce95d..02500a2b8 100644 --- a/magic/src/shift.c +++ b/magic/src/shift.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: February 12, 2023 + Last updated: December 29, 2023 */ #include @@ -45,7 +45,7 @@ static Mix_Chunk *shift_snd; static void shift_doit(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect, int crosshairs); Uint32 shift_api_version(void); -int shift_init(magic_api * api, Uint32 disabled_features); +int shift_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int shift_get_tool_count(magic_api * api); SDL_Surface *shift_get_icon(magic_api * api, int which); char *shift_get_name(magic_api * api, int which); @@ -80,7 +80,7 @@ Uint32 shift_api_version(void) // No setup required: -int shift_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int shift_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/smooth.c b/magic/src/smooth.c index 05352e8cd..eb0987793 100644 --- a/magic/src/smooth.c +++ b/magic/src/smooth.c @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: May 22, 2023 + Last updated: December 29, 2023 */ #include @@ -95,7 +95,7 @@ static Point2D smooth_PointOnCubicBezier(Point2D * cp, float t); static void smooth_ComputeBezier(Point2D * cp, int numberOfPoints, Point2D * curve); static float smooth_dist(float x1, float y1, float x2, float y2); -int smooth_init(magic_api * api, Uint32 disabled_features); +int smooth_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 smooth_api_version(void); int smooth_get_tool_count(magic_api * api); SDL_Surface *smooth_get_icon(magic_api * api, int which); @@ -125,7 +125,7 @@ void smooth_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, -int smooth_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int smooth_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; int i; diff --git a/magic/src/smudge.c b/magic/src/smudge.c index 4344a1a97..2330b3dd7 100644 --- a/magic/src/smudge.c +++ b/magic/src/smudge.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 23, 2023 + Last updated: December 29, 2023 FIXME: "Wet Paint" doesn't smudge enough -bjk 2023.04.23 */ @@ -42,7 +42,7 @@ static Mix_Chunk *smudge_snd; static Uint8 smudge_r, smudge_g, smudge_b; static int smudge_radius = 16; -int smudge_init(magic_api * api, Uint32 disabled_features); +int smudge_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 smudge_api_version(void); SDL_Surface *smudge_get_icon(magic_api * api, int which); char *smudge_get_name(magic_api * api, int which); @@ -69,7 +69,7 @@ void smudge_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Rect * update_rect); -int smudge_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int smudge_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/snow.c b/magic/src/snow.c index ae735c37e..e0e2dfea6 100644 --- a/magic/src/snow.c +++ b/magic/src/snow.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: December 29, 2023 TODO: * Support sizes (for snowflakes, we'll need a new set of bitmap PNGs!) -bjk 2023.04.22 @@ -83,7 +83,7 @@ const char *snow_descs[snow_NUM_TOOLS] = { }; Uint32 snow_api_version(void); -int snow_init(magic_api * api, Uint32 disabled_features); +int snow_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int snow_get_tool_count(magic_api * api); SDL_Surface *snow_get_icon(magic_api * api, int which); char *snow_get_name(magic_api * api, int which); @@ -116,7 +116,7 @@ Uint32 snow_api_version(void) } //Load sounds -int snow_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int snow_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; diff --git a/magic/src/stretch.c b/magic/src/stretch.c index c6c8db944..7396da1a0 100644 --- a/magic/src/stretch.c +++ b/magic/src/stretch.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include "tp_magic_api.h" @@ -52,7 +52,7 @@ Mix_Chunk *stretch_snd; Uint32 stretch_api_version(void); 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, Uint32 disabled_features ATTRIBUTE_UNUSED); +int stretch_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int stretch_get_tool_count(magic_api * api); SDL_Surface *stretch_get_icon(magic_api * api, int which); char *stretch_get_name(magic_api * api, int which); @@ -89,7 +89,7 @@ void stretch_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNU { } -int stretch_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int stretch_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/string.c b/magic/src/string.c index ba0bd3aa3..3042ff266 100644 --- a/magic/src/string.c +++ b/magic/src/string.c @@ -1,7 +1,7 @@ /* Strings -- draws string art. - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include "tp_magic_api.h" #include "SDL_image.h" @@ -64,7 +64,7 @@ char *string_get_description(magic_api * api, int which, int mode); int string_requires_colors(magic_api * api, int which); void string_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect); -int string_init(magic_api * api, Uint32 disabled_features); +int string_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); void string_shutdown(magic_api * api); void string_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot); void string_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * snapshot); @@ -190,7 +190,7 @@ void string_release(magic_api * api, int which, } } -int string_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int string_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/swirls.c b/magic/src/swirls.c index b4ccd4236..a22485e31 100644 --- a/magic/src/swirls.c +++ b/magic/src/swirls.c @@ -7,7 +7,7 @@ Inspired by "Night Sky Scene [Pen Parallax]" Scratch Project by -HexaScape- - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ #include @@ -82,7 +82,7 @@ Uint32 swirl_stroke_color; Uint8 swirl_fur_color_r, swirl_fur_color_g, swirl_fur_color_b; Uint32 swirls_api_version(void); -int swirls_init(magic_api * api, Uint32 disabled_features); +int swirls_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int swirls_get_tool_count(magic_api * api); SDL_Surface *swirls_get_icon(magic_api * api, int which); char *swirls_get_name(magic_api * api, int which); @@ -117,7 +117,7 @@ Uint32 swirls_api_version(void) return (TP_MAGIC_API_VERSION); } -int swirls_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int swirls_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/tint.c b/magic/src/tint.c index 1954432c1..818836264 100644 --- a/magic/src/tint.c +++ b/magic/src/tint.c @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ #include @@ -81,7 +81,7 @@ const char *tint_descs[tint_NUM_TOOLS][2] = { gettext_noop("Click to turn your entire picture into white and a color you choose.")} }; -int tint_init(magic_api * api, Uint32 disabled_features); +int tint_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); Uint32 tint_api_version(void); int tint_get_tool_count(magic_api * api); SDL_Surface *tint_get_icon(magic_api * api, int which); @@ -117,7 +117,7 @@ Uint32 tint_api_version(void) } //Load sounds -int tint_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int tint_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/toothpaste.c b/magic/src/toothpaste.c index 839e12216..51ddbd8c7 100644 --- a/magic/src/toothpaste.c +++ b/magic/src/toothpaste.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: February 12, 2023 + Last updated: December 29, 2023 */ #include @@ -77,7 +77,7 @@ const char *toothpaste_descs[toothpaste_NUM_TOOLS] = { Uint32 toothpaste_api_version(void); -int toothpaste_init(magic_api * api, Uint32 disabled_features); +int toothpaste_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int toothpaste_get_tool_count(magic_api * api); SDL_Surface *toothpaste_get_icon(magic_api * api, int which); char *toothpaste_get_name(magic_api * api, int which); @@ -110,7 +110,7 @@ Uint32 toothpaste_api_version(void) } -int toothpaste_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int toothpaste_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { int i; char fname[1024]; diff --git a/magic/src/tornado.c b/magic/src/tornado.c index 3f88eb654..e4fd4f6cc 100644 --- a/magic/src/tornado.c +++ b/magic/src/tornado.c @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include @@ -74,7 +74,7 @@ static void tornado_ComputeBezier(Point2D * cp, int numberOfPoints, Point2D * cu static void tornado_colorize_cloud(magic_api * api); static Uint32 tornado_mess(Uint32 pixel, SDL_Surface * canvas); Uint32 tornado_api_version(void); -int tornado_init(magic_api * api, Uint32 disabled_features); +int tornado_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int tornado_get_tool_count(magic_api * api); SDL_Surface *tornado_get_icon(magic_api * api, int which); char *tornado_get_name(magic_api * api, int which); @@ -108,7 +108,7 @@ Uint32 tornado_api_version(void) // No setup required: -int tornado_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int tornado_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/tv.c b/magic/src/tv.c index 8972488b6..d5255fd69 100644 --- a/magic/src/tv.c +++ b/magic/src/tv.c @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: December 29, 2023 */ #include "tp_magic_api.h" @@ -48,7 +48,7 @@ Mix_Chunk *tv_snd; Uint32 tv_api_version(void); 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, Uint32 disabled_features); +int tv_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int tv_get_tool_count(magic_api * api); SDL_Surface *tv_get_icon(magic_api * api, int which); char *tv_get_name(magic_api * api, int which); @@ -87,7 +87,7 @@ void tv_set_color(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, //get the colors from API and store it in structure } -int tv_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int tv_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/waves.c b/magic/src/waves.c index 6102e9c8f..24362bdfc 100644 --- a/magic/src/waves.c +++ b/magic/src/waves.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 19, 2023 + Last updated: December 29, 2023 */ #include @@ -41,7 +41,7 @@ static Mix_Chunk *waves_snd[2]; /* Local function prototypes: */ Uint32 waves_api_version(void); -int waves_init(magic_api * api, Uint32 disabled_features); +int waves_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int waves_get_tool_count(magic_api * api); SDL_Surface *waves_get_icon(magic_api * api, int which); char *waves_get_name(magic_api * api, int which); @@ -72,7 +72,7 @@ Uint32 waves_api_version(void) // No setup required: -int waves_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int waves_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024]; diff --git a/magic/src/xor.c b/magic/src/xor.c index eef8a200c..77b6c2a45 100644 --- a/magic/src/xor.c +++ b/magic/src/xor.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: April 22, 2023 + Last updated: Decemer 29, 2023 */ #include @@ -36,7 +36,7 @@ static Mix_Chunk *xor_snd; static int xor_radius = 16; Uint32 xor_api_version(void); -int xor_init(magic_api * api, Uint32 disabled_features); +int xor_init(magic_api * api, Uint8 disabled_features, Uint8 complexity_level); int xor_get_tool_count(magic_api * api); SDL_Surface *xor_get_icon(magic_api * api, int which); char *xor_get_name(magic_api * api, int which); @@ -70,7 +70,7 @@ Uint32 xor_api_version(void) return (TP_MAGIC_API_VERSION); } -int xor_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED) +int xor_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) { char fname[1024];