2222#include "globals.h"
2323#include "bflib_basics.h"
2424#include "bflib_sound.h"
25+ #include "config_sounds.h"
2526
2627#include "bflib_math.h"
2728#include "thing_list.h"
@@ -676,7 +677,7 @@ long instf_dig(struct Thing *creatng, int32_t *param)
676677 }
677678 }
678679 check_map_explored (creatng , stl_x , stl_y );
679- thing_play_sample (creatng , 72 + SOUND_RANDOM (3 ), NORMAL_PITCH , 0 , 3 , 0 , 4 , FULL_LOUDNESS );
680+ thing_play_sample (creatng , snd_dig_impact + SOUND_RANDOM (snd_dig_impact_count ), NORMAL_PITCH , 0 , 3 , 0 , 4 , FULL_LOUDNESS );
680681 return 1 ;
681682}
682683
@@ -702,7 +703,7 @@ long instf_destroy(struct Thing *creatng, int32_t *param)
702703 {
703704 volume = FULL_LOUDNESS ;
704705 }
705- thing_play_sample (creatng , 5 + SOUND_RANDOM (2 ), 200 , 0 , 3 , 0 , 2 , volume );
706+ thing_play_sample (creatng , snd_foot_spur + SOUND_RANDOM (2 ), 200 , 0 , 3 , 0 , 2 , volume );
706707 return 0 ;
707708 }
708709 clear_dig_on_room_slabs (room , creatng -> owner );
@@ -717,7 +718,7 @@ long instf_destroy(struct Thing *creatng, int32_t *param)
717718 event_create_event_or_update_nearby_existing_event (ccor_x , ccor_y , EvKind_RoomLost , room -> owner , room -> kind );
718719 claim_enemy_room (room , creatng );
719720 }
720- thing_play_sample (creatng , 76 , NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
721+ thing_play_sample (creatng , snd_spell_stars , NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
721722 create_effects_on_room_slabs (room , imp_spangle_effects [get_player_color_idx (creatng -> owner )], 0 , creatng -> owner );
722723 return 0 ;
723724 }
@@ -728,7 +729,7 @@ long instf_destroy(struct Thing *creatng, int32_t *param)
728729 {
729730 volume = FULL_LOUDNESS ;
730731 }
731- thing_play_sample (creatng , 128 + SOUND_RANDOM (3 ), 200 , 0 , 3 , 0 , 2 , volume );
732+ thing_play_sample (creatng , snd_strike_wall + SOUND_RANDOM (snd_strike_wall_count ), 200 , 0 , 3 , 0 , 2 , volume );
732733 return 0 ;
733734 }
734735 if (prev_owner != game .neutral_player_num ) {
@@ -768,7 +769,7 @@ long instf_attack_room_slab(struct Thing *creatng, int32_t *param)
768769 {
769770 //TODO CONFIG damage made to room slabs is constant - doesn't look good
770771 slb -> health -= 2 ;
771- thing_play_sample (creatng , 128 + SOUND_RANDOM (3 ), NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
772+ thing_play_sample (creatng , snd_strike_wall + SOUND_RANDOM (snd_strike_wall_count ), NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
772773 return 1 ;
773774 }
774775 if (room -> owner != game .neutral_player_num )
@@ -787,7 +788,7 @@ long instf_attack_room_slab(struct Thing *creatng, int32_t *param)
787788 return 0 ;
788789 }
789790 create_effect (& creatng -> mappos , TngEff_Explosion3 , creatng -> owner );
790- thing_play_sample (creatng , 47 , NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
791+ thing_play_sample (creatng , snd_explode , NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
791792 if (z > 0 )
792793 {
793794 for (long k = 0 ; k < AROUND_TILES_COUNT ; k ++ )
@@ -822,9 +823,9 @@ long instf_damage_wall(struct Thing *creatng, int32_t *param)
822823 place_slab_type_on_map (SlbT_EARTH , stl_x , stl_y , creatng -> owner , 0 );
823824 do_slab_efficiency_alteration (slb_x , slb_y );
824825 create_dirt_rubble_for_dug_slab (slb_x , slb_y );
825- thing_play_sample (creatng , 73 , NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
826+ thing_play_sample (creatng , snd_dig_dirt , NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
826827 }
827- thing_play_sample (creatng , 63 + SOUND_RANDOM (6 ), NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
828+ thing_play_sample (creatng , snd_dig_spell + SOUND_RANDOM (snd_dig_spell_count ), NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
828829 return 1 ;
829830}
830831
@@ -1015,7 +1016,7 @@ long instf_pretty_path(struct Thing *creatng, int32_t *param)
10151016 MapSlabCoord slb_x = subtile_slab (creatng -> mappos .x .stl .num );
10161017 MapSlabCoord slb_y = subtile_slab (creatng -> mappos .y .stl .num );
10171018 create_effect (& creatng -> mappos , imp_spangle_effects [get_player_color_idx (creatng -> owner )], creatng -> owner );
1018- thing_play_sample (creatng , 76 , NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
1019+ thing_play_sample (creatng , snd_spell_stars , NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
10191020 place_slab_type_on_map (SlbT_CLAIMED , slab_subtile_center (slb_x ), slab_subtile_center (slb_y ), creatng -> owner , 1 );
10201021 do_unprettying (creatng -> owner , slb_x , slb_y );
10211022 do_slab_efficiency_alteration (slb_x , slb_y );
@@ -1039,7 +1040,7 @@ long instf_reinforce(struct Thing *creatng, int32_t *param)
10391040 if (cctrl -> digger .consecutive_reinforcements <= 25 )
10401041 {
10411042 cctrl -> digger .consecutive_reinforcements ++ ;
1042- if (!S3DEmitterIsPlayingSample (creatng -> snd_emitter_id , 63 , 0 ))
1043+ if (!S3DEmitterIsPlayingSample (creatng -> snd_emitter_id , 63 ))
10431044 {
10441045 struct PlayerInfo * player ;
10451046 player = get_my_player ();
@@ -1048,7 +1049,7 @@ long instf_reinforce(struct Thing *creatng, int32_t *param)
10481049 {
10491050 volume = FULL_LOUDNESS ;
10501051 }
1051- thing_play_sample (creatng , 1005 + SOUND_RANDOM (7 ), NORMAL_PITCH , 0 , 3 , 0 , 2 , volume );
1052+ thing_play_sample (creatng , snd_reinforce_hit + SOUND_RANDOM (snd_reinforce_hit_count ), NORMAL_PITCH , 0 , 3 , 0 , 2 , volume );
10521053 }
10531054 return 0 ;
10541055 }
@@ -1066,7 +1067,7 @@ long instf_reinforce(struct Thing *creatng, int32_t *param)
10661067 create_effect (& pos , imp_spangle_effects [get_player_color_idx (creatng -> owner )], creatng -> owner );
10671068 }
10681069 }
1069- thing_play_sample (creatng , 41 , NORMAL_PITCH , 0 , 3 , 0 , 3 , FULL_LOUDNESS );
1070+ thing_play_sample (creatng , snd_spell_wall , NORMAL_PITCH , 0 , 3 , 0 , 3 , FULL_LOUDNESS );
10701071 return 0 ;
10711072}
10721073
@@ -1087,7 +1088,7 @@ long instf_tunnel(struct Thing *creatng, int32_t *param)
10871088 if (slabmap_block_invalid (slb )) {
10881089 return 0 ;
10891090 }
1090- thing_play_sample (creatng , 69 + SOUND_RANDOM (3 ), NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
1091+ thing_play_sample (creatng , snd_tunnel_dig + SOUND_RANDOM (snd_tunnel_dig_count ), NORMAL_PITCH , 0 , 3 , 0 , 2 , FULL_LOUDNESS );
10911092 if (slb -> health > 1 ) {
10921093 slb -> health -- ;
10931094 } else {
0 commit comments