;ELC   
;;; Compiled by rms@psilocin.ai.mit.edu on Tue Jun 16 12:47:20 1998
;;; from file /gd/gnu/emacs/lisp/play/gamegrid.el
;;; in Emacs version 20.2.95.2
;;; with bytecomp version 2.46
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`gamegrid.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@42 Non-nil means use glyphs when available.
(defvar gamegrid-use-glyphs t (#$ . 609))
#@41 Non-nil means use color when available.
(defvar gamegrid-use-color t (#$ . 698))
#@34 Name of the font used in X mode.
(defvar gamegrid-font "-*-courier-medium-r-*-*-*-140-100-75-*-*-iso8859-*" (#$ . 785))
(byte-code "\306\300!\204 \307\300	B\306\302!\204 \310\302	B\306\303!\204  \310\303	B\306\304!\204, \310\304	B\306\305!\2048 \307\305	B\306\311!\204E \307	\311	B\312	B\306\313!\204V \307\313	B\306\314!\204c \315\f\314	B\307\207" [gamegrid-display-options current-load-list gamegrid-buffer-width gamegrid-buffer-height gamegrid-blank gamegrid-timer boundp nil 0 gamegrid-display-mode gamegrid-display-table gamegrid-face-table gamegrid-buffer-start 1] 2)
#@31 Number of high scores to keep
(defvar gamegrid-score-file-length 50 (#$ . 1385))
(byte-code "\305\306!\210\305\307!\210\305\310!\210\305\311!\210\305\312!\210\305\313!\210\305\314!\210\305\315!\210\305\316!\210\305\317!\210\305\320!\210\305\321!\210\305\322!\210\323\300!\204< \324\300	B\323\302!\204H \324\302	B\323\303!\204T \324\303	B\325\304	B\324\207" [gamegrid-grid-x-face current-load-list gamegrid-mono-x-face gamegrid-mono-tty-face gamegrid-glyph-height make-variable-buffer-local gamegrid-use-glyphs gamegrid-use-color gamegrid-font gamegrid-display-options gamegrid-buffer-width gamegrid-buffer-height gamegrid-blank gamegrid-timer gamegrid-display-mode gamegrid-display-table gamegrid-face-table gamegrid-buffer-start gamegrid-score-file-length boundp nil 16] 2)
#@39 XPM format image used for each square
(defconst gamegrid-xpm "/* XPM */\nstatic char *noname[] = {\n/* width height ncolors chars_per_pixel */\n\"16 16 3 1\",\n/* colors */\n\"+ s col1\",\n\". s col2\",\n\"- s col3\",\n/* pixels */\n\"---------------+\",\n\"--------------++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"--............++\",\n\"-+++++++++++++++\",\n\"++++++++++++++++\"\n};\n" (#$ . 2174))
(defalias 'gamegrid-characterp #[(arg) "\301\302!\203\n \302!\207\250\207" [arg fboundp characterp] 2])
(put 'gamegrid-characterp 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'gamegrid-event-x #[(event) "\301\302!\203\n \302!\207\303\3048:\203 \304\202 \3058)!@\207" [event fboundp event-x posn-col-row 2 1] 3])
(put 'gamegrid-event-x 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'gamegrid-event-y #[(event) "\301\302!\203\n \302!\207\303\3048:\203 \304\202 \3058)!A\207" [event fboundp event-y posn-col-row 2 1] 3])
(put 'gamegrid-event-y 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'gamegrid-color #[(color shade) "\306\307_!\211\n\310H_	\n\311H_	\n\312H_\313\314\f$,\207" [shade v color r g b floor 255 0 1 2 format "#%02x%02x%02x"] 6])
(defalias 'gamegrid-set-font #[(face) "\205 \301\302\303\217\207" [gamegrid-font nil (set-face-font face gamegrid-font) (('error))] 3])
(defalias 'gamegrid-setup-face #[(face color) "\302	\"\210\303	\"\210\304!\210\305\306\307\217\210\305\310\311\217\207" [face color set-face-foreground set-face-background gamegrid-set-font nil (set-face-background-pixmap face [nothing]) (('error)) (set-face-background-pixmap face nil) (('error))] 3])
(defalias 'gamegrid-make-mono-tty-face #[nil "\301\302!\303\304\305\217\210)\207" [face make-face gamegrid-mono-tty-face nil (byte-code "\301\302\303#\207" [face set-face-property reverse t] 4) (('error))] 3])
(defalias 'gamegrid-make-color-tty-face #[(color) "\304\305\"\306\307\310	\"!\311\n!\312\"\210+\207" [color hex name face gamegrid-color 1.0 intern format "gamegrid-color-tty-face-%s" make-face gamegrid-setup-face] 4])
(defalias 'gamegrid-make-grid-x-face #[nil "\301\302!\303!\210)\207" [face make-face gamegrid-x-border-face gamegrid-set-font] 2])
(defalias 'gamegrid-make-mono-x-face #[nil "\302\303!\304\305!\204 \306\307 \236\243\310	\"\210	*\207" [color face make-face gamegrid-mono-x-face face-foreground default foreground-color frame-parameters gamegrid-setup-face] 3])
(defalias 'gamegrid-make-color-x-face #[(color) "\304\305\"\306\307\310	\"!\311\n!\312\304\313\"\"\210+\207" [color hex name face gamegrid-color 1.0 intern format "gamegrid-color-x-face-%s" make-face gamegrid-setup-face 1.0] 5])
(defalias 'gamegrid-make-face #[(data-spec-list color-spec-list) "\306!\306	!\211\307>\203 \310\n!\202S \311>\203% \f\204! \312 \f\202S \313>\2036 \2042 \314 \202S \315>\203B \316\n!\202S \317>\205S \204Q \320 *\207" [data-spec-list color-spec-list color data gamegrid-grid-x-face gamegrid-mono-x-face gamegrid-match-spec-list 'color-x gamegrid-make-color-x-face 'grid-x gamegrid-make-grid-x-face 'mono-x gamegrid-make-mono-x-face 'color-tty gamegrid-make-color-tty-face 'mono-tty gamegrid-make-mono-tty-face gamegrid-mono-tty-face] 4])
(defalias 'gamegrid-colorize-glyph #[(color) "\304\305\306	\n\307\310\311\"B\312\310\313\"B\314\310\315\"BE%!\207" [:data gamegrid-xpm :color-symbols color make-glyph vector xpm "col1" gamegrid-color 0.6 "col2" 0.8 "col3" 1.0] 12])
(defalias 'gamegrid-match-spec #[(spec) "@A@\211\304=\204# \n<\203 \n>\204# \n9\205$ \n=\205$ 	*\207" [spec value locale gamegrid-display-mode t] 3])
(defalias 'gamegrid-match-spec-list #[(spec-list) "\205 \301@!\206 \302A!\207" [spec-list gamegrid-match-spec gamegrid-match-spec-list] 2])
(defalias 'gamegrid-make-glyph #[(data-spec-list color-spec-list) "\305!\305	!\211\306\307!\203 \307\f!\202 \f\250)\203\" \310!\2027 \311=\203. \312\n!\2027 \313!\2057 \314!*\207" [data-spec-list color-spec-list color data arg gamegrid-match-spec-list fboundp characterp vector colorize gamegrid-colorize-glyph vectorp make-glyph] 4])
(defalias 'gamegrid-color-display-p #[nil "\300\301!\203 \301\302 !\303=\207\304\305 \236\243\303=\207" [fboundp device-class selected-device color display-type frame-parameters] 2])
(defalias 'gamegrid-display-type #[nil "\304\305!\203 \305 \206\f \n\203 	\203 \306\307!\203 \310\202P \2030 	\2030 \311 \2030 \312\202P 	\2038 \313\202P \203E \311 \203E \314\202P \304\315!\203O \316\202P \317)\207" [window-system window-system-p gamegrid-use-glyphs gamegrid-use-color fboundp console-on-window-system-p featurep xpm glyph gamegrid-color-display-p color-x mono-x color-tty set-face-property mono-tty emacs-tty] 2])
(defalias 'gamegrid-set-display-table #[nil "\303\304!\203 \305	p\306\307%\207	\211\207" [current-display-table gamegrid-display-table buffer-display-table fboundp specifierp add-spec-to-specifier nil remove-locale] 6])
(defalias 'gamegrid-hide-cursor #[nil "\301\302!\205 \303\304p#\207" [text-cursor-visible-p fboundp specifierp set-specifier nil] 4])
(defalias 'gamegrid-setup-default-font #[nil "\306=\205a \307\310\311\"\312	!\313\314\314\315X\203B \fH\316!\203: \317!\2036 W\2039 ))\fT\211\202 )\205` \320	!V\205` \321\n!\211\205` \322	\np#\210\202G +\207" [gamegrid-display-mode font-spec name max-height c gamegrid-display-table glyph face-property default font font-name nil 0 255 glyphp glyph-height font-height x-find-smaller-font add-spec-to-specifier height] 4])
(defalias 'gamegrid-initialize-display #[nil "\306 \307 \310\311\312\"\313\313\314X\203@ \fH\315@AA@\"\316A@AA@\"\nI\210	I\210+T\211\202 )\317 \210\320 \210\321 \207" [gamegrid-display-mode gamegrid-display-table gamegrid-face-table c gamegrid-display-options spec gamegrid-display-type make-display-table make-vector 256 nil 0 255 gamegrid-make-glyph gamegrid-make-face gamegrid-setup-default-font gamegrid-set-display-table gamegrid-hide-cursor glyph face] 4])
(defalias 'gamegrid-set-face #[(c) "\303=?\205 \304`S`\305	\nH$\207" [gamegrid-display-mode gamegrid-face-table c glyph put-text-property face] 6])
(defalias 'gamegrid-cell-offset #[(x y) "	T\n_\\\\\207" [gamegrid-buffer-start gamegrid-buffer-width y x] 3])
(defalias 'gamegrid-get-cell #[(x y) "\302	\"f\207" [x y gamegrid-cell-offset] 3])
(defalias 'gamegrid-set-cell #[(x y c) "\212\304\305	\n\"b\210\306\307!\210\310\307\"\210\311!*\207" [buffer-read-only x y c nil gamegrid-cell-offset delete-char 1 insert-char gamegrid-set-face] 3])
(defalias 'gamegrid-init-buffer #[(width height blank) "\n\306\f\"\307P\310\f\311 \210`\n\312W\2030 \313\f!\210T\211\202 *eb*\207" [width gamegrid-buffer-width height gamegrid-buffer-height blank buffer-read-only make-string "\n" nil erase-buffer 0 insert-string line gamegrid-buffer-start i #1=#:--dotimes-temp--48822] 3])
(defalias 'gamegrid-init #[(options) "\304\304\n\305p!\210\306 \207" [buffer-read-only truncate-lines options gamegrid-display-options t buffer-disable-undo gamegrid-initialize-display] 2])
(defalias 'gamegrid-start-timer #[(period func) "\303\304!\203 \305\306	\211\307\310p&\202 \311	\211p$\211\207" [func period gamegrid-timer featurep itimer start-itimer "Gamegrid" nil t run-with-timer] 8])
(defalias 'gamegrid-set-timer #[(delay) "\205 \302\303!\203 \304	\"\207\305\211\306H\307H\310HE	#\207" [gamegrid-timer delay featurep itimer set-itimer-restart timer-set-time 1 2 3] 6])
(defalias 'gamegrid-kill-timer #[nil "\203 \301\302!\203 \303!\210\202 \304\305\306#\210\306\211\207" [gamegrid-timer featurep itimer delete-itimer timer-set-time (0 0 0) nil] 4])
#@47 Add the current score to the high score file.
(defalias 'gamegrid-add-score #[(file score) "\212\305!\210\306db\210\307\310\n\311 \312 \313\303!\203 \303 \202' \314\303!\203& \202' \315%c\210\316\317ed#\210\320ed\"\210\321\fT!\210`d|\210\322\323 )\207" [file buffer-read-only score user-mail-address gamegrid-score-file-length find-file-other-window nil format "%05d	%s	%s <%s>\n" current-time-string user-full-name fboundp boundp "" sort-numeric-fields 1 reverse-region goto-line t save-buffer] 7 (#$ . 10116)])
(provide 'gamegrid)
