Untitled
unknown
c_cpp
3 years ago
715 B
9
Indexable
#include <gb\gb.h>
#include <stdio.h>
#include "mariolandtiles.h"
#include "mariolandmap.h"
void main(void)
{
char dir = 0, j;
DISPLAY_ON;
SHOW_SPRITES;
set_bkg_data(0, 21, mariolandtiles);
set_bkg_tiles(0, 0, mariolandmapWidth, mariolandmapHeight, mariolandmap);
SHOW_BKG;
while(1) {
j = joypad();
switch (j) {
case J_RIGHT : {
dir = 1;
break;
}
case J_LEFT : {
dir = -1;
break;
}
case J_DOWN : {
dir = 0;
break;
}
}
wait_vbl_done();
scroll_bkg(dir, 0);
}
}
Editor is loading...