1;; Copyright 1995 Crack dot Com, All Rights reserved 2;; See licensing information for more details on usage rights 3 4;; Bobby, samples should be 8 bit mono playing 11025 Hz 5 6(defun sfxdir (filename) (concatenate 'string "sfx/" filename)) 7 8;; steel ball bounce 9(def_sound 'SBALL_SND (sfxdir "ball01.wav")) 10 11;; flying sound 12(def_sound 'FLY_SND (sfxdir "fly03.wav")) 13 14;; speed sound 15(def_sound 'SPEED_SND (sfxdir "speed02.wav")) 16 17(setq LOW_HEALTH_SND SPEED_SND) 18 19;; laser hitting somehting it can't kill 20(def_sound 'LPING_SND (sfxdir "lasrmis2.wav")) 21 22;; light saber - should be short 23(def_sound 'LSABER_SND (sfxdir "plasma02.wav")) 24 25;; when you save at a console 26(def_sound 'SAVE_SND (sfxdir "save05.wav")) 27 28;; end level 29(def_sound 'END_LEV_SND (sfxdir "endlvl02.wav")) 30 31;; plasma weapon 32(def_sound 'PLASMA_SND (sfxdir "plasma03.wav")) 33 34;; spring 35(def_sound 'SPRING_SOUND (sfxdir "spring03.wav")) 36 37;; health up sound 38(def_sound 'HEALTH_UP_SND (sfxdir "health01.wav")) 39 40;; door sliding up 41(def_sound 'DOOR_UP (sfxdir "doorup01.wav")) 42 43;; door sliding up 44(def_sound 'DOOR_DOWN (sfxdir "doorup02.wav")) 45 46;; bomb count-down tick 47(def_sound 'TICK_SND (sfxdir "timerfst.wav")) 48 49(setq PLAYER_PAIN (make-array 4 :initial-contents 50 (list (def_sound (sfxdir "plpain01.wav")) 51 (def_sound (sfxdir "plpain02.wav")) 52 (def_sound (sfxdir "plpain04.wav")) 53 (def_sound (sfxdir "plpain10.wav"))))) 54 55(setq PLAYER_DEATH (make-array 4 :initial-contents 56 (list (def_sound (sfxdir "pldeth02.wav")) 57 (def_sound (sfxdir "pldeth04.wav")) 58 (def_sound (sfxdir "pldeth05.wav")) 59 (def_sound (sfxdir "pldeth07.wav"))))) 60 61 62;; jugger stomp 63(def_sound 'JSTOMP_SND (sfxdir "blkfoot4.wav")) 64 65;; hiding wall disappear sound 66(def_sound 'HWALL_SND (sfxdir "blkfoot4.wav")) 67 68;; firebomb sound 69(def_sound 'FIREBOMB_SND (sfxdir "firebmb1.wav")) 70 71 72;; force field 73(def_sound 'FF_SND (sfxdir "force01.wav")) 74 75;; flying robot sound 76(def_sound 'FLYER_SND (sfxdir "robot02.wav")) 77 78;; cleaner sound 79(def_sound 'CLEANER_SND (sfxdir "cleaner.wav")) 80 81;; shotgun/laser taking from the lava sample 82(def_sound 'ZAP_SND (sfxdir "zap2.wav")) 83 84;; rocket launch sound 85(def_sound 'ROCKET_LAUNCH_SND (sfxdir "rocket02.wav")) 86 87;; platform de-acel 88(def_sound 'PLAT_D_SND (sfxdir "eledec01.wav")) 89 90;; platform acel 91(def_sound 'PLAT_A_SND (sfxdir "eleacc01.wav")) 92 93 94;; machine gun hitting the floor, sounds 1 & 2, played randomly 95(def_sound 'MG_HIT_SND1 (sfxdir "mghit01.wav")) 96(def_sound 'MG_HIT_SND2 (sfxdir "mghit02.wav")) 97 98;; enemy mounted gun firing 99(def_sound 'MGUN_SND (sfxdir "ammo02.wav")) 100 101;; planet explode sound 102(def_sound 'P_EXPLODE_SND (sfxdir "poof06.wav")) 103 104;; space ship zipping by 105(def_sound 'SHIP_ZIP_SND (sfxdir "zap3.wav")) 106 107;; grenade explosion 108(def_sound 'GRENADE_SND (sfxdir "grenad01.wav")) 109 110;; opening door 111(def_sound 'SWISH (sfxdir "swish01.wav")) 112 113;; sound of player going through a teleporter, not grinding 114(def_sound 'TELEPORTER_SND (sfxdir "telept01.wav")) 115 116;; blowing something up 117(def_sound 'BLOWN_UP (sfxdir "grenad01.wav")) 118 119;; get a "treasure"/ammo noise 120(def_sound 'AMMO_SND (sfxdir "ammo01.wav")) 121 122;; lava shooting up sound 123(def_sound 'LAVA_SND (sfxdir "lava01.wav")) 124 125;; sound of a switch being flipped 126(def_sound 'SWITCH_SND (sfxdir "switch01.wav")) 127 128;; sound of grenade being thrown 129(def_sound 'GRENADE_THROW (sfxdir "throw01.wav")) 130 131;; electricity shooting up from the ground 132(def_sound 'ELECTRIC_SND (sfxdir "elect02.wav")) 133 134;; rocket being fired 135(def_sound 'ROCKET_SND (sfxdir "rocket02.wav")) 136 137;; alien landing on the ground 138(def_sound 'ALAND_SND (sfxdir "aland01.wav")) 139 140;; alien slash/bite noise 141(def_sound 'ASLASH_SND (sfxdir "aslash01.wav")) 142 143;; light fading on 144(def_sound 'FADEON_SND (sfxdir "fadeon01.wav")) 145 146;; block crumbling 147(def_sound 'CRUMBLE_SND (sfxdir "crmble01.wav")) 148 149;; aliean screaming 150(def_sound 'ASCREAM_SND (sfxdir "alien01.wav")) 151 152;; alien pain sound 153(def_sound 'APAIN_SND (sfxdir "ahit01.wav")) 154 155;; small alien death 156(setq ASML_DEATH (make-array 2 :initial-contents 157 (list (def_sound (sfxdir "adie05.wav")) 158 (def_sound (sfxdir "poof05.wav"))))) 159 160;; large alien death 161(setq ALRG_DEATH (make-array 3 :initial-contents 162 (list (def_sound (sfxdir "adie02.wav")) 163 (def_sound (sfxdir "adie03.wav")) 164 (def_sound (sfxdir "poof05.wav"))))) 165 166 167 168(setq APPEAR_SND (def_sound (sfxdir "amb16.wav"))) ;; 14 169(setq TAUNT_SND (def_sound (sfxdir "amb07.wav"))) ;; 15 170(setq SPACE_SND (def_sound (sfxdir "ambcave1.wav"))) ;; 3 171(setq SCARE_SND (def_sound (sfxdir "amb10.wav"))) ;; 16 172 173(setq A_SCREAMS (make-array 3 :initial-contents (list 174 (def_sound (sfxdir "scream02.wav")) ;; 8 175 (def_sound (sfxdir "scream03.wav")) ;; 9 176 (def_sound (sfxdir "scream08.wav"))))) ;; 10 177 178 179;; out side of game sounds 180 181(setq BUTTON_PRESS_SND (def_sound (sfxdir "button02.wav"))) 182(setq LOGO_SND (def_sound (sfxdir "logo09.wav"))) 183(setq DEL_OBJECT_SND (def_sound (sfxdir "delobj01.wav"))) 184(setq LINK_OBJECT_SND (def_sound (sfxdir "link01.wav"))) 185 186 187(setq AMB_SOUNDS (make-array 17 :initial-contents (list 188 (def_sound (sfxdir "ambtech1.wav")) ;; 0 189 (def_sound (sfxdir "ambtech2.wav")) ;; 1 190 (def_sound (sfxdir "ambtech3.wav")) ;; 2 191 SPACE_SND ;; 3 192 (def_sound (sfxdir "ambcave2.wav")) ;; 4 193 (def_sound (sfxdir "ambcave3.wav")) ;; 5 194 (def_sound (sfxdir "ambcave4.wav")) ;; 6 195 (def_sound (sfxdir "ambfrst2.wav")) ;; 7 196 (aref A_SCREAMS 0) ;; 8 197 (aref A_SCREAMS 1) ;; 9 198 (aref A_SCREAMS 2) ;; 10 199 (def_sound (sfxdir "adie03.wav")) ;; 11 200 (def_sound (sfxdir "amb11.wav")) ;; 12 201 (def_sound (sfxdir "amb13.wav")) ;; 13 202 APPEAR_SND ;; 14 203 TAUNT_SND ;; 15 204 SCARE_SND ;; 16 205 ))) 206 207;; XXX: Mac Abuse uses voice hint SFXs 208;(setq voice_hints 209; (make-array 12 :initial-contents 210; (list 211; (def_sound "sfx/voice/aimsave.wav") 212; (def_sound "sfx/voice/ammosave.wav") 213; (def_sound "sfx/voice/switch_1.wav") 214; (def_sound "sfx/voice/savesave.wav") 215; (def_sound "sfx/voice/platfo_1.wav") 216; (def_sound "sfx/voice/poweru_1.wav") 217; (def_sound "sfx/voice/weapon_1.wav") 218; (def_sound "sfx/voice/ladder_1.wav") 219; (def_sound "sfx/voice/starts_1.wav") 220; (def_sound "sfx/voice/wallss_1.wav") 221; (def_sound "sfx/voice/switch_2.wav") 222; (def_sound "sfx/voice/telepo_1.wav")))) 223 224 225(defun amb_sound_ct () 226 (if (> (aitype) 16) 227 (set_aitype 0) 228 (play_sound (aref AMB_SOUNDS (aitype))))) 229 230(defun amb_sound_ai () 231 (if (activated) 232 (if (eq (aistate) 0) 233 (progn 234 (play_sound (aref AMB_SOUNDS (aitype)) (yvel) (x) (y)) 235 (set_aistate (+ (xvel) (random (+ 1 (xacel))))) 236 (> (xvel) 0)) 237 (progn 238 (set_aistate (- (aistate) 1)) 239 T)) 240 (progn 241 (set_aistate 0) 242 T))) 243 244 245(defun ambs_cons () 246 (set_xvel 100) ;; delay time to 100 247 (set_yvel 127)) ;; set volume default to 127 248 249(def_char AMBIENT_SOUND 250 (funs (ai_fun amb_sound_ai) 251 (draw_fun dev_draw) 252 (constructor ambs_cons) 253 (type_change_fun amb_sound_ct)) 254 (range 500 500) 255 (fields ("aitype" amb_num) 256 ("yvel" amb_vol) 257 ("xvel" amb_rep) 258 ("xacel" amb_rand)) 259 (states "art/misc.spe" 260 (stopped "sfx_player"))) 261 262(setq song_list '("music/abuse01.hmi" "music/abuse02.hmi")) 263(setq current_song song_list) 264 265(defun next_song () 266 (if current_song 267 (progn 268 (play_song (car current_song)) 269 (break) 270 (setq current_song (cdr current_song)) 271 (if (not current_song) 272 (setq current_song song_list)) 273 (break) 274 ))) 275 276 277(defun level_loaded (name) 278 (trace) 279 (if (search "levels/level" name) ; is this one of the regular levels? 280 (progn 281 (stop_song) ; stop playing the old song 282 (select (substr 12 13 name) 283 ("00" (play_song "music/abuse01.hmi")) 284 ("01" (play_song "music/abuse02.hmi")) 285 ("02" (play_song "music/abuse04.hmi")) 286 ("03" (play_song "music/abuse07.hmi")) 287 ("04" (play_song "music/abuse08.hmi")) 288 ("05" (play_song "music/abuse10.hmi")) 289 ("06" (play_song "music/indst1.hmi")) 290 ("07" (play_song "music/indst2.hmi")) 291 ("08" (play_song "music/indst3.hmi")) 292 ("09" (play_song "music/indst4.hmi")) 293 ("10" (play_song "music/indst5.hmi")) 294 ("11" (play_song "music/abuse07.hmi")) 295 ("12" (play_song "music/abuse08.hmi")) 296 ("13" (play_song "music/abuse10.hmi")) 297 ("14" (play_song "music/indst1.hmi")) 298 ("15" (play_song "music/indst2.hmi")) 299 ("16" (play_song "music/indst3.hmi")) 300 ("17" (play_song "music/indst4.hmi")) 301 ("18" (play_song "music/indst5.hmi"))))) 302 (untrace) 303 (break)) 304 305 306 307