sync on
sync rate 0
set display mode 320,240,16
brush$="rnddots"
size=320
size2=240
strengh=20
background_color=rgb(0,0,0)
gosub draw
get image 1,0,0,320,240
save image "img1.bmp",1
delete image 1
cls
gosub draw
get image 1,0,0,320,240
save image "img2.bmp",1
delete image 1
cls
gosub draw
get image 1,0,0,320,240
save image "img3.bmp",1
delete image 1
cls
gosub draw
get image 1,0,0,320,240
save image "img4.bmp",1
delete image 1
cls
ink rgb(0,128,0),0
box 0,0,10,10
get image 1,0,0,10,10
save image "img5.bmp",1
delete image 1
cls
sync rate 60
set display mode 640,480,32
for x=1 to 20
make object box x,rnd(10),rnd(10),10
position object x,rnd(100),0,rnd(100)
next x
load image "img1.bmp",1
load image "img2.bmp",2
load image "img3.bmp",3
load image "img4.bmp",4
load image "img5.bmp",5
imgtext=1
sprite 1,0,0,imgtext
size sprite 1,screen width(),screen height()
set sprite alpha 1,50
sprite 2,0,0,5
size sprite 2,screen width(),screen height()
set sprite alpha 2,50
color backdrop 0
do
set cursor 0,0
print "press 1 to turn nivi on"
print "press 2 to turn nivi off"
print "fps: ",screen fps()
print "display mode 640,480,32"
if inkey$()="1" then nivi=1
if inkey$()="2" then nivi=0
if nivi=1
show sprite 1
show sprite 2
inc screen_over_time
if screen_over_time=4 then inc imgtext : screen_over_time=0
if imgtext>4 then imgtext=1
sprite 1,0,0,imgtext
else
hide sprite 1
hide sprite 2
endif
control camera using arrowkeys 0,0.5,0.5
sync
loop
draw:
for x=1 to size : for y=1 to size2
if brush$="rnddots" then rndx=(rnd(size)) : rndy=(rnd(size2))
color=point(rndx,rndy)
r=rgbr(color)+strengh
g=rgbg(color)+strengh
b=rgbb(color)+strengh
if r>255 then r=255
if g>255 then g=255
if b>255 then b=255
ink rgb(r,g,b),background_color
if brush$="rnddots" then dot rndx,rndy
next x : next y
return
(this is the media)
load image "img1.bmp",1
load image "img2.bmp",2
load image "img3.bmp",3
load image "img4.bmp",4
load image "img5.bmp",5
imgtext=1
sprite 1,0,0,imgtext
size sprite 1,screen width(),screen height()
set sprite alpha 1,50
sprite 2,0,0,5
size sprite 2,screen width(),screen height()
set sprite alpha 2,50
rem nivi=1
+++ in loop: +++
if nivi=1
show sprite 1
show sprite 2
inc screen_over_time
if screen_over_time=4 then inc imgtext : screen_over_time=0
if imgtext>4 then imgtext=1
sprite 1,0,0,imgtext
else
hide sprite 1
hide sprite 2
endif
(copy after you copy media)
Bach Tran