From http://www.jwz.org/xscreensaver/xscreensaver-5.30.tar.gz
[xscreensaver] / hacks / bouboule.c
index 143354b3d74d4a759d7c7098e14c03180f90a930..7fb026040b916a1291aac002f14168bf58d46511 100644 (file)
@@ -78,15 +78,16 @@ static const char sccsid[] = "@(#)bouboule.c        4.00 97/01/01 xlockmore";
                                        "*size:                 15      \n"                     \
                                        "*delay:                20000   \n"                     \
                                        "*ncolors:              64      \n"                     \
-                                       "*use3d:                False   \n"                     \
+                                       "*use3d:                True    \n"                     \
                                        "*delta3d:              1.5             \n"                     \
                                        "*right3d:              red             \n"                     \
                                        "*left3d:               blue    \n"                     \
                                        "*both3d:               magenta \n"                     \
-                                       "*none3d:               black   \n"
+                                       "*none3d:               black   \n"                     \
+                                       "*fpsSolid:             true    \n"                     \
+                                       "*ignoreRotation: True  \n"
 
 # define SMOOTH_COLORS
-# define reshape_bouboule 0
 # define bouboule_handle_event 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -837,6 +838,24 @@ release_bouboule(ModeInfo * mi)
        }
 }
 
+ENTRYPOINT void
+reshape_bouboule(ModeInfo * mi, int width, int height)
+{
+       StarField  *sp = &starfield[MI_SCREEN(mi)];
+       sp->width  = width;
+       sp->height = height;
+    sininit(&sp->x,
+        sp->x.alpha, sp->x.step,
+        ((double) sp->width) / 4.0,
+        3.0 * ((double) sp->width) / 4.0,
+        POSCANRAND);
+    sininit(&sp->y,
+        sp->y.alpha, sp->y.step,
+        ((double) sp->height) / 4.0,
+        3.0 * ((double) sp->height) / 4.0,
+        POSCANRAND);
+}
+
 ENTRYPOINT void
 refresh_bouboule(ModeInfo * mi)
 {