_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Go to the documentation of this file.
41 #include "SDL_mixer.h"
55 #define MaxSampleVolume 255
137 #define INFINITE_SOUND_RANGE 255
141 #define MAX_SOUND_RANGE 254
166 extern unsigned char CalculateVolume(
bool isVolume,
int power,
unsigned char range);
213 extern CSound *
MakeSound(
const std::string &sound_name,
const std::vector<std::string> &files);
227 #endif // !__SOUND_H__
void InitSoundClient()
Initialize client side of the sound layer.
Definition: sound.cpp:526
void SetSoundRange(CSound *sound, unsigned char range)
Modify the range of a given sound.
Definition: sound.cpp:453
@ VoiceDying
If attacked.
Definition: sound.h:66
Mix_Chunk * OneSound
Definition: sound.h:115
unsigned int Mapref
Definition: sound.h:107
SoundConfig NotEnoughRes[MAX_RACES][MaxCosts]
research complete message
Definition: sound.h:92
@ MaxCosts
resource 6
Definition: upgrade_structs.h:70
~CSound()
Definition: sound.cpp:594
void CallbackMusicDisable()
Skip the next music stopped callback invocation.
Definition: music.cpp:122
UnitVoiceGroup
Definition: sound.h:61
unsigned char Number
Range is a multiplier for DistanceSilent.
Definition: sound.h:113
union CSound::@38 Sound
single, group, or table of sounds.
const void * Base
Definition: sound.h:147
void CallbackMusicTrigger()
Turn music stopped callback on and trigger it immediately.
Definition: music.cpp:126
@ VoiceBuilding
only worker, work completed
Definition: sound.h:68
Definition: unitsound.h:54
@ VoiceBuild
Attack command.
Definition: sound.h:73
GameSound GameSounds
Definition: sound.cpp:57
@ VoiceReady
Acknowledge command.
Definition: sound.h:64
@ VoiceWorkCompleted
If killed.
Definition: sound.h:67
SoundConfig BuildingConstruction[MAX_RACES]
ship reaches coast
Definition: sound.h:87
@ VoiceHarvesting
repairing
Definition: sound.h:71
Mix_Chunk ** OneGroup
if it's only a simple sound
Definition: sound.h:116
void PlayUnitSound(const CUnit &unit, UnitVoiceGroup unit_voice_group, bool sampleUnique=false)
Play a unit sound.
Definition: sound.cpp:281
void InitMusic()
Initialize music.
Definition: music.cpp:109
SoundConfig NotEnoughFood[MAX_RACES]
not enough resources message
Definition: sound.h:93
unsigned char Range
Definition: sound.h:112
void MapSound(const std::string &sound_name, CSound *id)
Map sound to identifier.
Definition: sound_id.cpp:71
CSound * SoundForName(const std::string &sound_name)
Get the sound id bound to an identifier.
Definition: sound_id.cpp:88
int PlayFile(const std::string &name, LuaActionListener *listener=NULL)
Play a sound file.
Definition: sound.cpp:429
@ VoiceSelected
Definition: sound.h:62
@ VoiceHelpMe
Command completed.
Definition: sound.h:65
@ VoiceAcknowledging
If selected.
Definition: sound.h:63
@ VoiceAttack
harvesting
Definition: sound.h:72
int DistanceSilent
Game sound configuration.
Definition: sound.cpp:72
void PlayMissileSound(const Missile &missile, CSound *sound)
Play a missile sound.
Definition: sound.cpp:350
CSound * First
Definition: sound.h:118
SoundConfig PlacementSuccess[MAX_RACES]
used by ui
Definition: sound.h:84
SoundConfig PlacementError[MAX_RACES]
Definition: sound.h:83
CSound * Second
first group: selected sound
Definition: sound.h:119
struct CSound::@38::@39 TwoGroups
when it's a simple group
void CallbackMusicEnable()
Turn music stopped callback on.
Definition: music.cpp:118
CSound * RegisterSound(const std::vector< std::string > &files)
Register a sound (can be a simple sound or a group)
Definition: sound.cpp:472
CSound * RegisterTwoGroups(CSound *first, CSound *second)
Create a special sound group with two sounds.
Definition: sound.cpp:509
CSound * MakeSound(const std::string &sound_name, const std::vector< std::string > &files)
Make a sound bound to identifier.
Definition: sound_id.cpp:111
SoundConfig ResearchComplete[MAX_RACES]
chat message
Definition: sound.h:91
SoundConfig Click
used by ui
Definition: sound.h:85
void FreeSounds()
Definition: sound_id.cpp:156
@ VoiceRepairing
only for transport reaching coast
Definition: sound.h:70
SoundConfig WorkComplete[MAX_RACES]
building under construction
Definition: sound.h:88
CSound()
Definition: sound.h:102
void PlayGameSound(CSound *sound, unsigned char volume, bool always=false)
Play a game sound.
Definition: sound.cpp:380
SoundConfig ChatMessage
rescue units
Definition: sound.h:90
void SoundCclRegister()
register ccl features
Definition: script_sound.cpp:364
SoundConfig Docking
used by ui
Definition: sound.h:86
unsigned char CalculateVolume(bool isVolume, int power, unsigned char range)
Calculates volume level.
Definition: sound.cpp:251
constexpr unsigned char MAX_RACES
How many upgrades supported.
Definition: settings.h:65
unsigned Id
pointer on a Unit
Definition: sound.h:148
CSound * MakeSoundGroup(const std::string &name, CSound *first, CSound *second)
Make a sound group bound to identifier.
Definition: sound_id.cpp:140
@ VoiceDocking
only for building under construction
Definition: sound.h:69
SoundConfig Rescue[MAX_RACES]
building ready
Definition: sound.h:89
The big unit structure.
Definition: unit.h:135
Missile on the map.
Definition: missile.h:413
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.