From 0a1de6bd3739aca13ccc95c0f227b9359b894c19 Mon Sep 17 00:00:00 2001 From: Pere Pujal i Carabantes Date: Mon, 15 Jun 2009 17:04:24 +0000 Subject: [PATCH] Playing sound when painting, still no support for two sounds... --- magic/src/rosette.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/magic/src/rosette.c b/magic/src/rosette.c index a4e0e3379..f11baf919 100644 --- a/magic/src/rosette.c +++ b/magic/src/rosette.c @@ -105,9 +105,7 @@ int rosette_requires_colors(magic_api * api, int which) { return 1; } void rosette_release(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect) -{ - api->playsound(rosette_snd, (x * 255) / canvas->w, 255); -} +{} void rosette_shutdown(magic_api * api) { Mix_FreeChunk(rosette_snd); } @@ -179,7 +177,8 @@ void rosette_drag(magic_api * api, int which, SDL_Surface * canvas, SDL_Rect * update_rect) { api->line((void *) api, which, canvas, snapshot, ox, oy, x, y, 1, rosette_draw); - + api->playsound(rosette_snd, (x * 255) / canvas->w, 255); + update_rect->x=update_rect->y=0; update_rect->w=canvas->w; update_rect->h=canvas->h;