Adding Google Eyes sound effect
Updating credits & changelog, too.
This commit is contained in:
parent
105b6958c5
commit
866c5f6483
4 changed files with 17 additions and 7 deletions
|
|
@ -69,10 +69,9 @@ int googlyeyes_init(magic_api * api)
|
|||
char fname[1024];
|
||||
int i;
|
||||
|
||||
// FIXME
|
||||
// snprintf(fname, sizeof(fname), "%ssounds/magic/googlyeyes.ogg",
|
||||
// api->data_directory);
|
||||
// snd_effect = Mix_LoadWAV(fname);
|
||||
snprintf(fname, sizeof(fname), "%ssounds/magic/googlyeyes.ogg",
|
||||
api->data_directory);
|
||||
snd_effect = Mix_LoadWAV(fname);
|
||||
|
||||
for (i = 0; i < NUM_SIZES; i++) {
|
||||
googlyeyes_img_bkgd[i] = NULL;
|
||||
|
|
@ -227,6 +226,9 @@ googlyeyes_click(magic_api * api, int which, int mode ATTRIBUTE_UNUSED,
|
|||
if (eye_y < googlyeyes_img_bkgd[which]->h / 2)
|
||||
eye_y = googlyeyes_img_bkgd[which]->h / 2;
|
||||
|
||||
api->stopsound();
|
||||
api->playsound(snd_effect, (x * 255) / canvas->w, 255);
|
||||
|
||||
googlyeyes_drag(api, which, canvas, snapshot, x, y, x, y, update_rect);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue