Chunky Writer by Richard Davey29th Sep 2003 14:01
|
---|
Summary Brings on a 640x480 picture in 16x16 spiral chunks. Simple but nice opening effect. Description Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com ` ------------------------------------------------------------------------ ` Chunky Writer DarkForge Snippet (20/2/2001) ` ------------------------------------------------------------------------ ` Brings on a 640x480 picture in 16x16 spiral chunks. Simple but nice ` opening effect. sync rate 0 sync on hide mouse load bitmap "tmk-blue.bmp",1 create bitmap 2,640,480 x=0 : y=0 : sx=0 : sy=16 : ex=624 : ey=464 : dim c(1) for a=0 to 14 repeat Chunk(x,y) inc x,16 until x=ex dec ex,16 repeat Chunk(x,y) inc y,16 until y=ey dec ey,16 repeat Chunk(x,y) dec x,16 until x=sx inc sx,16 repeat Chunk(x,y) dec y,16 until y=sy inc sy,16 next a repeat sync until spacekey() Function Chunk(x,y) tc = c(1) inc tc c(1) = tc if tc < 1201 set current bitmap 1 get image 1,x,y,x+16,y+16 set current bitmap 2 paste image 1,x,y copy bitmap 2,0 sync else sync endif Endfunction |