X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fgalaxy.c;fp=hacks%2Fgalaxy.c;h=3a6e1f78582c08671210d80cb6de507696cfdfb1;hp=7f72af5b2ccb22b0aee64cb6c13af4805341d13f;hb=39809ded547bdbb08207d3e514950425215b4410;hpb=4361b69d3178d7fc98d0388f9a223af6c2651aba diff --git a/hacks/galaxy.c b/hacks/galaxy.c index 7f72af5b..3a6e1f78 100644 --- a/hacks/galaxy.c +++ b/hacks/galaxy.c @@ -46,9 +46,12 @@ static const char sccsid[] = "@(#)galaxy.c 4.04 97/07/28 xlockmore"; "*ncolors: 64 \n" \ "*fpsSolid: true \n" \ "*ignoreRotation: True \n" \ + "*lowrez: True \n" \ # define UNIFORM_COLORS # define release_galaxy 0 +# define reshape_galaxy 0 +# define galaxy_handle_event 0 # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ # include "xlock.h" /* from the xlockmore distribution */ @@ -158,8 +161,8 @@ x-axis */ static unistruct *universes = NULL; -static void -free_galaxies(ModeInfo * mi) +ENTRYPOINT void +free_galaxy(ModeInfo * mi) { unistruct *gp = &universes[MI_SCREEN(mi)]; if (gp->galaxies != NULL) { @@ -193,7 +196,7 @@ startover(ModeInfo * mi) gp->rot_x = 0; if (MI_BATCHCOUNT(mi) < -MINGALAXIES) - free_galaxies(mi); + free_galaxy(mi); gp->ngalaxies = MI_BATCHCOUNT(mi); if (gp->ngalaxies < -MINGALAXIES) gp->ngalaxies = NRAND(-gp->ngalaxies - MINGALAXIES + 1) + MINGALAXIES; @@ -308,7 +311,7 @@ init_galaxy(ModeInfo * mi) { unistruct *gp; - MI_INIT (mi, universes, free_galaxies); + MI_INIT (mi, universes); gp = &universes[MI_SCREEN(mi)]; # ifdef HAVE_JWXYZ /* Don't second-guess Quartz's double-buffering */ @@ -437,29 +440,12 @@ draw_galaxy(ModeInfo * mi) startover(mi); } -ENTRYPOINT void -reshape_galaxy(ModeInfo * mi, int width, int height) -{ - XClearWindow (MI_DISPLAY (mi), MI_WINDOW(mi)); - init_galaxy (mi); -} - +#ifndef STANDALONE ENTRYPOINT void refresh_galaxy(ModeInfo * mi) { /* Do nothing, it will refresh by itself */ } - -ENTRYPOINT Bool -galaxy_handle_event (ModeInfo *mi, XEvent *event) -{ - if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event)) - { - reshape_galaxy (mi, MI_WIDTH(mi), MI_HEIGHT(mi)); - return True; - } - return False; -} - +#endif XSCREENSAVER_MODULE ("Galaxy", galaxy)