-# define PROGCLASS "Grav"
-# define HACK_INIT init_grav
-# define HACK_DRAW draw_grav
-# define grav_opts xlockmore_opts
-# define DEFAULTS "*count: 12 \n" \
- "*delay: 10000 \n" \
- "*ncolors: 64 \n"
-# define BRIGHT_COLORS
-# include "xlockmore.h" /* from the xscreensaver distribution */
-#else /* !STANDALONE */
-# include "xlock.h" /* from the xlockmore distribution */
-#endif /* !STANDALONE */
+#define MODE_grav
+#define DEFAULTS "*delay: 10000 \n" \
+ "*count: 12 \n" \
+ "*ncolors: 64 \n" \
+ "*fpsSolid: true \n" \
+
+#define BRIGHT_COLORS
+# define reshape_grav 0
+# define grav_handle_event 0
+# include "xlockmore.h" /* in xscreensaver distribution */
+#else /* STANDALONE */
+# include "xlock.h" /* in xlockmore distribution */
+#endif /* STANDALONE */
+
+#ifdef MODE_grav
+
+#define DEF_DECAY "True" /* Damping for decaying orbits */
+#define DEF_TRAIL "True" /* For trails (works good in mono only) */
+
+static Bool decay;
+static Bool trail;
+
+static XrmOptionDescRec opts[] =
+{
+ {"-decay", ".grav.decay", XrmoptionNoArg, "on"},
+ {"+decay", ".grav.decay", XrmoptionNoArg, "off"},
+ {"-trail", ".grav.trail", XrmoptionNoArg, "on"},
+ {"+trail", ".grav.trail", XrmoptionNoArg, "off"}
+};
+static argtype vars[] =
+{
+ {&decay, "decay", "Decay", DEF_DECAY, t_Bool},
+ {&trail, "trail", "Trail", DEF_TRAIL, t_Bool}
+};
+static OptionStruct desc[] =
+{
+ {"-/+decay", "turn on/off decaying orbits"},
+ {"-/+trail", "turn on/off trail dots"}
+};
+
+ENTRYPOINT ModeSpecOpt grav_opts =
+{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc};
+
+#ifdef USE_MODULES
+ModStruct grav_description =
+{"grav", "init_grav", "draw_grav", "release_grav",
+ "refresh_grav", "init_grav", (char *) NULL, &grav_opts,
+ 10000, -12, 1, 1, 64, 1.0, "",
+ "Shows orbiting planets", 0, NULL};
+
+#endif