Hello,
more sdl: example 21
include "sdl.inc"
loadwinIcon "bitmaps/happy.bmp"
window 1024,600,1
LoadFont 1,"sdlfonts/bullpen.ttf",34
type particle
single x
single y
single xi
single yi
sys life
end type
particle pc[200]
int i, v, h, p1, p2,size=96
float a
LoadSprite 1,"bitmaps/happy.bmp",1
For i=0 to 100
pc[i].x=0
pc[i].y=0
pc[i].xi=Rand(10,1000)/400
pc[i].yi=Rand(10,1000)/200
pc[i].life=1400
Next
while Key(27)=0
Cls 0,0,255
For i=0 to 100
iF pc[i].life then
pc[i].x += pc[i].xi
pc[i].y += pc[i].yi
pc[i].life -=1
pc[i].yi +=0.01
iF pc[i].y > 500 then
pc[i].yi = -pc[i].yi * 0.6
End iF
End iF
Next
For i=0 to 100
iF pc[i].life then
size=pc[i].life*10/100
Sprite 1,pc[i].x,pc[i].y,0
Else
For i=0 to 100
pc[i].x=0
pc[i].y=0
pc[i].xi=Rand(10,1000)/300
pc[i].yi=Rand(10,1000)/200
pc[i].life=1400
Next
End iF
Next
a +=.2
iF a >=1 then
a=0
v +=1
iF v=15 Then v=0
End iF
h +=1
iF h=240 then h=0
textcolor 255,255,255
text "HAPPY EUROS",350,10,1
Redraw
wait 10
wend
winExit
[attachment deleted by admin]