#include #include #include "sintab.h" #define STARS 256 #define SHIFT 16 #define CINC 8 struct star { int x,y,dx,dy; int c,d; } stars[STARS]; GraphicsContext screen, buffer; #define MODE G320x200x256 #define PLOTFC(x,y,c) gl_setpixel((x)>>SHIFT,(y)>>SHIFT,(c)) #define CLEAR() gl_fillbox(0,0,WIDTH,HEIGHT,0) __inline__ newstar(int s) { int t,u; stars[s].x=WIDTH<<(SHIFT-1); stars[s].y=HEIGHT<<(SHIFT-1); stars[s].c=64*(rand()%4); #if 1 t=rand()%TABSIZE; u=rand()%128+32; stars[s].dx=sintab[t]*(u<=(WIDTH<=(HEIGHT<