From: Zygo Blaxell Date: Mon, 4 Nov 2019 19:20:58 +0000 (-0500) Subject: From http://www.jwz.org/xscreensaver/xscreensaver-5.43.tar.gz X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24e806e93f2b10862fe18a6c21fb1d1bfe14fc60;p=xscreensaver From http://www.jwz.org/xscreensaver/xscreensaver-5.43.tar.gz -rw-rw-r-- 1 zblaxell zblaxell 26973508 Jul 9 23:37 xscreensaver-5.43.tar.gz 7a0e24b224e1316f0a211446db301de1c22daaa0 xscreensaver-5.43.tar.gz --- diff --git a/Makefile.in b/Makefile.in index a9486814..e0795b2f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,8 +18,11 @@ TARFILES = README README.hacking README.VMS INSTALL \ TAR = tar -MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done -MAKE_SUBDIR2 = for dir in $(SUBDIRS2); do (cd $$dir; $(MAKE) $@) || exit 5; done +# Using $(MAKE) directly means the shell executes things even with "make -n" +MAKE2 = $(MAKE) + +MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE2) $@) || exit 5; done +MAKE_SUBDIR2 = for dir in $(SUBDIRS2); do (cd $$dir; $(MAKE2) $@) || exit 5; done default:: @+$(MAKE_SUBDIR) @@ -42,9 +45,9 @@ uninstall-man:: depend:: @$(MAKE_SUBDIR) distdepend:: - @$(MAKE) update_spec_version + @$(MAKE2) update_spec_version @$(MAKE_SUBDIR2) - @cd po ; $(MAKE) update-po + @cd po ; $(MAKE2) update-po TAGS:: tags tags:: @@ -64,8 +67,8 @@ tar:: @ \ sh config.status ; \ rm -f configure ; \ - $(MAKE) configure ; \ - $(MAKE) version-date distdepend ; \ + $(MAKE2) configure ; \ + $(MAKE2) version-date distdepend ; \ VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' utils/version.h` ; \ NAME="xscreensaver-$$VERS" ; \ rm -rf $$NAME ; ln -s . $$NAME ; \ @@ -74,7 +77,7 @@ tar:: for subdir in $(SUBDIRS2) ; do \ d=`pwd` ; \ cd $$subdir ; \ - FILES="$$FILES `$(MAKE) echo_tarfiles \ + FILES="$$FILES `$(MAKE2) echo_tarfiles \ | grep -v '^.*make\[' \ | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \ ` "; \ @@ -231,9 +234,9 @@ rpm:: ls -lFG xscreensaver*-$$VERS-*.rpm dmg:: - $(MAKE) -C OSX release dmg + $(MAKE2) -C OSX release dmg apk:: - $(MAKE) -C android apk + $(MAKE2) -C android apk www:: @ \ @@ -256,7 +259,7 @@ www:: exit 1 ; \ fi ; \ \ - $(MAKE) -C OSX updates.xml ; \ + $(MAKE2) -C OSX updates.xml ; \ \ if [ ! -f $$NAME ]; then \ echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \ @@ -331,7 +334,7 @@ www:: \ git add $$BNAME $$BNAME2 $$BNAME3 ; \ \ - $(MAKE) -C ../ xscreensaver/changelog.html xscreensaver/screenshots/index.html; \ + $(MAKE2) -C ../ xscreensaver/changelog.html xscreensaver/screenshots/index.html; \ git diff changelog.html ; \ set +x ; \ \ diff --git a/OSX/Makefile b/OSX/Makefile index bf1f6c61..4f2312b3 100644 --- a/OSX/Makefile +++ b/OSX/Makefile @@ -228,7 +228,7 @@ update_plist_version: updates.xml:: ./updates.pl xscreensaver ../README ../archive ~/www/xscreensaver - @$(MAKE) test_sig + @$(MAKE) $(MAKEFLAGS) test_sig test_sig:: @ \ @@ -243,6 +243,9 @@ test_sig:: SIGB=/tmp/$$NN.sig ; \ HASH=/tmp/$$NN.hash ; \ rm -f "$$SIGB" "$$HASH" ; \ + if ( echo "$$SIG" | grep -qi ERROR ); then \ + echo "No signature in updates.xml" >&2 ; exit 1 ; \ + fi ; \ echo "$$SIG " | base64 -D > "$$SIGB" ; \ set -e ; \ for OPENSSL in /usr/bin/openssl /opt/local/bin/openssl ; do \ @@ -375,6 +378,8 @@ _dmg:: \ hdiutil makehybrid -quiet -ov -hfs -hfs-volume-name "$$VOLNAME" \ -hfs-openfolder "$$STAGE" "$$STAGE" -o "$$TMPDMG" ; \ + echo "Chowning back and deleting..." ; \ + sudo chown -R `whoami` "$$STAGE/"* ; \ rm -rf "$$STAGE" ; \ \ hdiutil convert -quiet -ov -format UDBZ -imagekey zlib-level=9 \ @@ -386,7 +391,7 @@ _dmg:: spctl --assess --type install "$$DMG" ; \ \ ls -ldhgF "$$DMG" ; \ - $(MAKE) notarize ; \ + $(MAKE) $(MAKEFLAGS) notarize ; \ # To set up notarization: @@ -420,12 +425,16 @@ notarize:: --file "$$DMG" $(NOTARGS) ; \ echo "" ; \ sleep 3 ; \ - $(MAKE) notarize_wait staple updates.xml + $(MAKE) $(MAKEFLAGS) notarize_wait staple updates.xml notarize_wait:: - @while ( xcrun altool --notarization-history 0 $(NOTARGS) | \ + @TODAY=`date +%Y-%m-%d` ; \ + while ( xcrun altool --notarization-history 0 $(NOTARGS) | \ + grep "$$TODAY" | \ grep -q 'in progress' ); do \ echo `date +%I:%M:` "waiting for notarization..." ; \ + xcrun altool --notarization-history 0 $(NOTARGS) | \ + grep "$$TODAY" ; \ sleep 15 ; \ done ; \ echo '' ; \ diff --git a/OSX/bindist.rtf b/OSX/bindist.rtf index f6191e14..59770556 100644 --- a/OSX/bindist.rtf +++ b/OSX/bindist.rtf @@ -17,7 +17,7 @@ and many others\ \ version 5.43\ -01-Jul-2019\ +09-Jul-2019\ \ {\field{\*\fldinst{HYPERLINK "https://www.jwz.org/xscreensaver/"}}{\fldrslt \cf2 \ul \ulc2 https://www.jwz.org/xscreensaver/}}\ \pard\pardeftab720 diff --git a/OSX/updates.pl b/OSX/updates.pl index 92491549..21ead069 100755 --- a/OSX/updates.pl +++ b/OSX/updates.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright © 2013-2018 Jamie Zawinski +# Copyright © 2013-2019 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 @@ -21,7 +21,7 @@ use open ":encoding(utf8)"; use POSIX; my $progname = $0; $progname =~ s@.*/@@g; -my ($version) = ('$Revision: 1.5 $' =~ m/\s(\d[.\d]+)\s/s); +my ($version) = ('$Revision: 1.6 $' =~ m/\s(\d[.\d]+)\s/s); my $verbose = 0; my $debug_p = 0; @@ -54,6 +54,8 @@ sub generate_xml($$$$) { my ($sig2) = ($item =~ m/edSignature="(.*?)"/si); my ($date) = ($item =~ m/(.*?) 1); + $sig1 = `$cmd`; $sig1 =~ s/\s+//gs; } if (!$sig2 && $zip) { # New-style sigs local %ENV = %ENV; $ENV{PATH} = "/usr/bin:$ENV{PATH}"; - my $xml = `$edddsa_sign_update "$archive_dir/$zip"`; + my $cmd = "$edddsa_sign_update \"$archive_dir/$zip\""; + print STDERR "$progname: exec: $cmd\n" if ($verbose > 1); + my $xml = `$cmd`; ($sig2) = ($xml =~ m/sparkle:edSignature=\"([^\"<>\s]+)\"/si); error ("unparsable: $edddsa_sign_update: $xml") unless $sig2; } diff --git a/OSX/updates.xml b/OSX/updates.xml index e782f726..2948b6c6 100644 --- a/OSX/updates.xml +++ b/OSX/updates.xml @@ -7,6 +7,18 @@ https://www.jwz.org/xscreensaver/updates.xml Updates to xscreensaver. en + + Version 5.43 + https://www.jwz.org/xscreensaver/xscreensaver-5.43.dmg + • GLPlanet now supports the Mercator projection.
• Bouncing Cow has mathematically ideal cows (spherical, frictionless).
• Foggy toasters.
• Unknown Pleasures can now use an image file as a clip mask.
• Updated `webcollage' for recent changes.
• macOS: Fixed BSOD fonts on UWQHD+ displays.
• X11: Added some sample unlock dialog color schemes to the .ad file.
• X11: On systemd systems, closing your laptop lid might actually lock your screen now, maybe.
• X11: 'sonar' can ping without being setuid by using setcap.]]>
+ Mon, 01 Jul 2019 15:58:08 -0700 + +
Version 5.42 https://www.jwz.org/xscreensaver/xscreensaver-5.42.dmg diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index 14f3e96f..5deb3344 100644 --- a/driver/XScreenSaver.ad.in +++ b/driver/XScreenSaver.ad.in @@ -5,7 +5,7 @@ ! by Jamie Zawinski ! ! version 5.43 -! 01-Jul-2019 +! 09-Jul-2019 ! ! See "man xscreensaver" for more info. The latest version is always ! available at https://www.jwz.org/xscreensaver/ diff --git a/hacks/config/README b/hacks/config/README index 061b1109..58c41953 100644 --- a/hacks/config/README +++ b/hacks/config/README @@ -5,7 +5,7 @@ by Jamie Zawinski version 5.43 - 01-Jul-2019 + 09-Jul-2019 https://www.jwz.org/xscreensaver/ diff --git a/hacks/glx/Makefile.in b/hacks/glx/Makefile.in index 3c5abac5..482bed3d 100644 --- a/hacks/glx/Makefile.in +++ b/hacks/glx/Makefile.in @@ -137,7 +137,7 @@ SRCS = xscreensaver-gl-helper.c normals.c erase-gl.c fps-gl.c \ raverhoop.c hydrostat.c discoball.c cubetwist.c cubestack.c \ splodesic.c hexstrut.c vigilance.c seccam.c esper.c \ razzledazzle.c ships.c peepers.c crumbler.c quickhull.c \ - maze3d.c handsy.c handsy_model.c gravitywell.c + maze3d.c handsy.c handsy_model.c gravitywell.c deepstars.c OBJS = xscreensaver-gl-helper.o normals.o erase-gl.o fps-gl.o \ atlantis.o b_draw.o b_lockglue.o b_sphere.o bubble3d.o \ @@ -184,7 +184,7 @@ OBJS = xscreensaver-gl-helper.o normals.o erase-gl.o fps-gl.o \ raverhoop.o hydrostat.o discoball.o cubetwist.o cubestack.o \ splodesic.o hexstrut.o vigilance.o seccam.o esper.o \ razzledazzle.o ships.o peepers.o crumbler.o quickhull.o \ - maze3d.o handsy.o handsy_model.o gravitywell.o + maze3d.o handsy.o handsy_model.o gravitywell.o deepstars.o GL_EXES = cage gears moebius pipes sproingies stairs superquadrics \ morph3d rubik atlantis lament bubble3d glplanet pulsar \ @@ -205,7 +205,7 @@ GL_EXES = cage gears moebius pipes sproingies stairs superquadrics \ splitflap dymaxionmap unicrud energystream raverhoop \ hydrostat discoball cubetwist cubestack splodesic \ hexstrut vigilance esper razzledazzle peepers crumbler \ - maze3d handsy gravitywell + maze3d handsy gravitywell deepstars GLE_EXES = extrusion SUID_EXES = sonar SETCAP_EXES = sonar @@ -273,7 +273,7 @@ GL_MEN = atlantis.man boxed.man bubble3d.man cage.man circuit.man \ discoball.man cubetwist.man cubestack.man splodesic.man \ hexstrut.man vigilance.man esper.man razzledazzle.man \ peepers.man crumbler.man maze3d.man handsy.man \ - gravitywell.man + gravitywell.man deepstars.man MEN = @GL_MEN@ RETIRED_MEN = glforestfire.man EXTRAS = README Makefile.in dxf2gl.pl vrml2gl.pl wfront2gl.pl \ @@ -1030,6 +1030,9 @@ handsy_dxf:: gravitywell: gravitywell.o $(HACK_TRACK_OBJS) $(CC_HACK) -o $@ $@.o $(HACK_TRACK_OBJS) $(HACK_LIBS) +deepstars: deepstars.o $(HACK_TRACK_OBJS) + $(CC_HACK) -o $@ $@.o $(HACK_TRACK_OBJS) $(HACK_LIBS) + ############################################################################## # # DO NOT DELETE: updated by make distdepend @@ -1541,6 +1544,23 @@ dangerball.o: $(UTILS_SRC)/visual.h dangerball.o: $(UTILS_SRC)/yarandom.h dangerball.o: $(HACK_SRC)/xlockmoreI.h dangerball.o: $(HACK_SRC)/xlockmore.h +deepstars.o: ../../config.h +deepstars.o: $(HACK_SRC)/fps.h +deepstars.o: $(srcdir)/gltrackball.h +deepstars.o: $(HACK_SRC)/recanim.h +deepstars.o: $(HACK_SRC)/screenhackI.h +deepstars.o: $(srcdir)/sphere.h +deepstars.o: $(UTILS_SRC)/colors.h +deepstars.o: $(UTILS_SRC)/erase.h +deepstars.o: $(UTILS_SRC)/font-retry.h +deepstars.o: $(UTILS_SRC)/grabscreen.h +deepstars.o: $(UTILS_SRC)/hsv.h +deepstars.o: $(UTILS_SRC)/resources.h +deepstars.o: $(UTILS_SRC)/usleep.h +deepstars.o: $(UTILS_SRC)/visual.h +deepstars.o: $(UTILS_SRC)/yarandom.h +deepstars.o: $(HACK_SRC)/xlockmoreI.h +deepstars.o: $(HACK_SRC)/xlockmore.h discoball.o: ../../config.h discoball.o: $(HACK_SRC)/fps.h discoball.o: $(srcdir)/gltrackball.h diff --git a/hacks/glx/deepstars.c b/hacks/glx/deepstars.c new file mode 100644 index 00000000..b477e001 --- /dev/null +++ b/hacks/glx/deepstars.c @@ -0,0 +1,387 @@ +/* xscreensaver, Copyright (c) 2019 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 + * 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. + */ + +#ifdef STANDALONE +#define DEFAULTS "*delay: 30000 \n" \ + "*showFPS: False \n" \ + "*suppressRotationAnimation: True\n" \ + +# define release_deepstars 0 +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef USE_GL /* whole file */ + +#include "sphere.h" +#include "gltrackball.h" + +#define DEF_SPEED "1.0" +#define DEF_SMEAR "1.0" +#define SMEAR_BASE 400 +#define SPEED_BASE 0.02 + +#undef countof +#define countof(x) (sizeof((x))/sizeof((*x))) + +#undef BELLRAND +#define BELLRAND(n) ((frand((n)) + frand((n)) + frand((n))) / 3) + +static GLfloat speed_arg, smear_arg; + +static XrmOptionDescRec opts[] = { + {"-speed", ".speed", XrmoptionSepArg, 0 }, + {"-smear", ".smear", XrmoptionSepArg, 0 }, +}; + +static argtype vars[] = { + {&speed_arg, "speed" ,"Speed", DEF_SPEED, t_Float}, + {&smear_arg, "smear" ,"Smear", DEF_SMEAR, t_Float}, +}; + +ENTRYPOINT ModeSpecOpt deepstars_opts = {countof(opts), opts, countof(vars), vars, NULL}; + +#ifdef USE_MODULES +ModStruct deepstars_description = +{"deepstars", "init_deepstars", "draw_deepstars", NULL, + "draw_deepstars", "init_deepstars", "free_deepstars", &deepstars_opts, + 1000, 1, 2, 1, 4, 1.0, "", + "Animates texture mapped sphere (deepstars)", 0, NULL}; +#endif + +typedef struct { + GLfloat *colors; + GLuint starlist, groundlist; + int ncolors, starcount, groundcount; + GLXContext *glx_context; + GLfloat z, latitude, facing; + int smear, dsmear; + trackball_state *trackball; + Bool button_down_p; +} starstruct; + +static starstruct *deepstarss = NULL; + + +ENTRYPOINT void +reshape_deepstars (ModeInfo *mi, int width, int height) +{ + starstruct *gp = &deepstarss[MI_SCREEN(mi)]; + GLfloat h = (GLfloat) height / (GLfloat) width; + + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *gp->glx_context); + + glViewport(0, 0, (GLint) width, (GLint) height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-1.0, 1.0, -h, h, 5.0, 200.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0, 0.0, -40); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); +} + + +ENTRYPOINT Bool +deepstars_handle_event (ModeInfo *mi, XEvent *event) +{ + starstruct *gp = &deepstarss[MI_SCREEN(mi)]; + + /* Neutralize any horizontal motion, and flip Y */ + GLfloat rot = current_device_rotation(); + Bool rotp = ((rot > 45 && rot < 135) || + (rot < -45 && rot > -135)); + + if (event->xany.type == ButtonPress || + event->xany.type == ButtonRelease) + { + if (rotp) + { + event->xbutton.y = MI_HEIGHT(mi) / 2; + event->xbutton.x = MI_WIDTH(mi) - event->xbutton.x; + } + else + { + event->xbutton.x = MI_WIDTH(mi) / 2; + event->xbutton.y = MI_HEIGHT(mi) - event->xbutton.y; + } + } + else if (event->xany.type == MotionNotify) + { + if (rotp) + { + event->xmotion.y = MI_HEIGHT(mi) / 2; + event->xmotion.x = MI_WIDTH(mi) - event->xmotion.x; + } + else + { + event->xmotion.x = MI_WIDTH(mi) / 2; + event->xmotion.y = MI_HEIGHT(mi) - event->xmotion.y; + } + } + + if (gltrackball_event_handler (event, gp->trackball, + MI_WIDTH (mi), MI_HEIGHT (mi), + &gp->button_down_p)) + return True; + else if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event)) + { + if (gp->smear <= 1) + gp->dsmear = 1; + else + gp->dsmear = gp->smear = 0; + return True; + } + + return False; +} + + +ENTRYPOINT void +init_deepstars (ModeInfo * mi) +{ + starstruct *gp; + int screen = MI_SCREEN(mi); + + int i, j, k; + int width = MI_WIDTH(mi); + int height = MI_HEIGHT(mi); + int size = (width > height ? width : height); + int nstars = size * size / 80; + int max_size = 3; + GLfloat inc = 0.5; + int sizes = max_size / inc; + GLfloat scale = 1; + + MI_INIT (mi, deepstarss); + gp = &deepstarss[screen]; + + if ((gp->glx_context = init_GL(mi)) != NULL) { + reshape_deepstars(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + } + +# ifdef HAVE_MOBILE + scale *= 3; + nstars /= 3; +# else /* !HAVE_MOBILE */ + if (MI_WIDTH(mi) > 2560) { /* Retina displays */ + scale *= 2; + nstars /= 2; + } +# endif /* !HAVE_MOBILE */ + + + gp->trackball = gltrackball_init (True); + + gp->latitude = 10 + frand(70); + gp->facing = 10 * (frand(1.0)-0.5); + + /* Only need a small number of distinct star colors, and we have one + display list for each color, so we can modify the alpha. + */ + gp->ncolors = 16; + gp->colors = (GLfloat *) malloc (4 * gp->ncolors * sizeof(*gp->colors)); + + for (i = 0; i < gp->ncolors; i++) + { + GLfloat d = 0.1; + GLfloat r = 0.15 + frand(0.3); + GLfloat g = r + frand(d) - d; + GLfloat b = r + frand(d) - d; + gp->colors[i*4+0] = r; + gp->colors[i*4+1] = g; + gp->colors[i*4+2] = b; + gp->colors[i*4+3] = 1; + } + + gp->starcount = nstars / gp->ncolors; + gp->starlist = glGenLists(gp->ncolors); + for (i = 0; i < gp->ncolors; i++) + { + glNewList (gp->starlist + i, GL_COMPILE); + for (j = 1; j <= sizes; j++) + { + glPointSize (inc * j * scale); + glBegin (GL_POINTS); + for (k = 0; k < gp->starcount / sizes; k++) + { + GLfloat x = frand(1)-0.5; + GLfloat y = frand(1)-0.5; + GLfloat z = ((random() & 1) + ? frand(1)-0.5 + : (BELLRAND(1)-0.5)/20); /* milky way */ + GLfloat d = sqrt (x*x + y*y + z*z); + x /= d; + y /= d; + z /= d; + glVertex3f (x, y, z); + } + glEnd(); + } + glEndList(); + } + + glDisable (GL_BLEND); + gp->groundlist = glGenLists(1); + glNewList(gp->groundlist, GL_COMPILE); + { + GLfloat inc = 0.5; + glColor3f (0.02, 0.02, 0.05); + glBegin (GL_QUAD_STRIP); + gp->groundcount = 50; + for (i = 0; i <= gp->groundcount; i++) + { + glVertex3f (i / (GLfloat) gp->groundcount, 0, 0); + glVertex3f (i / (GLfloat) gp->groundcount, inc, 0); + inc += 0.1 * (frand(1.0) - 0.5); + } + glEnd(); + } + glEndList(); +} + + +ENTRYPOINT void +draw_deepstars (ModeInfo * mi) +{ + starstruct *gp = &deepstarss[MI_SCREEN(mi)]; + Display *dpy = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int smear_change = 800; + int sky_scale = 60; + int i, j; + + if (!gp->glx_context) + return; + + glDrawBuffer(GL_BACK); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glXMakeCurrent (dpy, window, *gp->glx_context); + + mi->polygon_count = 0; + + glEnable (GL_LINE_SMOOTH); + glEnable (GL_POINT_SMOOTH); + glDisable (GL_DEPTH_TEST); + glDisable (GL_CULL_FACE); + + glPushMatrix(); + + gltrackball_rotate (gp->trackball); + + /* At the equator, Polaris is on the horizon. In the Arctic, overhead. */ + glRotatef (180 - gp->latitude, 1, 0, 0); + glRotatef (gp->facing, 0, 1, 0); + + if (gp->dsmear == 0 && !(random() % smear_change)) + gp->dsmear = 1; + else if (gp->smear == SMEAR_BASE * smear_arg && !(random() % smear_change)) + gp->dsmear = -1; + + if (! gp->button_down_p) + gp->smear += gp->dsmear; + if (gp->smear < 1) gp->smear = 1; + else if (gp->smear > SMEAR_BASE * smear_arg) + gp->smear = SMEAR_BASE * smear_arg; + + if (!gp->button_down_p) + gp->z -= SPEED_BASE * speed_arg; + + glEnable (GL_BLEND); + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + for (i = 0; i < gp->smear; i++) + { + GLfloat alpha = 1 - (i / (GLfloat) gp->smear); + + glPushMatrix(); + + glRotatef (gp->z - (-i * SPEED_BASE * speed_arg), 0, 0, 1); + +# if 0 + if (i == 0) + { + glBegin(GL_LINES); + glVertex3f(0,0,0); glVertex3f(0,0,-3); + glVertex3f(0,-1,0); glVertex3f(0,1,0); + glVertex3f(-1,0,0); glVertex3f(1,0,0); + glEnd(); + + glPushMatrix(); + glRotatef (90, 1, 0, 0); + glScalef (sky_scale, sky_scale, sky_scale); + mi->polygon_count += unit_sphere (12, 24, 1); + glPopMatrix(); + } +# endif + + glRotatef (50, 1, 0, 0); /* Tilt milky way */ + glScalef (sky_scale, sky_scale, sky_scale); + + for (j = 0; j < gp->ncolors; j++) + { + gp->colors[j*4+3] = alpha; + glColor4fv (&gp->colors[j*4]); + glCallList (gp->starlist + j); + mi->polygon_count += gp->starcount; + } + glPopMatrix(); + } + + glPopMatrix(); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + { + glLoadIdentity(); + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + { + glLoadIdentity(); + glTranslatef (-1, -1, 0); + glScalef (2, 0.7, 1); + glCallList (gp->groundlist); + mi->polygon_count += gp->groundcount; + } + glPopMatrix(); + } + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + + glMatrixMode(GL_MODELVIEW); + + if (mi->fps_p) do_fps (mi); + glFinish(); + glXSwapBuffers(dpy, window); +} + + +ENTRYPOINT void +free_deepstars (ModeInfo * mi) +{ + starstruct *gp = &deepstarss[MI_SCREEN(mi)]; + + if (!gp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *gp->glx_context); + if (gp->colors) free (gp->colors); + if (glIsList(gp->groundlist)) glDeleteLists(gp->groundlist, 1); + if (glIsList(gp->starlist)) glDeleteLists(gp->starlist, gp->ncolors); + if (gp->trackball) gltrackball_free (gp->trackball); +} + + +XSCREENSAVER_MODULE ("DeepStars", deepstars) + +#endif diff --git a/hacks/glx/deepstars.man b/hacks/glx/deepstars.man new file mode 100644 index 00000000..bd4a65a9 --- /dev/null +++ b/hacks/glx/deepstars.man @@ -0,0 +1,57 @@ +.TH XScreenSaver 1 "" "X Version 11" +.SH NAME +deepstars - screen saver. +.SH SYNOPSIS +.B deepstars +[\-display \fIhost:display.screen\fP] +[\-visual \fIvisual\fP] +[\-window] +[\-root] +[\-delay \fInumber\fP] +[\-speed \fInumber\fP] +[\-smear \fInumber\fP] +.SH DESCRIPTION +A long exposure of the night sky, showing star paths as vapor trails. +.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 \-delay \fInumber\fP +Per-frame delay, in microseconds. Default: 30000 (0.03 seconds). +.TP 8 +.B \-speed \fInumber\fP +Animation speed. 2.0 means twice as fast, 0.5 means half as fast. +.TP 8 +.B \-smear \fInumber\fP +How long the vapor trails should be. +2.0 means twice as long, 0.5 means half as long. +.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 2019 by 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 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 +Jamie Zawinski. diff --git a/po/POTFILES.in b/po/POTFILES.in index cd9cf4ac..38a89efc 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,4 +1,4 @@ -# Auto-generated: Mon Jul 1 14:17:56 PDT 2019 +# Auto-generated: Tue Jul 9 20:31:29 PDT 2019 driver/demo-Gtk-conf.c driver/demo-Gtk.c driver/screensaver-properties.desktop.in diff --git a/utils/version.h b/utils/version.h index 19a6ca35..b01396c2 100644 --- a/utils/version.h +++ b/utils/version.h @@ -1,2 +1,2 @@ static const char screensaver_id[] = - "@(#)xscreensaver 5.43 (01-Jul-2019), by Jamie Zawinski (jwz@jwz.org)"; + "@(#)xscreensaver 5.43 (09-Jul-2019), by Jamie Zawinski (jwz@jwz.org)";