Updated Space Invaders on the mbed. Improved upon Michael Son's "Mbed Space Invaders" at https://os.mbed.com/users/michaeljson/notebook/mbed-space-invaders/.
Dependencies: mbed wave_player mbed-rtos 4DGL-uLCD-SE SparkfunAnalogJoystick SDFileSystem LSM9DS1_Library_cal_updated
Fork of Two-PlayerSpaceInvaders by
test
Diff: barrier.h
- Revision:
- 28:a2dac56af32f
- Parent:
- 23:56f6a12aaebd
--- a/barrier.h Wed Apr 28 03:12:39 2021 +0000 +++ b/barrier.h Wed Apr 28 15:21:44 2021 +0000 @@ -8,12 +8,8 @@ extern uLCD_4DGL uLCD; -//typedef enum { -// PLAYER_DEAD = 0, -// PLAYER_ALIVE = 1 -//} PLAYER_STATUS; -/// This struct contains the status of a player +/// This struct contains the status of a barrier typedef struct { int barrier_blk_x; ///< horizontal position in the grid @@ -22,9 +18,8 @@ //unsigned int player_old_blk_y; ///< old vertical position in the grid int barrier_width; int barrier_height; - int barrier_color; ///< color of the player + int barrier_color; ///< color of the barrier bool barrierPixels[20*20]; // bool array to signify whether the pixel of the barrier is "destroyed" or still part of the barrier. - //PLAYER_STATUS status; } barrier_t; void barrier_init(barrier_t * g, int blk_x, int blk_y, int color);