![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
f
Dependencies: mbed 4DGL-uLCD-SE MMA8452
graphics.cpp
- Committer:
- lballard9
- Date:
- 2022-03-10
- Revision:
- 0:8e3b9bb1084a
File content as of revision 0:8e3b9bb1084a:
#include "graphics.h" #include "globals.h" //Example sprite, DON'T USE THIS SPRITE!! void draw_sprite() { int new_piskel_data[256] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0xffd000ff, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0xffd000ff, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffd000ff, 0xffd000ff, 0xffd000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }; uLCD.BLIT(0,0,16,16, new_piskel_data); } /* * Helper function to differentiate where the * keyboard is on the screen. */ void draw_lower_status() { // Draw top border of status bar uLCD.line(0, 118, 127, 118, GREEN); // Add other status info drawing code here }