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

Committer:
yfkwok
Date:
Wed May 08 23:57:04 2019 +0000
Revision:
33:f7ec806e14b6
Parent:
32:58def659f463
09/05/19 - Inline comment added, functionalities complete, all Deoxygen comment added for classes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yfkwok 2:464c7e62d97d 1 #ifndef SCORE_H
yfkwok 2:464c7e62d97d 2 #define SCORE_H
yfkwok 2:464c7e62d97d 3
yfkwok 2:464c7e62d97d 4 #include "Gamepad.h"
yfkwok 2:464c7e62d97d 5 #include "mbed.h"
yfkwok 2:464c7e62d97d 6 #include "Notes.h"
yfkwok 4:5bc9c4363d31 7 #include "N5110.h"
yfkwok 4:5bc9c4363d31 8 #include "Squirtle.h"
yfkwok 10:adff3c804985 9 #include "Charmander.h"
yfkwok 12:71683453f66a 10 #include "Bulbasaur.h"
yfkwok 2:464c7e62d97d 11
yfkwok 16:4e49f5cb972e 12 /** Score Class
yfkwok 16:4e49f5cb972e 13 * @author Yiu Fai Kwok, University of Leeds
yfkwok 16:4e49f5cb972e 14 * @version 1.0
yfkwok 16:4e49f5cb972e 15 * @brief Score class containing all in-game background music files
yfkwok 16:4e49f5cb972e 16 * @date 20/04/2019
yfkwok 16:4e49f5cb972e 17 */
yfkwok 16:4e49f5cb972e 18
yfkwok 2:464c7e62d97d 19 class Score
yfkwok 2:464c7e62d97d 20 {
yfkwok 2:464c7e62d97d 21 public:
yfkwok 16:4e49f5cb972e 22
yfkwok 16:4e49f5cb972e 23 /** Constructor */
yfkwok 2:464c7e62d97d 24 Score();
yfkwok 16:4e49f5cb972e 25 /** Deconstructor */
yfkwok 2:464c7e62d97d 26 ~Score();
yfkwok 16:4e49f5cb972e 27
yfkwok 16:4e49f5cb972e 28 /**
yfkwok 16:4e49f5cb972e 29 * @brief Title screen music
yfkwok 16:4e49f5cb972e 30 * @details Background music played during title screen
yfkwok 16:4e49f5cb972e 31 */
yfkwok 2:464c7e62d97d 32 void title_music(Gamepad &pad);
yfkwok 16:4e49f5cb972e 33
yfkwok 16:4e49f5cb972e 34 /**
yfkwok 16:4e49f5cb972e 35 * @brief Level up music
yfkwok 16:4e49f5cb972e 36 * @details Background music played when player advance in level or year
yfkwok 16:4e49f5cb972e 37 */
yfkwok 2:464c7e62d97d 38 void level_up(Gamepad &pad);
yfkwok 16:4e49f5cb972e 39
yfkwok 16:4e49f5cb972e 40 /**
yfkwok 16:4e49f5cb972e 41 * @brief Congratulation music
yfkwok 16:4e49f5cb972e 42 * @details Background music played when player succesfully completed a mission
yfkwok 16:4e49f5cb972e 43 */
yfkwok 2:464c7e62d97d 44 void congrats(Gamepad &pad);
yfkwok 16:4e49f5cb972e 45
yfkwok 16:4e49f5cb972e 46 /**
yfkwok 16:4e49f5cb972e 47 * @brief Coin music
yfkwok 16:4e49f5cb972e 48 * @details Background music played when player successfully collected a coin in Game 1
yfkwok 16:4e49f5cb972e 49 */
yfkwok 2:464c7e62d97d 50 void coin(Gamepad &pad);
yfkwok 16:4e49f5cb972e 51
yfkwok 16:4e49f5cb972e 52 /**
yfkwok 16:4e49f5cb972e 53 * @brief Evolution animation and music
yfkwok 17:5d8ff39a0e49 54 * @param character cha (int)
yfkwok 17:5d8ff39a0e49 55 * @param the value of year (int)
yfkwok 16:4e49f5cb972e 56 * @details Background music played when player's character enters evolution, dependent on character selected (cha) and year of which player is currently in (year), initiate animation for evolution.
yfkwok 16:4e49f5cb972e 57 */
yfkwok 4:5bc9c4363d31 58 void evolution_music(Gamepad &pad, N5110 &lcd, int cha, int year);
yfkwok 16:4e49f5cb972e 59
yfkwok 16:4e49f5cb972e 60 /**
yfkwok 16:4e49f5cb972e 61 * @brief Congratulation music for evolution
yfkwok 31:0d2c19a285f6 62 * @param character cha (int)
yfkwok 31:0d2c19a285f6 63 * @param the value of year (int)
yfkwok 16:4e49f5cb972e 64 * @details Background music played when player's character succesfully evolves, draw sprite of the evolved character
yfkwok 16:4e49f5cb972e 65 */
yfkwok 4:5bc9c4363d31 66 void congrats(Gamepad &pad, N5110 &lcd, int cha, int year);
yfkwok 16:4e49f5cb972e 67
yfkwok 16:4e49f5cb972e 68 /**
yfkwok 16:4e49f5cb972e 69 * @brief Draw sprite of pokemon
yfkwok 17:5d8ff39a0e49 70 * @param character cha (int)
yfkwok 17:5d8ff39a0e49 71 * @param the value of year (int)
yfkwok 17:5d8ff39a0e49 72 * @param the value of x (int)
yfkwok 17:5d8ff39a0e49 73 * @param the value of y (int)
yfkwok 16:4e49f5cb972e 74 * @details Draw sprite of character depending on character selected (cha) and the year at which the player is in (year). Location of the sprite is determined by x and y to generate the moving name title.
yfkwok 16:4e49f5cb972e 75 */
yfkwok 12:71683453f66a 76 void draw(N5110 &lcd, int cha, int year, int x, int y);
yfkwok 16:4e49f5cb972e 77
yfkwok 16:4e49f5cb972e 78 /**
yfkwok 16:4e49f5cb972e 79 * @brief Draw sprite of evolved pokemon
yfkwok 17:5d8ff39a0e49 80 * @param character cha (int)
yfkwok 17:5d8ff39a0e49 81 * @param the value of year (int)
yfkwok 16:4e49f5cb972e 82 * @details Draw sprite of evolved character according to year (year) and character selected (cha)
yfkwok 16:4e49f5cb972e 83 */
yfkwok 4:5bc9c4363d31 84 void draw_cong(N5110 &lcd, int cha, int year);
yfkwok 16:4e49f5cb972e 85
yfkwok 16:4e49f5cb972e 86 /**
yfkwok 16:4e49f5cb972e 87 * @brief Music for winning
yfkwok 16:4e49f5cb972e 88 * @details Background music played when player wins a mini game
yfkwok 16:4e49f5cb972e 89 */
yfkwok 5:bc0691d02fd5 90 void win(Gamepad &pad);
yfkwok 16:4e49f5cb972e 91
yfkwok 16:4e49f5cb972e 92 /**
yfkwok 16:4e49f5cb972e 93 * @brief Music for EXAM introduction
yfkwok 16:4e49f5cb972e 94 * @details Background music played when player enters the EXAM
yfkwok 16:4e49f5cb972e 95 */
yfkwok 5:bc0691d02fd5 96 void exam_intro(Gamepad &pad);
yfkwok 16:4e49f5cb972e 97
yfkwok 16:4e49f5cb972e 98 /**
yfkwok 31:0d2c19a285f6 99 * @brief Draw sprite for graduation
yfkwok 31:0d2c19a285f6 100 * @param character cha (int)
yfkwok 31:0d2c19a285f6 101 * @param the value of year (int)
yfkwok 31:0d2c19a285f6 102 * @param position x (int)
yfkwok 31:0d2c19a285f6 103 * @details Draw sprite and animation for the graduation credit scene according to character picked
yfkwok 31:0d2c19a285f6 104 */
yfkwok 31:0d2c19a285f6 105 void draw_grad(N5110 &lcd, int cha, int year, int x);
yfkwok 31:0d2c19a285f6 106
yfkwok 31:0d2c19a285f6 107 /**
yfkwok 31:0d2c19a285f6 108 * @brief Graduation animation and music
yfkwok 31:0d2c19a285f6 109 * @param character cha (int)
yfkwok 31:0d2c19a285f6 110 * @details Background music played when player graduates, dependent on character selected (cha), initiate animation for the graduation.
yfkwok 31:0d2c19a285f6 111 */
yfkwok 31:0d2c19a285f6 112 void graduation(Gamepad &pad, N5110 &lcd, int cha);
yfkwok 31:0d2c19a285f6 113
yfkwok 2:464c7e62d97d 114 private:
yfkwok 4:5bc9c4363d31 115 Squirtle _s1;
yfkwok 10:adff3c804985 116 Charmander _c1;
yfkwok 12:71683453f66a 117 Bulbasaur _b1;
yfkwok 2:464c7e62d97d 118 };
yfkwok 2:464c7e62d97d 119 #endif