Missile Control Game with uLCD

Dependencies:   4DGL-uLCD-SE SDFileSystem mbed wave_player

Fork of missile_command by ECE 2035 TA

Revision:
2:eba4ed0263a4
Parent:
0:532cb55d6136
--- a/player.h	Wed Oct 29 02:58:53 2014 +0000
+++ b/player.h	Tue Oct 20 19:13:03 2015 +0000
@@ -1,41 +1,50 @@
-/* Gatech ECE2035 2014 FALL missile command
- * Copyright (c) 2014 Gatech ECE2035
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
- 
 // Template of player header file
 #ifndef PLAYER_H
 #define PLAYER_H
 
-// Example of some player settings
+// Player settings
 #define PLAYER_WIDTH   10 
 #define PLAYER_HEIGHT  3
 #define PLAYER_DELTA   3
 #define PLAYER_COLOR   0x0000FF
+#define BLACK_COLOR    0x000000
+#define YELLOW_COLOR   0xFFFF00  
+#define GREEN_COLOR    0x00FF00
+
+
 
 
-/** Get the information of city
-    @brief x and y are the top left corner of the player drawing
-    @param x x-coordinate
-    @param y y-coordinate
-*/
+typedef enum {
+    PLAYER_MISSILE_EXPLODED=2,///<missile has been destroyed
+    PLAYER_MISSILE_ACTIVE=1,///<missile is active
+    PLAYER_MISSILE_DEACTIVE=0///<missile is no longer active
+} PLAYER_MISSILE_STATUS;
+//Initialize ANTI-missile structure
+
+typedef struct {
+    int x;   
+    int origin_y;                ///< The x-coordinate of missile current position
+    int y;                   ///< The y-coordinate of missile current position
+    int source_x;
+    int source_y;                 
+    PLAYER_MISSILE_STATUS status;   ///< The missile status, see MISSILE_STATUS
+    
+} PLAYER_MISSILE;
+//Initialize PLAYER structure
+typedef struct {
+    int x;
+    int y;
+    int numMissile;
+    int lives;   
+     
+            
+    } PLAYER;
+//Declare functions
+void player_missile_draw(PLAYER_MISSILE player_missile, int color);
 void player_draw(int x, int y);
+void player_delete(int x, int y);
+void missile_start(int counter);
+void player_set_exploded(int index);
+void gameover(int s);
 
 #endif //PLAYER_H
\ No newline at end of file