Sound effects for Filled Polygon magic tool
Based on some CC0 sounds by Kenneth Cooney (see AUTHORS.txt and CHANGES.txt).
This commit is contained in:
parent
02562f8b44
commit
a2fece280b
6 changed files with 41 additions and 17 deletions
|
|
@ -6,7 +6,7 @@ Copyright (c) 2002-2024
|
||||||
Various contributors (see below, and CHANGES.txt)
|
Various contributors (see below, and CHANGES.txt)
|
||||||
https://tuxpaint.org/
|
https://tuxpaint.org/
|
||||||
|
|
||||||
June 17, 2002 - March 28, 2024
|
June 17, 2002 - May 28, 2024
|
||||||
|
|
||||||
* Design and Coding:
|
* Design and Coding:
|
||||||
|
|
||||||
|
|
@ -153,6 +153,13 @@ June 17, 2002 - March 28, 2024
|
||||||
Scanline polygon fill routine based on public-domain code
|
Scanline polygon fill routine based on public-domain code
|
||||||
by Darel Rex Finley, 2007 <https://alienryderflex.com/polygon_fill/>
|
by Darel Rex Finley, 2007 <https://alienryderflex.com/polygon_fill/>
|
||||||
|
|
||||||
|
Filled Polygon sound effects (place, move, finish) based on
|
||||||
|
"success_02.wav" (https://freesound.org/people/Kenneth_Cooney/sounds/463067/),
|
||||||
|
"success.wav" (https://freesound.org/people/Kenneth_Cooney/sounds/457547/), &
|
||||||
|
"Completed.wav" (https://freesound.org/people/Kenneth_Cooney/sounds/609336/)
|
||||||
|
respectively.
|
||||||
|
Creative Commons 0 by Kenneth Cooney <https://www.kennethcooney.com/>
|
||||||
|
|
||||||
Bloom magic tool
|
Bloom magic tool
|
||||||
by Bill Kendrick <bill@newbreedsoftware.com>
|
by Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
Googly Eyes sound effect: "Torch Crackle.wav"
|
Googly Eyes sound effect: "Torch Crackle.wav"
|
||||||
|
|
|
||||||
|
|
@ -13,17 +13,19 @@ https://tuxpaint.org/
|
||||||
with dithered X-and-white pixels. With "Dither", X is always black,
|
with dithered X-and-white pixels. With "Dither", X is always black,
|
||||||
or the currently-selected color; with "Dither (Keep Color)", X is
|
or the currently-selected color; with "Dither (Keep Color)", X is
|
||||||
a muted version of the original color.
|
a muted version of the original color.
|
||||||
Bill Kendrick <bill@newbreedsoftware.com>
|
+ Code & icon Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
- Sound effects based on "Orion FIll.wav", Creative Commons 0
|
+ Sound effects based on "Orion FIll.wav", Creative Commons 0
|
||||||
by KatHakaku <https://freesound.org/people/KatHakaku/>
|
by KatHakaku <https://freesound.org/people/KatHakaku/>
|
||||||
|
|
||||||
* WIP Filled Polygon - Draw points to form a polygon which is filled
|
* Filled Polygon + Draw points to form a polygon which is filled
|
||||||
Bill Kendrick <bill@newbreedsoftware.com>
|
+ Code & icon by Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
Scanline polygon fill routine based on public-domain code
|
+ Scanline polygon fill routine based on public-domain code
|
||||||
by Darel Rex Finley, 2007 <https://alienryderflex.com/polygon_fill/
|
by Darel Rex Finley, 2007 <https://alienryderflex.com/polygon_fill/
|
||||||
|
+ Sound effects based on "success.wav", "success_02.wav", and
|
||||||
|
"Completed.wav", Creative Commons 0 by Kenneth Cooney
|
||||||
|
<https://freesound.org/people/Kenneth_Cooney>
|
||||||
|
<https://www.kennethcooney.com/>
|
||||||
Closes https://sourceforge.net/p/tuxpaint/feature-requests/251/
|
Closes https://sourceforge.net/p/tuxpaint/feature-requests/251/
|
||||||
+ WIP Needs sound effect
|
|
||||||
+ WIP Needs testing & tweaking
|
|
||||||
|
|
||||||
* Magic Tool Improvements:
|
* Magic Tool Improvements:
|
||||||
------------------------
|
------------------------
|
||||||
|
|
@ -31,8 +33,8 @@ https://tuxpaint.org/
|
||||||
(via the size option): Red/Cyan, Red/Blue, Red/Green, and Magenta/Cyan.
|
(via the size option): Red/Cyan, Red/Blue, Red/Green, and Magenta/Cyan.
|
||||||
(If Tux Paint is running in "Novice" complexity mode, no choices will
|
(If Tux Paint is running in "Novice" complexity mode, no choices will
|
||||||
be available; it will use Red/Cyan, as before.)
|
be available; it will use Red/Cyan, as before.)
|
||||||
+ Idea O'Hare The Rabbit
|
+ Idea from O'Hare The Rabbit
|
||||||
+ Coding Bill Kendrick <bill@newbreedsoftware.com>
|
+ Coding by Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
|
|
||||||
* Improvements to Eraser tool:
|
* Improvements to Eraser tool:
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
|
||||||
BIN
magic/sounds/polyfill_finish.ogg
Normal file
BIN
magic/sounds/polyfill_finish.ogg
Normal file
Binary file not shown.
BIN
magic/sounds/polyfill_move.ogg
Normal file
BIN
magic/sounds/polyfill_move.ogg
Normal file
Binary file not shown.
BIN
magic/sounds/polyfill_place.ogg
Normal file
BIN
magic/sounds/polyfill_place.ogg
Normal file
Binary file not shown.
|
|
@ -7,7 +7,7 @@
|
||||||
Scanline polygon fill routine based on public-domain code
|
Scanline polygon fill routine based on public-domain code
|
||||||
by Darel Rex Finley, 2007 <https://alienryderflex.com/polygon_fill/>
|
by Darel Rex Finley, 2007 <https://alienryderflex.com/polygon_fill/>
|
||||||
|
|
||||||
Last updated: May 19, 2024
|
Last updated: May 28, 2024
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -38,8 +38,17 @@ char *polyfill_icon_filenames[NUM_TOOLS] = {
|
||||||
"polyfill.png",
|
"polyfill.png",
|
||||||
};
|
};
|
||||||
|
|
||||||
char *polyfill_snd_filenames[NUM_TOOLS] = {
|
enum {
|
||||||
"dither.ogg", // FIXME
|
SND_PLACE,
|
||||||
|
SND_MOVE,
|
||||||
|
SND_FINISH,
|
||||||
|
NUM_SOUNDS
|
||||||
|
};
|
||||||
|
|
||||||
|
char *polyfill_snd_filenames[NUM_SOUNDS] = {
|
||||||
|
"polyfill_place.ogg",
|
||||||
|
"polyfill_move.ogg",
|
||||||
|
"polyfill_finish.ogg",
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SNAP_SIZE 16
|
#define SNAP_SIZE 16
|
||||||
|
|
@ -54,7 +63,7 @@ int polyfill_editing = MAX_PTS;
|
||||||
int polyfill_dragged = 0;
|
int polyfill_dragged = 0;
|
||||||
int polyfill_active = 0;
|
int polyfill_active = 0;
|
||||||
|
|
||||||
Mix_Chunk *snd_effects[NUM_TOOLS];
|
Mix_Chunk *snd_effects[NUM_SOUNDS];
|
||||||
|
|
||||||
Uint32 polyfill_color, polyfill_color_red, polyfill_color_green;
|
Uint32 polyfill_color, polyfill_color_red, polyfill_color_green;
|
||||||
|
|
||||||
|
|
@ -108,7 +117,7 @@ int polyfill_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uin
|
||||||
int i;
|
int i;
|
||||||
char filename[1024];
|
char filename[1024];
|
||||||
|
|
||||||
for (i = 0; i < NUM_TOOLS; i++)
|
for (i = 0; i < NUM_SOUNDS; i++)
|
||||||
{
|
{
|
||||||
snprintf(filename, sizeof(filename), "%ssounds/magic/%s", api->data_directory, polyfill_snd_filenames[i]);
|
snprintf(filename, sizeof(filename), "%ssounds/magic/%s", api->data_directory, polyfill_snd_filenames[i]);
|
||||||
snd_effects[i] = Mix_LoadWAV(filename);
|
snd_effects[i] = Mix_LoadWAV(filename);
|
||||||
|
|
@ -185,7 +194,7 @@ void polyfill_shutdown(magic_api * api ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < NUM_TOOLS; i++)
|
for (i = 0; i < NUM_SOUNDS; i++)
|
||||||
{
|
{
|
||||||
if (snd_effects[i] != NULL)
|
if (snd_effects[i] != NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -246,6 +255,7 @@ polyfill_click(magic_api * api, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_U
|
||||||
|
|
||||||
/* Add the new point */
|
/* Add the new point */
|
||||||
polyfill_drag(api, which, canvas, snapshot, x, y, x, y, update_rect);
|
polyfill_drag(api, which, canvas, snapshot, x, y, x, y, update_rect);
|
||||||
|
api->playsound(snd_effects[SND_PLACE], (x * 255) / canvas->w, 255);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -271,6 +281,7 @@ polyfill_drag(magic_api * api, int which ATTRIBUTE_UNUSED,
|
||||||
polyfill_pt_y[polyfill_editing] = y;
|
polyfill_pt_y[polyfill_editing] = y;
|
||||||
|
|
||||||
polyfill_draw_preview(api, canvas, 1);
|
polyfill_draw_preview(api, canvas, 1);
|
||||||
|
api->playsound(snd_effects[SND_MOVE], (x * 255) / canvas->w, 255);
|
||||||
|
|
||||||
update_rect->x = 0;
|
update_rect->x = 0;
|
||||||
update_rect->y = 0;
|
update_rect->y = 0;
|
||||||
|
|
@ -389,11 +400,15 @@ polyfill_release(magic_api * api, int which ATTRIBUTE_UNUSED,
|
||||||
|
|
||||||
polyfill_draw_final(canvas);
|
polyfill_draw_final(canvas);
|
||||||
|
|
||||||
|
/* Reset points */
|
||||||
polyfill_num_pts = 0;
|
polyfill_num_pts = 0;
|
||||||
polyfill_editing = MAX_PTS;
|
polyfill_editing = MAX_PTS;
|
||||||
|
|
||||||
/* Update snapshot ahead of next polygon */
|
/* Update snapshot ahead of next polygon */
|
||||||
SDL_BlitSurface(canvas, NULL, polyfill_snapshot, NULL);
|
SDL_BlitSurface(canvas, NULL, polyfill_snapshot, NULL);
|
||||||
|
|
||||||
|
/* Play "finish" sound effect */
|
||||||
|
api->playsound(snd_effects[SND_FINISH], 128 /* TODO could be clever and determine midpoint of polygon */, 255);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue