//goglus generate robot pixilang (2009) B=#101010 S=SNEG a=RED z=GREEN o=ORANGE n=BLUE robobottom=" ..aaaaaa ..a.aa.a ..aaaaaa ...aaaa zzoooooozz zzoooooozz z.oooooo.z ..nnnnnn ..nnnnnn ..nn..nn .nnn..nnn " make_pixi(robobottom) r=#bfbfbf savebottom=" ..rrrrr.. ..r.r.r.. ..rrrrr.. ...rrr... ..rrrrr rrrrrrrrr ..rrrrr ...rrr.. ..rrrrr ..rr.rr .rrr.rrr " make_pixi(savebottom) xz=777 yz=777 body = new_pixi( 5, 7, 1 ) head = new_pixi( 7, 7, 1 ) hand = new_pixi( 9, 3, 1 ) foot = new_pixi( 5,5, 1 ) clear(S) print("MAKE",-65,142,B) print("SAVE",35,142,#c5c5c5) print("clik - generate robot",-85,-132,B) start: pixi(robobottom,-93,132,4,2) pixi(savebottom,95,132,4,2) //robots pixi(head, 0, -70, 8 ) pixi( foot, 0, 80, 12 ) pixi( hand, 0, 0, 16 ) pixi( body, 0, 20, 16 ) handle_keys( { a=-1 b=-1 x1=gpx+2 y1=gpy+2 color=get_dot(x1,y1) if color=ORANGE {Body} if color=GREEN {Hand} if color=BLUE{Foot} if color=RED {Head} if color=#bfbfbf{tame video_export_gif("robot.$h.$m.$s.gif",-80,-120,160,245)} if color=B {Head Foot Hand Body} }, {pause_video_export }, { } ) frame(0) pause_video_export go start Body: set_screen(body) xs = get_pixi_xsize( body ) ys = get_pixi_ysize( body ) y = 0 x = 0 yloop: x = 0 xloop: xx = x - xs / 2 yy = y - ys / 2 dot( xx, yy, S ) dot( -xx, yy, S ) dot( -xx, -yy, S ) dot( xx, -yy, S ) if rand & 1 { dot( xx, yy, B ) dot( -xx, yy, B ) dot( -xx, -yy, B ) dot( xx, -yy, B )} x + 1 if x < xs { go xloop } y + 1 if y < ys { go yloop } set_screen( 0 ) ret Head: set_screen( head ) hxs = get_pixi_xsize( head ) hys = get_pixi_ysize( head) hy = 0 hx = 0 hyloop: hx = 0 hxloop: hxx = hx - hxs/2 hyy = hy - hxs/2 dot( hx, hy, S ) dot( -hx, hy, S ) if rand & 1{ dot( hxx, hyy, B ) dot( -hxx, hyy, B )} hx + 1 if hx < hxs { go hxloop } hy + 1 if hy < hys { go hyloop } set_screen( 0 ) ret Hand: set_screen( hand ) handxs = get_pixi_xsize( hand ) handys = get_pixi_ysize( hand ) handy = 0 handx = 0 handyloop: handx = 0 handxloop: handxx = handx - handxs / 2 handyy = handy - handys / 2 dot( handxx, handyy, S ) dot( -handxx, handyy, S ) dot( -handxx, -handyy, S ) dot( handxx, -handyy, S ) if rand & 1 { dot( handxx, handyy, B ) dot( -handxx, handyy, B ) dot( -handxx, -handyy, B ) dot( handxx, -handyy, B ) } handx + 1 if handx < handxs { go handxloop } handy + 1 if handy < handys { go handyloop } set_screen( 0 ) ret Foot: set_screen( foot ) footxs = get_pixi_xsize( foot ) footys = get_pixi_ysize( foot ) footy = 0 footx = 0 footyloop: footx = 0 footxloop: footxx = footx - footxs / 2 footyy = footy - footys / 2 dot( footxx, footyy, S ) dot( -footxx, footyy, S ) dot( -footxx, -footyy, S ) dot( footxx, -footyy, S ) if rand & 1 { dot( footxx, footyy, B ) dot( -footxx, footyy, B ) dot( -footxx, -footyy, B ) dot( footxx, -footyy, B ) } footx + 1 if footx < footxs {go footxloop} footy + 1 if footy < footys {go footyloop} set_screen( 0 ) ret tame: h = get_hours m = get_minutes s = get_seconds ret