54 #define MaxSampleVolume 255
136 #define INFINITE_SOUND_RANGE 255
140 #define MAX_SOUND_RANGE 254
167 extern unsigned char CalculateVolume(
bool isVolume,
int power,
unsigned char range);
202 #define CallbackMusicOn() \
203 CallbackMusic = true;
204 #define CallbackMusicOff() \
206 CallbackMusic = false;
216 extern CSound *
MakeSound(
const std::string &sound_name,
const std::vector<std::string> &files);
230 #endif // !__SOUND_H__
SoundConfig BuildingConstruction[MAX_RACES]
ship reaches coast
Definition: sound.h:86
Attack command.
Definition: sound.h:72
void CheckMusicFinished(bool force=false)
Check if music is finished and play the next song.
Definition: music.cpp:77
only for building under construction
Definition: sound.h:68
CSound * Second
first group: selected sound
Definition: sound.h:118
int PlayFile(const std::string &name, LuaActionListener *listener=NULL)
Play a sound file.
Definition: sound.cpp:403
CSound * SoundForName(const std::string &sound_name)
Get the sound id bound to an identifier.
Definition: sound_id.cpp:88
SoundConfig Rescue[MAX_RACES]
building ready
Definition: sound.h:88
SoundConfig Docking
used by ui
Definition: sound.h:85
CSound()
Definition: sound.h:101
struct CSound::@34::@35 TwoGroups
when it's a simple group
int DistanceSilent
flag true callback ccl if stops
Definition: sound.cpp:72
Missile on the map.
Definition: missile.h:413
#define MAX_RACES
Definition: stratagus.h:160
resource 6
Definition: upgrade_structs.h:70
unsigned char CalculateVolume(bool isVolume, int power, unsigned char range)
Calculates volume level.
Definition: sound.cpp:245
void SoundCclRegister()
register ccl features
Definition: script_sound.cpp:352
SoundConfig NotEnoughFood[MAX_RACES]
not enough resources message
Definition: sound.h:92
only worker, work completed
Definition: sound.h:67
The big unit structure.
Definition: unit.h:119
CSound * MakeSoundGroup(const std::string &name, CSound *first, CSound *second)
Make a sound group bound to identifier.
Definition: sound_id.cpp:140
void InitSoundClient()
Initialize client side of the sound layer.
Definition: sound.cpp:498
SoundConfig WorkComplete[MAX_RACES]
building under construction
Definition: sound.h:87
Definition: unitsound.h:54
UnitVoiceGroup
Definition: sound.h:60
unsigned char Number
Range is a multiplier for DistanceSilent.
Definition: sound.h:112
Acknowledge command.
Definition: sound.h:63
SoundConfig ResearchComplete[MAX_RACES]
chat message
Definition: sound.h:90
void InitMusic()
Initialize music.
Definition: music.cpp:100
bool CallbackMusic
Game sound configuration.
Definition: music.cpp:57
GameSound GameSounds
Definition: sound.cpp:57
only for transport reaching coast
Definition: sound.h:69
unsigned char Range
Definition: sound.h:111
const void * Base
Definition: sound.h:146
~CSound()
Definition: sound.cpp:566
If killed.
Definition: sound.h:66
SoundConfig PlacementError[MAX_RACES]
Definition: sound.h:82
harvesting
Definition: sound.h:71
void SetSoundRange(CSound *sound, unsigned char range)
Modify the range of a given sound.
Definition: sound.cpp:425
SoundConfig Click
used by ui
Definition: sound.h:84
CSound * RegisterTwoGroups(CSound *first, CSound *second)
Create a special sound group with two sounds.
Definition: sound.cpp:481
CSample * OneSound
Definition: sound.h:114
CSound * First
Definition: sound.h:117
CSound * RegisterSound(const std::vector< std::string > &files)
Register a sound (can be a simple sound or a group)
Definition: sound.cpp:444
CSound * MakeSound(const std::string &sound_name, const std::vector< std::string > &files)
Make a sound bound to identifier.
Definition: sound_id.cpp:111
If selected.
Definition: sound.h:62
SoundConfig NotEnoughRes[MAX_RACES][MaxCosts]
research complete message
Definition: sound.h:91
SoundConfig PlacementSuccess[MAX_RACES]
used by ui
Definition: sound.h:83
void PlayMissileSound(const Missile &missile, CSound *sound)
Play a missile sound.
Definition: sound.cpp:330
void PlayGameSound(CSound *sound, unsigned char volume, bool always=false)
Play a game sound.
Definition: sound.cpp:360
unsigned Id
pointer on a Unit
Definition: sound.h:147
unsigned int Mapref
Definition: sound.h:106
Definition: sound_server.h:52
SoundConfig ChatMessage
rescue units
Definition: sound.h:89
void PlayUnitSound(const CUnit &unit, UnitVoiceGroup unit_voice_group)
Play a unit sound.
Definition: sound.cpp:275
void FreeSounds()
Definition: sound_id.cpp:156
CSample ** OneGroup
if it's only a simple sound
Definition: sound.h:115
union CSound::@34 Sound
single, group, or table of sounds.
If attacked.
Definition: sound.h:65
repairing
Definition: sound.h:70
Command completed.
Definition: sound.h:64
void MapSound(const std::string &sound_name, CSound *id)
Map sound to identifier.
Definition: sound_id.cpp:71