Lines Matching defs:hp
91 hopstruct *hp = &hops[screen];
95 hp->centerx = xgwa.width / 2;
96 hp->centery = xgwa.height / 2;
97 range = sqrt((double) hp->centerx * hp->centerx +
98 (double) hp->centery * hp->centery) /
101 hp->pix = 0;
102 hp->inc = (int) ((random() / MAXRAND) * 200) - 100;
103 hp->a = (random() / MAXRAND) * range - range / 2.0;
104 hp->b = (random() / MAXRAND) * range - range / 2.0;
105 hp->c = (random() / MAXRAND) * range - range / 2.0;
107 hp->c = 0.0;
109 hp->i = hp->j = 0.0;
116 hp->centerx * 2, hp->centery * 2);
118 hp->startTime = seconds();
129 hopstruct *hp = &hops[screen];
131 hp->inc++;
133 XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[hp->pix]);
134 if (++hp->pix >= Scr[screen].npixels)
135 hp->pix = 0;
138 oldj = hp->j;
139 hp->j = hp->a - hp->i;
140 hp->i = oldj + (hp->i < 0
141 ? sqrt(fabs(hp->b * (hp->i + hp->inc) - hp->c))
142 : -sqrt(fabs(hp->b * (hp->i + hp->inc) - hp->c)));
143 xp->x = hp->centerx + (int) (hp->i + hp->j);
144 xp->y = hp->centery - (int) (hp->i - hp->j);
149 if (seconds() - hp->startTime > TIMEOUT)