contains my game for the embedded systems project 2645

Dependencies:   mbed FXOS8700CQQQ

Committer:
OmarAlebiary
Date:
Fri May 03 00:27:52 2019 +0000
Revision:
33:24ef796ff2c8
Parent:
29:e660274d8222
added in-line comments to all classes of the project

Who changed what in which revision?

UserRevisionLine numberNew contents of line
OmarAlebiary 28:39607fb67e88 1 #ifndef GAMETONES_H
OmarAlebiary 28:39607fb67e88 2 #define GAMETONES_H
OmarAlebiary 28:39607fb67e88 3 #include "mbed.h"
OmarAlebiary 28:39607fb67e88 4 #include "N5110.h"
OmarAlebiary 28:39607fb67e88 5 #include "Gamepad.h"
OmarAlebiary 28:39607fb67e88 6
OmarAlebiary 28:39607fb67e88 7
OmarAlebiary 33:24ef796ff2c8 8 /** GameTones class
OmarAlebiary 28:39607fb67e88 9
OmarAlebiary 28:39607fb67e88 10 @brief C++ class containing the tones for the gameplay
OmarAlebiary 28:39607fb67e88 11
OmarAlebiary 28:39607fb67e88 12 @version 1.0
OmarAlebiary 28:39607fb67e88 13
OmarAlebiary 28:39607fb67e88 14 @author Omar Alebiary
OmarAlebiary 28:39607fb67e88 15
OmarAlebiary 28:39607fb67e88 16 @date April 2019
OmarAlebiary 28:39607fb67e88 17
OmarAlebiary 28:39607fb67e88 18 @code
OmarAlebiary 28:39607fb67e88 19
OmarAlebiary 28:39607fb67e88 20 #include "mbed.h"
OmarAlebiary 28:39607fb67e88 21 #include "N5110.h"
OmarAlebiary 28:39607fb67e88 22 #include "Gamepad.h"
OmarAlebiary 28:39607fb67e88 23 #include "RocketRacer.h"
OmarAlebiary 28:39607fb67e88 24
OmarAlebiary 28:39607fb67e88 25 // objects
OmarAlebiary 28:39607fb67e88 26 Gamepad pad;
OmarAlebiary 28:39607fb67e88 27 RocketRacer rc;
OmarAlebiary 28:39607fb67e88 28 Menus menus;
OmarAlebiary 29:e660274d8222 29 GameTones tones;
OmarAlebiary 28:39607fb67e88 30
OmarAlebiary 28:39607fb67e88 31
OmarAlebiary 28:39607fb67e88 32
OmarAlebiary 28:39607fb67e88 33 int main(){
OmarAlebiary 28:39607fb67e88 34
OmarAlebiary 29:e660274d8222 35 //initializes the gamepad and the lcd
OmarAlebiary 28:39607fb67e88 36 setup();
OmarAlebiary 29:e660274d8222 37 //plays costume made tones for the end of game display
OmarAlebiary 29:e660274d8222 38 tones.End_Game_Melody(pad);
OmarAlebiary 29:e660274d8222 39 //plays costume made tones for the welcome screen
OmarAlebiary 29:e660274d8222 40 tones.Play_Welcome_Melody(pad);
OmarAlebiary 28:39607fb67e88 41
OmarAlebiary 28:39607fb67e88 42 }
OmarAlebiary 28:39607fb67e88 43
OmarAlebiary 28:39607fb67e88 44 @endcode
OmarAlebiary 28:39607fb67e88 45 */
OmarAlebiary 28:39607fb67e88 46
OmarAlebiary 28:39607fb67e88 47
OmarAlebiary 28:39607fb67e88 48 class GameTones{
OmarAlebiary 28:39607fb67e88 49
OmarAlebiary 28:39607fb67e88 50 public:
OmarAlebiary 29:e660274d8222 51 /**
OmarAlebiary 29:e660274d8222 52 * @brief Default Constuctor
OmarAlebiary 29:e660274d8222 53 * @details Creates the object of class GameTones
OmarAlebiary 29:e660274d8222 54 */
OmarAlebiary 28:39607fb67e88 55 GameTones();
OmarAlebiary 28:39607fb67e88 56 /**
OmarAlebiary 29:e660274d8222 57 * @brief Default destuctor
OmarAlebiary 29:e660274d8222 58 * @details destroys the object of class GameTones
OmarAlebiary 29:e660274d8222 59 */
OmarAlebiary 29:e660274d8222 60 ~GameTones();
OmarAlebiary 29:e660274d8222 61 /**
OmarAlebiary 28:39607fb67e88 62 * @brief method to play the game over melody
OmarAlebiary 28:39607fb67e88 63 * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
OmarAlebiary 28:39607fb67e88 64 */
OmarAlebiary 28:39607fb67e88 65 void End_Game_Melody(Gamepad &pad);
OmarAlebiary 28:39607fb67e88 66 /**
OmarAlebiary 28:39607fb67e88 67 * @brief method to play the welcome melody
OmarAlebiary 28:39607fb67e88 68 * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
OmarAlebiary 28:39607fb67e88 69 */
OmarAlebiary 28:39607fb67e88 70 void Play_Welcome_Melody(Gamepad &pad);
OmarAlebiary 28:39607fb67e88 71
OmarAlebiary 28:39607fb67e88 72 };
OmarAlebiary 28:39607fb67e88 73
OmarAlebiary 28:39607fb67e88 74 #endif