Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!hemuli!tml From: tml@hemuli (Tor Lillqvist) Newsgroups: comp.windows.x Subject: Dragon Message-ID: <8905031837.AA07741@hemuli.atk.vtt.fi> Date: 3 May 89 18:37:01 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 46 I have installed ``dragon'' that recently appeared in comp.sources.x on an HP9000/840, displaying on an HP9000/318 running HP's product X11 server. The 318 is monochrome, but has window depth 8. The following patch was necessary to get dragon running: *** orig/main.c Tue May 2 17:35:29 1989 --- main.c Tue May 2 17:57:11 1989 *************** *** 169,176 **** { XImage ximage; Pixmap pix; ! pix = XCreatePixmap( display, d, width, height, 1 ); if (pix == (Pixmap)0) return (Pixmap)0; ximage.height = height; --- 169,179 ---- { XImage ximage; Pixmap pix; + XWindowAttributes wa; + + if (XGetWindowAttributes( display, d, &wa) == 0) return (Pixmap)0; ! pix = XCreatePixmap( display, d, width, height, wa.depth ); if (pix == (Pixmap)0) return (Pixmap)0; ximage.height = height; However, there is still something wrong. From reading the code, I assume that the program should hilight selected tiles by calling XFillPolygon with Xor_GC. I don't get any hilight... Also, I don't get any numbers in the corners of the bam, dot or crak tiles. The other texts are visible. An then, the game seems too simple... I mean, more or less randomly selecting tiles to remove with no strategy I ``win'' every time. Any clues? Tor Lillqvist Technical Research Centre of Finland, Computing Services (VTT/ATK) tml%hemuli.uucp@santra.hut.fi