From 3243731044b944673630b55e16674c191b026f84 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Thu, 10 Sep 2009 23:29:20 -0400 Subject: [PATCH] http://www.jwz.org/xscreensaver/xscreensaver-5.10.tar.gz -rw-r--r-- 1 zblaxell zblaxell 5561162 Sep 8 00:55 xscreensaver-5.10.tar.gz d8379928de2e6e86cc7b17d75150daafe57e93c4 xscreensaver-5.10.tar.gz --- OSX/._SaverTester.m | Bin 173 -> 0 bytes OSX/._XScreenSaverView.m | Bin 170 -> 0 bytes OSX/._osxgrabscreen.m | Bin 170 -> 0 bytes OSX/SaverTester.plist | 4 +- OSX/XScreenSaver.plist | 4 +- OSX/XScreenSaverView.m | 7 +- OSX/bindist.rtf | 2 +- OSX/jwxyz.h | 6 +- OSX/jwxyz.m | 61 ++++-- OSX/osxgrabscreen.m | 75 ++++++- README | 5 +- README.hacking | 2 +- driver/Makefile.in | 2 + driver/XScreenSaver.ad.in | 6 +- driver/XScreenSaver_ad.h | 2 - hacks/._fps.c | Bin 170 -> 0 bytes hacks/Makefile.in | 19 +- hacks/abstractile.c | 9 +- hacks/ant.man | 96 +++++++++ hacks/bubbles.man | 140 +++++++++++++ hacks/check-configs.pl | 6 +- hacks/config/README | 4 +- hacks/config/ant.xml | 3 + hacks/config/bubbles.xml | 5 +- hacks/config/critical.xml | 3 + hacks/config/flag.xml | 3 + hacks/config/forest.xml | 3 + hacks/config/glforestfire.xml | 3 + hacks/config/hyperball.xml | 7 +- hacks/config/hypercube.xml | 6 +- hacks/config/hypertorus.xml | 25 +-- hacks/config/juggle.xml | 3 +- hacks/config/laser.xml | 3 + hacks/config/lightning.xml | 3 + hacks/config/lisa.xml | 3 + hacks/config/lissie.xml | 3 + hacks/config/lmorph.xml | 3 + hacks/config/mismunch.xml | 40 ++++ hacks/config/polytopes.xml | 21 +- hacks/config/rotor.xml | 3 + hacks/config/sphere.xml | 3 + hacks/config/spiral.xml | 3 + hacks/config/t3d.xml | 3 + hacks/config/vines.xml | 3 + hacks/config/whirlygig.xml | 3 + hacks/config/worm.xml | 3 + hacks/critical.man | 94 +++++++++ hacks/flag.man | 92 +++++++++ hacks/forest.man | 62 ++++++ hacks/glx/Makefile.in | 3 +- hacks/glx/glforestfire.man | 130 ++++++++++++ hacks/glx/hypertorus.c | 276 ++++++++++++++----------- hacks/glx/juggler3d.c | 7 +- hacks/glx/polytopes.c | 238 +++++++++++++-------- hacks/glx/polytopes.man | 2 +- hacks/juggle.man | 181 ++++++++++++++++ hacks/laser.man | 68 ++++++ hacks/lightning.man | 62 ++++++ hacks/lisa.man | 71 +++++++ hacks/lissie.man | 69 +++++++ hacks/lmorph.man | 65 ++++++ hacks/maze.c | 5 + hacks/munge-ad.pl | 22 +- hacks/rotor.man | 68 ++++++ hacks/sphere.man | 62 ++++++ hacks/spiral.man | 71 +++++++ hacks/t3d.man | 131 ++++++++++++ hacks/vines.man | 66 ++++++ hacks/whirlygig.man | 137 ++++++++++++ hacks/worm.man | 65 ++++++ hacks/xsublim.man | 91 ++++++++ po/POTFILES.in | 3 +- po/de.po | 2 +- setup.com | 2 - utils/version.h | 2 +- xscreensaver.spec | 2 +- xscreensaver.xcodeproj/project.pbxproj | 149 +++++++------ 77 files changed, 2507 insertions(+), 399 deletions(-) delete mode 100644 OSX/._SaverTester.m delete mode 100644 OSX/._XScreenSaverView.m delete mode 100644 OSX/._osxgrabscreen.m delete mode 100644 hacks/._fps.c create mode 100644 hacks/ant.man create mode 100644 hacks/bubbles.man create mode 100644 hacks/config/mismunch.xml create mode 100644 hacks/critical.man create mode 100644 hacks/flag.man create mode 100644 hacks/forest.man create mode 100644 hacks/glx/glforestfire.man create mode 100644 hacks/juggle.man create mode 100644 hacks/laser.man create mode 100644 hacks/lightning.man create mode 100644 hacks/lisa.man create mode 100644 hacks/lissie.man create mode 100644 hacks/lmorph.man create mode 100644 hacks/rotor.man create mode 100644 hacks/sphere.man create mode 100644 hacks/spiral.man create mode 100644 hacks/t3d.man create mode 100644 hacks/vines.man create mode 100644 hacks/whirlygig.man create mode 100644 hacks/worm.man create mode 100644 hacks/xsublim.man diff --git a/OSX/._SaverTester.m b/OSX/._SaverTester.m deleted file mode 100644 index dae644c95bc3fa2a50e5dbe595d664cbd66896c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 173 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aWxQw_-lcf2;dkJ62w^dZxc`{NXHx? z7DUs=h!7V~&d=3LEGWoH)eA|jC~?h8&QHnAO9v__&&*57FE7?LG%_`^HZ-y@007G8 B7vTT^ diff --git a/OSX/._XScreenSaverView.m b/OSX/._XScreenSaverView.m deleted file mode 100644 index 5e2d01f4693fa7622a0fa6c3181b85cd2d56495b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 170 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aRm^A_^W`J2;dkJ62w^V@(QRFq+<>c y^Py>DM2L$g=jZAr78K;9>V>3Ml(^<4=ci=mr2`dY7U%0)SeRPs8d{qg8Up}LiWSiS diff --git a/OSX/._osxgrabscreen.m b/OSX/._osxgrabscreen.m deleted file mode 100644 index bf488b2164b7fd18409534c059b3e7f580243935..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 170 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aRm^A_^W`J2;dkJ62w>^CCFBundlePackageType APPL CFBundleShortVersionString - 5.09 + 5.10 CFBundleSignature ???? CFBundleVersion - 5.09 + 5.10 LSMinimumSystemVersion 10.4 NSMainNibFile diff --git a/OSX/XScreenSaver.plist b/OSX/XScreenSaver.plist index c3f76020..d78b9c62 100644 --- a/OSX/XScreenSaver.plist +++ b/OSX/XScreenSaver.plist @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 5.09 + 5.10 CFBundleSignature ???? CFBundleVersion - 5.09 + 5.10 LSMinimumSystemVersion 10.4 NSMainNibFile diff --git a/OSX/XScreenSaverView.m b/OSX/XScreenSaverView.m index 528c4f6c..d483c888 100644 --- a/OSX/XScreenSaverView.m +++ b/OSX/XScreenSaverView.m @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 2006, 2007 Jamie Zawinski +/* xscreensaver, Copyright (c) 2006-2009 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -81,7 +81,8 @@ int mono_p = 0; perror ("putenv"); abort(); } -// free (npath); // Oops, don't free this! putenv() does not copy it! + + /* Don't free (npath) -- MacOS's putenv() does not copy it. */ } @@ -101,7 +102,7 @@ int mono_p = 0; perror ("putenv"); abort(); } - free (env); + /* Don't free (env) -- MacOS's putenv() does not copy it. */ } diff --git a/OSX/bindist.rtf b/OSX/bindist.rtf index df0a9209..05e5323e 100644 --- a/OSX/bindist.rtf +++ b/OSX/bindist.rtf @@ -15,7 +15,7 @@ XScreenSaver \f1\b0 \ by Jamie Zawinski \uc0\u8232 and many others\ \ -version 5.09 \uc0\u8232 03-Sep-2009\ +version 5.10 \uc0\u8232 07-Sep-2009\ \ {\field{\*\fldinst{HYPERLINK "http://www.jwz.org/xscreensaver/"}}{\fldrslt \cf2 \ul \ulc2 http://www.jwz.org/xscreensaver/}}\ \pard\pardeftab720\li720 diff --git a/OSX/jwxyz.h b/OSX/jwxyz.h index 966a40fa..e12e3a28 100644 --- a/OSX/jwxyz.h +++ b/OSX/jwxyz.h @@ -357,8 +357,10 @@ extern Pixmap XCreatePixmapFromBitmapData (Display *, Drawable, unsigned int depth); extern XPixmapFormatValues *XListPixmapFormats (Display *, int *count_ret); -extern void jwxyz_draw_NSImage (Display *, Drawable, void *NSImage_arg, - XRectangle *geom_ret, int exif_rotation); +extern void jwxyz_draw_NSImage_or_CGImage (Display *, Drawable, + Bool nsimg_p, void *NSImage_arg, + XRectangle *geom_ret, + int exif_rotation); extern int XSetGraphicsExposures (Display *, GC, Bool); extern Bool XTranslateCoordinates (Display *, Window src_w, Window dest_w, diff --git a/OSX/jwxyz.m b/OSX/jwxyz.m index 37290ecf..724ac5fe 100644 --- a/OSX/jwxyz.m +++ b/OSX/jwxyz.m @@ -113,6 +113,7 @@ jwxyz_make_display (void *nsview_arg) // w->cgc = [[[view window] graphicsContext] graphicsPort]; w->cgc = 0; w->window.view = view; + CFRetain (w->window.view); // needed for garbage collection? w->window.background = BlackPixel(0,0); d->main_window = w; @@ -1629,6 +1630,7 @@ XGetImage (Display *dpy, Drawable d, int x, int y, if (d->type == PIXMAP) { depth = d->pixmap.depth; + alpha_first_p = 1; // we created it with kCGImageAlphaNoneSkipFirst. ibpp = CGBitmapContextGetBitsPerPixel (d->cgc); ibpl = CGBitmapContextGetBytesPerRow (d->cgc); data = CGBitmapContextGetData (d->cgc); @@ -1785,22 +1787,35 @@ exif_rotate (int rot, CGSize rect) void -jwxyz_draw_NSImage (Display *dpy, Drawable d, void *nsimg_arg, - XRectangle *geom_ret, int exif_rotation) +jwxyz_draw_NSImage_or_CGImage (Display *dpy, Drawable d, + Bool nsimg_p, void *img_arg, + XRectangle *geom_ret, int exif_rotation) { - NSImage *nsimg = (NSImage *) nsimg_arg; + CGImageRef cgi; + CGImageSourceRef cgsrc; + NSSize imgr; + + if (nsimg_p) { + + NSImage *nsimg = (NSImage *) img_arg; + imgr = [nsimg size]; + + // convert the NSImage to a CGImage via the toll-free-bridging + // of NSData and CFData... + // + NSData *nsdata = [NSBitmapImageRep + TIFFRepresentationOfImageRepsInArray: + [nsimg representations]]; + CFDataRef cfdata = (CFDataRef) nsdata; + cgsrc = CGImageSourceCreateWithData (cfdata, NULL); + cgi = CGImageSourceCreateImageAtIndex (cgsrc, 0, NULL); + + } else { + cgi = (CGImageRef) img_arg; + imgr.width = CGImageGetWidth (cgi); + imgr.height = CGImageGetHeight (cgi); + } - // convert the NSImage to a CGImage via the toll-free-bridging - // of NSData and CFData... - // - NSData *nsdata = [NSBitmapImageRep - TIFFRepresentationOfImageRepsInArray: - [nsimg representations]]; - CFDataRef cfdata = (CFDataRef) nsdata; - CGImageSourceRef cgsrc = CGImageSourceCreateWithData (cfdata, NULL); - CGImageRef cgi = CGImageSourceCreateImageAtIndex (cgsrc, 0, NULL); - - NSSize imgr = [nsimg size]; Bool rot_p = (exif_rotation >= 5); if (rot_p) @@ -1846,8 +1861,10 @@ jwxyz_draw_NSImage (Display *dpy, Drawable d, void *nsimg_arg, CGContextDrawImage (d->cgc, dst2, cgi); CGContextRestoreGState (d->cgc); - CFRelease (cgsrc); - CGImageRelease (cgi); + if (nsimg_p) { + CFRelease (cgsrc); + CGImageRelease (cgi); + } if (geom_ret) { geom_ret->x = dst.origin.x; @@ -2013,6 +2030,14 @@ query_font (Font fid) NSTextStorage *ts = [[NSTextStorage alloc] initWithString:nsstr]; [ts setFont:fid->nsfont]; NSLayoutManager *lm = [[NSLayoutManager alloc] init]; + + /* Without this, the layout manager ends up on a queue somewhere and is + referenced again after we return to the command loop. Since we don't + use this layout manager again, by that time it may have been garbage + collected, and we crash. Setting this seems to cause `lm' to no + longer be referenced once we exit this block. */ + [lm setBackgroundLayoutEnabled:NO]; + NSTextContainer *tc = [[NSTextContainer alloc] init]; [lm addTextContainer:tc]; [tc release]; // lm retains tc @@ -2341,6 +2366,7 @@ XLoadFont (Display *dpy, const char *name) NSLog(@"no NSFont for \"%s\"", name); abort(); } + CFRetain (fid->nsfont); // needed for garbage collection? //NSLog(@"parsed \"%s\" to %s %.1f", name, fid->ps_name, fid->size); @@ -2369,6 +2395,7 @@ XUnloadFont (Display *dpy, Font fid) // They're probably not very big... // // [fid->nsfont release]; + // CFRelease (fid->nsfont); free (fid); return 0; @@ -2409,6 +2436,7 @@ XSetFont (Display *dpy, GC gc, Font fid) XUnloadFont (dpy, gc->gcv.font); gc->gcv.font = copy_font (fid); [gc->gcv.font->nsfont retain]; + CFRetain (gc->gcv.font->nsfont); // needed for garbage collection? return 0; } @@ -2458,6 +2486,7 @@ set_font (CGContextRef cgc, GC gc) font = XLoadFont (0, 0); gc->gcv.font = font; [gc->gcv.font->nsfont retain]; + CFRetain (gc->gcv.font->nsfont); // needed for garbage collection? } CGContextSelectFont (cgc, font->ps_name, font->size, kCGEncodingMacRoman); CGContextSetTextMatrix (cgc, CGAffineTransformIdentity); diff --git a/OSX/osxgrabscreen.m b/OSX/osxgrabscreen.m index c636754d..2c7fc8b9 100644 --- a/OSX/osxgrabscreen.m +++ b/OSX/osxgrabscreen.m @@ -22,6 +22,16 @@ #import "usleep.h" +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 + + /* 10.4 code. + + This version of the code works on 10.4, but is flaky. There is + a better way to do it on 10.5 and newer, but taking this path, + then we are being compiled against the 10.4 SDK instead of the + 10.5 SDK, and the newer API is not available to us. + */ + static void copy_framebuffer_to_ximage (CGDirectDisplayID cgdpy, XImage *xim, int window_x, int window_y) @@ -117,18 +127,18 @@ void osx_grab_desktop_image (Screen *screen, Window xwindow, Drawable drawable) { Display *dpy = DisplayOfScreen (screen); - XWindowAttributes xgwa; NSView *nsview = jwxyz_window_view (xwindow); NSWindow *nswindow = [nsview window]; + XWindowAttributes xgwa; int window_x, window_y; Window unused; - // figure out where this window is on the screen + // Figure out where this window is on the screen. // XGetWindowAttributes (dpy, xwindow, &xgwa); XTranslateCoordinates (dpy, xwindow, RootWindowOfScreen (screen), 0, 0, &window_x, &window_y, &unused); - + // Use the size of the Drawable, not the Window. { Window r; @@ -208,6 +218,60 @@ osx_grab_desktop_image (Screen *screen, Window xwindow, Drawable drawable) } +#else /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 + + 10.5+ code. + + This version of the code is simpler and more reliable, but + uses an API that only exist on 10.5 and newer, so we can only + use it if when being compiled against the 10.5 SDK or later. + */ + +/* Loads an image into the Drawable, returning once the image is loaded. + */ +void +osx_grab_desktop_image (Screen *screen, Window xwindow, Drawable drawable) +{ + Display *dpy = DisplayOfScreen (screen); + NSView *nsview = jwxyz_window_view (xwindow); + XWindowAttributes xgwa; + int window_x, window_y; + Window unused; + + // Figure out where this window is on the screen. + // + XGetWindowAttributes (dpy, xwindow, &xgwa); + XTranslateCoordinates (dpy, xwindow, RootWindowOfScreen (screen), 0, 0, + &window_x, &window_y, &unused); + + // Grab only the rectangle of the screen underlying this window. + // + CGRect cgrect; + cgrect.origin.x = window_x; + cgrect.origin.y = window_y; + cgrect.size.width = xgwa.width; + cgrect.size.height = xgwa.height; + + // Grab a screen shot of those windows below this one + // (hey, X11 can't do that!) + // + CGImageRef img = + CGWindowListCreateImage (cgrect, + kCGWindowListOptionOnScreenBelowWindow, + [[nsview window] windowNumber], + kCGWindowImageDefault); + + // Render the grabbed CGImage into the Drawable. + if (img) { + jwxyz_draw_NSImage_or_CGImage (DisplayOfScreen (screen), drawable, + False, img, NULL, 0); + CGImageRelease (img); + } +} + +#endif /* 10.5+ code */ + + /* Returns the EXIF rotation property of the image, if any. */ static int @@ -250,8 +314,9 @@ osx_load_image_file (Screen *screen, Window xwindow, Drawable drawable, if (!img) return False; - jwxyz_draw_NSImage (DisplayOfScreen (screen), drawable, img, geom_ret, - exif_rotation (filename)); + jwxyz_draw_NSImage_or_CGImage (DisplayOfScreen (screen), drawable, + True, img, geom_ret, + exif_rotation (filename)); [img release]; return True; } diff --git a/README b/README index 82edc809..a322d833 100644 --- a/README +++ b/README @@ -25,7 +25,7 @@ To compile on a Unix system with X11: To compile on MacOS X: - Use the included XCode project. Requires XCode 2.4 and MacOS X 10.4.0 + Use the included XCode project. Requires XCode 3.1 and MacOS X 10.4.0 or newer. Interested in writing a new screen saver? @@ -38,6 +38,9 @@ XScreenSaver has an extensive manual -- please read it! =============================================================================== +Changes since 5.09: * Fixed some crashes and color problems on MacOS 10.6. + * Retired `hypercube' and `hyperball', which are + redundant with `polytopes'. Changes since 5.08: * Ported to MacOS 10.6, including various 64-bit fixes. * New hack, `rubikblocks'. * Fixed another potential RANDR crash. diff --git a/README.hacking b/README.hacking index 72489a2d..9be7b88d 100644 --- a/README.hacking +++ b/README.hacking @@ -161,7 +161,7 @@ The MacOS X Port To compile on MacOS, use the XCode project included in the source distribution. You shouldn't need to have X11 installed, and shouldn't - need to run "configure" first. MacOS 10.4.0 and XCode 2.5 or newer are + need to run "configure" first. MacOS 10.4.0 and XCode 3.1 or newer are required. ========================================================================== diff --git a/driver/Makefile.in b/driver/Makefile.in index a6348f1c..19ed4673 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -797,6 +797,8 @@ xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS) demo-Gtk.o: XScreenSaver_ad.h demo-Xm.o: XScreenSaver_Xm_ad.h +xscreensaver.o: XScreenSaver_ad.h +xscreensaver-getimage.o: XScreenSaver_ad.h xscreensaver-getimage: $(GETIMG_OBJS) $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index 12ca54f2..ec6dfdc6 100644 --- a/driver/XScreenSaver.ad.in +++ b/driver/XScreenSaver.ad.in @@ -4,8 +4,8 @@ ! a screen saver and locker for the X window system ! by Jamie Zawinski ! -! version 5.09 -! 03-Sep-2009 +! version 5.10 +! 07-Sep-2009 ! ! See "man xscreensaver" for more info. The latest version is always ! available at http://www.jwz.org/xscreensaver/ @@ -158,7 +158,6 @@ GetViewPortIsFullOfLies: False greynetic -root \n\ helix -root \n\ hopalong -root \n\ -- hypercube -root \n\ imsmap -root \n\ - noseguy -root \n\ - pyro -root \n\ @@ -242,7 +241,6 @@ GetViewPortIsFullOfLies: False xflame -root \n\ xmatrix -root \n\ @GL_KLUDGE@ GL: gflux -root \n\ -- hyperball -root \n\ - nerverot -root \n\ xrayswarm -root \n\ xspirograph -root \n\ diff --git a/driver/XScreenSaver_ad.h b/driver/XScreenSaver_ad.h index d08c1816..2c3c2537 100644 --- a/driver/XScreenSaver_ad.h +++ b/driver/XScreenSaver_ad.h @@ -57,7 +57,6 @@ greynetic -root \\n\ helix -root \\n\ hopalong -root \\n\ -- hypercube -root \\n\ imsmap -root \\n\ - noseguy -root \\n\ - pyro -root \\n\ @@ -141,7 +140,6 @@ xflame -root \\n\ xmatrix -root \\n\ GL: gflux -root \\n\ -- hyperball -root \\n\ - nerverot -root \\n\ xrayswarm -root \\n\ xspirograph -root \\n\ diff --git a/hacks/._fps.c b/hacks/._fps.c deleted file mode 100644 index ebffbac9a5d91b8bc2b0f86807a10f944bea5a29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 170 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aRm^A_^W`J2;dkJ62w^dryr;kq+<>c y^Py>DM2L$g=jZAr78K;9>V>3Ml(^<4=ci=mr2`dY7U%0)SeRPs8d{qg8Up}oq!ujz diff --git a/hacks/Makefile.in b/hacks/Makefile.in index cf9b7411..59da01dc 100644 --- a/hacks/Makefile.in +++ b/hacks/Makefile.in @@ -154,7 +154,7 @@ OBJS = attraction.o blitspin.o bouboule.o braid.o bubbles.o \ EXES = attraction blitspin bouboule braid decayscreen deco \ drift flame galaxy grav greynetic halo \ - helix hopalong hypercube ifs imsmap julia kaleidescope \ + helix hopalong ifs imsmap julia kaleidescope \ maze moire noseguy pedal \ penrose pyro qix rocks rorschach sierpinski slidescreen \ slip strange swirl goop starfish munch \ @@ -164,7 +164,7 @@ EXES = attraction blitspin bouboule braid decayscreen deco \ demon loop penetrate deluxe compass squiral xflame \ wander spotlight phosphor xmatrix petri shadebobs \ ccurve blaster bumps ripples xspirograph \ - nerverot xrayswarm hyperball zoom whirlwindwarp rotzoomer \ + nerverot xrayswarm zoom whirlwindwarp rotzoomer \ speedmine vermiculate twang apollonian euler2d \ polyominoes thornbird fluidballs anemone halftone \ metaballs eruption popsquares barcode piecewise cloudlife \ @@ -175,9 +175,9 @@ EXES = attraction blitspin bouboule braid decayscreen deco \ @JPEG_EXES@ JPEG_EXES = webcollage-helper -RETIRED_EXES = ant bubbles critical flag forest laser lightning lisa \ - lissie lmorph rotor sphere spiral t3d vines whirlygig \ - worm xsublim juggle +RETIRED_EXES = ant bubbles critical flag forest hyperball hypercube laser \ + lightning lisa lissie lmorph rotor sphere spiral t3d vines \ + whirlygig worm xsublim juggle HACK_OBJS_1 = fps.o $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \ $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@ @@ -200,7 +200,7 @@ MEN = anemone.man apollonian.man attraction.man \ drift.man epicycle.man euler2d.man fadeplot.man \ flame.man flow.man fluidballs.man galaxy.man \ goop.man grav.man greynetic.man halo.man helix.man \ - hopalong.man hyperball.man hypercube.man ifs.man imsmap.man \ + hopalong.man ifs.man imsmap.man \ interference.man julia.man \ kaleidescope.man kumppa.man \ loop.man maze.man moire.man \ @@ -228,7 +228,8 @@ MEN = anemone.man apollonian.man attraction.man \ RETIRED_MEN = ant.man bubbles.man critical.man flag.man forest.man \ laser.man lightning.man lisa.man lissie.man lmorph.man \ rotor.man sphere.man spiral.man t3d.man vines.man \ - whirlygig.man worm.man xsublim.man juggle.man + whirlygig.man worm.man xsublim.man juggle.man \ + hypercube.man hyperball.man STAR = * EXTRAS = README Makefile.in xml2man.pl m6502.sh .gdbinit \ @@ -250,7 +251,8 @@ EXTRAS = README Makefile.in xml2man.pl m6502.sh .gdbinit \ VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \ vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt -TARFILES = $(SRCS) $(HDRS) $(SCRIPTS) $(MEN) $(EXTRAS) $(VMSFILES) +TARFILES = $(SRCS) $(HDRS) $(SCRIPTS) $(MEN) $(RETIRED_MEN) \ + $(EXTRAS) $(VMSFILES) default: all @@ -825,6 +827,7 @@ m6502.h: UTILS_SRC="$(UTILS_SRC)" \ $(srcdir)/m6502.sh m6502.h $(srcdir)/images/m6502/*.asm +m6502.o: m6502.h m6502: m6502.o asm6502.o $(HACK_OBJS) $(ATV) $(CC_HACK) -o $@ $@.o asm6502.o $(HACK_OBJS) $(ATV) $(HACK_LIBS) diff --git a/hacks/abstractile.c b/hacks/abstractile.c index 56d42dfe..9d7e968c 100644 --- a/hacks/abstractile.c +++ b/hacks/abstractile.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2007 Steve Sundstrom + * Copyright (c) 2004-2009 Steve Sundstrom * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -1104,6 +1104,7 @@ _create_screen(struct state *st) values tuned for it draw the screen in a blink on Linux. Therefore we draw 1/200th of the screen with each update and sleep, if necessary */ st->lpu = (st->dialog) ? st->li/50 : st->li/200; + if (!st->lpu) st->lpu = 1; st->bi=1; st->mode=MODE_ERASE; } @@ -1521,7 +1522,10 @@ abstractile_draw (Display *dpy, Window window, void *closure) int mse, usleep; gettimeofday(&st->time, NULL); - switch (st->mode) { + + /* If the window is too small, do nothing, sorry! */ + if (st->xgwa.width > 20 && st->xgwa.height > 20) { + switch (st->mode) { case MODE_CREATE: _init_screen(st); _create_screen(st); @@ -1532,6 +1536,7 @@ abstractile_draw (Display *dpy, Window window, void *closure) case MODE_DRAW: _draw_lines(st); break; + } } mse=_mselapsed(st); usleep = ((!st->ii) && (st->mode==MODE_CREATE)) ? 0 : diff --git a/hacks/ant.man b/hacks/ant.man new file mode 100644 index 00000000..fb71d57b --- /dev/null +++ b/hacks/ant.man @@ -0,0 +1,96 @@ +.TH XScreenSaver 1 "" "X Version 11" +.SH NAME +ant - cellular automaton. +.SH SYNOPSIS +.B ant +[\-display \fIhost:display.screen\fP] +[\-visual \fIvisual\fP] +[\-window] +[\-install] +[\-noinstall] +[\-root] +[\-eyes] +[\-no-eyes] +[\-truchet] +[\-no-truchet] +[\-sharpturn] +[\-no-sharpturn] +[\-delay \fInumber\fP] +[\-cycles \fInumber\fP] +[\-count \fInumber\fP] +[\-size \fInumber\fP] +[\-neighbors 3] +[\-neighbors 4] +[\-neighbors 6] +[\-neighbors 9] +[\-neighbors 12] +[\-ncolors \fInumber\fP] +[\-fps] +.SH DESCRIPTION +A cellular automaton that is really a two-dimensional Turing machine: as +the heads ("ants") walk along the screen, they change pixel values in +their path. Then, as they pass over changed pixels, their behavior is +influenced. +.SH OPTIONS +.TP 8 +.B \-visual \fIvisual\fP +Specify which visual to use. Legal values are the name of a visual class, +or the id number (decimal or hex) of a specific visual. +.TP 8 +.B \-window +Draw on a newly-created window. This is the default. +.TP 8 +.B \-root +Draw on the root window. +.TP 8 +.B \-sharpturns | \-no-sharpturns +Whether to do sharp turns. +.TP 8 +.B \-truchet | \-no-truchet +Whether to use truchet lines. +.TP 8 +.B \-eyes | \-no-eyes +Whether to draw eyes on the ants. +.TP 8 +.B \-delay \fInumber\fP +Per-frame delay, in microseconds. Default: 1000 (0.0001 seconds.). +.TP 8 +.B \-cycles \fInumber\fP +How long to wait until resetting. 0 - 800000. Default: 40000. +.TP 8 +.B \-count \fInumber\fP +Ants Count. -20 - 20. Default: -3. +.TP 8 +.B \-size \fInumber\fP +Ant Size. -18 - 18. Default: -12. +.TP 8 +.B \-neighbors \fIN\fP +How many neighbors each cell has. Legal values are 3, 4, 6, 9, and 12. +.TP 8 +.B \-ncolors \fInumber\fP +Number of colors. Default: 64. +.TP 8 +.B \-fps +Display the current frame rate and CPU load. +.SH ENVIRONMENT +.PP +.TP 8 +.B DISPLAY +to get the default host and display number. +.TP 8 +.B XENVIRONMENT +to get the name of a resource file that overrides the global resources +stored in the RESOURCE_MANAGER property. +.SH SEE ALSO +.BR X (1), +.BR xscreensaver (1) +.SH COPYRIGHT +Copyright \(co 2002 by David Bagley. Permission to use, copy, modify, +distribute, and sell this software and its documentation for any purpose is +hereby granted without fee, provided that the above copyright notice appear +in all copies and that both that copyright notice and this permission notice +appear in supporting documentation. No representations are made about the +suitability of this software for any purpose. It is provided "as is" without +express or implied warranty. +.SH AUTHOR +David Bagley. diff --git a/hacks/bubbles.man b/hacks/bubbles.man new file mode 100644 index 00000000..f9b892e6 --- /dev/null +++ b/hacks/bubbles.man @@ -0,0 +1,140 @@ +.de EX \"Begin example +.ne 5 +.if n .sp 1 +.if t .sp .5 +.nf +.in +.5i +.. +.de EE +.fi +.in -.5i +.if n .sp 1 +.if t .sp .5 +.. +.TH XScreenSaver 1 "14-Dec-95" "X Version 11" +.SH NAME +bubbles - frying pan / soft drink simulation +.SH SYNOPSIS +.B bubbles +[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-simple] [\-broken] [\-3D] [\-rise|\-drop] [-trails] +[\-fps] +.SH DESCRIPTION +\fIBubbles\fP sprays lots of little random bubbles all over the window which +then grow until they reach their maximum size and go pop. The inspiration +for this was watching little globules of oil on the bottom of a frying pan +and it also looks a little like bubbles in fizzy soft drink. The default +mode uses fancy ray-traced bubbles but there is also a mode which just draws +circles in case the default mode is too taxing on your hardware. +.SH OPTIONS +Depending on how your +.I bubbles +was compiled, it accepts the following options: +.TP 8 +.B \-foreground +Colour of circles if \fI\-simple\fP mode is selected. +.TP 8 +.B \-background +Colour of window background. +.TP 8 +.B \-window +Draw on a newly-created window. This is the default. +.TP 8 +.B \-root +Draw on the root window. +.TP 8 +.B \-mono +If on a color display, pretend we're on a monochrome display. +.TP 8 +.B \-install +Install a private colormap for the window. +.TP 8 +.B \-visual \fIvisual\fP +Specify which visual to use. Legal values are the name of a visual class, +or the id number (decimal or hex) of a specific visual. +.TP 8 +.B \-delay microseconds +How much of a delay should be introduced between steps of the animation. +Default 800, or about 800 microsecond. Actually, this is the delay between each +group of 15 new bubbles since such a delay between each step results in a +very slow animation rate. +.TP 8 +.B \-nodelay +Same as \fI\-delay 0\fP. +.TP 8 +.B \-simple +Don't use the default fancy pixmap bubbles. Just draw circles instead. +This may give more bearable performance if your hardware wasn't made for +this sort of thing. +.TP 8 +.B \-broken +Don't hide bubbles when they pop. This was a bug during development +but the results were actually quite attractive. +.TP 8 +.B \-3D +Normally, the simulation is done completely in two dimensions. When a +bubble swallows up another bubble, the areas of each are added to get +the area of the resulting bubble. This option changes the algorithm +to instead add volume (imagining each to be a sphere in 3D space). The +whole thing looks more realistic but I find it attracts attention to +the flickering of each bubble as they are move and are redrawn. Your +mileage may vary. +.TP 8 +.B \-quiet +Don't print messages explaining why one or several command line options +were ignored. This is disabled by default. +.TP 8 +.B \-rise | \-drop +.TP 8 +.B \-trails +.TP 8 +.B \-fps +Display the current frame rate and CPU load. +.SH NOTES +If you find the pace of things too slow, remember that there is a delay +even though you specify no \fI\-delay\fP option. Try using \fI\-nodelay\fP +although beware of the effects of irritation of other users if you're on a +shared system as you bleed their CPU time away. + +Some tools to assist in creation of new bubbles are included in the source +distribution. These can either be loaded with the \fI\-file\fP or +\fI\-directory\fP options (if available) or they can be used in place +of the distributed default bubble (bubble_default.c). +You might like to copy these scripts to a permanent location and +use them. Read bubbles.README. + +Rendered bubbles are not supported on monochrome displays. I'm not +convinced that small bubbles, even dithered properly are going to look +like anything more than a jumble of random dots. +.SH BUGS +There is a delay before something appears on the screen when using +rendered bubbles. The XPM library seems to take a \fBlong\fP time to make +pixmaps out of raw data. This can be irritating on slower systems. + +The movement of the bubbles looks jerky if an incomplete set of bubbles +is used. + +The hide/display algorithm could do with some work to avoid flickering +when \fI\-nodelay\fP is set. +.SH ENVIRONMENT +.PP +.TP 8 +.B DISPLAY +to get the default host and display number. +.TP 8 +.B XENVIRONMENT +to get the name of a resource file that overrides the global resources +stored in the RESOURCE_MANAGER property. +.SH SEE ALSO +.BR X (1), +.BR xscreensaver (1) +.SH DISTRIBUTION POLICY +This work is Copyright \(co 1995, 1996 by James Macnicol. Permission +to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided +that the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. No representations are made about the suitability of +this software for any purpose. It is provided "as is" without express +or implied warranty. +.SH AUTHOR +James Macnicol diff --git a/hacks/check-configs.pl b/hacks/check-configs.pl index 28beb6f2..9d06bd2f 100755 --- a/hacks/check-configs.pl +++ b/hacks/check-configs.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright © 2008 Jamie Zawinski +# Copyright © 2008, 2009 Jamie Zawinski # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that @@ -19,7 +19,7 @@ use diagnostics; use strict; my $progname = $0; $progname =~ s@.*/@@g; -my $version = q{ $Revision: 1.2 $ }; $version =~ s/^[^\d]+([\d.]+).*/$1/; +my $version = q{ $Revision: 1.3 $ }; $version =~ s/^[^\d]+([\d.]+).*/$1/; my $verbose = 0; @@ -265,7 +265,7 @@ sub check_config($) { my ($saver) = @_; # kludge - return 0 if ($saver =~ m/(-helper|hypertorus|polytopes)$/); + return 0 if ($saver =~ m/(-helper)$/); my ($src_opts, $switchmap) = parse_src ($saver); my (@xml_opts) = parse_xml ($saver, $switchmap); diff --git a/hacks/config/README b/hacks/config/README index 1a131f87..e93e9362 100644 --- a/hacks/config/README +++ b/hacks/config/README @@ -4,8 +4,8 @@ a screen saver and locker for the X window system by Jamie Zawinski - version 5.09 - 03-Sep-2009 + version 5.10 + 07-Sep-2009 http://www.jwz.org/xscreensaver/ diff --git a/hacks/config/ant.xml b/hacks/config/ant.xml index b2a59928..76fc4475 100644 --- a/hacks/config/ant.xml +++ b/hacks/config/ant.xml @@ -47,6 +47,9 @@ <_description> +This screen saver was removed from the XScreenSaver distribution as of +version 4.22. + A cellular automaton that is really a two-dimensional Turing machine: as the heads ("ants") walk along the screen, they change pixel values in their path. Then, as they pass over changed pixels, their diff --git a/hacks/config/bubbles.xml b/hacks/config/bubbles.xml index d11935d6..bf675546 100644 --- a/hacks/config/bubbles.xml +++ b/hacks/config/bubbles.xml @@ -26,8 +26,11 @@ <_description> +This screen saver was removed from the XScreenSaver distribution as of +version 5.08. + This simulates the kind of bubble formation that happens when water -boils:small bubbles appear, and as they get closer to each other, +boils: small bubbles appear, and as they get closer to each other, they combine to form larger bubbles, which eventually pop. Written by James Macnicol; 1996. diff --git a/hacks/config/critical.xml b/hacks/config/critical.xml index 55e092ee..ceef8326 100644 --- a/hacks/config/critical.xml +++ b/hacks/config/critical.xml @@ -16,6 +16,9 @@ <_description> +This screen saver was removed from the XScreenSaver distribution as of +version 5.08. + Draws a system of self-organizing lines. It starts out as random squiggles, but after a few iterations, order begins to appear. diff --git a/hacks/config/flag.xml b/hacks/config/flag.xml index cbce18b9..93155fb2 100644 --- a/hacks/config/flag.xml +++ b/hacks/config/flag.xml @@ -24,6 +24,9 @@ <_description> +This screen saver was removed from the XScreenSaver distribution as of +version 5.08. + This draws a waving colored flag, that undulates its way around the screen. The flag can contain arbitrary text and images. By default, it displays either the current system name and OS type, or a picture diff --git a/hacks/config/forest.xml b/hacks/config/forest.xml index 4bce9055..2b8d64e9 100644 --- a/hacks/config/forest.xml +++ b/hacks/config/forest.xml @@ -16,6 +16,9 @@ <_description> +This screen saver was removed from the XScreenSaver distribution as of +version 5.08. + Fractal trees. Written by Peter Baumung; 1997. diff --git a/hacks/config/glforestfire.xml b/hacks/config/glforestfire.xml index 844db120..cf46bd5c 100644 --- a/hacks/config/glforestfire.xml +++ b/hacks/config/glforestfire.xml @@ -31,6 +31,9 @@ <_description> +This screen saver was removed from the XScreenSaver distribution as of +version 5.08. + Draws an animation of sprinkling fire-like 3D triangles in a landscape filled with trees. diff --git a/hacks/config/hyperball.xml b/hacks/config/hyperball.xml index b8ecd2c7..5d80bd91 100644 --- a/hacks/config/hyperball.xml +++ b/hacks/config/hyperball.xml @@ -43,13 +43,16 @@ <_description> +This screen saver was removed from the XScreenSaver distribution as of +version 5.10. It has been replaced by the more general "Polytopes" +screen saver, which can display this object as well as others. The +Polytopes "120-cell" object corresponds to this one. + Hyperball is to hypercube as dodecahedron is to cube: this displays a 2D projection of the sequence of 3D objects which are the projections of the 4D analog to the dodecahedron. Technically, it is a "120 cell polytope". -See also "polytopes" for a more general version of this using OpenGL. - http://en.wikipedia.org/wiki/Hypercube http://en.wikipedia.org/wiki/Regular_polytope diff --git a/hacks/config/hypercube.xml b/hacks/config/hypercube.xml index 178cd433..e52232e2 100644 --- a/hacks/config/hypercube.xml +++ b/hacks/config/hypercube.xml @@ -50,6 +50,10 @@ <_description> +This screen saver was removed from the XScreenSaver distribution as of +version 5.10. It has been replaced by the more general "Polytopes" +screen saver, which can display this object as well as others. + This displays 2D projections of the sequence of 3D objects which are the projections of the 4D analog to the cube: as a square is composed of four lines, each touching two others; and a cube is composed of @@ -58,8 +62,6 @@ eight cubes, each touching six others. To make it easier to visualize the rotation, it uses a different color for the edges of each face. Don't think about it too long, or your brain will melt. -See also "polytopes" for a more general version of this using OpenGL. - http://en.wikipedia.org/wiki/Hypercube http://en.wikipedia.org/wiki/Regular_polytope diff --git a/hacks/config/hypertorus.xml b/hacks/config/hypertorus.xml index f32b2404..cd383871 100644 --- a/hacks/config/hypertorus.xml +++ b/hacks/config/hypertorus.xml @@ -14,32 +14,34 @@
+