More function documentation

This commit is contained in:
Bill Kendrick 2018-05-17 00:30:48 -07:00
parent e56067d202
commit 9144ebd705
11 changed files with 338 additions and 90 deletions

View file

@ -33,6 +33,20 @@ int mute;
int use_sound = 1;
static int old_sound[4] = { -1, -1, -1, -1 };
/**
* Play a sound.
*
* @param screen Screen surface (for dealing with panning & volume)
* @param chan Channel to play on (-1 for first free unused channel)
* @param s Which sound to play (integer index of `sounds[]` array)
* @param override 1 to override an already-playing sound, 0 otherwise
* @param x X coordinate within the screen surface, for left/right panning
* effect; or SNDPOS_LEFT, SNDPOS_CENTER, or SNDPOS_RIGHT for
* far left, center, or far right panning, respectively.
* @param y Y coordinate within the screen surface, for volume control
* (low values, near the top of the window, are quieter), or
* SNDDIST_NEAR for full volume
*/
void playsound(SDL_Surface * screen, int chan, int s, int override, int x, int y)
{
#ifndef NOSOUND