home *** CD-ROM | disk | FTP | other *** search
- ;; Copyright 1995 Crack dot Com, All Rights reserved
- ;; See licensing information for more details on usage rights
-
- ;; Bobby, samples should be 8 bit mono playing 11025 Hz
-
- (defun sfxdir (filename) (concatenate 'string "sfx/" filename))
-
- (defun newsfx (filename) (concatenate 'string "addon/craig/" filename))
-
- (def_sound 'MMM_BEER (newsfx "mbeer.wav"))
-
- (setq LOGO_SND (def_sound (newsfx "alrighty.wav")))
-
- (setq NEW_SOUNDS (make-array 5 :initial-contents (list
- (def_sound (newsfx "foghorn.wav")) ;; 0
- (def_sound (newsfx "asskick.wav")) ;; 1
- (def_sound (newsfx "cool.wav")) ;; 2
- (def_sound (newsfx "alrighty.wav")) ;; 3
- MMM_BEER ;; 4
- )))
-
- (defun new_sound_ct ()
- (if (> (aitype) 4)
- (set_aitype 0)
- (play_sound (aref NEW_SOUNDS (aitype)))))
-
- (defun new_sound_ai ()
- (if (activated)
- (if (eq (aistate) 0)
- (progn
- (play_sound (aref NEW_SOUNDS (aitype)) (yvel) (x) (y))
- (set_aistate (+ (xvel) (random (+ 1 (xacel)))))
- (> (xvel) 0))
- (progn
- (set_aistate (- (aistate) 1))
- T))
- (progn
- (set_aistate 0)
- T)))
-
-
- (defun news_cons ()
- (set_xvel 100) ;; delay time to 100
- (set_yvel 127)) ;; set volume default to 127
-
- (def_char NEW_SOUND
- (funs (ai_fun new_sound_ai)
- (draw_fun dev_draw)
- (constructor news_cons)
- (type_change_fun new_sound_ct))
- (range 500 500)
- (fields ("aitype" "sound # (0-4)")
- ("yvel" "volume (0-127)")
- ("xvel" "repeat delay (0=no repeat)")
- ("xacel" "random delay (0=none)"))
- (states "art/misc.spe"
- (stopped "sfx_player")))
-
-
-
-
-
-
-
-
-
-
-
-
-
-