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: player.cpp
- Revision:
- 23:56f6a12aaebd
- Parent:
- 22:a907eeb128a4
- Child:
- 28:a2dac56af32f
--- a/player.cpp Sun Apr 25 21:12:30 2021 +0000 +++ b/player.cpp Mon Apr 26 21:53:25 2021 +0000 @@ -1,12 +1,13 @@ #include "player.h" #include "missile.h" - +/* #define GREEN 0x00FF00 #define BLUE 0x0000FF #define PINK 0xFFC0CB #define PURPLE 0x800080 #define YELLOW 0xFFFF00 #define RED 0xFF0000 + // Modified from the RPG Game from ECE 2035. Draw more complex player object (with changing color). void draw_img(int u, int v, int width, int height, const char* img) { @@ -24,6 +25,7 @@ uLCD.BLIT(u, v, width, height, colors); wait_us(250); // Recovery time! } +*/ void draw_player_object(int blk_x, int blk_y, int player_color, int p_width, int p_height) {