Mountain/* Graphics Not Rendered in HTML */ //Used in Camp, Quail, GodTalking, Clouds, and Squirt. <2>/* Graphics Not Rendered in HTML */ <3>/* Graphics Not Rendered in HTML */ <4>/* Graphics Not Rendered in HTML */ <5>/* Graphics Not Rendered in HTML */ <6>/* Graphics Not Rendered in HTML */ <7>/* Graphics Not Rendered in HTML */ U8 *right_imgs[4]={<2>,<3>,<4>,<3>}, *left_imgs [4]={<5>,<6>,<5>,<7>}; I64 x=0,y=0; U0 DrawMountain(CTask *task,CDC *dc) { static I64 last_x; static Bool last_left; I64 cx=task->pix_width/2,cy=task->pix_height/2; dc->color=BROWN; dc->thick=2; Sprite3(dc,0,117,0,<1>); GrLine3(dc,cx,cy,0,cx+100,cy-20,0); GrLine3(dc,cx+100,cy-20,0,cx-90,cy-40,0); GrLine3(dc,cx-90,cy-40,0,cx+70,cy-60,0); GrLine3(dc,cx+70,cy-60,0,cx-70,cy-60,0); GrLine3(dc,cx-70,cy-60,0,cx+60,cy-80,0); GrLine3(dc,cx+60,cy-80,0,cx-50,cy-100,0); GrLine3(dc,cx-50,cy-100,0,cx+30,cy-120,0); GrLine3(dc,cx+30,cy-120,0,cx-15,cy-140,0); dc->color=BROWN; GrCircle(dc,50,25,15); dc->color=YELLOW; GrFloodFill(dc,50,25); if (Blink) { dc->color=BLACK; GrPrint(dc,cx-50,80,"Mt. Horeb"); } if (x<last_x) last_left=TRUE; else if (x>last_x) last_left=FALSE; dc->thick=1; if (last_left) Sprite3(dc,x+cx,y+cy,0,left_imgs [ToI64(6.0*tS)&3]); else Sprite3(dc,x+cx,y+cy,0,right_imgs[ToI64(6.0*tS)&3]); last_x=x; } //This is the path of the man. CD3I32 mountain[17]={{0,0,0},{100,-20,0},{100,-20,0},{-100,-40,0},{-100,-40,0}, {80,-60,0},{80,-60,0},{-80,-60,0},{-80,-60,0}, {60,-80,0},{60,-80,0},{-60,-100,0},{-60,-100,0},{40,-120,0}, {40,-120,0},{-37,-140,0},{-37,-140,0}}; Bool PlotMan(U8 *,I64 _x,I64 _y,I64) { x=_x; y=_y; Sleep(10); return !ToBool(ScanChar); } U0 Mountain() { SettingsPush(Fs,TSF_SAME_SONG); //See SettingsPush try { Fs->text_attr=YELLOW<<4+BLUE; AutoComplete; WinBorder; WinMax; DocCursor; DocClear; Fs->draw_it=&DrawMountain; BSpline2(NULL,&mountain,17,&PlotMan); //See Graphics/Math. } catch PutExcept; SettingsPop(Fs,TSF_SAME_SONG); } #if __CMD_LINE__ Mountain; #endif