Image library for all the graph. Just test
Diff: Image.cpp
- Revision:
- 0:da6e8a366665
- Child:
- 1:298e74e9170b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Image.cpp Sun Mar 31 18:40:48 2019 +0000 @@ -0,0 +1,64 @@ +#include "Image.h" + + +Image::Image() +{ +} + +Image::~Image() +{ +} + + + +//mine +int BigGold[5][8]= { + { 0,0,1,1,1,0,0,0 }, + { 0,0,1,0,0,1,1,0 }, + { 0,1,0,0,0,0,0,1 }, + { 1,0,0,0,0,0,0,1 }, + { 0,1,1,1,1,1,1,0 }, +}; + +int SmallGold[4][3]= { + { 0,1,1 }, + { 1,0,1 }, + { 1,0,1 }, + { 1,1,1 }, +}; + +int BigRock[8][10]= { + { 0,0,0,0,1,1,1,0,0,0 }, + { 0,0,1,1,1,1,1,1,1,0 }, + { 0,1,1,1,1,1,1,1,1,0 }, + { 1,1,1,1,1,1,1,1,1,0 }, + { 1,1,1,1,1,1,1,1,1,0 }, + { 1,1,1,1,1,1,1,1,1,1 }, + { 0,1,1,1,1,1,1,1,1,1 }, + { 0,1,1,1,1,1,1,1,1,1 }, +}; + + + +// level 1 mine +int level_1_x[7]= {15, 38, 50, 25, 70, 27, 60}; +int level_1_y[7]= {10, 30, 25, 30, 37, 13, 20}; + + +void Image::draw_1(N5110 &lcd) +{ + int i; + //big gold + for(i=0; i<3; i=i+1) { + lcd.drawSprite(level_1_x[i],level_1_y[i], 5, 8, (int*)BigGold); + }; + // small gold + for(i=3; i<5; i=i+1) { + lcd.drawSprite(level_1_x[i], level_1_y[i], 4, 3, (int*)SmallGold); + }; + //Big rock + for(i=5; i<7; i=i+1) { + lcd.drawSprite(level_1_x[i], level_1_y[i], 8, 10, (int*)BigRock); + } +} +//Rotate