/*This shows how you can make a background very easily. */ $SP,"<1>",BI=1$ $SP,"<2>",BI=2$ CDC *background; #define BALL_TIME 0.2 #define FANS_NUM 10 I64 x[FANS_NUM],y[FANS_NUM]; Bool hit[FANS_NUM]; F64 é[FANS_NUM],ball_t; I64 target_x,target_y,pitcher_x,pitcher_y; U0 DrawIt(CTask *,CDC *dc) { I64 i,*r; F64 xx,yy,t0; background->flags|=DCF_NO_TRANSPARENTS; GrBlot(dc,0,0,background); for (i=0;i",BI=1$,é[i]); if (ball_t) { t0=(tS-ball_t)/BALL_TIME; if (t0>1.0) ball_t=0; else { xx=t0*target_x+(1.0-t0)*pitcher_x; yy=t0*target_y+(1.0-t0)*pitcher_y; xx/=1.5-t0; yy/=1.5-t0; r=Mat4x4New(dc->r,dc->mem_task); Mat4x4Scale(r,1.5-t0); Free(dc->r); DCMat4x4Set(dc,r); dc->flags|=DCF_TRANSFORMATION; Sprite3ZB(dc,xx,yy,0,$IB,"",BI=2$,t0); } } dc->color=RED; GrPrint(dc,FONT_WIDTH,FONT_HEIGHT,"Peg the Fans"); } U0 AnimateTask(I64) { I64 i; F64 xx,yy,t0; while (TRUE) { if (ball_t) { t0=(tS-ball_t)/BALL_TIME; xx=t0*target_x+(1.0-t0)*pitcher_x; yy=t0*target_y+(1.0-t0)*pitcher_y; } for (i=0;iwin_inhibit|=WIG_DBL_CLICK; MenuPush( "File {" " Abort(,CH_SHIFT_ESC);" " Exit(,CH_ESC);" "}" "Play {" " Restart(,'\n');" "}" ); AutoComplete; WinBorder; WinMax; DocCursor; DocClear; Init; Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs); background=GRRead("StadiumBG"); Fs->draw_it=&DrawIt; do { msg_code=GetMsg(&arg1,&arg2,1<