Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Spaceship/Spaceship.cpp@107:83b0bc100600, 2019-05-05 (annotated)
- Committer:
- fy14lkaa
- Date:
- Sun May 05 13:27:20 2019 +0000
- Revision:
- 107:83b0bc100600
- Parent:
- 106:73d5d818ae7d
- Child:
- 108:ca888bb3ed54
deleted the void draw function that used lcd.drawSprite to void function to draw the spaceship by using lcd.draeRect.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| fy14lkaa | 105:b206078335a3 | 1 | #include "Spaceship.h" |
| fy14lkaa | 83:a55e77dfee5a | 2 | |
| fy14lkaa | 106:73d5d818ae7d | 3 | Spaceship::Spaceship() |
| fy14lkaa | 83:a55e77dfee5a | 4 | { |
| fy14lkaa | 83:a55e77dfee5a | 5 | } |
| fy14lkaa | 106:73d5d818ae7d | 6 | Spaceship::~Spaceship() |
| fy14lkaa | 83:a55e77dfee5a | 7 | { |
| fy14lkaa | 83:a55e77dfee5a | 8 | } |
| fy14lkaa | 84:d875c6e87398 | 9 | |
| fy14lkaa | 87:4635d00ffe9d | 10 | |
| fy14lkaa | 87:4635d00ffe9d | 11 | |
| fy14lkaa | 106:73d5d818ae7d | 12 | void Spaceship::init(int x_spaceship,int y_spaceship, int speed_spaceship) |
| fy14lkaa | 85:0094d33fb1da | 13 | { |
| fy14lkaa | 106:73d5d818ae7d | 14 | |
| fy14lkaa | 106:73d5d818ae7d | 15 | _x_spaceship= x_spaceship; |
| fy14lkaa | 106:73d5d818ae7d | 16 | _y_spaceship= y_spaceship; |
| fy14lkaa | 106:73d5d818ae7d | 17 | _speed_spaceship= speed_spaceship; |
| fy14lkaa | 106:73d5d818ae7d | 18 | } |
| fy14lkaa | 85:0094d33fb1da | 19 | |
| fy14lkaa | 107:83b0bc100600 | 20 | void Spaceship::draw(N5110 &lcd) |
| fy14lkaa | 107:83b0bc100600 | 21 | { |
| fy14lkaa | 107:83b0bc100600 | 22 | lcd.drawRect(_x_spaceship,_y_spaceship,_x_spaceship+5,_y_spaceship+10,FILL_BLACK); |
| fy14lkaa | 107:83b0bc100600 | 23 | //lcd.drawSprite(_x_spaceship,_y_spaceship,10,12,(int *) spaceship_2); |
| fy14lkaa | 107:83b0bc100600 | 24 | |
| fy14lkaa | 107:83b0bc100600 | 25 | } |