' $Id$ Import "imagefont.bmx" Incbin "bmaxtest.bmi" Graphics 800,600,32,60 fnt:ImageFont=ImageFont.Load("incbin::bmaxtest.bmi") c=0 ci=5 Type Star Field x Field y,sp Function Create:Star() Local s:Star=New Star s.x=Rand(0,800) s.y=Rand(0,600) s.sp=Rand(1,3) Return s End Function Method Update() Plot(x,y) y:+sp y:Mod 600 End Method End Type Const NO=10000 Local st:Star[]=New Star[NO] For f=0 Until NO st[f]=Star.Create() Next While Not KeyHit(KEY_ESCAPE) Cls For f=0 Until NO st[f].Update() Next SetTransform(0,2,2) fnt.DrawColoured("DRAWCOLOURED",0,10,c/2,c/2,c) fnt.Draw("DRAW",0,20) fnt.CentreColoured("CENTRECOLOURED",30,c/2,c/2,c) fnt.Centre("CENTRE",40) c:+ci If (c=0 Or c=255) ci=-ci DrawText(MemAlloced(),0,100) If KeyHit(KEY_SPACE) Then FlushMem Flip Wend SetTransform(0,1,1) ch=33 While Not KeyHit(KEY_ESCAPE) Cls For f=0 Until NO st[f].Update() Next a$=Chr$(ch) ch:+1 If ch>Asc("Z") Then ch=33 For x=0 To 800 Step 8 For y=0 To 600 Step 8 fnt.DrawColoured(a$,x,y,c,c,c) Next Next c:+ci If (c=0 Or c=255) ci=-ci DrawText(MemAlloced(),0,100) FlushMem Flip Wend