http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.16.tar.gz
[xscreensaver] / hacks / glx / spheremonics.c
index f4ffa0116085ecc4e5a6dadcc1cb72c44748f40d..7d074a2dd1fab5152f804952ad0baeb0e185205c 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2002 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2002, 2004 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -165,14 +165,14 @@ static XrmOptionDescRec opts[] = {
 };
 
 static argtype vars[] = {
-  {(caddr_t *) &do_spin,   "spin",   "Spin",   DEF_SPIN,   t_String},
-  {(caddr_t *) &do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
-  {(caddr_t *) &res,       "resolution", "Resolution", DEF_RESOLUTION, t_Int},
-  {(caddr_t *) &duration,  "duration",   "Duration",   DEF_DURATION,   t_Int},
-  {(caddr_t *) &do_bbox,   "bbox",   "BBox",   DEF_BBOX,   t_Bool},
-  {(caddr_t *) &do_grid,   "grid",   "Grid",   DEF_GRID,   t_Bool},
-  {(caddr_t *) &smooth_p,  "smooth", "Smooth", DEF_SMOOTH, t_Bool},
-  {(caddr_t *) &static_parms, "parameters", "Parameters", DEF_PARMS, t_String},
+  {&do_spin,      "spin",       "Spin",       DEF_SPIN,       t_String},
+  {&do_wander,    "wander",     "Wander",     DEF_WANDER,     t_Bool},
+  {&res,          "resolution", "Resolution", DEF_RESOLUTION, t_Int},
+  {&duration,     "duration",   "Duration",   DEF_DURATION,   t_Int},
+  {&do_bbox,      "bbox",       "BBox",       DEF_BBOX,       t_Bool},
+  {&do_grid,      "grid",       "Grid",       DEF_GRID,       t_Bool},
+  {&smooth_p,     "smooth",     "Smooth",     DEF_SMOOTH,     t_Bool},
+  {&static_parms, "parameters", "Parameters", DEF_PARMS,      t_String},
 };
 
 ModeSpecOpt ccs_opts = {countof(opts), opts, countof(vars), vars, NULL};
@@ -768,7 +768,7 @@ static void
 draw_label (ModeInfo *mi, const char *s)
 {
   spheremonics_configuration *cc = &ccs[MI_SCREEN(mi)];
-  int i;
+  unsigned int i;
   
   glPushAttrib(GL_TRANSFORM_BIT | GL_ENABLE_BIT);
   glDisable(GL_LIGHTING);
@@ -851,11 +851,11 @@ init_spheremonics (ModeInfo *mi)
       }
 
     cc->rot = make_rotator (spinx ? spin_speed : 0,
-                            spiny ? spin_speed : 0,
                             spinz ? spin_speed : 0,
+                            spiny ? spin_speed : 0,
                             1.0,
                             do_wander ? wander_speed : 0,
-                            True);
+                            (spinx && spiny && spinz));
     cc->trackball = gltrackball_init ();
   }
 
@@ -871,7 +871,7 @@ init_spheremonics (ModeInfo *mi)
 
   cc->m_max = 4; /* 9? */
   {
-    int i;
+    unsigned int i;
     for (i = 0; i < countof(cc->dm); i++)
       cc->dm[i] = 1;  /* going up! */