From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.devel Subject: Re: gamegrid.el and some games Date: Fri, 13 Sep 2002 16:16:02 +0200 Organization: Olymp Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1031920699 16182 127.0.0.1 (13 Sep 2002 12:38:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 13 Sep 2002 12:38:19 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17ppiE-0004Cs-00 for ; Fri, 13 Sep 2002 14:38:18 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17pqK6-0004ay-00 for ; Fri, 13 Sep 2002 15:17:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17ppiL-0007hC-00; Fri, 13 Sep 2002 08:38:25 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17ppgS-0007UP-00 for emacs-devel@gnu.org; Fri, 13 Sep 2002 08:36:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17ppgQ-0007S9-00 for emacs-devel@gnu.org; Fri, 13 Sep 2002 08:36:27 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17ppgP-0007RS-00 for emacs-devel@gnu.org; Fri, 13 Sep 2002 08:36:25 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 17ppgB-00046t-00 for ; Fri, 13 Sep 2002 14:36:11 +0200 Original-To: emacs-devel@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 17ppgB-00046k-00 for ; Fri, 13 Sep 2002 14:36:11 +0200 Original-Path: hermes!nobody Original-Lines: 57 Original-NNTP-Posting-Host: dialin-145-254-191-237.arcor-ip.net Original-X-Trace: main.gmane.org 1031920571 15790 145.254.191.237 (13 Sep 2002 12:36:11 GMT) Original-X-Complaints-To: usenet@main.gmane.org Original-NNTP-Posting-Date: Fri, 13 Sep 2002 12:36:11 +0000 (UTC) X-Operating-System: Linux from Scratch X-Attribution: os X-Face: "HgH2sgK|bfH$;PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) Cancel-Lock: sha1:foT5QkTZYRAyiSGijAZsl+d/Ysk= Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7880 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7880 Francesco Potorti` writes: > I am resending here, hoping to find a bigger audience, a message I had > sent (by error) to emacs-pretest-bug. > > 1) why > (featurep 'xpm) => nil > even though in config.h I have #define HAVE_XPM 1 ? Is this a bug? > Or maybe it is a Xemacs thing? It is an XEmacs thing. To test for XPM in Emacs you can use. (image-type-available-p 'xpm) I don't know if it is depreciated to use this function, though. It is not even mentioned in the Elisp Reference of Emacs 21.2. I have send a patch some time ago, which enables XPM (and PBM) for gamegrid. (BTW what happend to this patch?) It uses `display-images-p' and `find-image' to get the appropriate graphics. [...] > As you can see, foreground and background are set to the same > colour, thus preventing the possibility of anything different > from a coloured space. Is this intentional or a bug? What I > would have done is to have a function with a third optional > argument for the case when one wants something different from a > square. For example, both in pong.el and tetris.el, the "dot" > should naturally be an asterisk. [...] I guess gamegrid is mainly supposed to provide simple grids, i.e. colored squares. The option to use characters is -- I guess -- intended only as a fallback on ttys without color. OTOH: it allows to utilize arbitrary XPM images ... A simple optional third argument won't do AFAICS, because gamegrid is supposed to work through the definition of a spec list for all cases. You can get a non-colored asterisk for pong by changing the specs for the ball like this: (setq pong-ball-options '(((glyph colorize) (t ?\*)) ((color-x emacs-tty) ;; ^^^^^^^^ (mono-x grid-x) (color-tty emacs-tty)) ;; ^^^^^^^^^ (((glyph color-x) [1 0 0]) (color-tty pong-ball-color)))) -- Oliver -- 27 Fructidor an 210 de la Révolution Liberté, Egalité, Fraternité!