![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.
Dependencies: mbed FXOS8700CQ mbed-rtos
Diff: Start/Start.h
- Revision:
- 17:5d8ff39a0e49
- Parent:
- 5:bc0691d02fd5
- Child:
- 25:31111e6e13ad
--- a/Start/Start.h Sat Apr 20 15:20:43 2019 +0000 +++ b/Start/Start.h Sun Apr 21 11:02:28 2019 +0000 @@ -1,3 +1,9 @@ +/** Start Class +* @brief This class is the starting menu for selecting the character of the game +* @version 1.0 +* @author Yiu Fai Kwok +* @date Match, 2019 +*/ #ifndef START_H #define START_H @@ -11,21 +17,100 @@ { public: + /** Constructor */ Start(); + /** Deconstructor */ ~Start(); + /** + * @brief Initialize the class + * @details Initialize the objects positions. + */ void init(Gamepad &pad); + + /** + * @brief Update the objects + * @details Update the objects on the lcd screen depending on the object being selected and joystick input + */ void starter_update(Gamepad &pad); + + /** + * @brief Draw the objects + * @details Draw the objects, the characters, their alternative sprites and the selection box + */ void starter_draw(N5110 &lcd); + + /** + * @brief Updates the selector + * @return position of selection box (Vector2D) + * @details Updates the location of the selection box by reading the input from the Gamepad's joystick control + */ Vector2D update_select(Gamepad &pad); + + /** + * @brief Update postion of Bulbasaur + * @return position of Bulbasaur (int) + * @details Update the position of Bulbasaur when it is selected to create animation + */ int update_animation_b(Gamepad &pad); + + /** + * @brief Update postion of Charmander + * @return position of Charmander (int) + * @details Update the position of Charmander when it is selected to create animation + */ int update_animation_c(Gamepad &pad); + + /** + * @brief Update postion of Squirtle + * @return position of Squirtle (int) + * @details Update the position of Squirtle when it is selected to create animation + */ int update_animation_s(Gamepad &pad); + + /** + * @brief Update parameter alt + * @return current value of alt (int) + * @details Update the parameter alt which determines which position the sprite should be drawn + */ int update_alt(); + + /** + * @brief Set postion of selection box + * @param position of selection box p (Vector2D) + * @details Function to set the position of the selection box + */ void set_pos(Vector2D p); + + /** + * @brief Set postion of the three characters + * @param position of Charmander pos_cy (int) + * @param position of Squirtle pos_sy (int) + * @param position of Bulbasaur pos_by (int) + * @details Function to set the position of the three characters + */ void set_pos_csb(int pos_cy, int pos_sy, int pos_by); + + /** + * @brief Set parameter alt + * @return the value of alt (int) + * @details Set the parameter alt which determines which position the sprite should be drawn + */ void set_alt(int alt); + + /** + * @brief Return the Character selected + * @param the value of position of selection box p (Vector2D) + * @return current value of select (int) + * @details Takes in the position of the selection box to determine which character has been selected. Return 0 when Bulbasaur is selected, 1 for Squirtle and 2 for Charmander. + */ int get_select(Vector2D p); + + /** + * @brief Display description + * @param value of select (int) + * @details Display the descrption of the character being selected when information is being required + */ void intro(int select,Gamepad &pad, N5110 &lcd); private: