projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.38.tar.gz
[xscreensaver]
/
hacks
/
hopalong.c
diff --git
a/hacks/hopalong.c
b/hacks/hopalong.c
index f0093a3952e212fe8f49369fe5093949ee212989..d3cc7df0cbdc5461f9e20ec0ddd263d21295c2c0 100644
(file)
--- a/
hacks/hopalong.c
+++ b/
hacks/hopalong.c
@@
-62,8
+62,8
@@
static const char sccsid[] = "@(#)hop.c 5.00 2000/11/01 xlockmore";
# define SMOOTH_COLORS
# define reshape_hop 0
# define release_hop 0
# define SMOOTH_COLORS
# define reshape_hop 0
# define release_hop 0
+# define hop_handle_event 0
# include "xlockmore.h" /* in xscreensaver distribution */
# include "xlockmore.h" /* in xscreensaver distribution */
-# include "erase.h"
#else /* STANDALONE */
# include "xlock.h" /* in xlockmore distribution */
#endif /* STANDALONE */
#else /* STANDALONE */
# include "xlock.h" /* in xlockmore distribution */
#endif /* STANDALONE */
@@
-154,7
+154,7
@@
ENTRYPOINT ModeSpecOpt hop_opts =
#ifdef USE_MODULES
ModStruct hop_description =
{"hop", "init_hop", "draw_hop", (char *) NULL,
#ifdef USE_MODULES
ModStruct hop_description =
{"hop", "init_hop", "draw_hop", (char *) NULL,
- "refresh_hop", "init_hop",
(char *) NULL
, &hop_opts,
+ "refresh_hop", "init_hop",
"free_hop"
, &hop_opts,
10000, 1000, 2500, 1, 64, 1.0, "",
"Shows real plane iterated fractals", 0, NULL};
10000, 1000, 2500, 1, 64, 1.0, "",
"Shows real plane iterated fractals", 0, NULL};
@@
-187,15
+187,10
@@
typedef struct {
int count;
int bufsize;
XPoint *pointBuffer; /* pointer for XDrawPoints */
int count;
int bufsize;
XPoint *pointBuffer; /* pointer for XDrawPoints */
-#ifdef STANDALONE
- eraser_state *eraser;
-#endif
} hopstruct;
static hopstruct *hops = (hopstruct *) NULL;
} hopstruct;
static hopstruct *hops = (hopstruct *) NULL;
-static void free_hop(ModeInfo * mi);
-
ENTRYPOINT void
init_hop(ModeInfo * mi)
{
ENTRYPOINT void
init_hop(ModeInfo * mi)
{
@@
-204,7
+199,7
@@
init_hop(ModeInfo * mi)
double range;
hopstruct *hp;
double range;
hopstruct *hp;
- MI_INIT (mi, hops
, free_hop
);
+ MI_INIT (mi, hops);
hp = &hops[MI_SCREEN(mi)];
hp->centerx = MI_WIDTH(mi) / 2;
hp = &hops[MI_SCREEN(mi)];
hp->centerx = MI_WIDTH(mi) / 2;
@@
-387,9
+382,7
@@
init_hop(ModeInfo * mi)
return;
}
return;
}
-#ifndef STANDALONE
MI_CLEARWINDOW(mi);
MI_CLEARWINDOW(mi);
-#endif
XSetForeground(display, gc, MI_WHITE_PIXEL(mi));
hp->count = 0;
XSetForeground(display, gc, MI_WHITE_PIXEL(mi));
hp->count = 0;
@@
-408,15
+401,6
@@
draw_hop(ModeInfo * mi)
return;
hp = &hops[MI_SCREEN(mi)];
return;
hp = &hops[MI_SCREEN(mi)];
-#ifdef STANDALONE
- if (hp->eraser) {
- hp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), hp->eraser);
- if (!hp->eraser)
- init_hop(mi);
- return;
- }
-#endif
-
if (hp->pointBuffer == NULL)
return;
if (hp->pointBuffer == NULL)
return;
@@
-545,15
+529,11
@@
draw_hop(ModeInfo * mi)
XDrawPoints(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
hp->pointBuffer, hp->bufsize, CoordModeOrigin);
if (++hp->count > MI_CYCLES(mi)) {
XDrawPoints(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
hp->pointBuffer, hp->bufsize, CoordModeOrigin);
if (++hp->count > MI_CYCLES(mi)) {
-#ifdef STANDALONE
- hp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), hp->eraser);
-#else /* !STANDALONE */
init_hop(mi);
init_hop(mi);
-#endif
}
}
}
}
-
static
void
+
ENTRYPOINT
void
free_hop(ModeInfo * mi)
{
hopstruct *hp = &hops[MI_SCREEN(mi)];
free_hop(ModeInfo * mi)
{
hopstruct *hp = &hops[MI_SCREEN(mi)];
@@
-562,25
+542,13
@@
free_hop(ModeInfo * mi)
(void) free((void *) hp->pointBuffer);
}
(void) free((void *) hp->pointBuffer);
}
+#ifndef STANDALONE
ENTRYPOINT void
refresh_hop(ModeInfo * mi)
{
MI_CLEARWINDOW(mi);
}
ENTRYPOINT void
refresh_hop(ModeInfo * mi)
{
MI_CLEARWINDOW(mi);
}
-
-ENTRYPOINT Bool
-hop_handle_event (ModeInfo *mi, XEvent *event)
-{
- if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event))
- {
- MI_CLEARWINDOW(mi);
- init_hop (mi);
- return True;
- }
- return False;
-}
-
-
+#endif
XSCREENSAVER_MODULE_2 ("Hopalong", hopalong, hop)
XSCREENSAVER_MODULE_2 ("Hopalong", hopalong, hop)