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:
1:527a11035e0b
Parent:
0:c9afe145b57b
--- a/Enemy.h	Sun Sep 17 17:05:27 2017 +0000
+++ b/Enemy.h	Fri Nov 17 02:23:33 2017 +0000
@@ -7,35 +7,35 @@
 {
     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;
+    int16_t x_pos;
+    int16_t y_pos;
+    int16_t x_vel;
+    int16_t y_vel;
+    int16_t health;
+    int16_t maxHealth;
+    int16_t freezeTimer;
+    int16_t gunTimer;
 };
 
-static struct Enemy * enemyPTR;
-static uint16_t enemyCount;
+extern struct Enemy * enemyPTR;
+extern int16_t enemyCount;
 
-//Across the board
-void addEnemy(uint16_t x_pos, uint16_t x_vel,uint16_t y_vel, uint16_t health); //--MAIN CARES!!!
+//User interface functions.
+void addEnemy(int16_t x_pos, int16_t x_vel,int16_t y_vel, int16_t health);
+void clearEnemies(); 
+void freezeEnemies();
+int16_t getEnemyBulletPos(struct Enemy * enemy,int8_t XOrY);
+int8_t dealDamageToEnemy(struct Enemy * enemy, int8_t damage);
+void callMultiFuncEnemy();
+
+//Functions user does not need to worry about.
 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