Go to the documentation of this file.
35 #define MAX_SOUND_DISTANCE 10
61 if (!emitter->
map && !(emitter->
env && emitter->
env->
map))
64 source = emitter->
map ? emitter : emitter->
env;
69 int distance = (
MIN(dx, dy) * 3 +
FABS(dx-dy) * 2) / 2;
73 volume = distance ? volume / distance : volume;
100 #define POW2(x) ((x)*(x))
117 if (!emitter->
map && !(emitter->
env && emitter->
env->
map))
120 source = emitter->
map ? emitter : emitter->
env;
155 if (
map->background_music != NULL) {
156 return map->background_music;
const char * get_name_of_region_for_map(const mapstruct *m)
#define MAX_SOUND_DISTANCE
void player_update_bg_music(object player[static 1])
void SockList_AddString(SockList *sl, const char *data)
void send_background_music(player *pl, const char *music)
void SockList_AddChar(SockList *sl, unsigned char c)
EXTERN player * first_player
const typedef char * sstring
void SockList_Init(SockList *sl)
void play_sound_player_only(player *pl, int8_t sound_type, object *emitter, int dir, const char *action)
static char const * pick_bg_music(mapstruct map[static 1])
void SockList_Term(SockList *sl)
void SockList_AddLen8Data(SockList *sl, const void *data, size_t len)
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
void Send_With_Handling(socket_struct *ns, SockList *sl)