/* ScrollScreen. V0.9 Scrolls the current public screen after spesified paramaters given via the argument. To use this program as a commodity, use the F-key commodity from commodore. Made by Kjetil S. Matheussen 1998. Arguments are: [x] [y]. Both arguments must be spesified (important). 'x' means how many x-lines to scroll right. 'y' means how many y-lines to scroll down. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include struct Screen *Scr = NULL; UBYTE *PubScreenName = NULL; int main(int argc,char **argv){ int x,y; if ( ! ( Scr = LockPubScreen( PubScreenName ))) return( 1L ); sscanf(argv[1],"%d",&x); sscanf(argv[2],"%d",&y); if(y+Scr->TopEdge<0 || (Scr->TopEdge>=0 && y<0)) y=0; MoveScreen(Scr,-x,-y); UnlockPubScreen( NULL, Scr ); return(0); }