Francesco Potorti` writes: [...] > I have send a patch some time ago, which enables XPM (and PBM) for > gamegrid. (BTW what happend to this patch?) > > Would you send it to me? O.K. Attached. The diff is against the version of gamegrid.el that comes with Emacs 21.2. AFAICS there are some changes in the current CVS. Could this cause problems? I am not familiar with diff & patch. > I was just trying to do that. *hehehe* I was quicker. > I guess gamegrid is mainly supposed to provide simple grids, > i.e. colored squares. > > Yes, after some study I arrived to the same conclusion, so I further > reduced my patch to pong.el, tetris.el, snake.el before installing it. > > 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 > > Yes, for example pong could use a real ball. Oh, that's easy: (defvar pong-ball-glyph "/* XPM */ static char * ball_xpm[] = { \"16 16 4 1\", \" c Black\", \"+ c Red4\", \"- c Red1\", \". c Red\", \" ------ \", \" ---------- \", \" ----....--++ \", \" ---........+++ \", \" --..........++ \", \"---..........+++\", \"--............++\", \"--............++\", \"--............++\", \"--............++\", \"---..........+++\", \" --..........++ \", \" ---........+++ \", \" -+++....++++ \", \" ++++++++++ \", \" ++++++ \"};") (defvar pong-ball-options `(((glyph [xpm :data ,pong-ball-glyph]) (t ?\*)) ((color-x color-x) (mono-x grid-x) (color-tty color-tty)) (((glyph color-x) [1 0 0]) (color-tty pong-ball-color)))) This reveals, however, a problem with my patch: As I said, I use `display-images-p' and then `find-image' to get either XPM or PBM; the latter AFAIU is supposed to be always available if `display-images-p' returns t. This is o.k. for all games that come with Emacs. But it could lead to unexpected results for packages like sokoban.el or for pong if you add the image above: if an Emacs is compiled without support for XPM, there is no PBM as a fall-back. -- Oliver