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
enemy.h
00001 #ifndef ENEMY_H 00002 #define ENEMY_H 00003 00004 #include "mbed.h" 00005 #include "enemy.h" 00006 #include "missile.h" 00007 #include "globals.h" 00008 00009 extern uLCD_4DGL uLCD; 00010 00011 // Enemy Status 00012 typedef enum { 00013 ENEMY_DEAD = 0, 00014 ENEMY_ALIVE = 1 00015 } ENEMY_STATUS; 00016 00017 /// This struct contains the status of a enemy 00018 typedef struct 00019 { 00020 int enemy_blk_x; ///< horizontal position in the grid 00021 int enemy_blk_y; ///< vertical position in the grid 00022 int enemy_old_blk_x; ///< old horizontal position in the grid 00023 int enemy_old_blk_y; ///< old vertical position in the grid 00024 int enemy_width; 00025 int enemy_height; 00026 int enemy_color; ///< color of the enemy 00027 ENEMY_STATUS status; 00028 } enemy_t; 00029 00030 void enemy_init(enemy_t * g, unsigned int blk_x, unsigned int blk_y, unsigned int color); 00031 void enemy_show(enemy_t *g); 00032 void enemy_erase(enemy_t *g); 00033 int check_enemy(enemy_t *g, missile_t *h); 00034 int move_enemy(enemy_t *g, int MOVE_DOWN, int DIRECTION); 00035 00036 #endif //ENEMY_H
Generated on Fri Jul 15 2022 11:23:44 by
1.7.2