Class containing all the bitmaps used to make up the various animations used within the game.

Files at this revision

API Documentation at this revision

Comitter:
el15mh
Date:
Thu May 04 14:02:17 2017 +0000
Parent:
0:45606d84dad8
Commit message:
Doxygen commenting added

Changed in this revision

Animations.cpp Show annotated file Show diff for this revision Revisions of this file
Animations.h Show annotated file Show diff for this revision Revisions of this file
diff -r 45606d84dad8 -r bf0f64c26a0a Animations.cpp
--- a/Animations.cpp	Wed May 03 21:14:08 2017 +0000
+++ b/Animations.cpp	Thu May 04 14:02:17 2017 +0000
@@ -1,24 +1,24 @@
-/*
- 
- @file Animations.cpp
- 
- (c) Max Houghton 13.04.17
- Roller Maze Project, ELEC2645, Univeristy of Leeds
- 
- */
-
 #include "Animations.h"
 
+/**
+ *  @details - constructor
+ */
 Animations::Animations()
 {
     
 }
 
+/**
+ *  @details - destructor
+ */
 Animations::~Animations()
 {
     
 }
 
+/**
+ *  @details - Function to draw transparent-filled ball rolling across the screen.
+ */
 void Animations::rollingEmptyBall(N5110 &lcd)
 {
     // shows ball rolling across the screen
@@ -33,7 +33,9 @@
     }
 }
 
-
+/**
+ *  @details - Function to draw solid-filled ball rolling across the screen.
+ */
 void Animations::rollingSolidBall(N5110 &lcd)
 {
     // shows ball rolling across the screen
@@ -48,7 +50,9 @@
     
 }
 
-
+/**
+ *  @details - Short intro animation to be used during the loading of the game.
+ */
 void Animations::intro(N5110 &lcd, Gamepad &pad)
 {
     // animation sequence
@@ -193,6 +197,9 @@
     }
 }
 
+/**
+ *  @details - Function to display a switch.
+ */
 void Animations::soundSwitch(N5110 &lcd, Gamepad &pad, bool tone)
 {
     int exit = 0;
@@ -227,6 +234,9 @@
     }
 }
 
+/**
+ *  @details - Function to draw vertical joystick image.
+ */
 void Animations::drawVerticalJoystick(N5110 &lcd)
 {
     for (int i = 33; i < 57; i++){
@@ -288,6 +298,9 @@
     }
 }
 
