Crossfire Client, Trunk  R21611
common.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void cf_play_music (const char *music_name)
 
void cf_play_sound (gint8 x, gint8 y, guint8 dir, guint8 vol, guint8 type, char const sound[static 1], char const source[static 1])
 
void cf_snd_exit ()
 
int cf_snd_init ()
 

Function Documentation

◆ cf_play_music()

void cf_play_music ( const char *  music_name)

Play a music file.

Parameters
nameName of the song to play, without file paths or extensions.

Definition at line 168 of file cfsndserv.c.

References MAXSOCKBUF, music, and music_is_different().

Referenced by parse_input().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cf_play_sound()

void cf_play_sound ( gint8  x,
gint8  y,
guint8  dir,
guint8  vol,
guint8  type,
char const  sound[static 1],
char const  source[static 1] 
)

Play a sound effect using the SDL_mixer sound system.

Parameters
soundThe sound to play.
type0 for normal sounds, 1 for spell_sounds.
xOffset (assumed from player) to play sound used to determine value and left vs. right speaker balance.
yOffset (assumed from player) to play sound used to determine value and left vs. right speaker balance.

Definition at line 131 of file cfsndserv.c.

References load_chunk(), and sounds.

Referenced by parse_input().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cf_snd_exit()

void cf_snd_exit ( )

Definition at line 194 of file cfsndserv.c.

References chunk_cache, music, and sounds.

Referenced by main().

+ Here is the caller graph for this function:

◆ cf_snd_init()

int cf_snd_init ( )

Initialize sound server.

Initialize resource paths, load sound definitions, and ready the sound subsystem.

Returns
Zero on success, anything else on failure.

Definition at line 80 of file cfsndserv.c.

References chunk_cache, init_audio(), and sounds.

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: