Last time I was trying to center an image I created, but somehow only the S from SIM is displayed on the right side of the screen.
How can I center this to the middle of the screen?
- Code: Select all
#include <SPI.h>
#include <Gamebuino.h>
Gamebuino gb;
const byte PROGMEM logo[] =
{
72,19,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11100000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B01111111,B11111111,B00111111,B11111111,B11001111,B11111111,B00000001,B11111111,B11100000,
B11111111,B11111111,B00111111,B11111111,B11001111,B11110111,B10000011,B11011111,B11100000,
B11111111,B11111111,B00111111,B11111111,B11001111,B11110011,B11000111,B10011111,B11100000,
B11111111,B00000000,B00000011,B11111100,B00001111,B11110001,B11111111,B00011111,B11100000,
B11111111,B00000000,B00000011,B11111100,B00001111,B11110000,B11111110,B00011111,B11100000,
B11111111,B00000000,B00000011,B11111100,B00001111,B11110000,B01111100,B00011111,B11100000,
B11111111,B11111110,B00000011,B11111100,B00001111,B11110000,B00111000,B00011111,B11100000,
B11111111,B11111111,B00000011,B11111100,B00001111,B11110000,B00010000,B00011111,B11100000,
B01111111,B11111111,B00000011,B11111100,B00001111,B11110000,B00000000,B00011111,B11100000,
B00000000,B11111111,B00000011,B11111100,B00001111,B11110000,B00000000,B00011111,B11100000,
B00000000,B11111111,B00000011,B11111100,B00001111,B11110000,B00000000,B00011111,B11100000,
B00000000,B11111111,B00000011,B11111100,B00001111,B11110000,B00000000,B00011111,B11100000,
B11111111,B11111111,B00111111,B11111111,B11001111,B11110000,B00000000,B00011111,B11100000,
B11111111,B11111111,B00111111,B11111111,B11001111,B11110000,B00000000,B00011111,B11100000,
B11111111,B11111110,B00111111,B11111111,B11001111,B11110000,B00000000,B00011111,B11100000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11100000,
};
void setup() {
gb.begin();
gb.setFrameRate(30);
gb.titleScreen(F("by nomisre"));
}
void loop() {
if(gb.update()){
gb.display.drawBitmap(72,19,logo);
}
}