+/**
+ *  @details - Function to draw joystick image tilting to the left.
+ */
 void Animations::drawLeftJoystick(N5110 &lcd)
 {
     for (int i = 33; i < 57; i++){
@@ -374,6 +387,9 @@
     lcd.setPixel(41, 25);
 }
 
+/**
+ *  @details - Function to draw joystick image tilting to the right.
+ */
 void Animations::drawRightJoystick(N5110 &lcd)
 {
     for (int i = 33; i < 57; i++){
@@ -457,6 +473,9 @@
     lcd.setPixel(49, 26);
 }
 
+/**
+ *  @details - Function to draw gamepad image tilting to the left.
+ */
 void Animations::drawLeftGamepad(N5110 &lcd)
 {
     for (int i = 33; i < 42; i++){
@@ -525,6 +544,9 @@
     lcd.clearPixel(32, 45);
 }
 
+/**
+ *  @details - Function to draw vertical gamepad image.
+ */
 void Animations::drawVerticalGamepad(N5110 &lcd)
 {
     for (int i = 38; i < 48; i++){
@@ -583,6 +605,9 @@
     lcd.clearPixel(48, 45);
 }
 
+/**
+ *  @details - Function to draw gamepad image tilting to the right.
+ */
 void Animations::drawRightGamepad(N5110 &lcd)
 {
     for (int i = 43; i < 52; i++){
@@ -654,12 +679,18 @@
     }
 }
 
+/**
+ *  @details - Short animation to be used maze is completed.
+ */
 void Animations::mazeCompleted(N5110 &lcd)
 {
     lcd.printString("  MAZE", 0, 2);
     lcd.printString("  DONE!", 0, 3);
 }
 
+/**
+ *  @details - First animation in a series to create a jumping man.
+ */
 void Animations::stickmanOne(N5110 &lcd)
 {
     lcd.clear();
@@ -693,7 +724,9 @@
     
 }
 
-
+/**
+ *  @details - Second animation in a series to create a jumping man.
+ */
 void Animations::stickmanTwo(N5110 &lcd)
 {
     lcd.clear();
@@ -718,6 +751,9 @@
     
 }
 
+/**
+ *  @details - Third animation in a series to create a jumping man.
+ */
 void Animations::stickmanThree(N5110 &lcd)
 {
     lcd.clear();
@@ -740,6 +776,9 @@
     
 }
 
+/**
+ *  @details - Fourth animation in a series to create a jumping man.
+ */
 void Animations::stickmanFour(N5110 &lcd)
 {
     lcd.clear();
@@ -764,6 +803,9 @@
     
 }
 
+/**
+ *  @details - Fifth animation in a series to create a jumping man.
+ */
 void Animations::stickmanFive(N5110 &lcd)
 {
     lcd.clear();
@@ -785,6 +827,9 @@
     
 }
 
+/**
+ *  @details - Sixth animation in a series to create a jumping man.
+ */
 void Animations::stickmanSix(N5110 &lcd)
 {
     lcd.clear();
diff -r 45606d84dad8 -r bf0f64c26a0a Animations.h
--- a/Animations.h	Wed May 03 21:14:08 2017 +0000
+++ b/Animations.h	Thu May 04 14:02:17 2017 +0000
@@ -1,10 +1,7 @@
-/*
- 
- @file Animations.h
- 
- (c) Max Houghton 13.04.17
- Roller Maze Project, ELEC2645, Univeristy of Leeds
- 
+/** Animations Class
+ @brief Class contains all the different animations used throughout the game.
+ @author Max Houghton
+ @date April 13 2017
  */
 
 #ifndef ANIMATIONS_H
@@ -19,30 +16,151 @@
     
 public:
     
+    /**
+     *  @details - constructor
+     */
     Animations();
+    
+    /**
+     *  @details - destructor
+     */
     ~Animations();
     
+    /** Intro
+     *
+     *  @details - Short animation to be used when running the introduction during the loading of the game.
+     *  @param - lcd - N5110 Libarary used to print strings and draw the ball
+     *
+     */
     void intro(N5110 &lcd, Gamepad &pad);
     
+    /** Vertical Joystick
+     *
+     *  @details - Function to draw vertical joystick image. Used in 'animateJoystick()' function in Menu class.
+     *  @param - lcd - N5110 Libarary used to draw joystick bitmap.
+     *
+     */
     void drawVerticalJoystick(N5110 &lcd);
+    
+    /** Left Joystick
+     *
+     *  @details - Function to draw joystick image tilting to the left. Used in 'animateJoystick()' function in Menu class.
+     *  @param - lcd - N5110 Libarary used to draw joystick bitmap.
+     *
+     */
     void drawLeftJoystick(N5110 &lcd);
+    
+    /** Right Joystick
+     *
+     *  @details - Function to draw joystick image tilting to the right. Used in 'animateJoystick()' function in Menu class.
+     *  @param - lcd - N5110 Libarary used to draw joystick bitmap.
+     *
+     */
     void drawRightJoystick(N5110 &lcd);
     
+    /**  Left Joystick
+     *
+     *  @details - Function to draw gamepad image tilting to the left. Used in 'animateGamepad()' function in Menu class.
+     *  @param - lcd - N5110 Libarary used to draw gamepad bitmap.
+     *
+     */
     void drawLeftGamepad(N5110 &lcd);
+    
+    /**  Vertical Gamepad
+     *
+     *  @details - Function to draw vertical gamepad image. Used in 'animateGamepad()' function in Menu class.
+     *  @param - lcd - N5110 Libarary used to draw gamepad bitmap.
+     *
+     */
     void drawVerticalGamepad(N5110 &lcd);
+    
+    /** Right Gamepad
+     *
+     *  @details - Function to draw gamepad image tilting to the right. Used in 'animateGamepad()' function in Menu class.
+     *  @param - lcd - N5110 Libarary used to draw gamepad bitmap.
+     *
+     */
     void drawRightGamepad(N5110 &lcd);
     
+    /** Rolling Empty Ball
+     *
+     *  @details - Function to draw transparent-filled ball rolling across the screen. Used in 'ballColourOptions()' function in Menu class.
+     *  @param - lcd - N5110 Libarary used to draw circles representing moving ball.
+     *
+     */
     void rollingEmptyBall(N5110 &lcd);
+    
+    /** Rolling Solid Ball
+     *
+     *  @details - Function to draw solid-filled ball rolling across the screen. Used in 'ballColourOptions()' function in Menu class.
+     *  @param - lcd - N5110 Libarary used to draw circles representing moving ball.
+     *
+     */
     void rollingSolidBall(N5110 &lcd);
     
+    /** Maze Completed
+     *
+     *  @details - Short animation to be used when the maze being used has been completed.
+     *  @param - lcd - N5110 Libarary used to print strings and draw bitmaps.
+     *
+     */
     void mazeCompleted(N5110 &lcd);
+    
+    /** Stickman One
+     *
+     *  @details - First animation in a series to create a jumping man. Used inside mazeCompleted() function.
+     *  @param - lcd - N5110 Libarary used to print strings and draw bitmap.
+     *
+     */
     void stickmanOne(N5110 &lcd);
+    
+    /** Stickman Two
+     *
+     *  @details - Second animation in a series to create a jumping man. Used inside mazeCompleted() function.
+     *  @param - lcd - N5110 Libarary used to print strings and draw bitmap.
+     *
+     */
     void stickmanTwo(N5110 &lcd);
+    
+    /** Stickman Three
+     *
+     *  @details - Third animation in a series to create a jumping man. Used inside mazeCompleted() function.
+     *  @param - lcd - N5110 Libarary used to print strings and draw bitmap.
+     *
+     */
     void stickmanThree(N5110 &lcd);
+    
+    /** Stickman Four
+     *
+     *  @details - Fourth animation in a series to create a jumping man. Used inside mazeCompleted() function.
+     *  @param - lcd - N5110 Libarary used to print strings and draw bitmap.
+     *
+     */
     void stickmanFour(N5110 &lcd);
+    
+    /** Stickman Five
+     *
+     *  @details - Fifth animation in a series to create a jumping man. Used inside mazeCompleted() function.
+     *  @param - lcd - N5110 Libarary used to print strings and draw bitmap.
+     *
+     */
     void stickmanFive(N5110 &lcd);
+    
+    /** Stickman Six
+     *
+     *  @details - Sixth animation in a series to create a jumping man. Used inside mazeCompleted() function.
+     *  @param - lcd - N5110 Libarary used to print strings and draw bitmap.
+     *
+     */
     void stickmanSix(N5110 &lcd);
     
+    /** Sound Switch
+     *
+     *  @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'.
+     *  @param - lcd - N5110 Libarary used to print rectangles on the screen.
+     *  @param - tone - Boolean variable to dictate the appearance of the switch being drawn on the screen.
+     *
+     */
     void soundSwitch(N5110 &lcd, Gamepad &pad, bool tone);
     
 private: