Game codes for Pokemon Academy

Dependencies:   mbed FXOS8700CQ mbed-rtos

Committer:
yfkwok
Date:
Mon May 06 20:37:23 2019 +0000
Revision:
30:0ff3bede5307
Parent:
25:31111e6e13ad
All 3 mini games for characters completed with documentations

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yfkwok 25:31111e6e13ad 1 #ifndef SQUIRTLE_H
yfkwok 25:31111e6e13ad 2 #define SQUIRTLE_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 /** Squirtle Class
yfkwok 17:5d8ff39a0e49 9 * @brief This class contains all information such as sprites and descriptions for the character Squirtle
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 Squirtle
yfkwok 2:464c7e62d97d 16 {
yfkwok 2:464c7e62d97d 17
yfkwok 2:464c7e62d97d 18 public:
yfkwok 17:5d8ff39a0e49 19 /** Constructor */
yfkwok 2:464c7e62d97d 20 Squirtle();
yfkwok 17:5d8ff39a0e49 21 /** Deconstructor */
yfkwok 2:464c7e62d97d 22 ~Squirtle();
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 * @brief Draw the secondary sprite
yfkwok 17:5d8ff39a0e49 34 * @param position x pos_x (int)
yfkwok 17:5d8ff39a0e49 35 * @param position y pos_y (int)
yfkwok 17:5d8ff39a0e49 36 * @details Draws the secondary evolution of the character, the position will be determined by parameters pos_x and pos_y
yfkwok 17:5d8ff39a0e49 37 */
yfkwok 2:464c7e62d97d 38 void draw_cha2_sprite(int pos_x,int pos_y,N5110 &lcd);
yfkwok 17:5d8ff39a0e49 39
yfkwok 17:5d8ff39a0e49 40 /**
yfkwok 17:5d8ff39a0e49 41 * @brief Draw the tertiary sprite
yfkwok 17:5d8ff39a0e49 42 * @param position x pos_x (int)
yfkwok 17:5d8ff39a0e49 43 * @param position y pos_y (int)
yfkwok 17:5d8ff39a0e49 44 * @details Draws the tertiary evolution of the character, the position will be determined by parameters pos_x and pos_y
yfkwok 17:5d8ff39a0e49 45 */
yfkwok 2:464c7e62d97d 46 void draw_cha3_sprite(int pos_x,int pos_y,N5110 &lcd);
yfkwok 17:5d8ff39a0e49 47
yfkwok 17:5d8ff39a0e49 48 /**
yfkwok 17:5d8ff39a0e49 49 * @brief Draw the primary alternative sprite
yfkwok 17:5d8ff39a0e49 50 * @param position x pos_x (int)
yfkwok 17:5d8ff39a0e49 51 * @param position y pos_y (int)
yfkwok 17:5d8ff39a0e49 52 * @details Draws the alternative primary evolution of the character, the position will be determined by parameters pos_x and pos_y
yfkwok 17:5d8ff39a0e49 53 */
yfkwok 2:464c7e62d97d 54 void draw_cha1_alt_sprite(int pos_x,int pos_y,N5110 &lcd);
yfkwok 17:5d8ff39a0e49 55
yfkwok 17:5d8ff39a0e49 56 /**
yfkwok 17:5d8ff39a0e49 57 * @brief Draw the secondary alternative sprite
yfkwok 17:5d8ff39a0e49 58 * @param position x pos_x (int)
yfkwok 17:5d8ff39a0e49 59 * @param position y pos_y (int)
yfkwok 17:5d8ff39a0e49 60 * @details Draws the alternative secondary evolution of the character, the position will be determined by parameters pos_x and pos_y
yfkwok 17:5d8ff39a0e49 61 */
yfkwok 2:464c7e62d97d 62 void draw_cha2_alt_sprite(int pos_x,int pos_y,N5110 &lcd);
yfkwok 17:5d8ff39a0e49 63
yfkwok 17:5d8ff39a0e49 64 /**
yfkwok 17:5d8ff39a0e49 65 * @brief Draw the tertiary alternative sprite
yfkwok 17:5d8ff39a0e49 66 * @param position x pos_x (int)
yfkwok 17:5d8ff39a0e49 67 * @param position y pos_y (int)
yfkwok 17:5d8ff39a0e49 68 * @details Draws the alternative tertiary evolution of the character, the position will be determined by parameters pos_x and pos_y
yfkwok 17:5d8ff39a0e49 69 */
yfkwok 2:464c7e62d97d 70 void draw_cha3_alt_sprite(int pos_x,int pos_y,N5110 &lcd);
yfkwok 17:5d8ff39a0e49 71
yfkwok 17:5d8ff39a0e49 72 /**
yfkwok 17:5d8ff39a0e49 73 * @brief Draw the evolution 1 sprite
yfkwok 17:5d8ff39a0e49 74 * @details Draws the primary evolution of the character which is displayed when evolving
yfkwok 17:5d8ff39a0e49 75 */
yfkwok 4:5bc9c4363d31 76 void evo_1_sprite(N5110 &lcd);
yfkwok 17:5d8ff39a0e49 77
yfkwok 17:5d8ff39a0e49 78 /**
yfkwok 17:5d8ff39a0e49 79 * @brief Draw the evolution 2 sprite
yfkwok 17:5d8ff39a0e49 80 * @details Draws the secondary evolution of the character which is displayed when evolving
yfkwok 17:5d8ff39a0e49 81 */
yfkwok 4:5bc9c4363d31 82 void evo_2_sprite(N5110 &lcd);
yfkwok 17:5d8ff39a0e49 83
yfkwok 17:5d8ff39a0e49 84 /**
yfkwok 17:5d8ff39a0e49 85 * @brief Draw the name title
yfkwok 17:5d8ff39a0e49 86 * @param position x x (int)
yfkwok 17:5d8ff39a0e49 87 * @param position y y (int)
yfkwok 17:5d8ff39a0e49 88 * @details Draws the name tile of the character, the position will be determined by parameters x and y
yfkwok 17:5d8ff39a0e49 89 */
yfkwok 9:1395c98b58fc 90 void evo_3_sprite(N5110 &lcd, int x, int y);
yfkwok 17:5d8ff39a0e49 91
yfkwok 17:5d8ff39a0e49 92 /**
yfkwok 17:5d8ff39a0e49 93 * @brief Draw the congratulation sprite for evolution 1
yfkwok 17:5d8ff39a0e49 94 * @details Draws the primary evolution of the character which is displayed after evolution
yfkwok 17:5d8ff39a0e49 95 */
yfkwok 4:5bc9c4363d31 96 void evo_1_cong(N5110 &lcd);
yfkwok 17:5d8ff39a0e49 97
yfkwok 17:5d8ff39a0e49 98 /**
yfkwok 17:5d8ff39a0e49 99 * @brief Draw the congratulation sprite for evolution 2
yfkwok 17:5d8ff39a0e49 100 * @details Draws the secondary evolution of the character which is displayed after evolution
yfkwok 17:5d8ff39a0e49 101 */
yfkwok 4:5bc9c4363d31 102 void evo_2_cong(N5110 &lcd);
yfkwok 17:5d8ff39a0e49 103
yfkwok 17:5d8ff39a0e49 104 /**
yfkwok 17:5d8ff39a0e49 105 * @brief Draw the congratulation sprite for evolution 3
yfkwok 17:5d8ff39a0e49 106 * @details Draws the final evolution of the character which is displayed after evolution
yfkwok 17:5d8ff39a0e49 107 */
yfkwok 4:5bc9c4363d31 108 void evo_3_cong(N5110 &lcd);
yfkwok 17:5d8ff39a0e49 109
yfkwok 17:5d8ff39a0e49 110 /**
yfkwok 17:5d8ff39a0e49 111 * @brief Display the descrption of the character
yfkwok 17:5d8ff39a0e49 112 * @details Contain the detail description of the character and the instruction sets to navigate through the manual
yfkwok 17:5d8ff39a0e49 113 */
yfkwok 2:464c7e62d97d 114 void description(Gamepad &pad, N5110 &lcd);
yfkwok 2:464c7e62d97d 115
yfkwok 2:464c7e62d97d 116 private:
yfkwok 2:464c7e62d97d 117
yfkwok 2:464c7e62d97d 118 int _pos_x;
yfkwok 2:464c7e62d97d 119 int _pos_y;
yfkwok 9:1395c98b58fc 120 int _x;
yfkwok 9:1395c98b58fc 121 int _y;
yfkwok 2:464c7e62d97d 122
yfkwok 2:464c7e62d97d 123 };
yfkwok 2:464c7e62d97d 124
yfkwok 2:464c7e62d97d 125 #endif