Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: MenuClasses/Settings/Settings.h
- Revision:
- 83:329da564799a
- Parent:
- 65:2872ca289b49
- Child:
- 84:9950d561fdf8
diff -r c51ae8a501d1 -r 329da564799a MenuClasses/Settings/Settings.h --- a/MenuClasses/Settings/Settings.h Mon May 06 10:49:50 2019 +0000 +++ b/MenuClasses/Settings/Settings.h Mon May 06 14:28:35 2019 +0000 @@ -11,62 +11,68 @@ Settings(); ~Settings(); + + /** Initialise Settings + * + * This function passes the pointers to the settings class so that it can control the screen and the gamepad. + */ + void init(N5110 *lcd, Gamepad *pad); /** Implement Settings * * This function is used to configure settings. */ - - float * Implement(N5110 &lcd, Gamepad &pad, float cs); + float * Implement(float cs); /** Info * * This function shows the info for using settings. */ - - void info(N5110 &lcd, Gamepad &pad); + void info(); /** Call Functions * * This function calls respective settings menu as per the contol entries by the user. */ - - void CallFunctions(N5110 &lcd, Gamepad &pad, int st); + void CallFunctions(int st); /** controlSensitivity * * This function essentialy enables the user to select the sensitivity of the game controls */ - - void controlSensitivity(N5110 &lcd, Gamepad &pad); + void controlSensitivity(); /** brigntness * * This function allows the user to set the screen brightness. */ - void brigntness(N5110 &lcd, Gamepad &pad); + void brigntness(); /** contrast * * This function allows the user to set the contrast of the screen. */ - void contrast(N5110 &lcd, Gamepad &pad); + void contrast(); /** volume * * This function allows the user to set the volume of the speaker. */ - void volume(N5110 &lcd, Gamepad &pad); + void volume(); /** showCredits * * This function allows the user to hide/show credits. */ - - void showCredits(N5110 &lcd, Gamepad &pad); + void showCredits(); private: float cs_sc[2]; //this array helps to return Control speeds and Show credits parameters. + + //Pointer to the game pad object pad. + Gamepad *_pad; + //Pointer to the N5110 object lcd. + N5110 *_lcd; };