/* 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 MAX_FANS 10 I64 x[MAX_FANS],y[MAX_FANS]; Bool hit[MAX_FANS]; F64 é[MAX_FANS],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=GrScaleNew(dc->r,1.5-t0,dc->mem_task); Free(dc->r); GrSetRotMat(dc,r); dc->flags|=DCF_TRANSFORMATION; SpriteZ3B(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');" "}" ); WinMax; WinBorder; WordStat; Init; Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs); background=GRARead("::/Demo/Games/Stadium/Stadium"); DocCursor; DocClear; Fs->draw_it=&DrawIt; do { msg_code=GetMsg(&p1,&p2,1<