Sound effect for new "Comic Dots" Magic tool

This commit is contained in:
Bill Kendrick 2024-09-17 21:35:09 -07:00
parent 61478d7858
commit 143b50733c
4 changed files with 25 additions and 7 deletions

View file

@ -6,7 +6,7 @@ Copyright (c) 2002-2024
Various contributors (see below, and CHANGES.txt)
https://tuxpaint.org/
June 17, 2002 - July 26, 2024
June 17, 2002 - September 17, 2024
* Design and Coding:
@ -171,9 +171,19 @@ June 17, 2002 - July 26, 2024
Creative Commons Attribution 3.0 by stinkhorn
<https://freesound.org/people/stinkhorn/>
Comic Dots magic tool
by Bill Kendrick <bill@newbreedsoftware.com>
Comic Dots sound effect
Based on "superhero theme"
<https://freesound.org/people/humanoide9000/sounds/569062/>
Creative Commons Attribution 4.0 by Luis Humanoide
<https://freesound.org/people/humanoide9000/>
Bloom magic tool
by Bill Kendrick <bill@newbreedsoftware.com>
Googly Eyes sound effect: "Torch Crackle.wav"
Bloom sound effect: "Torch Crackle.wav"
(https://freesound.org/people/kentnelson64/sounds/647221/)
Creative Commons 0 license by "kentnelson64"

View file

@ -11,9 +11,11 @@ https://tuxpaint.org/
----------------
* WIP "Comic Dots", draws repeating dots (using a multiply blend)
to simulate the "Ben Day process" of coloring/shading.
Bill Kendrick <bill@newbreedsoftware.com>
- TODO needs icons
- TODO needs sound effects
+ Code & icon Bill Kendrick <bill@newbreedsoftware.com>
+ Sound effect based on "superhero theme",
Creative Commons Attribution 4.0 by Luis Humanoide
<https://freesound.org/people/humanoide9000/>
- TODO needs icon
Closes https://sourceforge.net/p/tuxpaint/feature-requests/257/
* Improvements to Fill tool:

BIN
magic/sounds/comic_dots.ogg Normal file

Binary file not shown.

View file

@ -83,7 +83,7 @@ int comicdot_init(magic_api * api, Uint8 disabled_features ATTRIBUTE_UNUSED, Uin
char fname[1024];
int i;
snprintf(fname, sizeof(fname), "%ssounds/magic/xor.ogg", api->data_directory); // FIXME
snprintf(fname, sizeof(fname), "%ssounds/magic/comic_dots.ogg", api->data_directory);
comicdot_snd = Mix_LoadWAV(fname);
/* Load base pattern image */
@ -222,7 +222,7 @@ void comicdot_drag(magic_api * api, int which, SDL_Surface * canvas,
update_rect->w = (x + comicdot_radius) - update_rect->x;
update_rect->h = (y + comicdot_radius) - update_rect->y;
api->playsound(comicdot_snd, (x * 255) / canvas->w, 255);
api->playsound(comicdot_snd, 64 + ((x * 127) / canvas->w), 255);
}
void comicdot_click(magic_api * api, int which, int mode,
@ -251,6 +251,12 @@ void comicdot_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUS
SDL_Surface * last ATTRIBUTE_UNUSED, int x ATTRIBUTE_UNUSED,
int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
{
/* FIXME: Would be nice to be able to ask Tux Paint to pause
the sound (`Mix_Pause()`), and then resume (`Mix_Resume()`)
(or start new (`Mix_PlayChannel()`) if nothing is currently playing)
on click/drag. That way the sound won't start over every time
you make small stroke. */
api->stopsound();
}
void comicdot_shutdown(magic_api * api ATTRIBUTE_UNUSED)