![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
f
Dependencies: mbed 4DGL-uLCD-SE MMA8452
Diff: graphics.cpp
- Revision:
- 0:8e3b9bb1084a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphics.cpp Thu Mar 10 05:18:13 2022 +0000 @@ -0,0 +1,44 @@ +#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 +} + +