Sry wenn ich einfach deine Frage umgehe

aber ich wollte auch noch ein Code mit reinschreiben der auch etwas mit dem Desktop spielt :
Schusslöcher im Bildschirm + Risse
Code: Alles auswählen
Global Mem.l
Mem = AllocateMemory(1, 1024)
Procedure.l DesktopOutput()
PokeL(Mem, 1)
ProcedureReturn Mem
EndProcedure
b.f = 3.14159265/180
Repeat
Delay(10)
StartDrawing(DesktopOutput() )
If Random(200) = 0
x = Random(GetSystemMetrics_(0))
y = Random(GetSystemMetrics_(1))
r = Random(4)+4
For n = 1 To r*2
ax = x
ay = y
w = Random(359)
Repeat
bx = ax+Cos((w+Random(12)-6)*b)*(Random(40)+40)
by = ay+Sin((w+Random(12)-6)*b)*(Random(40)+40)
LineXY(ax-1, ay , bx-1, by , RGB(128,128,128))
LineXY(ax , ay-1, bx , by-1, RGB(128,128,128))
LineXY(ax-1, ay-1, bx-1, by-1, RGB(0,0,0))
LineXY(ax , ay , bx , by , RGB(255,255,255))
ax = bx
ay = by
Until bx < 0 Or bx > GetSystemMetrics_(0) Or by < 0 Or by > GetSystemMetrics_(1)
z = r+Random(r)
ww = Random(359)
For xx = -r/2 To r/2 :
For yy = -r/2 To r/2 :
LineXY(x+xx,y+yy,x+Cos(ww*b)*z,y+Sin(ww*b)*z, RGB(0,0,0))
Next yy
Next xx
Next n
Circle(x ,y ,r/2+4, RGB(128,128,128))
Circle(x ,y ,r/2+3, RGB(0,0,0))
For n = 1 To r
Next n
EndIf
StopDrawing()
Until GetAsyncKeyState_(#VK_ESCAPE)
End
und
Wasser läuft am Desktop runter
Code: Alles auswählen
Global Mem.l
Mem = AllocateMemory(1, 1024)
Procedure.l DesktopOutput()
PokeL(Mem, 1)
ProcedureReturn Mem
EndProcedure
Global xx, yy
xx = GetSystemMetrics_(0)
yy = GetSystemMetrics_(1)
Procedure Weich(PosX, PosY)
x = Random(60)-30
y = Random(60)-30
F0 = Point(PosX+x ,PosY+y )
F1 = Point(PosX+x-1,PosY+y )
F2 = Point(PosX+x ,PosY+y-1)
F3 = Point(PosX+x+1,PosY+y )
F4 = Point(PosX+x ,PosY+y+1)
F5 = Point(PosX+x-1,PosY+y-1)
F6 = Point(PosX+x+1,PosY+y-1)
F7 = Point(PosX+x+1,PosY+y+1)
F8 = Point(PosX+x-1,PosY+y+1)
R_RGB = (Red(F0)+Red(F1)+Red(F2)+Red(F3)+Red(F4)+Red(F5)+Red(F6)+Red(F7)+Red(F8))/9
G_RGB = (Green(F0)+Green(F1)+Green(F2)+Green(F3)+Green(F4)+Green(F5)+Green(F6)+Green(F7)+Green(F8))/9
B_RGB = (Blue(F0)+Blue(F1)+Blue(F2)+Blue(F3)+Blue(F4)+Blue(F5)+Blue(F6)+Blue(F7)+Blue(F8))/9
If PosX+x > -1 And PosY+y > -1 : Box(PosX+x, PosY+y, 2, 2, RGB(R_RGB, G_RGB, B_RGB)) : EndIf
EndProcedure
b.f = 3.14159265/180
Repeat
StartDrawing(DesktopOutput())
For y = 1 To yy-2 Step 2
For x = 1 To xx-2 Step 2
Weich(x, y)
Next x
Delay(5)
If GetAsyncKeyState_(#VK_ESCAPE) : InvalidateRect_(0, 0, 0) : End : EndIf
Next y
StopDrawing()
ForEver