Lines Matching defs:rp

159     rocket     *rp;
177 for (rockn = 0, rp = pp->rockq; rockn < batchcount; rockn++, rp++) {
178 rp->state = SILENT;
181 rp->Xpoints[starn].width = rp->Xpoints[starn].height =
182 rp->Xpoints2[starn].width = rp->Xpoints2[starn].height = bsize;
224 rocket *rp;
241 for (rockn = pp->nflying, rp = pp->rockq; rockn > 0; rp++) {
242 if (rp->state != SILENT) {
243 animate(win, pp, rp);
253 rocket *rp;
281 rp = pp->rockq;
285 while (rp->state != SILENT)
286 rp++;
288 rp->shelltype = shelltype;
289 rp->state = REDGLARE;
290 rp->color1 = color1;
291 rp->color2 = color2;
292 rp->xvel = xvel;
293 rp->yvel = FLOATRAND(yvel * 0.97, yvel * 1.03);
294 rp->fuse = INTRAND((fuse * 90) / 100, (fuse * 110) / 100);
295 rp->x = x + FLOATRAND(multi * 7.6, multi * 8.4);
296 rp->y = pp->height - 1;
297 rp->nstars = nstars;
302 animate(win, pp, rp)
305 rocket *rp;
310 if (rp->state == REDGLARE) {
311 shootup(win, pp, rp);
314 if (rp->state == BURSTINGINAIR) {
315 for (starn = 0; starn < rp->nstars; starn++) {
316 rp->sx[starn] = rp->sy[starn] = 0.0;
317 rp->Xpoints[starn].x = (int) rp->x;
318 rp->Xpoints[starn].y = (int) rp->y;
319 if (rp->shelltype == DOUBLECLOUD) {
320 rp->Xpoints2[starn].x = (int) rp->x;
321 rp->Xpoints2[starn].y = (int) rp->y;
327 rp->sxvel[starn] = r * cos(theta);
328 rp->syvel[starn] = r * sin(theta);
330 rp->fuse = INTRAND(MINSFUSE, MAXSFUSE);
333 if (rp->state == BURSTINGINAIR) {
334 burst(win, pp, rp);
339 shootup(win, pp, rp)
342 rocket *rp;
344 XFillRectangle(dsp, win, pp->bgGC, (int) (rp->x), (int) (rp->y),
347 if (rp->fuse-- <= 0) {
348 rp->state = BURSTINGINAIR;
351 rp->x += rp->xvel;
352 rp->y += rp->yvel;
353 rp->yvel += pp->rockdecel;
355 XFillRectangle(dsp, win, Scr[screen].gc, (int) (rp->x), (int) (rp->y),
360 burst(win, pp, rp)
363 rocket *rp;
370 nstars = rp->nstars;
371 stype = rp->shelltype;
374 XFillRectangles(dsp, win, pp->bgGC, rp->Xpoints, nstars);
376 XFillRectangles(dsp, win, pp->bgGC, rp->Xpoints2, nstars);
378 XDrawPoints(dsp, win, pp->bgGC, rp->Xpoints, nstars, CoordModeOrigin);
380 XDrawPoints(dsp, win, pp->bgGC, rp->Xpoints2, nstars, CoordModeOrigin);
383 if (rp->fuse-- <= 0) {
384 rp->state = SILENT;
389 if (rp->fuse <= 7) {
390 if ((rp->nstars = nstars = nstars * 90 / 100) == 0)
393 rx = rp->x;
394 ry = rp->y;
397 sx = rp->sx[starn] += rp->sxvel[starn];
398 sy = rp->sy[starn] += rp->syvel[starn];
399 rp->syvel[starn] += sd;
400 rp->Xpoints[starn].x = (int) (rx + sx);
401 rp->Xpoints[starn].y = (int) (ry + sy);
403 rp->Xpoints2[starn].x = (int) (rx + 1.7 * sx);
404 rp->Xpoints2[starn].y = (int) (ry + 1.7 * sy);
407 rp->x = rx + rp->xvel;
408 rp->y = ry + rp->yvel;
409 rp->yvel += sd;
411 XSetForeground(dsp, Scr[screen].gc, rp->color1);
413 XFillRectangles(dsp, win, Scr[screen].gc, rp->Xpoints, nstars);
415 XSetForeground(dsp, Scr[screen].gc, rp->color2);
416 XFillRectangles(dsp, win, Scr[screen].gc, rp->Xpoints2, nstars);
419 XDrawPoints(dsp, win, Scr[screen].gc, rp->Xpoints, nstars, CoordModeOrigin);
421 XSetForeground(dsp, Scr[screen].gc, rp->color2);
422 XDrawPoints(dsp, win, Scr[screen].gc, rp->Xpoints2, nstars,