~ubuntu-branches/ubuntu/dapper/xscreensaver/dapper

« back to all changes in this revision

Viewing changes to hacks/galaxy.c

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2005-10-11 21:00:42 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20051011210042-u7q6zslgevdxspr3
Tags: 4.21-4ubuntu17
updated pt_BR again, fixed to UTF-8 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- Mode: C; tab-width: 4 -*- */
2
2
/* galaxy --- spinning galaxies */
3
3
/* #include<math.h>*/
4
 
#if !defined( lint ) && !defined( SABER )
 
4
#if 0
5
5
static const char sccsid[] = "@(#)galaxy.c 4.04 97/07/28 xlockmore";
6
6
#endif
7
7
 
56
56
#endif /* !STANDALONE */
57
57
 
58
58
static Bool tracks;
 
59
static Bool spin;
59
60
 
60
61
#define DEF_TRACKS "True"
 
62
#define DEF_SPIN   "True"
61
63
 
62
64
static XrmOptionDescRec opts[] =
63
65
{
64
 
 {"-tracks", ".galaxy.tracks", XrmoptionNoArg, (caddr_t) "on"},
65
 
 {"+tracks", ".galaxy.tracks", XrmoptionNoArg, (caddr_t) "off"}
 
66
 {"-tracks", ".galaxy.tracks", XrmoptionNoArg, "on"},
 
67
 {"+tracks", ".galaxy.tracks", XrmoptionNoArg, "off"},
 
68
 {"-spin",   ".galaxy.spin",   XrmoptionNoArg, "on"},
 
69
 {"+spin",   ".galaxy.spin",   XrmoptionNoArg, "off"}
66
70
};
67
71
 
68
72
static argtype vars[] =
69
73
{
70
 
 {(caddr_t *) & tracks, "tracks", "Tracks", DEF_TRACKS, t_Bool}
 
74
 {&tracks, "tracks", "Tracks", DEF_TRACKS, t_Bool},
 
75
 {&spin,   "spin",   "Spin",   DEF_SPIN,   t_Bool}
71
76
};
72
77
 
73
78
static OptionStruct desc[] =
74
79
{
75
 
 {"-/+tracks", "turn on/off star tracks"}
 
80
 {"-/+tracks", "turn on/off star tracks"},
 
81
 {"-/+spin",   "do/don't spin viewpoint"}
76
82
};
77
83
 
78
 
ModeSpecOpt galaxy_opts = { 2, opts, 1, vars, desc };
 
84
ModeSpecOpt galaxy_opts = { 4, opts, 2, vars, desc };
79
85
 
80
86
 
81
87
#define FLOATRAND ((double) LRAND() / ((double) MAXRAND))
320
326
 int         i, j, k; /* more tmp */
321
327
    XPoint    *dummy = NULL;
322
328
 
323
 
    gp->rot_y += 0.01;
324
 
 gp->rot_x += 0.004;
 
329
 if(spin){
 
330
  gp->rot_y += 0.01;
 
331
  gp->rot_x += 0.004;
 
332
 }
325
333
 
326
334
 cox = COSF(gp->rot_y);
327
335
 six = SINF(gp->rot_y);