ECE 4180 Single Player Space Invaders Team / Mbed 2 deprecated Mbed-Space-Invaders4

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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers player.h Source File

player.h

00001 #ifndef PLAYER_H
00002 #define PLAYER_H
00003 
00004 #include "mbed.h"
00005 #include "player.h"
00006 #include "missile.h"
00007 #include "globals.h"
00008 
00009 extern uLCD_4DGL uLCD;
00010 
00011 typedef enum {
00012     PLAYER_DEAD = 0,
00013     PLAYER_ALIVE = 1
00014 } PLAYER_STATUS;
00015 
00016 /// This struct contains the status of a player
00017 typedef struct
00018 {
00019     int player_blk_x;   ///< horizontal position in the grid
00020     int player_blk_y;   ///< vertical position in the grid
00021     unsigned int player_old_blk_x; ///< old horizontal position in the grid
00022     unsigned int player_old_blk_y; ///< old vertical position in the grid
00023     int player_width;
00024     int player_height;
00025     int player_color;   ///< color of the player  
00026     PLAYER_STATUS status;
00027 } player_t;
00028 
00029 void player_init(player_t * g, int blk_x, int blk_y, int color);
00030 void player_show(player_t *g);
00031 void player_erase(player_t *g);
00032 int check_player(player_t *g, missile_t *h);
00033 #endif //PLAYER_H