From 5f8522766cd7e6b4ed61a40c495e7a22101e7c41 Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Fri, 29 Dec 2023 15:49:12 -0800 Subject: [PATCH] N-pt perspective: Don't operate in novice mode --- docs/CHANGES.txt | 51 +++++++++++++++++++++--------------------- magic/src/n_pt_persp.c | 8 +++++++ 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 71c219fac..d0d0de577 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -7,31 +7,6 @@ Various contributors (see below, and AUTHORS.txt) https://tuxpaint.org/ 2023.December.29 (0.9.32) - * New Magic Tools: - ---------------- - * Vanishing point magic tools: - + 1-point Perspective ("1-Point Select" & "1-Point Draw") - Choose a vanishing point, and then draw lines that always - point towards it, or are vertical or horizontal. - + 2-point Perspective ("2-Point Select" & "2-Point Draw") - Choose two vanishing points, and then draw lines that always - point towards them, along the horizon defined by them, - or perpendicular to that horizon. - + 3-point Perspective ("3-Point Select" & "3-Point Draw") - Choose three vanishing points, and then draw lines that always - point towards them, or along the horizon defined by the first two. - + Code: Bill Kendrick - + Sounds: - - Select: "Gummibandloop_121.wav" - (https://freesound.org/people/von_Gardener/sounds/473829/) - Creative Commons 0 by von_Gardener - - Click: "Rubber Band" - (https://freesound.org/people/IndigoRay/sounds/241869/) - Creative Commons 0 by IndigoRay - - Release: "Elastic band c note" - (https://freesound.org/people/mudflea2/sounds/708182/) - Creative Commons 0 by mudflea2 - * Improvements to Magic tools: ---------------------------- * WIP - Support for complexity levels in Magic tools via the @@ -49,6 +24,32 @@ https://tuxpaint.org/ complexity mode. Bill Kendrick + * New Magic Tools: + ---------------- + * Vanishing point magic tools: + + 1-point Perspective ("1-Point Select" & "1-Point Draw") + Choose a vanishing point, and then draw lines that always + point towards it, or are vertical or horizontal. + + 2-point Perspective ("2-Point Select" & "2-Point Draw") + Choose two vanishing points, and then draw lines that always + point towards them, along the horizon defined by them, + or perpendicular to that horizon. + + 3-point Perspective ("3-Point Select" & "3-Point Draw") + Choose three vanishing points, and then draw lines that always + point towards them, or along the horizon defined by the first two. + + Tools do not operate when in "novice" complexity mode. + + Code: Bill Kendrick + + Sounds: + - Select: "Gummibandloop_121.wav" + (https://freesound.org/people/von_Gardener/sounds/473829/) + Creative Commons 0 by von_Gardener + - Click: "Rubber Band" + (https://freesound.org/people/IndigoRay/sounds/241869/) + Creative Commons 0 by IndigoRay + - Release: "Elastic band c note" + (https://freesound.org/people/mudflea2/sounds/708182/) + Creative Commons 0 by mudflea2 + * Improvements to "Text" & "Label" tools: --------------------------------------- * The name and size of the chosen font is shown in the instructions diff --git a/magic/src/n_pt_persp.c b/magic/src/n_pt_persp.c index 9c39a1db9..04fae0658 100644 --- a/magic/src/n_pt_persp.c +++ b/magic/src/n_pt_persp.c @@ -144,6 +144,14 @@ int n_pt_persp_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, U int i; char filename[1024]; + if (complexity_level == MAGIC_COMPLEXITY_NOVICE) { + /* No N-point perspective tools _at all_, if in Novice mode */ + return 0; + } + + /* FIXME: Behave differently if in BEGINNER mode, vs ADVANCED */ + /* (See idea in https://sourceforge.net/p/tuxpaint/feature-requests/247/ -bjk 2023.12.29) */ + for (i = 0; i < NUM_SNDS; i++) { snprintf(filename, sizeof(filename), "%s/sounds/magic/%s", api->data_directory,