From: sparky4 Date: Sun, 7 Sep 2014 06:33:28 +0000 (-0500) Subject: modified: 16/modex16/scroll.c X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=1563e70fa9792d30be454dbaff1758b80286a9dc;p=16.git modified: 16/modex16/scroll.c modified: 16/modex16/scroll.exe --- diff --git a/16/modex16/scroll.c b/16/modex16/scroll.c index 034ff43f..dbfe3976 100644 --- a/16/modex16/scroll.c +++ b/16/modex16/scroll.c @@ -48,7 +48,8 @@ void main() { int show1=1; int tx, ty; int x, y; - int ch=0x0; + int ch=0x0; + int q=0; page_t screen; map_t map; map_view_t mv; @@ -71,30 +72,38 @@ void main() { while(1){ // scroll all the way to the right //for(x=0; x<(map.width*16-SCREEN_WIDTH); x++) { - if(ch==0x4d){ - mapScrollRight(&mv, 4); - modexShowPage(mv.page); + if(ch==0x4d){ + for(q=0; q<16; q++) { + mapScrollRight(&mv, 1); + modexShowPage(mv.page); + } } // scroll all the way to the left //for(; x>0; x--) { - if(ch==0x4b){ - mapScrollLeft(&mv, 4); - modexShowPage(mv.page); + if(ch==0x4b){ + for(q=0; q<16; q++) { + mapScrollLeft(&mv, 1); + modexShowPage(mv.page); + } } // scroll all the way down //for(y=0; y<(map.height*16-SCREEN_HEIGHT); y++) { - if(ch==0x50){ - mapScrollDown(&mv, 4); - modexShowPage(mv.page); + if(ch==0x50){ + for(q=0; q<16; q++) { + mapScrollDown(&mv, 1); + modexShowPage(mv.page); + } } // scroll all the way up //for(; y>0; y--) { - if(ch==0x48){ - mapScrollUp(&mv, 4); - modexShowPage(mv.page); + if(ch==0x48){ + for(q=0; q<16; q++) { + mapScrollUp(&mv, 1); + modexShowPage(mv.page); + } } // spin for a time @@ -114,7 +123,7 @@ void main() { map_t allocMap(int w, int h) { map_t result; - + result.width =w; result.height=h; result.data = malloc(sizeof(byte) * w * h); diff --git a/16/modex16/scroll.exe b/16/modex16/scroll.exe index 6990eccd..213610d9 100755 Binary files a/16/modex16/scroll.exe and b/16/modex16/scroll.exe differ