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
missile.h
00001 #ifndef missile_H 00002 #define missile_H 00003 00004 #include "mbed.h" 00005 #include "missile.h" 00006 00007 00008 #include "globals.h" 00009 00010 extern uLCD_4DGL uLCD; 00011 00012 // Enumeration of Missile Status 00013 typedef enum { 00014 PLAYER_MISSILE_ACTIVE=0, // missile is active 00015 PLAYER_MISSILE_INACTIVE=1, // missile is inactive 00016 PLAYER_MISSILE_EXPLODED=2, // missile has been destroyed 00017 ENEMY_MISSILE_ACTIVE=3, // missile is active 00018 ENEMY_MISSILE_INACTIVE=4, // missile is inactive 00019 ENEMY_MISSILE_EXPLODED=5 // missile has been destroyed 00020 } PLAYER_MISSILE_STATUS; 00021 00022 /// This struct contains the status of a missile 00023 typedef struct 00024 { 00025 int missile_blk_x; ///< horizontal position in the grid 00026 int missile_blk_y; ///< vertical position in the grid 00027 unsigned int missile_old_blk_x; ///< old horizontal position in the grid 00028 unsigned int missile_old_blk_y; ///< old vertical position in the grid 00029 int missile_width; 00030 int missile_height; 00031 int missile_color; ///< color of the missile 00032 PLAYER_MISSILE_STATUS status; 00033 } missile_t; 00034 00035 void missile_init(missile_t * g, int blk_x, int blk_y, int color); 00036 void enemy_missile_init(missile_t * g, int blk_x, int blk_y, int color); 00037 void missile_show(missile_t *g); 00038 void missile_erase(missile_t *g); 00039 void update_missile_pos(missile_t *g); 00040 void update_enemy_missile_pos(missile_t *g); 00041 00042 #endif //missile_H
Generated on Fri Jul 15 2022 11:23:44 by
1.7.2