#define DEFAULTS "*delay: 50000 \n" \
"*count: 40 \n" \
"*cycles: 350 \n" \
- "*ncolors: 64 \n"
+ "*ncolors: 64 \n" \
+ "*fpsSolid: true \n" \
+
# define SMOOTH_COLORS
+# define release_spiral 0
# define reshape_spiral 0
# define spiral_handle_event 0
# include "xlockmore.h" /* from the xscreensaver distribution */
#ifdef USE_MODULES
ModStruct spiral_description =
-{"spiral", "init_spiral", "draw_spiral", "release_spiral",
- "refresh_spiral", "init_spiral", (char *) NULL, &spiral_opts,
+{"spiral", "init_spiral", "draw_spiral", (char *) NULL,
+ "refresh_spiral", "init_spiral", "free_spiral", &spiral_opts,
5000, -40, 350, 1, 64, 1.0, "",
"Shows a helical locus of points", 0, NULL};
spiralstruct *sp;
int i;
- if (spirals == NULL) {
- if ((spirals = (spiralstruct *) calloc(MI_NUM_SCREENS(mi),
- sizeof (spiralstruct))) == NULL)
- return;
- }
+ MI_INIT (mi, spirals);
sp = &spirals[MI_SCREEN(mi)];
-#ifdef HAVE_COCOA
+#ifdef HAVE_JWXYZ
jwxyz_XSetAntiAliasing (MI_DISPLAY(mi), MI_GC(mi), False);
#endif
}
ENTRYPOINT void
-release_spiral(ModeInfo * mi)
+free_spiral(ModeInfo * mi)
{
- if (spirals != NULL) {
- int screen;
+ spiralstruct *sp;
- for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
- spiralstruct *sp = &spirals[screen];
+ if (spirals == NULL)
+ return;
+ sp = &spirals[MI_SCREEN(mi)];
- if (sp->traildots)
- (void) free((void *) sp->traildots);
- }
- (void) free((void *) spirals);
- spirals = (spiralstruct *) NULL;
- }
+ if (sp->traildots)
+ (void) free((void *) sp->traildots);
}
+#ifndef STANDALONE
ENTRYPOINT void
refresh_spiral(ModeInfo * mi)
{
sp->redrawing = 1;
sp->redrawpos = 0;
}
+#endif
XSCREENSAVER_MODULE ("Spiral", spiral)