Challenge:
Version:
Example
Winner?:
No
Code Snippet:
set display mode 1024, 768, 32 sync on sync rate 100 `make bitmap 1 create bitmap 1,1024, 768 set current bitmap 1 ink rgb(255,255,255), 0 box 0,0,1024,768, RGB(255,0,0),RGB(0,255,0),RGB(0,0,255),RGB(255,255,0) for a=1 to 15 x=rnd(1024) y=rnd(768) text x,y, "press any key" next a for x=1 to 1024 step 50 line x,1,x,768 line 1,x,1024, x next x `make bitmap 2 create bitmap 2,1024, 768 set current bitmap 2 ink rgb(255,255,255), 0 box 0,0,1024,768, RGB(255,0,255),RGB(0,255,255),RGB(255,0,0),RGB(0,0,255) for a=1 to 15 x=rnd(1024) y=rnd(768) text x,y, "Bitmap 2" next a set current bitmap 0 copy bitmap 1,0 sync:sync `main loop do wait key curtain(1,2,1.0) wait key slide(2,1,2.0) loop function curtain(b1, b2, speed as float) copy bitmap b1,0 n as float going=1 dim ypos(1024) as float for x=1 to 1024 ypos(x)=0 next x while going=1 copy bitmap b2,0 going=0 for x=1 to 1024 n=.08*(sin(x*2.0)+20.0) ypos(x)=ypos(x)+(n*speed) if ypos(x)<768 then going=1 `COPY BITMAP From,Left,Top,Right,Bottom, To, Left,Top, Right,Bottom ` copy bitmap 1,x,0,x+1,768-ypos(x),0,x,ypos(x),x+1,768 copy bitmap b1,x,ypos(x),x+1,768,0,x,0,x+1,768-ypos(x) next x text 10,10, str$(screen fps()) sync endwhile endfunction function slide(b1, b2, speed as float) copy bitmap b1,0 going=1 dim ypos(1024) as float for x=1 to 1024 ypos(x)=0 next x while going=1 copy bitmap b2,0 going=0 for x=1 to 1024 ypos(x)=ypos(x)+rnd(speed*4) if ypos(x)<768 then going=1 copy bitmap b1,x,0,x+1,768-ypos(x),0,x,ypos(x),x+1,768 next x text 10,10, str$(screen fps()) sync endwhile endfunction