"*size: 500 \n" \
"*ncolors: 64 \n" \
"*fpsSolid: true \n" \
+ "*lowrez: True \n" \
# define UNIFORM_COLORS
+# define release_lisa 0
# define reshape_lisa 0
-# define lisa_handle_event 0
+# define lisa_handle_event xlockmore_no_events
# include "xlockmore.h" /* in xscreensaver distribution */
#else /* STANDALONE */
#include "xlock.h" /* in xlockmore distribution */
#ifdef USE_MODULES
ModStruct lisa_description =
-{"lisa", "init_lisa", "draw_lisa", "release_lisa",
- "refresh_lisa", "change_lisa", (char *) NULL, &lisa_opts,
+{"lisa", "init_lisa", "draw_lisa", (char *) NULL,
+ "refresh_lisa", "change_lisa", "free_lisa", &lisa_opts,
17000, 1, 768, -1, 64, 1.0, "",
"Shows animated lissajous figures", 0, NULL};
int xMaxLines;
-static void
-free_lisa(lisacons *lc)
+ENTRYPOINT void
+free_lisa(ModeInfo * mi)
{
+ lisacons *lc = &Lisa[MI_SCREEN(mi)];
while (lc->lissajous) {
int lctr;
/* Allocate the np (new point) array (with padding) */
if ((np = (XPoint *) calloc(loop->nsteps+extra_points, sizeof (XPoint))) == NULL) {
- free_lisa(lc);
+ free_lisa(mi);
return False;
}
if ((lp = loop->lastpoint = (XPoint *)
calloc(loop->nsteps+extra_points, sizeof (XPoint))) == NULL) {
- free_lisa(lc);
+ free_lisa(mi);
return False;
}
phase = lc->loopcount % loop->nsteps;
}
}
+#ifndef STANDALONE
ENTRYPOINT void
refresh_lisa(ModeInfo * mi)
{
refreshlisa(mi);
}
}
+#endif
static void
change_lisa(ModeInfo * mi)
int lctr;
lisacons *lc;
- if (Lisa == NULL) {
- if ((Lisa = (lisacons *) calloc(MI_NUM_SCREENS(mi),
- sizeof (lisacons))) == NULL)
- return;
- }
+ MI_INIT (mi, Lisa);
lc = &Lisa[MI_SCREEN(mi)];
lc->width = MI_WIDTH(mi);
lc->height = MI_HEIGHT(mi);
refreshlisa(mi);
}
-ENTRYPOINT void
-release_lisa (ModeInfo * mi)
-{
- if (Lisa) {
- int screen;
-
- for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
- free_lisa(&Lisa[screen]);
- (void) free(Lisa);
- Lisa = (lisacons *) NULL;
- }
-}
-
XSCREENSAVER_MODULE ("Lisa", lisa)
#endif /* MODE_lisa */