![](/media/cache/profiles/LinkedIn_0NghoZJ.jpeg.50x50_q85.jpg)
Snake vs Block Game to be run upon K64F.
MenuClasses/Settings/Settings.h@43:233f93860d08, 2019-04-25 (annotated)
- Committer:
- AhmedPlaymaker
- Date:
- Thu Apr 25 18:12:17 2019 +0000
- Revision:
- 43:233f93860d08
- Parent:
- Settings/Settings.h@30:461231877c89
- Child:
- 49:441c32f6603e
fixed a problem relating to snake not detecting blocks when it has just increased in length.
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 | 30:461231877c89 | 20 | float * Implement(N5110 &lcd, Gamepad &pad, int st, float cs); |
AhmedPlaymaker | 30:461231877c89 | 21 | |
AhmedPlaymaker | 5:e4df87957a5b | 22 | /** Initialise Settings |
AhmedPlaymaker | 5:e4df87957a5b | 23 | * |
AhmedPlaymaker | 30:461231877c89 | 24 | * This function shows the info for using settings. |
AhmedPlaymaker | 5:e4df87957a5b | 25 | */ |
AhmedPlaymaker | 5:e4df87957a5b | 26 | |
AhmedPlaymaker | 5:e4df87957a5b | 27 | void info(N5110 &lcd, Gamepad &pad); |
AhmedPlaymaker | 5:e4df87957a5b | 28 | |
AhmedPlaymaker | 5:e4df87957a5b | 29 | /** info |
AhmedPlaymaker | 5:e4df87957a5b | 30 | * |
AhmedPlaymaker | 5:e4df87957a5b | 31 | * This function just instructs the user on how to use settings |
AhmedPlaymaker | 5:e4df87957a5b | 32 | */ |
AhmedPlaymaker | 5:e4df87957a5b | 33 | |
AhmedPlaymaker | 5:e4df87957a5b | 34 | float controlSensitivity(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 | 5:e4df87957a5b | 40 | void brigntness(N5110 &lcd, Gamepad &pad); |
AhmedPlaymaker | 5:e4df87957a5b | 41 | |
AhmedPlaymaker | 5:e4df87957a5b | 42 | /** brigntness |
AhmedPlaymaker | 5:e4df87957a5b | 43 | * |
AhmedPlaymaker | 5:e4df87957a5b | 44 | * This function allows the user to set the screen brightness. |
AhmedPlaymaker | 5:e4df87957a5b | 45 | */ |
AhmedPlaymaker | 5:e4df87957a5b | 46 | void contrast(N5110 &lcd, Gamepad &pad); |
AhmedPlaymaker | 5:e4df87957a5b | 47 | |
AhmedPlaymaker | 5:e4df87957a5b | 48 | /** contrast |
AhmedPlaymaker | 5:e4df87957a5b | 49 | * |
AhmedPlaymaker | 5:e4df87957a5b | 50 | * This function allows the user to set the contrast of the screen. |
AhmedPlaymaker | 5:e4df87957a5b | 51 | */ |
AhmedPlaymaker | 5:e4df87957a5b | 52 | void volume(N5110 &lcd, Gamepad &pad); |
AhmedPlaymaker | 5:e4df87957a5b | 53 | |
AhmedPlaymaker | 5:e4df87957a5b | 54 | /** volume |
AhmedPlaymaker | 5:e4df87957a5b | 55 | * |
AhmedPlaymaker | 5:e4df87957a5b | 56 | * This function allows the user to set the volume of the speaker. |
AhmedPlaymaker | 5:e4df87957a5b | 57 | */ |
AhmedPlaymaker | 5:e4df87957a5b | 58 | |
AhmedPlaymaker | 5:e4df87957a5b | 59 | int showCredits(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 | 5:e4df87957a5b | 65 | |
AhmedPlaymaker | 30:461231877c89 | 66 | float cs_sc[2]; //this array helps to return Control speeds and Show credits parameters. |
AhmedPlaymaker | 5:e4df87957a5b | 67 | |
AhmedPlaymaker | 5:e4df87957a5b | 68 | |
AhmedPlaymaker | 5:e4df87957a5b | 69 | }; |
AhmedPlaymaker | 5:e4df87957a5b | 70 | #endif |