Stimmt, fori ! Es hätte "im Dezimalsystem" heißen müssen. Sorry!
Frohe Festtage!
P.S.: Bei uns ist noch alles grün. Schneefall sieht ungefähr so aus:
Code
WindowTitle "Schneefall-Simulator"
'(CL) CoypLeft 2017-12 by P.Specht, Wien
WindowStyle 16 | 64
Window 0,0-%maxx,%maxy
cls rgb(0,0,100)
Showmax
Declare n&,xm&,ym&
xm&=width(%hwnd):ym&=height(%hwnd)
Randomize
n&=430
Declare x&[n&],y&[n&],g&[n&],f&
f&=rgb(255,255,255)
x&[]=rnd(xm&)
y&[]=rnd(ym&)
g&[]=2+rnd(8)+17*(rnd()>0.99)
REPEAT
Cls rgb(0,0,100)
Whileloop n&
usepen 0,g&[&Loop],f&
line x&[&Loop],y&[&Loop]-x&[&Loop],y&[&Loop]
Endwhile
Whileloop n&
if x&[&Loop]>=0
x&[&Loop]=x&[&Loop] +4 +2*rnd(2)
y&[&Loop]=y&[&Loop]+1+g&[&Loop]/2
if x&[&Loop]>=xm&
x&[&Loop]=x&[&Loop]-xm&
endif
if y&[&Loop]>=ym&
y&[&Loop]=y&[&Loop]-ym&
x&[&Loop]=xm&-x&[&Loop]
endif
endif
Endwhile
Case rnd()>0.001:waitinput 42
UNTIL %key
END
Alles anzeigen