summaryrefslogtreecommitdiff
path: root/chess-sound.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-15 05:40:38 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-15 05:40:38 +0000
commitef7c29d679c6aaf8dda55772e65800097c46f163 (patch)
tree543f39f09bfaa6d44606804c18babff26470d4f8 /chess-sound.el
parent6fbcc92505250d896b5d408483822b115bc614c7 (diff)
*** no comment ***
Diffstat (limited to 'chess-sound.el')
-rw-r--r--chess-sound.el14
1 files changed, 4 insertions, 10 deletions
diff --git a/chess-sound.el b/chess-sound.el
index 8761f1d..1740261 100644
--- a/chess-sound.el
+++ b/chess-sound.el
@@ -51,25 +51,19 @@
(apply 'call-process chess-sound-program
nil nil nil (append chess-sound-args (list file))))
-(defun chess-sound-handler (event &rest args)
- "This display module presents a standard chessboard.
-See `chess-display-type' for the different kinds of displays."
+(defun chess-sound-handler (game event &rest args)
(cond
((eq event 'initialize)
- (kill-buffer (current-buffer))
- (set-buffer (generate-new-buffer " *chess-sound*"))
(and (file-directory-p chess-sound-directory)
(file-readable-p (expand-file-name "move.wav"
chess-sound-directory))
(or (eq chess-sound-play-function 'play-sound-file)
- (file-executable-p chess-sound-program))
- (current-buffer)))
+ (file-executable-p chess-sound-program))))
((eq event 'move)
- (let* ((ply (chess-game-ply chess-display-game
- (1- (chess-game-index chess-display-game))))
+ (let* ((ply (chess-game-ply game (1- (chess-game-index game))))
(pos (chess-ply-pos ply)))
- (if (eq (chess-game-data chess-display-game 'my-color)
+ (if (eq (chess-game-data game 'my-color)
(chess-pos-side-to-move pos))
(if chess-sound-my-moves
(chess-sound "move"))