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