2016-04-21 23:31:00 +02:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* ML_vertical_scroll.c */
|
2016-04-22 07:06:40 +02:00
|
|
|
/* | Project : libmonochrome */
|
2016-04-21 23:31:00 +02:00
|
|
|
/* */
|
|
|
|
/* By: Pierre "PierrotLL" Le Gall <legallpierre89@gmail.com> */
|
|
|
|
/* Last updated: 2011/11/22 */
|
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#include <monochrome/internals.h>
|
|
|
|
|
|
|
|
void ML_vertical_scroll(int scroll)
|
|
|
|
{
|
|
|
|
int i, j;
|
2016-05-29 02:59:52 +02:00
|
|
|
char column[64], *vram = ML_vram_address();
|
2016-04-21 23:31:00 +02:00
|
|
|
scroll %= 64;
|
|
|
|
for(i=0 ; i<16 ; i++)
|
|
|
|
{
|
|
|
|
for(j=0 ; j<64 ; j++) column[j] = vram[(j<<4)+i];
|
|
|
|
for(j=0 ; j<64 ; j++) vram[(j<<4)+i] = column[(j-scroll+64)&63];
|
|
|
|
}
|
|
|
|
}
|