diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 26787c746..ee8aef2f8 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -8,7 +8,7 @@ http://www.tuxpaint.org/ $Id$ -2021.November.4 (0.9.27) +2021.November.8 (0.9.27) * New Magic Tools: ---------------- * "Lightning" - Draws a bolt of lightning striking between @@ -44,6 +44,10 @@ $Id$ * "Blocks", "Cartoon", "Chalk", "Emboss", and "Halftone" can all now affect the entire image at once. + * More tools update progress bar while doing lots of work + (mostly full-screen mode). More tools play their sound effects + when applying effects in full-screen mode. + * Improvements to "Paint" and "Lines" tools: ------------------------------------------ * Rotational brushes now supported. Unlike "directional" diff --git a/magic/src/blocks_chalk_drip.c b/magic/src/blocks_chalk_drip.c index 1be29be16..21662db41 100644 --- a/magic/src/blocks_chalk_drip.c +++ b/magic/src/blocks_chalk_drip.c @@ -1,6 +1,6 @@ /* blocks_chalk_drip.c -// + Blocks, Chalk and Drip Magic Tools Plugin Tux Paint - A simple drawing program for children. @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: October 27, 2021 + Last updated: November 8, 2021 $Id$ */ @@ -325,6 +325,10 @@ void blocks_chalk_drip_click(magic_api * api, int which, int mode, blocks_chalk_drip_drag(api, which, canvas, last, x, y, x, y, update_rect); } else /* MODE_FULLSCREEN */ { for (y = 0; y < canvas->h; y += EFFECT_REZ) { + if (y % 10 == 0) { + api->update_progress_bar(); + } + for (x = 0; x < canvas->w; x += EFFECT_REZ) { blocks_chalk_drip_linecb(api, which, canvas, last, x, y); } @@ -333,6 +337,8 @@ void blocks_chalk_drip_click(magic_api * api, int which, int mode, update_rect->y = 0; update_rect->w = canvas->w; update_rect->h = canvas->h; + + api->playsound(snd_effect[which], (x * 255) / canvas->w, 255); } } diff --git a/magic/src/blur.c b/magic/src/blur.c index 5f17a7842..369588966 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: September 20, 2021 + Last updated: November 8, 2021 $Id$ */ @@ -185,16 +185,18 @@ static void do_blur_pixel(void *ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * c // Do the effect for the full image static void do_blur_full(void *ptr, SDL_Surface * canvas, SDL_Surface * last, int which) { - - //magic_api * api = (magic_api *) ptr; - + magic_api * api = (magic_api *) ptr; int x, y; for (y = 0; y < last->h; y++) { + if (y % 10 == 0) { + api->update_progress_bar(); + } + for (x = 0; x < last->w; x++) { - do_blur_pixel(ptr, which, canvas, last, x, y); + do_blur_pixel(api, which, canvas, last, x, y); } } } diff --git a/magic/src/cartoon.c b/magic/src/cartoon.c index bf0025640..29a3c8d72 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: November 4, 2021 + Last updated: November 8, 2021 $Id$ */ @@ -227,6 +227,10 @@ void cartoon_click(magic_api * api, int which, int mode, { for (y = 0; y < canvas->h; y++) { + if (y % 10 == 0) { + api->update_progress_bar(); + } + for (x = 0; x < canvas->w; x++) { cartoon_apply_colors(api, last, x, y); @@ -234,6 +238,10 @@ void cartoon_click(magic_api * api, int which, int mode, } for (y = 0; y < canvas->h; y++) { + if (y % 10 == 0) { + api->update_progress_bar(); + } + for (x = 0; x < canvas->w; x++) { cartoon_apply_outline(api, x, y); @@ -246,6 +254,8 @@ void cartoon_click(magic_api * api, int which, int mode, } else { + api->playsound(cartoon_snd, 128, 255); + SDL_BlitSurface(result_surf, NULL, canvas, NULL); update_rect->x = 0; update_rect->y = 0; diff --git a/magic/src/emboss.c b/magic/src/emboss.c index e8385afd8..6cd6b3da7 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: September 20, 2021 + Last updated: November 8, 2021 $Id$ */ @@ -204,6 +204,10 @@ void emboss_click(magic_api * api, int which, int mode, emboss_drag(api, which, canvas, last, x, y, x, y, update_rect); } else { for (y = 0; y < canvas->h; y++) { + if (y % 10 == 0) { + api->update_progress_bar(); + } + for (x = 0; x < canvas->w; x++) { emboss_pixel(api, last, x, y, canvas); } diff --git a/magic/src/glasstile.c b/magic/src/glasstile.c index defa49d37..e400d09f6 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: September 21, 2021 + Last updated: November 8, 2021 $Id$ */ @@ -272,7 +272,7 @@ void glasstile_click(magic_api * api, int which, int mode, update_rect->w = canvas->w; update_rect->h = canvas->h; - /* FIXME: Play sfx */ + api->playsound(glasstile_snd, 128, 255); } } diff --git a/magic/src/sharpen.c b/magic/src/sharpen.c index 9b5861cba..b58e75045 100644 --- a/magic/src/sharpen.c +++ b/magic/src/sharpen.c @@ -6,7 +6,7 @@ Credits: Andrew Corcoran - Copyright (c) 2002-2009 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2002-2021 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com http://www.tuxpaint.org/ @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - Last updated: May 6, 2009 + Last updated: May 6, 2021 $Id$ */ @@ -177,7 +177,6 @@ static int sharpen_grey(Uint8 r1, Uint8 g1, Uint8 b1) // Do the effect: static void do_sharpen_pixel(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y) { - magic_api *api = (magic_api *) ptr; Uint8 r1, g1, b1; @@ -239,16 +238,19 @@ static void do_sharpen_pixel(void *ptr, int which, SDL_Surface * canvas, SDL_Sur // Do the effect for the full image static void do_sharpen_full(void *ptr, SDL_Surface * canvas, SDL_Surface * last, int which) { - - // magic_api * api = (magic_api *) ptr; + magic_api * api = (magic_api *) ptr; int x, y; for (y = 0; y < last->h; y++) { + if (y % 10 == 0) { + api->update_progress_bar(); + } + for (x = 0; x < last->w; x++) { - do_sharpen_pixel(ptr, which, canvas, last, x, y); + do_sharpen_pixel(api, which, canvas, last, x, y); } } } diff --git a/src/po/ja.po b/src/po/ja.po index ca6298d50..72cadea57 100644 --- a/src/po/ja.po +++ b/src/po/ja.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: tuxpaint 0.9.23\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-07 20:32-0800\n" -"PO-Revision-Date: 2021-10-30 18:22+0900\n" +"PO-Revision-Date: 2021-11-09 23:01+0900\n" "Last-Translator: Shin-ichi TOYAMA \n" "Language-Team: japanese \n" "Language: ja\n" @@ -1207,10 +1207,8 @@ msgid "Lightning" msgstr "いなずま" #: ../../magic/src/lightning.c:88 -#, fuzzy -#| msgid "Click, drag, and release to a lightning bolt between two points." msgid "Click, drag, and release to draw a lightning bolt between two points." -msgstr "クリックしたあとドラッグして いなずまを かこう。" +msgstr "クリックしたまま マウスをうごかして いなずまを えがこう。" #: ../../magic/src/metalpaint.c:99 msgid "Metal Paint" @@ -1435,14 +1433,12 @@ msgstr "" #: ../../magic/src/reflection.c:110 msgid "Reflection" -msgstr "" +msgstr "はんしゃ" #: ../../magic/src/reflection.c:120 -#, fuzzy -#| msgid "" -#| "Click and drag the mouse to add a mosaic effect to parts of your picture." msgid "Click and drag the mouse around to add a reflection to your picture." -msgstr "クリックしたまま マウスをうごかして モザイクえのようにしよう。" +msgstr "" +"クリックしたまま マウスをうごかして かがみにうつったような えに しよう。" #: ../../magic/src/ripples.c:103 msgid "Ripples"