Hello,
Here is the beginning of SDL2 library.
It is almost all sdl2 except the keyboard handling. Later, I want to use the sdl2 scancode.
Actually, I'm not so excited.
Documentaries are really sparse. Lazy Foo is the worst ever. What you are looking for is not to be found.
Is actually no better than SDL 1.2.
include "sdx.inc"
window 640,480,1
setframes 60
sys np=500, j, z, p, float v
sys px[500]
sys py[500]
sys pz[500]
loadspr 1,"bmp/phoenix.bmp",10
loadbmp 1,"bmp/centauri.bmp"
for j=0 to np
px[j] = rnd(0,639)
py[j] = rnd(0,479)
pz[j] = rnd(0xFFFFFF,0xFFFFFFFF)
next
while key(27)=0
cls 0,0,0
'setalpha 128
drawbmp 1,128,64
for j=0 to np
px[j] = px[j] -1
if px[j] <0 then
px[j] = 640
py[j] = rnd(0,479)
end if
color (pz[j],pz[j],pz[j],255)
setpoint px[j],py[j],2
next
drawspr 1,(640-128)/2,(480-128)/2,z
v += 0.2
if v >=1 then
v = 0
z +=1
if z=10 then z=0
end if
Sync()
wend
Quit
.