]> code.delx.au - gnu-emacs-elpa/commitdiff
*** no comment ***
authorJohn Wiegley <johnw@newartisans.com>
Wed, 10 Apr 2002 01:21:36 +0000 (01:21 +0000)
committerJohn Wiegley <johnw@newartisans.com>
Wed, 10 Apr 2002 01:21:36 +0000 (01:21 +0000)
chess-display.el
chess-engine.el
chess-images.el

index 92f25c7d7bb5bfd437efe861f3882b2635815aa9..4fe35de1901d15e35fd40f2b62b46c2e489575ef 100644 (file)
     (chess-display-update new-display t)
     new-display))
 
-(defun chess-display-destroy (display)
-  "Destroy a chess display object, killing all of its buffers."
-  (let ((buf (or display (current-buffer))))
-    (when (buffer-live-p buf)
-      (chess-display-event-handler (chess-display-game nil)
-                                  buf 'destroy)
-      (kill-buffer buf))))
-
 (defsubst chess-display-style (display)
   (chess-with-current-buffer display
     chess-display-style))
@@ -328,6 +320,14 @@ that is supported by most displays, and is the default mode."
   (chess-with-current-buffer display
     (setq chess-display-no-popup t)))
 
+(defun chess-display-destroy (display)
+  "Destroy a chess display object, killing all of its buffers."
+  (let ((buf (or display (current-buffer))))
+    (when (buffer-live-p buf)
+      (chess-display-event-handler (chess-display-game nil)
+                                  buf 'destroy)
+      (kill-buffer buf))))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; Event handler
index b4249fef401fb76807e99183915bc0524f0ab13b..0644ed2044dacc3d51da04a5e236d92e00a7d189 100644 (file)
@@ -81,7 +81,7 @@
 
      ((eq event 'pass)
       (if (and (chess-game-get-data (chess-engine-game nil) 'active)
-              (= (chess-game-index game) 0))
+              (= (chess-game-index (chess-engine-game nil)) 0))
          (message "Your opponent has passed the first move to you"))
       t)
 
index 6a202d570254f861b1eb96e9d5a604214f0dd933..3c7bae0a55f25a31213a352c58c407bae30571c5 100644 (file)
@@ -280,14 +280,8 @@ Common modes are:
            (setq chess-images-size (car sizes)
                  chess-images-cache nil
                  sizes nil)
-           (chess-images-draw)
-           (if chess-images-separate-frame
-               (let* ((size (float (+ (* (or chess-images-border-width 0) 8)
-                                      (* chess-images-size 8))))
-                      (max-char-height (ceiling (/ size (frame-char-height))))
-                      (max-char-width  (ceiling (/ size (frame-char-width)))))
-                 (set-frame-size (selected-frame) max-char-width
-                                 (+ max-char-height 2)))))
+           ;; jww (2002-04-09): need to create a new frame here!
+           (chess-display-update nil))
        (setq sizes (cdr sizes))))))
 
 (defun chess-images-increase-size ()