Код:
Procedure Ris(arg.f)
StartDrawing(CanvasOutput(0))
Box(0,0,256*3,192*3,0)
horiz = 192/2
Box(0, horiz*3, 256*3, 3, RGB(255,255,255))
y.f = 0: ystp.f = arg
Repeat
Box(0, horiz*3+y*3, 256*3, 3, RGB(255,255,255))
y = y + ystp
ystp = ystp + 2
Until y>191
StopDrawing()
ProcedureReturn
EndProcedure
If OpenWindow(0, 0, 0, 256*3, 192*3, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CanvasGadget(0, 0, 0, 256*3, 192*3)
quit.a = 0
yp.f = 0.5
Repeat
Event = WaitWindowEvent(10)
Ris(yp)
yp = yp + 0.3
If yp>2
yp = 0
EndIf
If Event = #PB_Event_CloseWindow
quit = 1
EndIf
quit = quit | GetAsyncKeyState_(#VK_ESCAPE)
Until quit
EndIf
EndIf
End