diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 12cdd0e0a..71c219fac 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -45,6 +45,10 @@ https://tuxpaint.org/ + Note: Bumps `TP_MAGIC_API_VERSION` to 0x00000009. Bill Kendrick + * "Clone" tool does not operate when Tux Paint is in "novice" + complexity mode. + Bill Kendrick + * Improvements to "Text" & "Label" tools: --------------------------------------- * The name and size of the chosen font is shown in the instructions diff --git a/magic/src/clone.c b/magic/src/clone.c index bf5a977e2..bfc9e643c 100644 --- a/magic/src/clone.c +++ b/magic/src/clone.c @@ -95,10 +95,15 @@ 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, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level ATTRIBUTE_UNUSED) +int clone_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uint8 complexity_level) { char fname[1024]; + if (complexity_level == MAGIC_COMPLEXITY_NOVICE) { + /* Clone tool not available in "novice" mode */ + return(0); + } + snprintf(fname, sizeof(fname), "%ssounds/magic/clone_start.ogg", api->data_directory); clone_start_snd = Mix_LoadWAV(fname); @@ -119,6 +124,7 @@ Uint32 clone_api_version(void) // We have multiple tools: int clone_get_tool_count(magic_api * api ATTRIBUTE_UNUSED) { + printf("CLONE TOOL COUNT\n"); return (NUM_TOOLS); }