Image library for all the graph. Just test

Committer:
MYY
Date:
Mon May 06 13:17:38 2019 +0000
Revision:
5:2dfd00ecc02e
Add a new function called hanging to make the whole coding more efficient.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MYY 5:2dfd00ecc02e 1 #include"Image.h"
MYY 5:2dfd00ecc02e 2
MYY 5:2dfd00ecc02e 3 void Image::hanging_2(int x, int y, const int *graph, N5110 &lcd, Image &Image, float time, int new_score, Rotate &Rotate, float angle, float speed, int sizex, int sizey)
MYY 5:2dfd00ecc02e 4 {
MYY 5:2dfd00ecc02e 5 x = x+ speed*cos(angle);
MYY 5:2dfd00ecc02e 6 y = y + speed*sin(angle);
MYY 5:2dfd00ecc02e 7 //Score = Score + new_score;
MYY 5:2dfd00ecc02e 8 lcd.clear();
MYY 5:2dfd00ecc02e 9 lcd.drawSprite(x, y, sizex,sizey, (int*) graph);
MYY 5:2dfd00ecc02e 10 lcd.drawLine(42,0, x, y,1);
MYY 5:2dfd00ecc02e 11 Image.draw_2(lcd);
MYY 5:2dfd00ecc02e 12 char buffer[14];
MYY 5:2dfd00ecc02e 13 char buffer2[14];
MYY 5:2dfd00ecc02e 14 sprintf(buffer,"%i",Score);
MYY 5:2dfd00ecc02e 15 sprintf(buffer2,"%i",Timer_1);
MYY 5:2dfd00ecc02e 16 lcd.printString(buffer,0,0);
MYY 5:2dfd00ecc02e 17 lcd.printString(buffer2,70,0);
MYY 5:2dfd00ecc02e 18 lcd.refresh();
MYY 5:2dfd00ecc02e 19 wait(time);
MYY 5:2dfd00ecc02e 20 Rotate.hookpoint[0]=x;
MYY 5:2dfd00ecc02e 21 Rotate.hookpoint[1]=y;
MYY 5:2dfd00ecc02e 22 }