Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Committer:
AhmedPlaymaker
Date:
Mon Apr 29 14:40:42 2019 +0000
Revision:
60:d3a9e0e4a0de
Parent:
55:df0825049171
Child:
63:205f0ca48473
Created Tutorials class and added some sprites in it i will use later to implement

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AhmedPlaymaker 60:d3a9e0e4a0de 1 #ifndef SETTINGS_H
AhmedPlaymaker 60:d3a9e0e4a0de 2 #define SETTINGS_H
AhmedPlaymaker 5:e4df87957a5b 3
AhmedPlaymaker 5:e4df87957a5b 4 #include "mbed.h"
AhmedPlaymaker 5:e4df87957a5b 5 #include "N5110.h"
AhmedPlaymaker 5:e4df87957a5b 6 #include "Gamepad.h"
AhmedPlaymaker 5:e4df87957a5b 7
AhmedPlaymaker 5:e4df87957a5b 8 class Settings
AhmedPlaymaker 5:e4df87957a5b 9 {
AhmedPlaymaker 5:e4df87957a5b 10 public:
AhmedPlaymaker 5:e4df87957a5b 11
AhmedPlaymaker 5:e4df87957a5b 12 Settings();
AhmedPlaymaker 5:e4df87957a5b 13 ~Settings();
AhmedPlaymaker 5:e4df87957a5b 14
AhmedPlaymaker 30:461231877c89 15 /** Implement Settings
AhmedPlaymaker 30:461231877c89 16 *
AhmedPlaymaker 30:461231877c89 17 * This function is used to configure settings.
AhmedPlaymaker 30:461231877c89 18 */
AhmedPlaymaker 30:461231877c89 19
AhmedPlaymaker 49:441c32f6603e 20 float * Implement(N5110 &lcd, Gamepad &pad, float cs);
AhmedPlaymaker 30:461231877c89 21
AhmedPlaymaker 55:df0825049171 22 /** Call Functions
AhmedPlaymaker 55:df0825049171 23 *
AhmedPlaymaker 55:df0825049171 24 * This function calls respective settings menu as per the contol entries by the user.
AhmedPlaymaker 55:df0825049171 25 */
AhmedPlaymaker 55:df0825049171 26
AhmedPlaymaker 55:df0825049171 27 void CallFunctions(N5110 &lcd, Gamepad &pad, int st);
AhmedPlaymaker 55:df0825049171 28
AhmedPlaymaker 55:df0825049171 29 /** Info
AhmedPlaymaker 5:e4df87957a5b 30 *
AhmedPlaymaker 30:461231877c89 31 * This function shows the info for using settings.
AhmedPlaymaker 5:e4df87957a5b 32 */
AhmedPlaymaker 5:e4df87957a5b 33
AhmedPlaymaker 5:e4df87957a5b 34 void info(N5110 &lcd, Gamepad &pad);
AhmedPlaymaker 5:e4df87957a5b 35
AhmedPlaymaker 5:e4df87957a5b 36 /** controlSensitivity
AhmedPlaymaker 5:e4df87957a5b 37 *
AhmedPlaymaker 5:e4df87957a5b 38 * This function essentialy enables the user to select the sensitivity of the game controls
AhmedPlaymaker 5:e4df87957a5b 39 */
AhmedPlaymaker 55:df0825049171 40
AhmedPlaymaker 55:df0825049171 41 void controlSensitivity(N5110 &lcd, Gamepad &pad);
AhmedPlaymaker 5:e4df87957a5b 42
AhmedPlaymaker 5:e4df87957a5b 43 /** brigntness
AhmedPlaymaker 5:e4df87957a5b 44 *
AhmedPlaymaker 5:e4df87957a5b 45 * This function allows the user to set the screen brightness.
AhmedPlaymaker 5:e4df87957a5b 46 */
AhmedPlaymaker 55:df0825049171 47 void brigntness(N5110 &lcd, Gamepad &pad);
AhmedPlaymaker 5:e4df87957a5b 48
AhmedPlaymaker 5:e4df87957a5b 49 /** contrast
AhmedPlaymaker 5:e4df87957a5b 50 *
AhmedPlaymaker 5:e4df87957a5b 51 * This function allows the user to set the contrast of the screen.
AhmedPlaymaker 5:e4df87957a5b 52 */
AhmedPlaymaker 55:df0825049171 53 void contrast(N5110 &lcd, Gamepad &pad);
AhmedPlaymaker 5:e4df87957a5b 54
AhmedPlaymaker 5:e4df87957a5b 55 /** volume
AhmedPlaymaker 5:e4df87957a5b 56 *
AhmedPlaymaker 5:e4df87957a5b 57 * This function allows the user to set the volume of the speaker.
AhmedPlaymaker 5:e4df87957a5b 58 */
AhmedPlaymaker 55:df0825049171 59 void volume(N5110 &lcd, Gamepad &pad);
AhmedPlaymaker 5:e4df87957a5b 60
AhmedPlaymaker 5:e4df87957a5b 61 /** showCredits
AhmedPlaymaker 5:e4df87957a5b 62 *
AhmedPlaymaker 5:e4df87957a5b 63 * This function allows the user to hide/show credits.
AhmedPlaymaker 5:e4df87957a5b 64 */
AhmedPlaymaker 55:df0825049171 65
AhmedPlaymaker 55:df0825049171 66 void showCredits(N5110 &lcd, Gamepad &pad);
AhmedPlaymaker 55:df0825049171 67
AhmedPlaymaker 49:441c32f6603e 68 private:
AhmedPlaymaker 30:461231877c89 69 float cs_sc[2]; //this array helps to return Control speeds and Show credits parameters.
AhmedPlaymaker 5:e4df87957a5b 70
AhmedPlaymaker 5:e4df87957a5b 71
AhmedPlaymaker 5:e4df87957a5b 72 };
AhmedPlaymaker 5:e4df87957a5b 73 #endif