- fshell=fshells;
- for(n=SHELLCOUNT;n;n--){
- if (!explode(fshell)){
- recycle(fshell,rnd(fsc_width),rnd(fsc_height)); }
- fshell++; }}
- if(light_on) light_2x2(fshells);
- put_image(display,win,gc,xim);
- usleep(delay);
- XSync(display,0);
- sniff_events(display, win, fshells);
- blur_best();}
+ st->fshell=st->ffshell;
+ for(n=SHELLCOUNT;n;n--){
+ if (!explode(st, st->fshell)){
+ recycle(st, st->fshell,rnd(st->width),rnd(st->height)); }
+ st->fshell++; }}
+#if HAVE_X86_MMX
+ if(st->glow_on) mmx_glow(st->palaka1,st->width,st->height,8,st->palaka2);
+#else
+ if(st->glow_on) glow(st);
+#endif
+ if(st->flash_on) light_2x2(st, st->ffshell);
+ put_image(st);
+#if HAVE_X86_MMX
+ if(!st->glow_on) mmx_blur(st->palaka1,st->width,st->height,8);
+#else
+ if(!st->glow_on) blur(st);
+#endif
+
+ return st->delay;
+}
+
+
+static void
+fireworkx_reshape (Display *dpy, Window window, void *closure,
+ unsigned int w, unsigned int h)
+{
+ struct state *st = (struct state *) closure;
+ resize(st);
+}
+
+static Bool
+fireworkx_event (Display *dpy, Window window, void *closure, XEvent *event)
+{
+ struct state *st = (struct state *) closure;
+ if (event->type == ButtonPress) {
+ recycle(st, st->fshell, event->xbutton.x, event->xbutton.y);
+ return True;
+ }
+ return False;
+}