Exemplo n.º 1
0
void make_stars(void)
{
	OBJECT *obj;
	WORD ta4;

	last_star=makestar();
	last_star->oslink=NULL;

	/* amx2 */
	ta4=100;
	/* amx1 */
	do
	{
		makestar();
		(OBJECT *)(current_proc->pa8)->oslink=last_star;
		last_star=current_proc->pa8;
	} while (--ta4>0);

	/* amx5 */
	do
	{
		process_sleep(1);
		obj=last_star;
		/* amx4 */
		do
		{
			if ( obj->oypos.u.intpos>SCY(260) )
			{
				obj->oypos.u.intpos-=SCY(270);
				obj->oxpos.u.intpos=randu(SCX(400))-1;
			}
		} while ((obj=(OBJECT*)obj->oslink)!=NULL  );
	} while (1);
}
Exemplo n.º 2
0
int  main(){
    double x0[N],y0[N];
    double x[N],y[N];    
    makestar(x0,y0);
    int i;
    for(i = 0;i < N;i++)
        x[i]=x0[i],y[i]=y0[i];
    simulate(x,y,3.5,50,0.1,20);
    makefile(x0,y0,x,y);
    return 0;
}