ELEC2645 (2018/19) / Mbed 2 deprecated el17dg

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

Revision:
26:676874c42883
Parent:
25:749f1efc31fc
Child:
27:f05f4e738ba9
--- a/game/player.h	Wed Apr 03 12:46:04 2019 +0000
+++ b/game/player.h	Sat Apr 06 20:13:33 2019 +0000
@@ -36,6 +36,7 @@
                 if (blasts[i].pos.x >= screen_width){
                     blasts[i].active = false;
                     game_score -= 10;
+                    score_count_for_difficulty -= 50;
                 }
                 lcd.setPixel(blasts[i].pos.x,   blasts[i].pos.y, 1);
                 lcd.setPixel(blasts[i].pos.x+1, blasts[i].pos.y, 1);
@@ -91,6 +92,7 @@
         int max_player_y = game_area_y + game_area_height - spaceship1_height;
         if (player.pos.x > max_player_x) player.pos.x = max_player_x;
         if (player.pos.y > max_player_y) player.pos.y = max_player_y;
+        lcd.drawSpriteOnTop(player.pos.x, player.pos.y, spaceship1_width, spaceship1_height, (int *)spaceShip1);
     }  
 };
 #endif
\ No newline at end of file