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
Characters/Squirtle.h@17:5d8ff39a0e49, 2019-04-21 (annotated)
- Committer:
- yfkwok
- Date:
- Sun Apr 21 11:02:28 2019 +0000
- Revision:
- 17:5d8ff39a0e49
- Parent:
- 9:1395c98b58fc
- Child:
- 25:31111e6e13ad
21/04/2019 - Add Doxygen comments for the following classes: Exam, Characters, Score and Start
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yfkwok | 17:5d8ff39a0e49 | 1 | /** Squirtle Class |
yfkwok | 17:5d8ff39a0e49 | 2 | * @brief This class contains all information such as sprites and descriptions for the character Squirtle |
yfkwok | 17:5d8ff39a0e49 | 3 | * @version 1.0 |
yfkwok | 17:5d8ff39a0e49 | 4 | * @author Yiu Fai Kwok |
yfkwok | 17:5d8ff39a0e49 | 5 | * @date Match, 2019 |
yfkwok | 17:5d8ff39a0e49 | 6 | */ |
yfkwok | 2:464c7e62d97d | 7 | #ifndef SQUIRTLE_H |
yfkwok | 2:464c7e62d97d | 8 | #define SQUIRTLE_H |
yfkwok | 2:464c7e62d97d | 9 | |
yfkwok | 2:464c7e62d97d | 10 | #include "mbed.h" |
yfkwok | 2:464c7e62d97d | 11 | #include "N5110.h" |
yfkwok | 2:464c7e62d97d | 12 | #include "Gamepad.h" |
yfkwok | 2:464c7e62d97d | 13 | |
yfkwok | 2:464c7e62d97d | 14 | class Squirtle |
yfkwok | 2:464c7e62d97d | 15 | { |
yfkwok | 2:464c7e62d97d | 16 | |
yfkwok | 2:464c7e62d97d | 17 | public: |
yfkwok | 17:5d8ff39a0e49 | 18 | /** Constructor */ |
yfkwok | 2:464c7e62d97d | 19 | Squirtle(); |
yfkwok | 17:5d8ff39a0e49 | 20 | /** Deconstructor */ |
yfkwok | 2:464c7e62d97d | 21 | ~Squirtle(); |
yfkwok | 2:464c7e62d97d | 22 | |
yfkwok | 17:5d8ff39a0e49 | 23 | /** |
yfkwok | 17:5d8ff39a0e49 | 24 | * @brief Draw the primary sprite |
yfkwok | 17:5d8ff39a0e49 | 25 | * @param position x pos_x (int) |
yfkwok | 17:5d8ff39a0e49 | 26 | * @param position y pos_y (int) |
yfkwok | 17:5d8ff39a0e49 | 27 | * @details Draws the primary evolution of the character, the position will be determined by parameters pos_x and pos_y |
yfkwok | 17:5d8ff39a0e49 | 28 | */ |
yfkwok | 2:464c7e62d97d | 29 | void draw_cha1_sprite(int pos_x,int pos_y,N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 30 | |
yfkwok | 17:5d8ff39a0e49 | 31 | /** |
yfkwok | 17:5d8ff39a0e49 | 32 | * @brief Draw the secondary sprite |
yfkwok | 17:5d8ff39a0e49 | 33 | * @param position x pos_x (int) |
yfkwok | 17:5d8ff39a0e49 | 34 | * @param position y pos_y (int) |
yfkwok | 17:5d8ff39a0e49 | 35 | * @details Draws the secondary evolution of the character, the position will be determined by parameters pos_x and pos_y |
yfkwok | 17:5d8ff39a0e49 | 36 | */ |
yfkwok | 2:464c7e62d97d | 37 | void draw_cha2_sprite(int pos_x,int pos_y,N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 38 | |
yfkwok | 17:5d8ff39a0e49 | 39 | /** |
yfkwok | 17:5d8ff39a0e49 | 40 | * @brief Draw the tertiary sprite |
yfkwok | 17:5d8ff39a0e49 | 41 | * @param position x pos_x (int) |
yfkwok | 17:5d8ff39a0e49 | 42 | * @param position y pos_y (int) |
yfkwok | 17:5d8ff39a0e49 | 43 | * @details Draws the tertiary evolution of the character, the position will be determined by parameters pos_x and pos_y |
yfkwok | 17:5d8ff39a0e49 | 44 | */ |
yfkwok | 2:464c7e62d97d | 45 | void draw_cha3_sprite(int pos_x,int pos_y,N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 46 | |
yfkwok | 17:5d8ff39a0e49 | 47 | /** |
yfkwok | 17:5d8ff39a0e49 | 48 | * @brief Draw the primary alternative sprite |
yfkwok | 17:5d8ff39a0e49 | 49 | * @param position x pos_x (int) |
yfkwok | 17:5d8ff39a0e49 | 50 | * @param position y pos_y (int) |
yfkwok | 17:5d8ff39a0e49 | 51 | * @details Draws the alternative primary evolution of the character, the position will be determined by parameters pos_x and pos_y |
yfkwok | 17:5d8ff39a0e49 | 52 | */ |
yfkwok | 2:464c7e62d97d | 53 | void draw_cha1_alt_sprite(int pos_x,int pos_y,N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 54 | |
yfkwok | 17:5d8ff39a0e49 | 55 | /** |
yfkwok | 17:5d8ff39a0e49 | 56 | * @brief Draw the secondary alternative sprite |
yfkwok | 17:5d8ff39a0e49 | 57 | * @param position x pos_x (int) |
yfkwok | 17:5d8ff39a0e49 | 58 | * @param position y pos_y (int) |
yfkwok | 17:5d8ff39a0e49 | 59 | * @details Draws the alternative secondary evolution of the character, the position will be determined by parameters pos_x and pos_y |
yfkwok | 17:5d8ff39a0e49 | 60 | */ |
yfkwok | 2:464c7e62d97d | 61 | void draw_cha2_alt_sprite(int pos_x,int pos_y,N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 62 | |
yfkwok | 17:5d8ff39a0e49 | 63 | /** |
yfkwok | 17:5d8ff39a0e49 | 64 | * @brief Draw the tertiary alternative sprite |
yfkwok | 17:5d8ff39a0e49 | 65 | * @param position x pos_x (int) |
yfkwok | 17:5d8ff39a0e49 | 66 | * @param position y pos_y (int) |
yfkwok | 17:5d8ff39a0e49 | 67 | * @details Draws the alternative tertiary evolution of the character, the position will be determined by parameters pos_x and pos_y |
yfkwok | 17:5d8ff39a0e49 | 68 | */ |
yfkwok | 2:464c7e62d97d | 69 | void draw_cha3_alt_sprite(int pos_x,int pos_y,N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 70 | |
yfkwok | 17:5d8ff39a0e49 | 71 | /** |
yfkwok | 17:5d8ff39a0e49 | 72 | * @brief Draw the evolution 1 sprite |
yfkwok | 17:5d8ff39a0e49 | 73 | * @details Draws the primary evolution of the character which is displayed when evolving |
yfkwok | 17:5d8ff39a0e49 | 74 | */ |
yfkwok | 4:5bc9c4363d31 | 75 | void evo_1_sprite(N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 76 | |
yfkwok | 17:5d8ff39a0e49 | 77 | /** |
yfkwok | 17:5d8ff39a0e49 | 78 | * @brief Draw the evolution 2 sprite |
yfkwok | 17:5d8ff39a0e49 | 79 | * @details Draws the secondary evolution of the character which is displayed when evolving |
yfkwok | 17:5d8ff39a0e49 | 80 | */ |
yfkwok | 4:5bc9c4363d31 | 81 | void evo_2_sprite(N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 82 | |
yfkwok | 17:5d8ff39a0e49 | 83 | /** |
yfkwok | 17:5d8ff39a0e49 | 84 | * @brief Draw the name title |
yfkwok | 17:5d8ff39a0e49 | 85 | * @param position x x (int) |
yfkwok | 17:5d8ff39a0e49 | 86 | * @param position y y (int) |
yfkwok | 17:5d8ff39a0e49 | 87 | * @details Draws the name tile of the character, the position will be determined by parameters x and y |
yfkwok | 17:5d8ff39a0e49 | 88 | */ |
yfkwok | 9:1395c98b58fc | 89 | void evo_3_sprite(N5110 &lcd, int x, int y); |
yfkwok | 17:5d8ff39a0e49 | 90 | |
yfkwok | 17:5d8ff39a0e49 | 91 | /** |
yfkwok | 17:5d8ff39a0e49 | 92 | * @brief Draw the congratulation sprite for evolution 1 |
yfkwok | 17:5d8ff39a0e49 | 93 | * @details Draws the primary evolution of the character which is displayed after evolution |
yfkwok | 17:5d8ff39a0e49 | 94 | */ |
yfkwok | 4:5bc9c4363d31 | 95 | void evo_1_cong(N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 96 | |
yfkwok | 17:5d8ff39a0e49 | 97 | /** |
yfkwok | 17:5d8ff39a0e49 | 98 | * @brief Draw the congratulation sprite for evolution 2 |
yfkwok | 17:5d8ff39a0e49 | 99 | * @details Draws the secondary evolution of the character which is displayed after evolution |
yfkwok | 17:5d8ff39a0e49 | 100 | */ |
yfkwok | 4:5bc9c4363d31 | 101 | void evo_2_cong(N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 102 | |
yfkwok | 17:5d8ff39a0e49 | 103 | /** |
yfkwok | 17:5d8ff39a0e49 | 104 | * @brief Draw the congratulation sprite for evolution 3 |
yfkwok | 17:5d8ff39a0e49 | 105 | * @details Draws the final evolution of the character which is displayed after evolution |
yfkwok | 17:5d8ff39a0e49 | 106 | */ |
yfkwok | 4:5bc9c4363d31 | 107 | void evo_3_cong(N5110 &lcd); |
yfkwok | 17:5d8ff39a0e49 | 108 | |
yfkwok | 17:5d8ff39a0e49 | 109 | /** |
yfkwok | 17:5d8ff39a0e49 | 110 | * @brief Display the descrption of the character |
yfkwok | 17:5d8ff39a0e49 | 111 | * @details Contain the detail description of the character and the instruction sets to navigate through the manual |
yfkwok | 17:5d8ff39a0e49 | 112 | */ |
yfkwok | 2:464c7e62d97d | 113 | void description(Gamepad &pad, N5110 &lcd); |
yfkwok | 2:464c7e62d97d | 114 | |
yfkwok | 2:464c7e62d97d | 115 | private: |
yfkwok | 2:464c7e62d97d | 116 | |
yfkwok | 2:464c7e62d97d | 117 | int _pos_x; |
yfkwok | 2:464c7e62d97d | 118 | int _pos_y; |
yfkwok | 9:1395c98b58fc | 119 | int _x; |
yfkwok | 9:1395c98b58fc | 120 | int _y; |
yfkwok | 2:464c7e62d97d | 121 | |
yfkwok | 2:464c7e62d97d | 122 | }; |
yfkwok | 2:464c7e62d97d | 123 | |
yfkwok | 2:464c7e62d97d | 124 | #endif |