summaryrefslogtreecommitdiff
path: root/chess-images.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-08 09:01:59 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-08 09:01:59 +0000
commit51cf0ef745fe30a34b6072ef6ca4d3ae6f8b90c0 (patch)
tree6b993c27a31721272051d4974292afba58e0f4fb /chess-images.el
parent110d1880915bf26b13a8309419a67bf272b34d4d (diff)
*** no comment ***
Diffstat (limited to 'chess-images.el')
-rw-r--r--chess-images.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/chess-images.el b/chess-images.el
index 87ccf81..bbb4bb1 100644
--- a/chess-images.el
+++ b/chess-images.el
@@ -176,7 +176,7 @@ that specialized squares may be used such as marble tiles, etc."
(chess-images-popup-board))
(let* ((inhibit-redisplay t)
(board (chess-display-position nil))
- (inverted (null chess-display-perspective))
+ (inverted (not (chess-display-perspective nil)))
(rank (if inverted 7 0))
(file (if inverted 7 0))
(pos (point)) new beg)
@@ -229,10 +229,13 @@ Common modes are:
`unselected' show that the piece has been unselected."
(if (null (get-buffer-window (current-buffer) t))
(chess-images-popup-board))
- (let* ((pos (save-excursion
+ (let* ((inverted (not (chess-display-perspective nil)))
+ (pos (save-excursion
(goto-char (point-min))
- (goto-line (1+ (chess-index-rank index)))
- (forward-char (* 2 (chess-index-file index)))
+ (let ((rank (chess-index-rank index))
+ (file (chess-index-file index)))
+ (goto-line (1+ (if inverted (- 7 rank) rank)))
+ (forward-char (* 2 (if inverted (- 7 file) file))))
(point)))
(highlight (copy-alist (get-text-property pos 'display))))
(setcar (last highlight)