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: mbed wave_player mbed-rtos 4DGL-uLCD-SE SDFileSystem
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
Generated on Fri Jul 15 2022 11:23:44 by
1.7.2