All magic tools: Add "complexity_level" arg to init()
This commit is contained in:
parent
0bc54921d9
commit
2055b071f1
61 changed files with 185 additions and 189 deletions
|
|
@ -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 <akanewbie@gmail.com> 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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Last updated: April 19, 2023
|
||||
Last updated: December 29, 2023
|
||||
*/
|
||||
|
||||
#include <time.h> //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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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 <math.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
kaleidoscope.
|
||||
Bill Kendrick
|
||||
|
||||
Last updated: April 20, 2023
|
||||
Last updated: December 29, 2023
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Allows painting generated maze puzzles on your picture.
|
||||
|
||||
Last updated: February 5, 2023
|
||||
Last updated: December 29, 2023
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
by Bill Kendrick <bill@newbreedsoftware.com>
|
||||
|
||||
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];
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
by Bill Kendrick <bill@newbreedsoftware.com>
|
||||
Math assistance by Jeff Newmiller <jdnewmil@dcn.davis.ca.us>
|
||||
|
||||
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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
Inspired by "Night Sky Scene [Pen Parallax]" Scratch Project
|
||||
by -HexaScape- <https://scratch.mit.edu/users/-HexaScape->
|
||||
|
||||
Last updated: April 22, 2023
|
||||
Last updated: December 29, 2023
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue