el15mh 200929957

Dependencies:   mbed

Committer:
el15mh
Date:
Thu May 04 17:39:23 2017 +0000
Revision:
10:989e5dbd12ee
Parent:
9:960dfc71c224
Documented and final revision

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el15mh 9:960dfc71c224 1 #ifndef ANIMATIONS_H
el15mh 9:960dfc71c224 2 #define ANIMATIONS_H
el15mh 9:960dfc71c224 3
el15mh 9:960dfc71c224 4 #include "mbed.h"
el15mh 9:960dfc71c224 5 #include "N5110.h"
el15mh 9:960dfc71c224 6 #include "Gamepad.h"
el15mh 9:960dfc71c224 7
el15mh 10:989e5dbd12ee 8 /**
el15mh 10:989e5dbd12ee 9 @brief Animations Class contains all the different animations used throughout the game.
el15mh 10:989e5dbd12ee 10 @author Max Houghton
el15mh 10:989e5dbd12ee 11 @date April 13 2017
el15mh 10:989e5dbd12ee 12 */
el15mh 10:989e5dbd12ee 13
el15mh 9:960dfc71c224 14 class Animations
el15mh 9:960dfc71c224 15 {
el15mh 9:960dfc71c224 16
el15mh 9:960dfc71c224 17 public:
el15mh 9:960dfc71c224 18
el15mh 9:960dfc71c224 19 /**
el15mh 9:960dfc71c224 20 * @details - constructor
el15mh 9:960dfc71c224 21 */
el15mh 9:960dfc71c224 22 Animations();
el15mh 9:960dfc71c224 23
el15mh 9:960dfc71c224 24 /**
el15mh 9:960dfc71c224 25 * @details - destructor
el15mh 9:960dfc71c224 26 */
el15mh 9:960dfc71c224 27 ~Animations();
el15mh 9:960dfc71c224 28
el15mh 9:960dfc71c224 29 /** Intro
el15mh 9:960dfc71c224 30 *
el15mh 9:960dfc71c224 31 * @details - Short animation to be used when running the introduction during the loading of the game.
el15mh 9:960dfc71c224 32 * @param - lcd - N5110 Libarary used to print strings and draw the ball
el15mh 9:960dfc71c224 33 *
el15mh 9:960dfc71c224 34 */
el15mh 9:960dfc71c224 35 void intro(N5110 &lcd, Gamepad &pad);
el15mh 9:960dfc71c224 36
el15mh 9:960dfc71c224 37 /** Vertical Joystick
el15mh 9:960dfc71c224 38 *
el15mh 9:960dfc71c224 39 * @details - Function to draw vertical joystick image. Used in 'animateJoystick()' function in Menu class.
el15mh 9:960dfc71c224 40 * @param - lcd - N5110 Libarary used to draw joystick bitmap.
el15mh 9:960dfc71c224 41 *
el15mh 9:960dfc71c224 42 */
el15mh 9:960dfc71c224 43 void drawVerticalJoystick(N5110 &lcd);
el15mh 9:960dfc71c224 44
el15mh 9:960dfc71c224 45 /** Left Joystick
el15mh 9:960dfc71c224 46 *
el15mh 9:960dfc71c224 47 * @details - Function to draw joystick image tilting to the left. Used in 'animateJoystick()' function in Menu class.
el15mh 9:960dfc71c224 48 * @param - lcd - N5110 Libarary used to draw joystick bitmap.
el15mh 9:960dfc71c224 49 *
el15mh 9:960dfc71c224 50 */
el15mh 9:960dfc71c224 51 void drawLeftJoystick(N5110 &lcd);
el15mh 9:960dfc71c224 52
el15mh 9:960dfc71c224 53 /** Right Joystick
el15mh 9:960dfc71c224 54 *
el15mh 9:960dfc71c224 55 * @details - Function to draw joystick image tilting to the right. Used in 'animateJoystick()' function in Menu class.
el15mh 9:960dfc71c224 56 * @param - lcd - N5110 Libarary used to draw joystick bitmap.
el15mh 9:960dfc71c224 57 *
el15mh 9:960dfc71c224 58 */
el15mh 9:960dfc71c224 59 void drawRightJoystick(N5110 &lcd);
el15mh 9:960dfc71c224 60
el15mh 9:960dfc71c224 61 /** Left Joystick
el15mh 9:960dfc71c224 62 *
el15mh 9:960dfc71c224 63 * @details - Function to draw gamepad image tilting to the left. Used in 'animateGamepad()' function in Menu class.
el15mh 9:960dfc71c224 64 * @param - lcd - N5110 Libarary used to draw gamepad bitmap.
el15mh 9:960dfc71c224 65 *
el15mh 9:960dfc71c224 66 */
el15mh 9:960dfc71c224 67 void drawLeftGamepad(N5110 &lcd);
el15mh 9:960dfc71c224 68
el15mh 9:960dfc71c224 69 /** Vertical Gamepad
el15mh 9:960dfc71c224 70 *
el15mh 9:960dfc71c224 71 * @details - Function to draw vertical gamepad image. Used in 'animateGamepad()' function in Menu class.
el15mh 9:960dfc71c224 72 * @param - lcd - N5110 Libarary used to draw gamepad bitmap.
el15mh 9:960dfc71c224 73 *
el15mh 9:960dfc71c224 74 */
el15mh 9:960dfc71c224 75 void drawVerticalGamepad(N5110 &lcd);
el15mh 9:960dfc71c224 76
el15mh 9:960dfc71c224 77 /** Right Gamepad
el15mh 9:960dfc71c224 78 *
el15mh 9:960dfc71c224 79 * @details - Function to draw gamepad image tilting to the right. Used in 'animateGamepad()' function in Menu class.
el15mh 9:960dfc71c224 80 * @param - lcd - N5110 Libarary used to draw gamepad bitmap.
el15mh 9:960dfc71c224 81 *
el15mh 9:960dfc71c224 82 */
el15mh 9:960dfc71c224 83 void drawRightGamepad(N5110 &lcd);
el15mh 9:960dfc71c224 84
el15mh 9:960dfc71c224 85 /** Rolling Empty Ball
el15mh 9:960dfc71c224 86 *
el15mh 9:960dfc71c224 87 * @details - Function to draw transparent-filled ball rolling across the screen. Used in 'ballColourOptions()' function in Menu class.
el15mh 9:960dfc71c224 88 * @param - lcd - N5110 Libarary used to draw circles representing moving ball.
el15mh 9:960dfc71c224 89 *
el15mh 9:960dfc71c224 90 */
el15mh 9:960dfc71c224 91 void rollingEmptyBall(N5110 &lcd);
el15mh 9:960dfc71c224 92
el15mh 9:960dfc71c224 93 /** Rolling Solid Ball
el15mh 9:960dfc71c224 94 *
el15mh 9:960dfc71c224 95 * @details - Function to draw solid-filled ball rolling across the screen. Used in 'ballColourOptions()' function in Menu class.
el15mh 9:960dfc71c224 96 * @param - lcd - N5110 Libarary used to draw circles representing moving ball.
el15mh 9:960dfc71c224 97 *
el15mh 9:960dfc71c224 98 */
el15mh 9:960dfc71c224 99 void rollingSolidBall(N5110 &lcd);
el15mh 9:960dfc71c224 100
el15mh 9:960dfc71c224 101 /** Maze Completed
el15mh 9:960dfc71c224 102 *
el15mh 9:960dfc71c224 103 * @details - Short animation to be used when the maze being used has been completed.
el15mh 9:960dfc71c224 104 * @param - lcd - N5110 Libarary used to print strings and draw bitmaps.
el15mh 9:960dfc71c224 105 *
el15mh 9:960dfc71c224 106 */
el15mh 9:960dfc71c224 107 void mazeCompleted(N5110 &lcd);
el15mh 9:960dfc71c224 108
el15mh 9:960dfc71c224 109 /** Stickman One
el15mh 9:960dfc71c224 110 *
el15mh 9:960dfc71c224 111 * @details - First animation in a series to create a jumping man. Used inside mazeCompleted() function.
el15mh 9:960dfc71c224 112 * @param - lcd - N5110 Libarary used to print strings and draw bitmap.
el15mh 9:960dfc71c224 113 *
el15mh 9:960dfc71c224 114 */
el15mh 9:960dfc71c224 115 void stickmanOne(N5110 &lcd);
el15mh 9:960dfc71c224 116
el15mh 9:960dfc71c224 117 /** Stickman Two
el15mh 9:960dfc71c224 118 *
el15mh 9:960dfc71c224 119 * @details - Second animation in a series to create a jumping man. Used inside mazeCompleted() function.
el15mh 9:960dfc71c224 120 * @param - lcd - N5110 Libarary used to print strings and draw bitmap.
el15mh 9:960dfc71c224 121 *
el15mh 9:960dfc71c224 122 */
el15mh 9:960dfc71c224 123 void stickmanTwo(N5110 &lcd);
el15mh 9:960dfc71c224 124
el15mh 9:960dfc71c224 125 /** Stickman Three
el15mh 9:960dfc71c224 126 *
el15mh 9:960dfc71c224 127 * @details - Third animation in a series to create a jumping man. Used inside mazeCompleted() function.
el15mh 9:960dfc71c224 128 * @param - lcd - N5110 Libarary used to print strings and draw bitmap.
el15mh 9:960dfc71c224 129 *
el15mh 9:960dfc71c224 130 */
el15mh 9:960dfc71c224 131 void stickmanThree(N5110 &lcd);
el15mh 9:960dfc71c224 132
el15mh 9:960dfc71c224 133 /** Stickman Four
el15mh 9:960dfc71c224 134 *
el15mh 9:960dfc71c224 135 * @details - Fourth animation in a series to create a jumping man. Used inside mazeCompleted() function.
el15mh 9:960dfc71c224 136 * @param - lcd - N5110 Libarary used to print strings and draw bitmap.
el15mh 9:960dfc71c224 137 *
el15mh 9:960dfc71c224 138 */
el15mh 9:960dfc71c224 139 void stickmanFour(N5110 &lcd);
el15mh 9:960dfc71c224 140
el15mh 9:960dfc71c224 141 /** Stickman Five
el15mh 9:960dfc71c224 142 *
el15mh 9:960dfc71c224 143 * @details - Fifth animation in a series to create a jumping man. Used inside mazeCompleted() function.
el15mh 9:960dfc71c224 144 * @param - lcd - N5110 Libarary used to print strings and draw bitmap.
el15mh 9:960dfc71c224 145 *
el15mh 9:960dfc71c224 146 */
el15mh 9:960dfc71c224 147 void stickmanFive(N5110 &lcd);
el15mh 9:960dfc71c224 148
el15mh 9:960dfc71c224 149 /** Stickman Six
el15mh 9:960dfc71c224 150 *
el15mh 9:960dfc71c224 151 * @details - Sixth animation in a series to create a jumping man. Used inside mazeCompleted() function.
el15mh 9:960dfc71c224 152 * @param - lcd - N5110 Libarary used to print strings and draw bitmap.
el15mh 9:960dfc71c224 153 *
el15mh 9:960dfc71c224 154 */
el15mh 9:960dfc71c224 155 void stickmanSix(N5110 &lcd);
el15mh 9:960dfc71c224 156
el15mh 9:960dfc71c224 157 /** Sound Switch
el15mh 9:960dfc71c224 158 *
el15mh 9:960dfc71c224 159 * @details - Function to display a switch a made up of one outer rectangle and two inner ones. At any given instant, only one of the inner rectangles is drawn. This is decided by the boolean value of 'tone'.
el15mh 9:960dfc71c224 160 * @param - lcd - N5110 Libarary used to print rectangles on the screen.
el15mh 9:960dfc71c224 161 * @param - tone - Boolean variable to dictate the appearance of the switch being drawn on the screen.
el15mh 9:960dfc71c224 162 *
el15mh 9:960dfc71c224 163 */
el15mh 9:960dfc71c224 164 void soundSwitch(N5110 &lcd, Gamepad &pad, bool tone);
el15mh 9:960dfc71c224 165
el15mh 9:960dfc71c224 166 private:
el15mh 9:960dfc71c224 167
el15mh 9:960dfc71c224 168 };
el15mh 9:960dfc71c224 169
el15mh 9:960dfc71c224 170 #endif /*ANIMATIONS_H*/