Adding sound to magic Puzzle
This commit is contained in:
parent
ddd6e439f5
commit
5d0f89749e
2 changed files with 1 additions and 1 deletions
BIN
magic/sounds/puzzle.wav
Normal file
BIN
magic/sounds/puzzle.wav
Normal file
Binary file not shown.
|
|
@ -117,7 +117,6 @@ void puzzle_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED
|
|||
SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED,
|
||||
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||
{
|
||||
api->playsound(puzzle_snd, 128, 255);
|
||||
}
|
||||
|
||||
void puzzle_shutdown(magic_api * api ATTRIBUTE_UNUSED)
|
||||
|
|
@ -215,6 +214,7 @@ static void puzzle_draw(void * ptr, int which_tool ATTRIBUTE_UNUSED,
|
|||
|
||||
SDL_BlitSurface(canvas, &rect_this, canvas, &rect_that);
|
||||
SDL_BlitSurface(canvas_backup, &rect_that, canvas, &rect_this);
|
||||
api->playsound(puzzle_snd, (x * 255) / canvas->w, 255);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue