Yiu Fai Kwok / Mbed 2 deprecated el17yfk

Dependencies:   mbed FXOS8700CQ mbed-rtos

Committer:
yfkwok
Date:
Sat Apr 20 15:20:43 2019 +0000
Revision:
16:4e49f5cb972e
Parent:
12:71683453f66a
Child:
17:5d8ff39a0e49
20/04/2019 - Update documentation for Game 1 Classes and Score

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 16:4e49f5cb972e 54 * @param cha
yfkwok 16:4e49f5cb972e 55 * @param year
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 16:4e49f5cb972e 62 * @details Background music played when player's character succesfully evolves, draw sprite of the evolved character
yfkwok 16:4e49f5cb972e 63 */
yfkwok 4:5bc9c4363d31 64 void congrats(Gamepad &pad, N5110 &lcd, int cha, int year);
yfkwok 16:4e49f5cb972e 65
yfkwok 16:4e49f5cb972e 66 /**
yfkwok 16:4e49f5cb972e 67 * @brief Draw sprite of pokemon
yfkwok 16:4e49f5cb972e 68 * @param cha
yfkwok 16:4e49f5cb972e 69 * @param year
yfkwok 16:4e49f5cb972e 70 * @param x
yfkwok 16:4e49f5cb972e 71 * @param y
yfkwok 16:4e49f5cb972e 72 * @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 73 */
yfkwok 12:71683453f66a 74 void draw(N5110 &lcd, int cha, int year, int x, int y);
yfkwok 16:4e49f5cb972e 75
yfkwok 16:4e49f5cb972e 76 /**
yfkwok 16:4e49f5cb972e 77 * @brief Draw sprite of evolved pokemon
yfkwok 16:4e49f5cb972e 78 * @param cha
yfkwok 16:4e49f5cb972e 79 * @param year
yfkwok 16:4e49f5cb972e 80 * @details Draw sprite of evolved character according to year (year) and character selected (cha)
yfkwok 16:4e49f5cb972e 81 */
yfkwok 4:5bc9c4363d31 82 void draw_cong(N5110 &lcd, int cha, int year);
yfkwok 16:4e49f5cb972e 83
yfkwok 16:4e49f5cb972e 84 /**
yfkwok 16:4e49f5cb972e 85 * @brief Music for winning
yfkwok 16:4e49f5cb972e 86 * @details Background music played when player wins a mini game
yfkwok 16:4e49f5cb972e 87 */
yfkwok 5:bc0691d02fd5 88 void win(Gamepad &pad);
yfkwok 16:4e49f5cb972e 89
yfkwok 16:4e49f5cb972e 90 /**
yfkwok 16:4e49f5cb972e 91 * @brief Music for EXAM introduction
yfkwok 16:4e49f5cb972e 92 * @details Background music played when player enters the EXAM
yfkwok 16:4e49f5cb972e 93 */
yfkwok 5:bc0691d02fd5 94 void exam_intro(Gamepad &pad);
yfkwok 16:4e49f5cb972e 95
yfkwok 16:4e49f5cb972e 96 /**
yfkwok 16:4e49f5cb972e 97 * @brief Music for EXAM running in parallel to the exam
yfkwok 16:4e49f5cb972e 98 * @details Background music played during the EXAM
yfkwok 16:4e49f5cb972e 99 */
yfkwok 5:bc0691d02fd5 100 void gym(Gamepad &pad, bool state);
yfkwok 2:464c7e62d97d 101
yfkwok 2:464c7e62d97d 102 private:
yfkwok 4:5bc9c4363d31 103 Squirtle _s1;
yfkwok 10:adff3c804985 104 Charmander _c1;
yfkwok 12:71683453f66a 105 Bulbasaur _b1;
yfkwok 2:464c7e62d97d 106 };
yfkwok 2:464c7e62d97d 107 #endif