!--------------------------------- ! CURVA DO DRAGAO !--------------------------------- FN.DEF CurvaD(n,c$) GLOBALS.FNIMP x1,y1, x2,y2, t,rot IF n=1 THEN GR.ROTATE.START rot, x1,y1 GR.LINE ln,x1,y1, x2,y2 LET x1=x2 LET y1=y2 LET x2=x1+t ELSE CurvaD(n-1,"E") IF c$="E" THEN LET rot=90 CurvaD(n-1,"D") ELSEIF c$="D" THEN LET rot=-90 CurvaD(n-1,"D") ENDIF ENDIF FN.END WAKELOCK 3 GR.OPEN 255,0,0,0,0,1 GR.SET.ANTIALIAS 0 GR.SCREEN sw,sh GR.BITMAP.CREATE bmp,sw,sh LET sx=sw/2 LET sy=sh/2 LET ncal=0 LET l=1 DO GR.COLOR 255,0,255,0 GR.TEXT.ALIGN 2 GR.TEXT.SIZE sy/14 GR.TEXT.DRAW txt,sx,sy/10,"TOUCH TO DRAW, LEVEL: "+INT$(++l) GR.RENDER DO GR.TOUCH tch, tx,ty PAUSE 50 UNTIL tch DO GR.TOUCH tch, tx,ty UNTIL !tch POPUP "CALCULATING, LEVEL: "+INT$(l),0,-2000 GR.CLS GR.COLOR 255,128+RND()*128,128+RND()*128,128+RND()*128 LET t=INT(sx/(1.4^l)) IF t<1 THEN LET t=1 LET x1=sx LET y1=sy LET x2=x1+t LET y2=y1 LET rot=0 GR.BITMAP.DELETE bmp GR.BITMAP.CREATE bmp,sw,sh GR.BITMAP.DRAW b,bmp,0,0 GR.BITMAP.DRAWINTO.START bmp CALL CurvaD(l,"E") GR.BITMAP.DRAWINTO.END UNTIL 0