wozu hat man denn PB ...
Code: Alles auswählen
InitSprite()
OpenWindow(0, 0, 0, 600, 100, "SCREEN", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 600, 100, 0, 0, 0)
LoadFont(0,"Arial", 50, #PB_Font_Bold|#PB_Font_HighQuality)
CreateSprite(1,600,100)
StartDrawing(SpriteOutput(1))
DrawingMode(1)
Box(0,0,600,100, $804020)
DrawingFont(FontID(0))
DrawText(50, 10, "Pure Basic 4.20", $804021)
StopDrawing()
TransparentSpriteColor(1, $804021)
CreateSprite(2,600,100)
StartDrawing(SpriteOutput(2))
DrawingMode(1)
For n = 0 To 30
z.f = Sin(n/60*#PI)
Circle(300, 3515, 3500-n, RGB(160-z*80, 160-z*80, 160-z*80))
Next
Circle(300, 3515, 3500-30, RGB(70, 70,70))
Circle(300, 3515, 3500-31, RGB(60, 60,60))
For n = 31 To 60
z.f = Sin(n/60*#PI)
Circle(300, 3515, 3500-n, RGB(z*50, z*50, z*50))
Next
StopDrawing()
CreateSprite(3,600,100)
UseBuffer(3)
DisplaySprite(2,0,0)
DisplayTransparentSprite(1,0,0)
UseBuffer(-1)
Procedure IN_Glaetten()
For x = 1 To 598
For y = 1 To 98
F0 = Point(x ,y )
F1 = Point(x-1,y )
F2 = Point(x ,y-1)
F3 = Point(x+1,y )
F4 = Point(x ,y+1)
R_RGB = (Red(F0)+Red(F1)+Red(F2)+Red(F3)+Red(F4))/5
G_RGB = (Green(F0)+Green(F1)+Green(F2)+Green(F3)+Green(F4))/5
B_RGB = (Blue(F0)+Blue(F1)+Blue(F2)+Blue(F3)+Blue(F4))/5
Plot(x, y, RGB(R_RGB, G_RGB, B_RGB))
Next
Next
EndProcedure
StartDrawing(SpriteOutput(3))
IN_Glaetten()
StopDrawing()
Repeat
If WindowEvent() = #PB_Event_CloseWindow : End : EndIf
ClearScreen($804020)
DisplayTransparentSprite(3,0,0)
FlipBuffers()
ForEver