Consolodating description of source extraction in CHANGES.txt.
Extracted do_floodfill, playsound, draw_progressbar and RGB-to-linear functions.
This commit is contained in:
parent
a9511eda41
commit
7448cd879d
12 changed files with 780 additions and 505 deletions
19
src/playsound.c
Normal file
19
src/playsound.c
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include "playsound.h"
|
||||
|
||||
#ifndef NOSOUND
|
||||
Mix_Chunk * sounds[NUM_SOUNDS];
|
||||
#endif
|
||||
|
||||
int mute, use_sound;
|
||||
|
||||
void playsound(int chan, int s, int override)
|
||||
{
|
||||
#ifndef NOSOUND
|
||||
if (!mute && use_sound && s != SND_NONE)
|
||||
{
|
||||
if (override || !Mix_Playing(chan))
|
||||
Mix_PlayChannel(chan, sounds[s], 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue