ELEC2645 (2018/19) / Mbed 2 deprecated el17dg

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

Revision:
27:f05f4e738ba9
Parent:
26:676874c42883
Child:
28:35af3843de8f
--- a/game/player.h	Sat Apr 06 20:13:33 2019 +0000
+++ b/game/player.h	Mon Apr 08 14:41:57 2019 +0000
@@ -24,9 +24,8 @@
     blast_bounds.center.y = 1;
     blast_bounds.radius = 1;
 }
-    /**@brief
-     * Will move every active blast to the left with blast speed.
-     * Will deactivate blasts when they live screen, for future reuse
+   /** Will move every active blast to the left with blast speed.
+     *  Will deactivate blasts when they live screen, for future reuse
      */
     void updateAndDrawBlasts() {
         const int blast_speed = 5;
@@ -45,8 +44,7 @@
         }
     }
         
-    /**@brief
-      * This function searches the array for the inactive blasts,
+    /** This function searches the array for the inactive blasts,
       * If a blast is set to not active, it will set it active and start drawing
       * it accross the screen until it reaches the LCD border line.
       */
@@ -66,8 +64,7 @@
             blasts[found].pos.y = player.pos.y + (spaceship1_height/2);
         }
     }    
-    /**@brief
-      * The function reads the analog input signal from joystick and moves the 
+    /** The function reads the analog input signal from joystick and moves the 
       * player's ship on the LCD accordingly.(move joystic, the ship moves up
       * move joystick right, the ship moves right). Also, It prevents the player's 
       * ship to go beyond the playing zone limits.
@@ -92,7 +89,8 @@
         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);
+        drawSpriteOnTop(player.pos, player_spaceship1_sprite);
+        //lcd.drawSpriteOnTop(player.pos.x, player.pos.y, spaceship1_width, spaceship1_height, (int *)spaceShip1);
     }  
 };
 #endif
\ No newline at end of file