Hello,
New Sdl-Library o3.o9.2o15
Do a test!
Demo Example 1
include "sdl.inc"
window 800,600,1
sub drawLightning(sys x1, y1, x2, y2, displace)
dim as integer curdetail=5
if displace < curDetail
color 200,200,255,255
drawline x1,y1,x2,y2
else
single mid_x = (x2+x1)/2
single mid_y = (y2+y1)/2
mid_x += (-rndF()*displace)
mid_y += (-rndF()*displace)
drawLightning(x1,y1,mid_x,mid_y,displace/2)
drawLightning(x2,y2,mid_x,mid_y,displace/2)
end if
end sub
while key(27)=0
clsA 0,0,0,40
color 0,0,0,255
drawline 0,0,799,599
color 200,200,200,255
color 255,255,255,255
fillcircle 25,300,25
fillcircle 775,300,25
drawlightning(50,300,750,300,400)
redraw
wait 100
wend
winExit
Demo Example 2
include "sdl.inc"
window 640,480,1
single m1,m2,m4,m3,m5
while key(27)=0
for y=0 to 480
m3 = m3+1
m1 = m1+9
m2 = m1
m6 = m3
for x=0 to 640
m4 = m4+19
m2 = m2+15
m6=m6+1
r = abs(sin(m1/100)+sin(m2/100)+sin((m1+m4)/600))*(255/3)
g = abs(sin((m6)/50) + sin(m3/100))*250
b = abs(sin(x*y/100000)*200)
Color r,g,b,255
SetPixel x, y
next
next
redraw
'SetFps 10
wend
winExit
Demo Example 3
include "sdl.inc"
window 512,512,1
TgaLoad 1,"tga/baum.tga"
TgaLoad 2,"tga/wmas.tga"
single a
SetMousePos 200,200
while key(27)=0
cls 0,0,0
mx = xMouse()
my = yMouse()
SprPos 2,0,0,1,1
SprBright 1,mx,my,0,100
SprInvers 1,mx+128,my,0
SprDarken 1,mx+256,my,0,50
SprBRA 1,mx,my+128,0, 50, a,80
SprDRA 1,mx+128,my+128,0,150,-a,55
SprBRA 1,mx+256,my+128,0, 0, a,255
a +=6
redraw
setfps 60
wend
winExit
[attachment deleted by admin]