Difference between revisions of "Simple paint program"
From GbdevWiki
(Created page with '<pre> →Simple paint program feel free to edit this and improve on it! compiled with gbdk: #include <gb/gb.h> #include <gb/drawing.h> unsigned char x = 50; unsigned char y = 5…') |
(No difference)
|
Revision as of 17:41, 27 July 2014
/*Simple paint program
feel free to edit this and
improve on it!
compiled with gbdk*/
#include <gb/gb.h>
#include <gb/drawing.h>
unsigned char x = 50;
unsigned char y = 50;
int main(){
while(1){
delay(10);
plot(x,y);
if (joypad() == J_UP){y--;}
if (joypad() == J_DOWN){y++;}
if (joypad() == J_LEFT){x--;}
if (joypad() == J_RIGHT){x++;}
}
return 0;
}