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: 4DGL-uLCD-SE SDFileSystem mbed wave_player
Fork of missile_command by
Revision 3:fd1f794b7f5d, committed 2014-11-17
- Comitter:
- slin77
- Date:
- Mon Nov 17 13:53:14 2014 +0000
- Parent:
- 2:d39a6a36e0c0
- Child:
- 4:0dc720aa3c71
- Commit message:
- change trajectory of antimissiles
Changed in this revision
| player.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/player.cpp Mon Nov 17 13:15:34 2014 +0000
+++ b/player.cpp Mon Nov 17 13:53:14 2014 +0000
@@ -184,13 +184,13 @@
if (am[i].y - 2 <= 0) {
//when the missile flies out of the screen
am[i].status = DEACTIVE;
- uLCD.line(am[i].x, am[i].y, am[i].x, am[i].y - 2, BACKGROUND_COLOR);
+ uLCD.line(am[i].x, am[i].y, am[i].x, 100, BACKGROUND_COLOR);
am[i].y = current_player.y;
am[i].x = current_player.x;
current_player.am_remain++;
} else if (am[i].tick % rate == 0) {
- uLCD.line(am[i].x, am[i].y, am[i].x, am[i].y - 2, BACKGROUND_COLOR);
+ uLCD.line(am[i].x, am[i].y, am[i].x, 100, BACKGROUND_COLOR);
am[i].y = am[i].y - 2;
}
@@ -202,7 +202,7 @@
int i;
for(i = 0; i < current_player.max_am;i++) {
if (am[i].status == ACTIVE ) {
- uLCD.line(am[i].x, am[i].y, am[i].x, am[i].y - 2, PLAYER_COLOR);
+ uLCD.line(am[i].x, am[i].y, am[i].x, 100, PLAYER_COLOR);
}
}
}
