'Q: is semitransparent sprite, red strip on white
'LB vs LBB difference
nomainwin
WindowWidth = 600
WindowHeight = 300
open "test" for graphics_nsb as #gr
#gr "trapclose [quit]"
#gr "down"
for i = 1 to 200
x=rnd(1)*600
y=rnd(1)*300
r=rnd(1)*100+10
#gr "place ";x;" ";y
#gr "circle ";r
next
#gr "getbmp bg 0 0 600 280"
#gr "background bg"
d=30
for i = 0 to 255
#gr "color black"
#gr "line ";i;" ";0;" ";i;" ";d
#gr "color red"
#gr "line ";i;" ";d;" ";i;" ";2*d
c$=i;" ";i;" ";i
#gr "color ";c$
#gr "line ";i+256;" ";0;" ";i+256;" ";d
#gr "color red"
#gr "line ";i+256;" ";d;" ";i+256;" ";2*d
next
#gr "Getbmp sprite 0 0 512 ";2*d
#gr "Addsprite sprite sprite"
#gr "Spritexy sprite 40 100"
#gr, "Drawsprites"
wait
'-----------------------------------
[quit]
close #gr
call tryUnloadBMP "sprite"
call tryUnloadBMP "bg"
end
sub tryUnloadBMP picName$
on error goto [dontCare]
unloadbmp picName$
[dontCare]
end sub
'LB vs LBB difference
nomainwin
WindowWidth = 600
WindowHeight = 300
open "test" for graphics_nsb as #gr
#gr "trapclose [quit]"
#gr "down"
loadbmp "bg", "C:\progra~1\libert~1.04\sprites\bg1.bmp"
#gr "background bg"
d=130
for i = 0 to 255
c$=i;" ";i;" ";i
#gr "color ";c$
#gr "line ";i;" ";0;" ";i;" ";d
#gr "color black "
#gr "line ";i;" ";d;" ";i;" ";2*d
next
#gr "Getbmp sprite 0 0 256 ";2*d
#gr "Addsprite sprite sprite"
#gr "Spritexy sprite 0 0"
#gr "SpriteScale sprite 234"
#gr, "Drawsprites"
wait
[quit]
close #gr
unloadbmp "sprite"
unloadbmp "bg"
end