
Code: Alles auswählen
EnableExplicit
InitSprite()
InitKeyboard()
LoadFont(0,"courier new",64,#PB_Font_Bold)
OpenScreen(800,600,32,"x")
Define EXIT.l = 0
Define n.l
Define c$
Define Row.l = 25
Define Glide.l = 1
Define col1.l
Define col2.l
Define Count.l = 0
Define Shift.d
Define X1.l
Define Y1.l
For n=0 To 10
CreateSprite(n,55,50)
Next
For n=1 To 5
TransparentSpriteColor(n,$FFFFFF)
TransparentSpriteColor(n+5,$000000)
Next
Restore Letters
For n=1 To 5
Read c$
StartDrawing(SpriteOutput(n))
DrawingFont(FontID(0))
DrawText(2,-22,c$,$FFFFFF,$000000)
StopDrawing()
Next
Repeat
ExamineKeyboard()
ClearScreen($402010)
Row + Glide
If Row = 0 Or Row = 49
Glide = -Glide
EndIf
StartDrawing(SpriteOutput(0))
For n=0 To 24
col1 = 255 - 10*n
col2 = col1 * 256 + 255
Line(0,Row + n ,55,0,col2)
Line(0,Row - n ,55,0,col2)
Line(0,Row + 25 + n,55,0,col1)
Line(0,Row - 25 - n,55,0,col1)
Next
StopDrawing()
Count + 1
If Count > 314159265
Count = 0
EndIf
For n=5 To 1 Step -1
UseBuffer(n+5)
DisplaySprite(0,0,0)
DisplayTransparentSprite(n,0,0)
UseBuffer(-1)
Shift = Count - 20*n
X1 = 400 - 27 + 250*Sin(Shift / 37)
Y1 = 300 - 25 + 250*Cos(Shift / 29)
DisplayTransparentSprite(n+5,X1,Y1)
Next
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
End
DataSection
Letters:
Data.s "K","A","E","R","U"
EndDataSection