ELEC2645 (2018/19) / Mbed 2 deprecated el17st

Dependencies:   mbed FATFileSystem

Revision:
21:f3b0ce18b44f
Parent:
20:01efa2bce75d
Child:
22:0a12e52848fc
--- a/CaMove/CaMove.h	Wed May 08 15:48:44 2019 +0000
+++ b/CaMove/CaMove.h	Thu May 09 06:22:53 2019 +0000
@@ -98,6 +98,7 @@
         Bd  /**< Charater Facing Backward. */
 };
 
+
 class CaMove {
     public :
     /** Constructor
@@ -120,7 +121,15 @@
      *
      */
     void init(int x,int y,Direction D);
-    /** Function that moves the charater but also manages all animations related to its movement and collisions. Double Black lines cannot be crossed and Single Black lines can only be crossed one way.
+    /** Function that initilizes chasing Charater Models. 
+     *@param chaser Enter Integer to select chaser (1-Death Zone , 2- Girl (slow), 4-Girl (fast), other-Ghost)
+     */
+    void AIinit(int chaser);
+    
+
+     //Player Functions
+     
+     /** Function that moves the charater but also manages all animations related to its movement and collisions. Double Black lines cannot be crossed and Single Black lines can only be crossed one way.
      *
      *@param lcd Bitmap Class Object.
      *
@@ -132,6 +141,9 @@
      *
      */
     bool in_screen();
+    
+    //Interactive Regions Function pack
+    
     /** Function to set an interative region (rectangle areas only). Everytime it is run creates an additional new region.
      * 
      *@param xmin the top left x-location of region.
@@ -155,10 +167,9 @@
      *
      */
     int get_treg();
-    /** Function that initilizes chasing Charater Models. 
-     *@param chaser Enter Integer to select chaser (1-Death Zone , 2- Girl (slow), 4-Girl (fast), other-Ghost)
-     */
-    void AIinit(int chaser);
+    
+    //Chaser Functions
+    
     /** Function that spawns the chasing Charater.
      *
      *@param x The x-location where Charater will Spawn.
@@ -181,28 +192,36 @@
     AnalogIn *_ver;
     //Enum declaration
     Direction _fc;
-    //basic variables
+    //Priavte Variables
     int _h;
     int _v;
     short int _itr;
     bool LowerH, UpperH, MidH, LowerV, UpperV, MidV;
-    //Vector for storing interactive region x - y locations.
-    std::vector<int> _vreg;
+    
+    std::vector<int> _vreg;  //Vector for storing interactive region x - y locations.
+    
     //Volatile variables for ISR Interrupts
     volatile int _treg;
     volatile bool _trg;
-    void rend(Bitmap &lcd);
-    //AI Componets
+    
+    //AI Pack Variables
     bool enabled;
     int _ch;
     int _cv;
     int increment;
     
-    void check_collision(bool c1,bool c2,bool c3,bool c4);
-    void render_chaser(Bitmap &lcd,int chaser);
+    //Internal Functions
+    //Player Internal Functions
+    void check_collision(bool left,bool right,bool down,bool up);
+    //Interaction Internal Functions
     void set_statements(int Vvalue);
     void check_sides(int Vvalue);
+    //Aiding Functions
     void set_treg(int Vvalue);
+    //Rendering Functions
+    void rend(Bitmap &lcd);
+    void render_chaser(Bitmap &lcd,int chaser);
+    
 };
 
 #endif
\ No newline at end of file