Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE SDFileSystem mbed-rtos mbed wave_player
player.h
- Committer:
- michaeljson
- Date:
- 2016-03-15
- Revision:
- 1:618aa2c4ca6a
- Parent:
- 0:3817adfaeb06
File content as of revision 1:618aa2c4ca6a:
#ifndef PLAYER_H
#define PLAYER_H
#include "mbed.h"
#include "player.h"
#include "missile.h"
#include "globals.h"
extern uLCD_4DGL uLCD;
typedef enum {
PLAYER_DEAD = 0,
PLAYER_ALIVE = 1
} PLAYER_STATUS;
/// This struct contains the status of a player
typedef struct
{
int player_blk_x; ///< horizontal position in the grid
int player_blk_y; ///< vertical position in the grid
unsigned int player_old_blk_x; ///< old horizontal position in the grid
unsigned int player_old_blk_y; ///< old vertical position in the grid
int player_width;
int player_height;
int player_color; ///< color of the player
PLAYER_STATUS status;
} player_t;
void player_init(player_t * g, int blk_x, int blk_y, int color);
void player_show(player_t *g);
void player_erase(player_t *g);
int check_player(player_t *g, missile_t *h);
#endif //PLAYER_H