anderson@cme-durer.ARPA (William E. Anderson) (11/14/88)
I recently installed X windows, version 11, release 3 on my color Sun 3/160 running SunOs 3.5. I am totally new to X windows as I am sure will be apparent. I was able to get xwanderer running after changing some font names in icon.c. However, the colors (green foreground on a yellowish-green background) make it nearly impossible to see what is going on. I added code in m.c to set a default color map but to no avail: xswa.colormap = DefaultColormap(dpy,scr); XChangeWindowAttributes(dpy,win,(CWColormap), &xswa); Where are these colors coming from? Is there some way of setting then before xwanderer is invoked? Any help would be appreciated. NAME: William E. Anderson TELE: (301) 975-2423 USMAIL: National Bureau of Standards ARPA: anderson@ceee.nbs.gov Rm. B-344, Bldg. 220 UUCP: uunet!cme-durer!anderson Gaithersburg, MD 20899 -- NAME: William E. Anderson TELE: (301) 975-2423 USMAIL: National Bureau of Standards ARPA: anderson@ceee.nbs.gov Rm. B-344, Bldg. 220 UUCP: uunet!cme-durer!anderson Gaithersburg, MD 20899
keith@EXPO.LCS.MIT.EDU (Keith Packard) (11/15/88)
xwanderer uses colors 0 and 1 for foreground/background as it simply creates GC's with XCreateGC without specifying the appropriate colors. On many displays, colors 0 and 1 are writable, and frequently not white and black. On my display, they ended up using my normal foreground/background colors (sheer coincidence) and I thought xwanderer was using the resource manager... This is a trivial fix, simply add code like: build_pixmaps () { ... + XGCValues gcv; ... + gcv.foreground = WhitePixel (dpy, DefaultScreen (dpy)); + gcv.background = BlackPixel (dpy, DefaultScreen (dpy)); /* build all of the GC's here too! */ ! foogc = XCreateGC (dpy, win, GCForeground|GCBackground, &gcv) Actually, I've made these and other changes to xwanderer, like converting the icons into a font, which speeds up the display of the map quite a bit, while making startup time also faster. Sort of a win-win situation. It would also enable one to create different font sets for different display resolutions, and do lots of fun stuff with that. If there is any interest, I can make the diffs availible for anonymous ftp...
nobody@tekecs.TEK.COM (-for inetd server command) (11/16/88)
In article <722@sunspot.cme-durer.ARPA> anderson@cme-durer.ARPA (William E. Anderson) writes: >I recently installed X windows, version 11, release 3 on my >color Sun 3/160 running SunOs 3.5. I am totally new to X windows >as I am sure will be apparent. I was able to get xwanderer >running after changing some font names in icon.c. However, the >colors (green foreground on a yellowish-green background) make >it nearly impossible to see what is going on. > >I added code in m.c to set a default color map but to no avail: > > xswa.colormap = DefaultColormap(dpy,scr); > XChangeWindowAttributes(dpy,win,(CWColormap), &xswa); > >Where are these colors coming from? Is there some way of setting >then before xwanderer is invoked? Any help would be appreciated. I encountered the same problem. As best I can remember (I didn't save the original files), file icon.c used WhitePixel and BlackPixel, but then wrote to the screen using GXinvert mode. I have a four-plane color machine where BlackPixel = 0 and WhitePixel = 1. When these values are inverted, I get 15 and 14, a not-very-usable color combination. I think the author was trying to use this mode to switch black to white and white to black. The proper way to do this (I believe) is to create two GC's, one with white/black and the other with black/white (for fg/bg). Use the inverted GC (with GXcopy mode) where you might normally think of using GXinvert mode. This will produce the proper effect on both black-and-white and color displays. This is what I did to fix xwanderer. -- antoniof@af.GWD.TEK.COM -- antoniof@af x2433
koe@kivax.UUCP (Diana Koehler) (05/13/91)
Hello, Some times ago I have seen a game called "xwanderer". Can someone tell me how I can get the sources of that game. I don't have access to anonymious ftp. Thanks for advance. Diana ------------------------------------------------------------------------ Diana Koehler Tel.: +49 7721 867034 Digital Kienzle Computersysteme Abt. 011.2 e-mail: koe@kivax.UUCP Postfach 1640 ..!mcsun!unido!kivax!koe D-7730 VS-Villingen ..!uunet!unido!kivax!koe