#include <SPI.h> //imports the SPI library
#include <Gamebuino.h> //imports the Gamebuino library
Gamebuino gb; //creates a Gamebuino object named gb
static unsigned char PROGMEM sprite[] =
{
16,6,
B00011110,B00000000,
B01010100,B10000000,
B01000000,B10000000,
B00111111,B00000000,
B00010000,B00000000,
B00000100,B00000000,
};
void setup(){
gb.begin());
//display the main menu
gb.titleScreen(F("Dart Monkey Sprite"));
gb.sound.playTick();
}
//the main loop
void loop(){
while(true) {
if(gb.update()){
gb.display.drawBitmap(16,6,sprite);
}
}
}
//This is the program.
gb.begin());
#include <SPI.h> //imports the SPI library
#include <Gamebuino.h> //imports the Gamebuino library
Gamebuino gb; //creates a Gamebuino object named gb
const byte sprite[] PROGMEM =
{
8,6,
B0011110,
B10101001,
B10000001,
B01111110,
B00100000,
B00001000,
};
void setup(){
gb.begin();
//display the main menu
gb.titleScreen(F("Dart Monkey Sprite"));
gb.sound.playTick();
}
//the main loop
void loop(){
while(true) {
if(gb.update()){
gb.display.drawBitmap(12,6,sprite);
}
}
}
[code]Your code here[/code]
Here is you code with the mentioned corrections :
const byte sprite[] PROGMEM =
{
8,6,
B00111100,
B10101001,
B10000001,
B01111110,
B00100000,
B00001000,
};
Return to Project Guidance & Game development
Users browsing this forum: Google [Bot] and 1 guest