Screen Wipes by OSX Using Happy Dude12th Sep 2003 14:20
|
---|
Summary Various screen wipes for clearing screens. Description Wipes including horizontal and veritcal wipes. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com remstart This is a collection of screen wipes Written by N. Kingsley NOTE : The effect you get with backdrop off is different to that with backdrop on! remend function verticalWipe(x as integer, y as integer, r as integer, g as integer, b as integer) xloop as integer ink rgb(r,g,b),rgb(r,g,b) for xloop=0 to y step 2 line 0,xloop,x,xloop line 0,y-xloop-1,x,y-xloop-1 sync next loop endfunction function horizontalWipe(x as integer, y as integer, r as integer, g as integer, b as integer) xloop as integer ink rgb(r,g,b),rgb(r,g,b) for xloop=0 to x step 2 line xloop,0,xloop,y line x-xloop-1,0,x-xloop-1,y sync next loop endfunction function boxWipe(x as integer, y as integer, r as integer, g as integer, b as integer) halfx as integer halfy as integer xloop as integer yloop as integer halfX=x>>1 halfY=y>>1 xloop=0 ink rgb(r,g,b),rgb(r,g,b) for yloop=0 to y box halfX-xloop,halfY-yloop,halfX+xloop,halfY+yloop sync inc xloop if xloop>halfX then exitfunction next yloop endfunction function diagonalWipeL(x as integer,y as integer,r as integer,g as integer,b as integer) xloop as integer ink rgb(r,g,b),rgb(r,g,b) for xloop=0 to x<<1 step 2 line xloop,0,0,xloop line x-xloop-1,y,x,y-xloop-1 sync next xloop endfunction function diagonalWipeR(x as integer,y as integer,r as integer,g as integer,b as integer) xloop as integer ink rgb(r,g,b),rgb(r,g,b) for xloop=0 to x<<1 step 2 line x-xloop,0,x,xloop line xloop+1,y,0,(y-xloop)-1 sync next xloop endfunction function verticalSplitWipe(x as integer,y as integer,r as integer,g as integer,b as integer) yloop as integer ink rgb(r,g,b),rgb(r,g,b) for yloop=0 to y step 2 line 0,yloop,(x>>1)+1,yloop line x,y-yloop-1,x>>1,y-yloop-1 sync next yloop for yloop=0 to y step 2 line 0,y-yloop-1,(x>>1)+1,y-yloop-1 line x,yloop,x>>1,yloop sync next yloop endfunction function horizontalSplitWipe(x as integer,y as integer,r as integer,g as integer,b as integer) xloop as integer ink rgb(r,g,b),rgb(r,g,b) for xloop=0 to x step 2 line xloop,0,xloop,(y>>1)+1 line x-xloop-1,y,x-xloop-1,y>>1 sync next xloop for xloop=0 to x step 2 line xloop,y,xloop,y>>1 line x-xloop-1,0,x-xloop-1,(y>>1)+1 sync next xloop endfunction function horizontalBlindWipe(x as integer,y as integer,r as integer,g as integer,b as integer) stp as integer xloop as integer pos as integer stp=16 ink rgb(r,g,b),rgb(r,g,b) for xloop=0 to stp for pos=stp to x step stp line pos-xloop,0,pos-xloop,y next pos sync next xloop endfunction function verticalBlindWipe(x as integer,y as integer,r as integer,g as integer,b as integer) stp as integer yloop as integer pos as integer stp=16 ink rgb(r,g,b),rgb(r,g,b) for yloop=0 to stp for pos=stp to y step stp line 0,pos-yloop,x,pos-yloop next pos sync next yloop endfunction function circleWipe(r as integer,g as integer,b as integer) xloop as integer width as integer ink rgb(r,g,b),rgb(r,g,b) width=screen width()>>1 for xloop=0 to width+(width>>1) circle width,screen height()>>1,xloop sync next xloop endfunction |