static void DrawSpans(UBYTE *bpl) { UBYTE *frame = anim->frame[anim->current]; WORD f = normfx(SIN(frameCount * 32) * 48); WORD n = anim->height; WORD stride = screen->bytesPerRow; WaitBlitter(); while (--n >= 0) { WORD m = *frame++; while (--m >= 0) { WORD x = *frame++; x += f; bset(bpl + (x >> 3), ~x); } bpl += stride; } anim->current++; if (anim->current >= anim->count) anim->current -= anim->count; }
static void DrawPlotter() { WORD i, a; WORD t = frameCount * 5; WORD da = 2 * SIN_PI / NUM; for (i = 0, a = t; i < NUM; i++, a += da) { WORD g = SIN(ARMS * a); WORD x = normfx(normfx(SIN(t + a) * g) * 96) + 96; WORD y = normfx(normfx(COS(t + a) * g) * 96) + 96; WORD f = normfx(g * 3); if (f < 0) f = -f; if ((i & 1) && (frameCount & 15) < 3) f = 7; BitmapAddSaturated(screen[active], x, y, flare[f], carry); } }