U0 AnimateTask(I64) {//Preemption is off after Spawn I64 i; F64 t; Obj *tempo; while (TRUE) { t=tS; for (i=0;itype==OT_SHEEP || tempo->type==OT_GOAT1 || tempo->type==OT_GOAT2) { tempo->x+=tempo->dx; tempo->y+=tempo->dy; tempo->z+=tempo->dz; tempo->dx=5*Cos(0.5*t+tempo->é); tempo->dz=5*Sin(0.5*t+tempo->é); } } Sleep(20); } } U0 Init() { Obj *tempo; I64 i,j,k,total=0; for (i=0;inum=i; tempo->x=RandU32&0x1FFF-0x1000; tempo->y=0; tempo->z=RandU32&0x1FFF-0x1000; tempo->é=2*ã*Rand; tempo->sym=RandU16&1; if (itype=k; } else tempo->type=OT_PEBBLE; } objs[O_BURNING_BUSH].type=OT_BUSH1; vx=0; vz=0; é=0; horeb_done=FALSE; } #define ANIMATE_STEPS 5 U0 AnimateéTask(F64 a) { I64 i; for (i=0;itext_attr=YELLOW<<4+BLUE; Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS -WIF_SELF_GRAB_SCROLL-WIF_FOCUS_TASK_MENU; AutoComplete; WinMax; WinBorder; Preempt; DocClear; "$$BG,LTCYAN$$%h6c",'\n'; "$$BG,YELLOW$$%h30c",'\n'; BibleVerse(,"Exodus,3:1",21); Init; Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs); Fs->draw_it=&DrawHoreb; while (!horeb_done) switch (GetKey(&sc)) { case 0: switch (sc.u8[0]) { case SC_CURSOR_LEFT: Spawn(&AnimateéTask,(-ã/100)(I64),"Animate é",,Fs); break; case SC_CURSOR_RIGHT: Spawn(&AnimateéTask,( ã/100)(I64),"Animate é",,Fs); break; case SC_CURSOR_UP: Spawn(&AnimateVTask,(-40.0 )(I64),"Animate V",,Fs); break; case SC_CURSOR_DOWN: Spawn(&AnimateVTask,( 40.0 )(I64),"Animate V",,Fs); break; } break; case '\n': Init; break; case CH_SHIFT_ESC: case CH_ESC: goto hr_done; } hr_done: //Don't goto out of try } catch Fs->catch_except=TRUE; DocClear; SettingsPop(Fs,TSF_SAME_SONG); MenuPop; }