Michael Son / Mbed 2 deprecated Mbed Space Invaders

Dependencies:   4DGL-uLCD-SE SDFileSystem mbed-rtos mbed wave_player

Files at this revision

API Documentation at this revision

Comitter:
michaeljson
Date:
Tue Mar 15 19:46:47 2016 +0000
Parent:
0:3817adfaeb06
Commit message:
fixed bug

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
missile.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Mar 15 19:09:51 2016 +0000
+++ b/main.cpp	Tue Mar 15 19:46:47 2016 +0000
@@ -520,7 +520,9 @@
         blk_x = player.player_blk_x+(player.player_width/2);
         blk_y = player.player_blk_y;
         missile_init(&missile, blk_x, blk_y, WHITE);
-        enemy_missile_init(&enemy_missile, blk_x, blk_y, WHITE);
+        int e_blk_x = 0;
+        int e_blk_y = 2;
+        enemy_missile_init(&enemy_missile, e_blk_x, e_blk_y, WHITE);
         
         // prints lives
         uLCD.locate(0,0);
--- a/missile.cpp	Tue Mar 15 19:09:51 2016 +0000
+++ b/missile.cpp	Tue Mar 15 19:46:47 2016 +0000
@@ -48,6 +48,7 @@
     {
         missile_erase(g);
         g->status = ENEMY_MISSILE_INACTIVE;
+        g->missile_blk_y = 2;
     }
 }