This code contains the game Starship designed for the STM32F429i-DISC1 board. It requires a keyboard to play.

Dependencies:   Starship LCD_DISCO_F429ZI USBHost mbed

Dependents:   Starship

Revision:
0:c9afe145b57b
Child:
1:527a11035e0b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Enemy.h	Sun Sep 17 17:05:27 2017 +0000
@@ -0,0 +1,41 @@
+#ifndef __ENEMY_UNIT
+#define __ENEMY_UNIT
+#include "Constants.h"
+#include <stdint.h>
+
+struct Enemy
+{
+    struct Enemy * prev;
+    struct Enemy * next;
+    uint16_t x_pos;
+    uint16_t y_pos;
+    uint16_t x_vel;
+    uint16_t y_vel;
+    uint16_t health;
+    uint16_t freezeTimer;
+    uint16_t gunTimer;
+};
+
+static struct Enemy * enemyPTR;
+static uint16_t enemyCount;
+
+//Across the board
+void addEnemy(uint16_t x_pos, uint16_t x_vel,uint16_t y_vel, uint16_t health); //--MAIN CARES!!!
+void removeEnemy(struct Enemy * removePTR); 
+void clearEnemies(); //------------------------------------------------------------MAIN CARES!!!
+void freezeEnemies();//------------------------------------------------------------MAIN CARES!!!
+uint16_t getBulletPos(struct Enemy * enemy,uint8_t XOrY);//------------------------------------------------------------MAIN CARES!!!
+
+//Specific to 1 Enemy
+void enemyMovement(struct Enemy * enemy);
+void enemyMovement_ALL();//mf
+void updateEnemyTimers(struct Enemy * enemy);
+void updateEnemyTimers_ALL();//mf
+void removeEnemyIfOOB(struct Enemy * enemy);
+void removeEnemyIfOOB_ALL(); //mf
+uint8_t dealDamage(struct Enemy * enemy, uint8_t damage);//------------------------MAIN CARES!!!
+
+//Call functions noramlly called in the loop without parameters.
+void callMultiFuncEnemy();//------------------------------------------------------------MAIN CARES!!!
+
+#endif
\ No newline at end of file