![](/media/cache/profiles/LinkedIn_0NghoZJ.jpeg.50x50_q85.jpg)
Snake vs Block Game to be run upon K64F.
MenuClasses/Settings/Settings.h@55:df0825049171, 2019-04-27 (annotated)
- Committer:
- AhmedPlaymaker
- Date:
- Sat Apr 27 18:56:30 2019 +0000
- Revision:
- 55:df0825049171
- Parent:
- 49:441c32f6603e
- Child:
- 60:d3a9e0e4a0de
Converted menus from if implementation to case structures
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AhmedPlaymaker | 5:e4df87957a5b | 1 | #ifndef Settings_H |
AhmedPlaymaker | 5:e4df87957a5b | 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 |