~ubuntu-branches/ubuntu/karmic/xscreensaver/karmic

« back to all changes in this revision

Viewing changes to hacks/glx/gears.c

  • Committer: Bazaar Package Importer
  • Author(s): Ralf Hildebrandt
  • Date: 2006-07-29 23:00:43 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: james.westby@ubuntu.com-20060729230043-3ergkicskbntet5n
Tags: 4.24-5
remove /usr/doc/xscreensaver link to finish /usr/doc ->
/usr/share/doc transition (closes: #380394)

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
#define countof(x) (sizeof((x))/sizeof((*x)))
62
62
 
63
63
#define DEF_PLANETARY "False"
 
64
#define DEF_SPIN "True"
64
65
 
65
66
static int planetary;
 
67
static int spin;
66
68
 
67
69
static XrmOptionDescRec opts[] = {
68
70
  {"-planetary", ".gears.planetary", XrmoptionNoArg, "true" },
69
71
  {"+planetary", ".gears.planetary", XrmoptionNoArg, "false" },
 
72
  {"-spin", ".gears.spin", XrmoptionNoArg, "true" },
 
73
  {"+spin", ".gears.spin", XrmoptionNoArg, "false" },
70
74
};
71
75
 
72
76
static argtype vars[] = {
73
77
  {&planetary, "planetary", "Planetary", DEF_PLANETARY, t_Bool},
 
78
  {&spin, "spin", "Spin", DEF_SPIN, t_Bool},
74
79
};
75
80
 
76
81
ModeSpecOpt gears_opts = {countof(opts), opts, countof(vars), vars, NULL};
535
540
 
536
541
    gltrackball_rotate (gp->trackball);
537
542
 
538
 
    {
539
 
      double x, y, z;
540
 
      get_rotation (gp->rot, &x, &y, &z, !gp->button_down_p);
541
 
      glRotatef (x * 360, 1.0, 0.0, 0.0);
542
 
      glRotatef (y * 360, 0.0, 1.0, 0.0);
543
 
      glRotatef (z * 360, 0.0, 0.0, 1.0);
544
 
    }
 
543
    if (spin)
 
544
          {
 
545
                double x, y, z;
 
546
                get_rotation (gp->rot, &x, &y, &z, !gp->button_down_p);
 
547
                glRotatef (x * 360, 1.0, 0.0, 0.0);
 
548
                glRotatef (y * 360, 0.0, 1.0, 0.0);
 
549
                glRotatef (z * 360, 0.0, 0.0, 1.0);
 
550
          }
545
551
 
546
552
    if (!planetary) {
547
553
      glPushMatrix();