Wrapped up tuxpaint side of complexity tool
Need to work more on N-Point Perspective tools. (Also need to add configuration UI to `tuxpaint-config`)
This commit is contained in:
parent
864084482a
commit
24d84731ff
4 changed files with 27 additions and 6 deletions
|
|
@ -9,14 +9,13 @@ https://tuxpaint.org/
|
||||||
2023.December.29 (0.9.32)
|
2023.December.29 (0.9.32)
|
||||||
* Improvements to Magic tools:
|
* Improvements to Magic tools:
|
||||||
----------------------------
|
----------------------------
|
||||||
* WIP - Support for complexity levels in Magic tools via the
|
* Support for complexity levels in Magic tools via the plugin API.
|
||||||
plugin API.
|
|
||||||
(Closes https://sourceforge.net/p/tuxpaint/feature-requests/247/)
|
(Closes https://sourceforge.net/p/tuxpaint/feature-requests/247/)
|
||||||
+ WIP - Complexity/expertise level may be set via configuration,
|
+ Complexity/expertise level may be set via configuration,
|
||||||
`--complexity`; values may be "advanced" (default), "beginner",
|
`--complexity`; values may be "advanced" (default), "beginner",
|
||||||
or "novice".
|
or "novice".
|
||||||
+ WIP - Plugins' "init()" functions are sent a new
|
+ Plugins' "init()" functions are sent a new `complexity_level`
|
||||||
`complexity_level` argument.
|
argument.
|
||||||
+ Note: Bumps `TP_MAGIC_API_VERSION` to 0x00000009.
|
+ Note: Bumps `TP_MAGIC_API_VERSION` to 0x00000009.
|
||||||
Bill Kendrick <bill@newbreedsoftware.com>
|
Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
|
|
||||||
|
|
@ -37,7 +36,12 @@ https://tuxpaint.org/
|
||||||
+ 3-point Perspective ("3-Point Select" & "3-Point Draw")
|
+ 3-point Perspective ("3-Point Select" & "3-Point Draw")
|
||||||
Choose three vanishing points, and then draw lines that always
|
Choose three vanishing points, and then draw lines that always
|
||||||
point towards them, or along the horizon defined by the first two.
|
point towards them, or along the horizon defined by the first two.
|
||||||
+ Tools do not operate when in "novice" complexity mode.
|
+ None of these tools are available when in "novice" complexity mode
|
||||||
|
(see above).
|
||||||
|
+ WIP - "Select" tools (to edit vanishing points) are not offered
|
||||||
|
when in "beginner" complexity mode.
|
||||||
|
- WIP - Also, two "3-Point Draw" tools are provided in "beginner"
|
||||||
|
mode, to offer both 'looking up' and 'looking down' perspectives.
|
||||||
+ Code: Bill Kendrick <bill@newbreedsoftware.com>
|
+ Code: Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
+ Sounds:
|
+ Sounds:
|
||||||
- Select: "Gummibandloop_121.wav"
|
- Select: "Gummibandloop_121.wav"
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@ altprintnever, MULTI(alt_print_command_default)
|
||||||
autosave, POSBOOL(autosave_on_quit)
|
autosave, POSBOOL(autosave_on_quit)
|
||||||
buttondistinction, NEGBOOL(no_button_distinction)
|
buttondistinction, NEGBOOL(no_button_distinction)
|
||||||
colorfile, MULTI(colorfile)
|
colorfile, MULTI(colorfile)
|
||||||
|
complexity, MULTI(complexity)
|
||||||
complexshapes, NEGBOOL(simple_shapes)
|
complexshapes, NEGBOOL(simple_shapes)
|
||||||
copying, IMM(copying)
|
copying, IMM(copying)
|
||||||
currentlocalefont, NEGBOOL(all_locale_fonts)
|
currentlocalefont, NEGBOOL(all_locale_fonts)
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ struct cfginfo
|
||||||
const char *altprintcommand;
|
const char *altprintcommand;
|
||||||
const char *autosave_on_quit;
|
const char *autosave_on_quit;
|
||||||
const char *colorfile;
|
const char *colorfile;
|
||||||
|
const char *complexity;
|
||||||
const char *datadir;
|
const char *datadir;
|
||||||
const char *disable_label;
|
const char *disable_label;
|
||||||
const char *disable_brushspacing;
|
const char *disable_brushspacing;
|
||||||
|
|
|
||||||
|
|
@ -28370,6 +28370,21 @@ static void setup_config(char *argv[])
|
||||||
stamp_size_override = 10;
|
stamp_size_override = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (tmpcfg.complexity)
|
||||||
|
{
|
||||||
|
/* FIXME: Could maybe iterate the array of MAGIC_COMPLEXITY_LEVEL_NAMES[],
|
||||||
|
but just hard-coding for now -bjk 2023.12.29 */
|
||||||
|
if (!strcmp(tmpcfg.complexity, "novice")) {
|
||||||
|
magic_complexity_level = MAGIC_COMPLEXITY_NOVICE;
|
||||||
|
} else if (!strcmp(tmpcfg.complexity, "beginner")) {
|
||||||
|
magic_complexity_level = MAGIC_COMPLEXITY_BEGINNER;
|
||||||
|
} else if (!strcmp(tmpcfg.complexity, "advanced")) {
|
||||||
|
magic_complexity_level = MAGIC_COMPLEXITY_ADVANCED;
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "Ignoring unknown 'complexity' value \"%s\"\n", tmpcfg.complexity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* FIXME: make this dynamic (accelerometer or OLPC XO-1 rotation button) */
|
/* FIXME: make this dynamic (accelerometer or OLPC XO-1 rotation button) */
|
||||||
if (tmpcfg.rotate_orientation)
|
if (tmpcfg.rotate_orientation)
|
||||||
rotate_orientation = !strcmp(tmpcfg.rotate_orientation, "portrait"); /* alternative is "landscape" */
|
rotate_orientation = !strcmp(tmpcfg.rotate_orientation, "portrait"); /* alternative is "landscape" */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue