src/sound_effects.c File Reference

#include "sound.h"

Go to the source code of this file.

Functions

void CrySound (void)
void play_open_chest_sound (void)
void Play_Spell_ForceToEnergy_Sound ()
void Play_Spell_DetectItems_Sound ()
void No_Ammo_Sound (void)
void Not_Enough_Power_Sound (void)
void Not_Enough_Dist_Sound (void)
void Not_Enough_Mana_Sound (void)
void PlayGreetingSound (int SoundCode)
void play_death_sound_for_bot (enemy *ThisRobot)
void play_attack_animation_sound_for_bot (enemy *ThisRobot)
void play_enter_attack_run_state_sound (int SoundCode)
void play_item_sound (int item_type)
void CantCarrySound (void)
void TransferSound (void)
void Mission_Status_Change_Sound (void)
void teleport_arrival_sound (void)
void healing_spell_sound (void)
void application_requirements_not_met_sound (void)
void GotHitSound (void)
void tux_scream_sound (void)
void MenuItemSelectedSound (void)
void MenuItemDeselectedSound (void)
void MoveMenuPositionSound (void)
void ThouArtDefeatedSound (void)
void play_melee_weapon_hit_something_sound (void)
void play_melee_weapon_missed_sound (void)
void Fire_Bullet_Sound (int BulletType)
void Takeover_Set_Capsule_Sound (void)
void Takeover_Game_Won_Sound (void)
void Takeover_Game_Deadlock_Sound (void)
void Takeover_Game_Lost_Sound (void)
void BounceSound (void)
void DruidBlastSound (void)
void ExterminatorBlastSound (void)
void PlayLevelCommentSound (int levelnum)
void PlayEnemyGotHitSound (int enemytype)
void BulletReflectedSound (void)


Function Documentation

void application_requirements_not_met_sound ( void   ) 

Some items, that can be applied inside the running game, like e.g. spellbooks, do have a certain character stat requirement. If that stat requirement isn't met, a sound will be played, which uses this function.

Definition at line 469 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by ApplyItem().

void BounceSound ( void   ) 

Definition at line 700 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

void BulletReflectedSound ( void   ) 

This function plays a sound of a bullet being reflected. It is only used, when a bullets is compensated by the tux armour.

Definition at line 772 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by apply_bullet_damage_to_player().

void CantCarrySound ( void   ) 

This function generates a voice output stating that the influencer can't carry any more right now. Also this function will see to it, that the sentence is not repeated until 4 seconds after the previous cant-carry-sentence have passed.

Definition at line 396 of file sound_effects.c.

References FALSE, MyRandom(), and play_sample_using_WAV_cache().

Referenced by AddFloorItemDirectlyToInventory(), and place_item_on_this_position_if_you_can().

void CrySound ( void   ) 

============================================ EFFECTS ============================================

Definition at line 34 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by blit_tux().

void DruidBlastSound ( void   ) 

Definition at line 710 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by StartBlast().

void ExterminatorBlastSound ( void   ) 

Definition at line 719 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by StartBlast().

void Fire_Bullet_Sound ( int  BulletType  ) 

This function should generate the sound that belongs to a certain (ranged) weapon. This does not include the Tux swinging/swinging_and_hit sounds, when Tux is using melee weapons, but it does include ranged weapons and the non-animated bot weapons too.

Definition at line 614 of file sound_effects.c.

References DebugPrintf(), EXTERMINATOR, FALSE, FLASH, LASER_AXE, LASER_RIFLE, LASER_SWORD_1, LASER_SWORD_2, MILITARY, PLASMA_PISTOL, play_melee_weapon_missed_sound(), play_sample_using_WAV_cache(), PULSE, SINGLE_LASER, SINGLE_PULSE, and sound_on.

Referenced by PerformTuxAttackRaw(), and RawStartEnemysShot().

void GotHitSound ( void   ) 

Definition at line 477 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

void healing_spell_sound ( void   ) 

When the Tux casts a healing spell, this sound will be played.

Definition at line 458 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

void MenuItemDeselectedSound ( void   ) 

Definition at line 530 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by DoMenuSelection().

void MenuItemSelectedSound ( void   ) 

We add a matching group of sounds here for the menu movements. It's a 'ping-ping' sound, well, not super, but where do we get a better one?

Definition at line 524 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by DoMenuSelection().

void Mission_Status_Change_Sound ( void   ) 

Definition at line 438 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by AssignMission(), CheckIfMissionIsComplete(), and ExecuteChatExtra().

void MoveMenuPositionSound ( void   ) 

void No_Ammo_Sound ( void   ) 

This function plays a voice sample, stating that not enough power (strength) is available to use a certain item. The sample must of course only be played, if it hasn't been played just milliseconds before, so a check is made to see that the file is played with at least a certain interval in between to the last occasion of the file being played.

Definition at line 68 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by tux_wants_to_attack_now(), and TuxReloadWeapon().

void Not_Enough_Dist_Sound ( void   ) 

This function plays a voice sample, stating that not enough power distribution (dexterity) is available to use a certain item. The sample must of course only be played, if it hasn't been played just milliseconds before, so a check is made to see that the file is played with at least a certain interval in between to the last occasion of the file being played.

Definition at line 116 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by ItemUsageRequirementsMet().

void Not_Enough_Mana_Sound ( void   ) 

This function plays a voice sample, stating that not enough magical energy (force) is available to cast a certain spell. The sample must of course only be played, if it hasn't been played just milliseconds before, so a check is made to see that the file is played with at least a certain interval in between to the last occasion of the file being played.

Definition at line 141 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

void Not_Enough_Power_Sound ( void   ) 

This function plays a voice sample, stating that not enough power (strength) is available to use a certain item. The sample must of course only be played, if it hasn't been played just milliseconds before, so a check is made to see that the file is played with at least a certain interval in between to the last occasion of the file being played.

Definition at line 91 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by ItemUsageRequirementsMet().

void play_attack_animation_sound_for_bot ( enemy ThisRobot  ) 

Whenever a bot dies, that should create a dying sound. But so far, this will be done only for fully animated bots, since the other bots just explode and that has a sound of it's own.

Definition at line 271 of file sound_effects.c.

References druidspec_s::droid_attack_animation_sound_file_name, Druidmap, FALSE, PlayOnceNeededSoundSample(), and enemy_s::type.

void play_death_sound_for_bot ( enemy ThisRobot  ) 

Whenever a bot dies, that should create a dying sound. But so far, this will be done only for fully animated bots, since the other bots just explode and that has a sound of it's own.

Definition at line 243 of file sound_effects.c.

References druidspec_s::droid_death_sound_file_name, Druidmap, FALSE, play_sample_using_WAV_cache(), and enemy_s::type.

Referenced by kill_enemy().

void play_enter_attack_run_state_sound ( int  SoundCode  ) 

Whenever a bot starts to attack the Tux, he'll issue the attack cry. This is done here, and no respect to loading time issues for now...

Definition at line 298 of file sound_effects.c.

References DebugPrintf(), FALSE, MyRandom(), and PlayOnceNeededSoundSample().

Referenced by PerformTuxAttackRaw(), and state_machine_stop_and_eye_target().

void play_item_sound ( int  item_type  ) 

Whenever an item is placed or taken, we'll issue a sound attached to that item.

Definition at line 366 of file sound_effects.c.

References ErrorMessage(), FALSE, IS_FATAL, ItemMap, PlayOnceNeededSoundSample(), PLEASE_INFORM, and TRUE.

Referenced by AddFloorItemDirectlyToInventory(), ApplyItem(), CopyItem(), DropItemAt(), HandleInventoryScreen(), raw_move_picked_up_item_to_entry(), TryToPutItem(), and TryToTakeItem().

void play_melee_weapon_hit_something_sound ( void   ) 

When the Tux makes a weapon swing, this will either cause a swinging sound and then a 'hit' sound or it will just be a swinging sound. The following functions do this, also creating some variation in the choice of sample used.

Definition at line 563 of file sound_effects.c.

References FALSE, MyRandom(), and play_sample_using_WAV_cache().

Referenced by PerformTuxAttackRaw().

void play_melee_weapon_missed_sound ( void   ) 

Definition at line 585 of file sound_effects.c.

References FALSE, MyRandom(), and play_sample_using_WAV_cache().

Referenced by Fire_Bullet_Sound(), and PerformTuxAttackRaw().

void play_open_chest_sound ( void   ) 

Definition at line 40 of file sound_effects.c.

References FALSE, PlayOnceNeededSoundSample(), and TRUE.

Referenced by throw_out_all_chest_content().

void Play_Spell_DetectItems_Sound ( void   ) 

Definition at line 52 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

void Play_Spell_ForceToEnergy_Sound ( void   ) 

Definition at line 46 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by ApplyItem(), and handle_player_identification_command().

void PlayEnemyGotHitSound ( int  enemytype  ) 

Whenever an enemy is hit by the tux with a melee weapon, then the following sound is played...

Definition at line 750 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by hit_enemy().

void PlayGreetingSound ( int  SoundCode  ) 

Whenever the Tux meets someone in the game for the very first time, this enemy or friend will issue the first-time greeting. Depending on whether that is typically a hostile unit or not, we play the corresponding sound from preloaded memory or, if there is no combat to expect, by loading it freshly from disk and then forgeting about it again.

Definition at line 165 of file sound_effects.c.

References DebugPrintf(), ERR, FALSE, play_sample_using_WAV_cache(), and Terminate().

Referenced by state_machine_stop_and_eye_target().

void PlayLevelCommentSound ( int  levelnum  ) 

Definition at line 729 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by Teleport().

void Takeover_Game_Deadlock_Sound ( void   ) 

Definition at line 683 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by Takeover().

void Takeover_Game_Lost_Sound ( void   ) 

Definition at line 689 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by Takeover().

void Takeover_Game_Won_Sound ( void   ) 

Definition at line 677 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by check_for_new_experience_level_reached(), and Takeover().

void Takeover_Set_Capsule_Sound ( void   ) 

For the takeover game, there are 4 main sounds. We handle them from the cache, even if that might also be possible as 'once_needed' type sound samples...

Definition at line 671 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by AdvancedEnemyTakeoverMovements(), EnemyMovements(), and PlayGame().

void teleport_arrival_sound ( void   ) 

When the Tux uses the 'teleport home' spell, this sound will be played.

Definition at line 448 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

Referenced by Teleport(), and TeleportHome().

void ThouArtDefeatedSound ( void   ) 

Definition at line 548 of file sound_effects.c.

References FALSE, PlayOnceNeededSoundSample(), and sound_on.

Referenced by ThouArtDefeated().

void TransferSound ( void   ) 

Definition at line 427 of file sound_effects.c.

References FALSE, and play_sample_using_WAV_cache().

void tux_scream_sound ( void   ) 

Whenever the Tux gets hit, we *might* play a sound sample for the hit, depending on random results. Since we don't want to hear the same sound sample all the time, there is a selection of possible files one of which will be selected at random.

Definition at line 491 of file sound_effects.c.

References FALSE, MyRandom(), and play_sample_using_WAV_cache().

Referenced by apply_bullet_damage_to_player(), and DoMeleeDamage().


Generated on Mon Apr 28 21:58:00 2008 for FreedroidRPG by  doxygen 1.5.5