Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 65:2872ca289b49, committed 2019-05-03
- Comitter:
- AhmedPlaymaker
- Date:
- Fri May 03 19:16:02 2019 +0000
- Parent:
- 64:540aa1602372
- Child:
- 66:e47333ffc6ca
- Commit message:
- Refactored some function into smaller ones
Changed in this revision
--- a/GameEngine/SnakevsBlock/SnakevsBlock.cpp Thu May 02 11:30:04 2019 +0000
+++ b/GameEngine/SnakevsBlock/SnakevsBlock.cpp Fri May 03 19:16:02 2019 +0000
@@ -33,15 +33,6 @@
blockgap -= 10; //to make progressive levels harder by making the blocks drop more frequently.
}
SnakevsBlock::object_initialisations();
- /*
- //to clear all the memory buffer of the game object positions from the previous level.
- for(int i = 0; i <=2 ; i++) {
- food_pos[i].x = 0;
- food_pos[i].y = 0;
- }
- b_pos.x = 0;
- b_pos.y = 0;
- */
}
void SnakevsBlock::object_initialisations()
@@ -204,32 +195,53 @@
//If statements check if the snake sprite has collided with any
//of the three food sprites, if so then the food location is reset and
//length of the snake is increased using the length variable.
- for(int y=0; y<=2; y++) { //this loop automatically detects each combination of collision in the y postion
- for(int x=0; x<=2; x++) { //this loop automatically detects each combination of collision in the x postion
- for(int food_sr=0; food_sr<=2; food_sr++) { //this loop automatically detects which food we are interacting with.
- if (
- ((snakey + y == food_pos[food_sr].y) ||
- (snakey + y == food_pos[food_sr].y + 1) ||
- (snakey + y == food_pos[food_sr].y + 2)) &&
- ((snakex + x == food_pos[food_sr].x) ||
- (snakex + x == food_pos[food_sr].x + 1) ||
- (snakex + x == food_pos[food_sr].x + 2))
- ) {
- //printf("snake feast working \n");
- //audio feedback
- pad.tone(786.0,0.1);
- food_pos[food_sr].x = (rand() % 82); //this makes the food pop up at a random, unspecified location in the x axis.
- food_pos[food_sr].y = -3;
- _l.PlusLength();
- }
- }
- }
- }
+
+ SnakevsBlock::CheckSnakeFoodYCollision(pad);
+
_f.set_pos(food_pos[0]);
_ff.set_pos(food_pos[1]);
_fff.set_pos(food_pos[2]);
}
+void SnakevsBlock::CheckSnakeFoodYCollision(Gamepad &pad)
+{
+ for(int y=0; y<=2; y++) { //this loop automatically creates each coordinate of collision in the y postion that will be used in ImplementSnakeFoodCollision(pad, x, y).
+ SnakevsBlock::CheckSnakeFoodXCollision(pad, y);
+ }
+
+}
+
+void SnakevsBlock::CheckSnakeFoodXCollision(Gamepad &pad, int y)
+{
+
+ for(int x=0; x<=2; x++) { //this loop automatically creates each coordinate of collision in the x postion that will be used in ImplementSnakeFoodCollision(pad, x, y).
+ SnakevsBlock::ImplementSnakeFoodCollision(pad, x, y);
+ }
+
+}
+
+void SnakevsBlock::ImplementSnakeFoodCollision(Gamepad &pad, int x, int y)
+{
+ for(int food_sr=0; food_sr<=2; food_sr++) { //this loop automatically detects which food we are interacting with.
+ if (
+ ((snakey + y == food_pos[food_sr].y) ||
+ (snakey + y == food_pos[food_sr].y + 1) ||
+ (snakey + y == food_pos[food_sr].y + 2)) &&
+ ((snakex + x == food_pos[food_sr].x) ||
+ (snakex + x == food_pos[food_sr].x + 1) ||
+ (snakex + x == food_pos[food_sr].x + 2))
+ ) {
+ //printf("snake feast working \n");
+ //audio feedback
+ pad.tone(786.0,0.1);
+ food_pos[food_sr].x = (rand() % 82); //this makes the food pop up at a random, unspecified location in the x axis.
+ food_pos[food_sr].y = -3;
+ _l.PlusLength();
+ }
+ }
+
+}
+
void SnakevsBlock::CheckSnakeBlockCollision(Gamepad &pad)
{
//Obtains the numbers inside the block.
@@ -248,19 +260,19 @@
//audio feedback
srn = CheckBlock(block); //this tells us which of the 5 blocks we are colliding with
blocknum = b_number[srn]; //this saves the number inside the colliding block into blocknum.
- if((_length>=10)&&(b_number[srn]>0)) { //this makes the block stop moving down if it's length is more than 10 and still collides.
- velocity = 0; //the block and food have to stop as if length of snake is 15 and it reaches 10 one by one, it stays at the same place, as max virtual length
- } else { //is 10.
- velocity = 1;
- }
- ImplementCollision(pad); //this implements the collision once the conditions are met.
- SnakevsBlock::_set_velocity(); //sets the block and foods free or frezes them depending on snake level.
+ ImplementSnakeBlockCollision(pad); //this implements the collision once the conditions are met.
+ SnakevsBlock::_setVelocity(srn); //sets the block and foods free or frezes them depending on snake length.
}
}
}
-void SnakevsBlock::_set_velocity()
+void SnakevsBlock::_setVelocity(int srn)
{
+ if((_length>=10)&&(b_number[srn]>0)) { //this makes the block stop moving down if it's length is more than 10 and still collides.
+ velocity = 0; //the block and food have to stop as if length of snake is 15 and it reaches 10 one by one, it stays at the same place, as max virtual length
+ } else { //is 10.
+ velocity = 1;
+ }
_b.velocity.y = velocity;
_f.velocity.y = velocity;
_ff.velocity.y = velocity;
@@ -288,7 +300,7 @@
return srn;
}
-void SnakevsBlock::ImplementCollision(Gamepad &pad)
+void SnakevsBlock::ImplementSnakeBlockCollision(Gamepad &pad)
{
send_block_number = 1;
if(blocknum > 0) { // to make sure that snake doesn't decrease in _length if number on the block is less than 1;
@@ -307,7 +319,7 @@
SnakevsBlock::MakeDefaultMotionFree(); //this makes the default motion of the snake freemoving before a collision is checked for, to forget the previous collision.
for(int i=0; i<=9; i++) { //i checks for all possible collisions with the snake respective to it's length.
- SnakevsBlock::check_Collision_Y_axis(i); //checks if the snake and the block are at the same position in y axis.
+ SnakevsBlock::CheckSnakeBlockSidesYCollision(i); //checks if the snake and the block are at the same position in y axis.
}
}
@@ -319,7 +331,7 @@
}
}
-void SnakevsBlock::check_Collision_Y_axis(int i) //i is the index of the snake beed and checks for all possible collisions with the snake respective to it's length.
+void SnakevsBlock::CheckSnakeBlockSidesYCollision(int i) //i is the index of the snake beed and checks for all possible collisions with the snake respective to it's length.
{
//This code checks if the snake and the block overlap in the Y axis.
for(int b_y_combination=0; b_y_combination<=10; b_y_combination++) { //this carries out the next stage if the Y axis collision criterion is met.
@@ -328,21 +340,21 @@
(snake_pos[i].y + 1 == b_pos.y + b_y_combination) ||
(snake_pos[i].y + 2 == b_pos.y + b_y_combination)) {
- SnakevsBlock::check_Collision_X_axis(i); //checks if the snake and the block are at the same position in x axis.
+ SnakevsBlock::CheckSnakeBlockSidesXCollision(i); //checks if the snake and the block are at the same position in x axis.
}
}
}
-void SnakevsBlock::check_Collision_X_axis(int i) //i is the index of the snake beed and checks for all possible collisions with the snake respective to it's length.
+void SnakevsBlock::CheckSnakeBlockSidesXCollision(int i) //i is the index of the snake beed and checks for all possible collisions with the snake respective to it's length.
{
for(int b_x_combination=2; b_x_combination<=82; b_x_combination+=16) { //this carries out the next stage if the X axis collision criterion is met.
- SnakevsBlock::checkCollision_EastorWest(b_x_combination, i); //checks if the colliding wall is on east side or west side.
+ SnakevsBlock::CheckSnakeBlockSidesEastWestCollision(b_x_combination, i); //checks if the colliding wall is on east side or west side.
}
}
-void SnakevsBlock::checkCollision_EastorWest(int b_x_combination, int i) //i checks for all possible collisions with the snake respective to it's length.
+void SnakevsBlock::CheckSnakeBlockSidesEastWestCollision(int b_x_combination, int i) //i checks for all possible collisions with the snake respective to it's length.
{
SnakevsBlock::makeVirtualLengthMaxTen(); //stops the length at 10 for collision purposes.
@@ -351,14 +363,14 @@
((snake_pos[i].x == b_pos.x + b_x_combination+2) || //W
(snake_pos[i].x + 1 == b_x_combination+2))&&(_d != E)&&(_virtualLength > i) //W
) {
- SnakevsBlock::StopX_AxisMotion(i);
+ SnakevsBlock::ImplementSnakeBlockSidesCollision(i);
}
//for East side of walls
else if (
((snake_pos[i].x + 1 == b_x_combination) || //E
(snake_pos[i].x + 2 == b_x_combination))&&(_d != W)&&(_virtualLength > i) //E
) {
- SnakevsBlock::StopX_AxisMotion(i);
+ SnakevsBlock::ImplementSnakeBlockSidesCollision(i);
}
}
@@ -372,7 +384,7 @@
}
}
-void SnakevsBlock::StopX_AxisMotion(int i) //i is the index of the snake beed and checks for all possible collisions with the snake respective to it's length.
+void SnakevsBlock::ImplementSnakeBlockSidesCollision(int i) //i is the index of the snake beed and checks for all possible collisions with the snake respective to it's length.
{
//code makes sure that the colliding part doesn't move in x axis.
for(int snake_beed_num=0; snake_beed_num<=10; snake_beed_num++) {
--- a/GameEngine/SnakevsBlock/SnakevsBlock.h Thu May 02 11:30:04 2019 +0000
+++ b/GameEngine/SnakevsBlock/SnakevsBlock.h Fri May 03 19:16:02 2019 +0000
@@ -80,18 +80,6 @@
*/
void get_pos();
- /** Check Block
- *
- * This function returns the srn of the block we are colliding with;
- */
- int CheckBlock(int Block);
-
- /** Implement Collision
- *
- * This function allows the appropriate maths to take place after every collision.
- */
- void ImplementCollision(Gamepad &pad);
-
//Gamepad @enginePad
private:
@@ -102,6 +90,24 @@
*/
void CheckSnakeFoodCollision(Gamepad &pad);
+ /** Check Snake Food Y Collision
+ *
+ * This function automatically detects each combination of collision in the y postion.
+ */
+ void CheckSnakeFoodYCollision(Gamepad &pad);
+
+ /** Check Snake Food X Collision
+ *
+ * This function automatically detects each combination of collision in the x postion.
+ */
+ void CheckSnakeFoodXCollision(Gamepad &pad, int y);
+
+ /** Implement Snake Food Collision
+ *
+ * This function automatically detects which food we are interacting with and increases the snake length accordingly.
+ */
+ void ImplementSnakeFoodCollision(Gamepad &pad, int x, int y);
+
/** Check for Snake and Block collision
*
* This function checks if the Snake has come into contact with any Block.
@@ -112,7 +118,19 @@
*
* this is to stop/move the background (food and blocks), when collision occurs at a length greater than 10.lock.
*/
- void _set_velocity();
+ void _setVelocity(int srn);
+
+ /** Check Block
+ *
+ * This function returns the srn of the block we are colliding with;
+ */
+ int CheckBlock(int Block);
+
+ /** Implement Collision
+ *
+ * This function allows the appropriate maths to take place after every collision.
+ */
+ void ImplementSnakeBlockCollision(Gamepad &pad);
/** Check for Snake and Block Sides collision
*
@@ -130,19 +148,19 @@
*
* This function checks if the Snake and blocks collide anywhere in the Y axis.
*/
- void check_Collision_Y_axis(int i);
+ void CheckSnakeBlockSidesYCollision(int i);
/** Check Collision in X axis
*
* This function checks if the Snake and blocks collide anywhere in the X axis.
*/
- void check_Collision_X_axis(int i);
+ void CheckSnakeBlockSidesXCollision(int i);
/** Check Collision East or West
*
* checks if the colliding wall is on east side or west side and then calls StopX_AxisMotion(length,i) to carry out the required task.
*/
- void checkCollision_EastorWest(int b_x_combination, int i);
+ void CheckSnakeBlockSidesEastWestCollision(int b_x_combination, int i);
/** Make Virtual Length Max Ten
*
@@ -155,7 +173,7 @@
*
* This function implements the sides collision by making the x axis speed of the particular snake beed 0.
*/
- void StopX_AxisMotion(int i);
+ void ImplementSnakeBlockSidesCollision(int i);
//OBJECT DECLARATIONS.
Snake _s;
--- a/MenuClasses/Settings/Settings.h Thu May 02 11:30:04 2019 +0000
+++ b/MenuClasses/Settings/Settings.h Fri May 03 19:16:02 2019 +0000
@@ -7,67 +7,67 @@
class Settings
{
- public:
-
+public:
+
Settings();
~Settings();
-
+
/** Implement Settings
*
* This function is used to configure settings.
*/
-
+
float * Implement(N5110 &lcd, Gamepad &pad, float cs);
-
+
/** Info
*
* This function shows the info for using settings.
*/
void info(N5110 &lcd, Gamepad &pad);
-
+
/** Call Functions
*
* This function calls respective settings menu as per the contol entries by the user.
*/
void CallFunctions(N5110 &lcd, Gamepad &pad, int st);
-
+
/** controlSensitivity
*
* This function essentialy enables the user to select the sensitivity of the game controls
*/
-
+
void controlSensitivity(N5110 &lcd, Gamepad &pad);
-
+
/** brigntness
*
* This function allows the user to set the screen brightness.
*/
void brigntness(N5110 &lcd, Gamepad &pad);
-
+
/** contrast
*
* This function allows the user to set the contrast of the screen.
*/
void contrast(N5110 &lcd, Gamepad &pad);
-
+
/** volume
*
* This function allows the user to set the volume of the speaker.
*/
void volume(N5110 &lcd, Gamepad &pad);
-
+
/** showCredits
*
* This function allows the user to hide/show credits.
*/
-
+
void showCredits(N5110 &lcd, Gamepad &pad);
-
- private:
+
+private:
float cs_sc[2]; //this array helps to return Control speeds and Show credits parameters.
-
+
};
#endif
\ No newline at end of file
--- a/MenuClasses/StartScreen/StartScreen.cpp Thu May 02 11:30:04 2019 +0000
+++ b/MenuClasses/StartScreen/StartScreen.cpp Fri May 03 19:16:02 2019 +0000
@@ -140,10 +140,9 @@
fps = 15; //sets the default frames per second to a certain value.
i = 16; //main menu selection arrow position
g_mode = 1; //game mode selection (joystick/motion control).
- gs = 2; //game speed page selection.
- st = 1; //this is the sr num of settings pages.
- sc = 1; //this helps in wether ot not to show credits to the user.
- cs = 5; //sensitivity of control speed of menu options.
+ gameSpeedIndex = 2; //game speed page selection.
+ showCredits = 1; //this helps in wether ot not to show credits to the user.
+ controlSensitivity = 5; //sensitivity of control speed of menu options.
}
void StartScreen::screen_saver(N5110 &lcd, Gamepad &pad)
@@ -157,7 +156,9 @@
lcd.drawSprite(0,ani,48,84,(int *)sprite); //Function used to draw the sprite
lcd.refresh();
pad.tone(song[(ani+48)/3],0.1);
- Start_Pressed = 0;
+
+ //This Allows us to skip/play the animation before the menu screen
+ Start_Pressed = 0; //by default, animmation is not skipped, as StartScreen::instruct(lcd,pad) requires Start_Pressed to be 0 to be displayed
if((pad.check_event(Gamepad::START_PRESSED) == true)||(pad.check_event(Gamepad::A_PRESSED) == true)) { //to allow the gamer to skip the long starting animation if they are not a fan.
Start_Pressed = 1;
break;
@@ -176,8 +177,9 @@
void StartScreen::instruct(N5110 &lcd, Gamepad &pad)
{
//pad.init();
- wait(1/cs); //to avoid race condition of the following while loop being skipped.
+ wait(1/controlSensitivity); //to avoid race condition of the following while loop being skipped.
while ((pad.check_event(Gamepad::START_PRESSED) == false)&&(pad.check_event(Gamepad::A_PRESSED) == false)&&(Start_Pressed == 0)) {
+ //Start_Pressed is 1 if start is already pressed during animation
lcd.printString("Please Press",5,1); //Function used to promt the user to start.
lcd.printString("Start",25,3);
lcd.printString("to Begin",15,5);
@@ -195,7 +197,7 @@
void StartScreen::credits(N5110 &lcd)
{
lcd.clear();
- if(sc) {
+ if(showCredits) {
lcd.printString("Created BY",8,1);
lcd.printString("Ahmed",24,3);
lcd.printString("Adamjee",20,4);
@@ -220,27 +222,27 @@
StartScreen::ImplementMenu(lcd, pad);
}
pad.tone(1000.0,0.1);
- wait(1/cs);
- StartScreen::NextMenu(lcd, pad);
+ wait(1/controlSensitivity);
+ StartScreen::NextMenu(lcd, pad); //after all main menu operations have been completed, this function allows us to get to the next menu.
}
void StartScreen::ImplementMenu(N5110 &lcd, Gamepad &pad)
{
+ Direction d = pad.get_direction();
+ if(((d==N)||(pad.check_event(Gamepad::L_PRESSED) == true))&&(i>16)) {
+ i=i-8; // i is the position of the selection arrow in menu and also the index of the case structure to select the next menu in StartScreen::NextMenu(lcd, pad).
+ }
+ if(((d==S)||(pad.check_event(Gamepad::R_PRESSED) == true))&&(i<40)) {
+ i=i+8; // i is the position of the selection arrow in menu and also the index of the case structure to select the next menu in StartScreen::NextMenu(lcd, pad).
+ }
lcd.printString("SnakeVSBlock",5,0);
lcd.printString("Play",0,2);
lcd.printString("Settings",0,3);
lcd.printString("Stats",0,4);
lcd.printString("Tutorial",0,5);
- Direction d = pad.get_direction();
- if(((d==N)||(pad.check_event(Gamepad::L_PRESSED) == true))&&(i>16)) {
- i=i-8;
- }
- if(((d==S)||(pad.check_event(Gamepad::R_PRESSED) == true))&&(i<40)) {
- i=i+8;
- }
- lcd.drawSprite(50,i,7,9,(int *)arrow); //Function used to draw the sprite.
+ lcd.drawSprite(50,i,7,9,(int *)arrow); // i is the postion of where the arrow will be drawn and is determined by the above if command using joystick.
lcd.refresh();
- wait(1/cs);
+ wait(1/controlSensitivity);
lcd.clear();
}
@@ -248,13 +250,13 @@
{
switch (i) { //this i saves the value from the coordinates of arrow in main menu, and allows us to select the next menu accordingly.
case 16:
- game_mode(lcd, pad);
+ game_mode(lcd, pad); //calls game mode
break;
case 24:
float *cs_sc;
- cs_sc = _settings.Implement(lcd, pad, cs);
- cs = cs_sc[0]; //saves the number in cs which controls the control speed of the menu oftions (basically the wait time of between reading joystick input).
- sc = cs_sc[1]; //saves the number in sc which decides weather or not to show credits when game starts.
+ cs_sc = _settings.Implement(lcd, pad, controlSensitivity);
+ controlSensitivity = cs_sc[0]; //saves the number in controlSensitivity which controls the control speed of the menu oftions (basically the wait time of between reading joystick input).
+ showCredits = cs_sc[1]; //saves the number in sc which decides weather or not to show credits when game starts.
main_menu(lcd, pad); //to return to main_menu if back is pressed
break;
case 32:
@@ -271,13 +273,12 @@
void StartScreen::game_mode(N5110 &lcd, Gamepad &pad)
{
lcd.clear();
- wait(2/cs);
+ wait(2/controlSensitivity);
//pad.init();
while ((pad.check_event(Gamepad::A_PRESSED) == false)&&(pad.check_event(Gamepad::START_PRESSED) == false)) { //Change this to if button pressed.
StartScreen::ModeOptions(lcd); //displays to the user what are the mode options
StartScreen::SelectMode(pad); //the mode is selected by moving joystick in this function.
-
//This is a very important process, this helps the code to not get stuck in menu loop.
if (pad.check_event(Gamepad::BACK_PRESSED) == true) {
pad.tone(1000.0,0.1);
@@ -325,7 +326,7 @@
void StartScreen::SelectMode(Gamepad &pad)
{
Direction d = pad.get_direction();
- wait(1/cs);
+ wait(1/controlSensitivity);
if(((d==E)||(d==W)||(pad.check_event(Gamepad::R_PRESSED) == true)||(pad.check_event(Gamepad::L_PRESSED) == true))&&(g_mode==1)) {
g_mode=2;
}
@@ -350,7 +351,7 @@
void StartScreen::game_speed(N5110 &lcd, Gamepad &pad)
{
lcd.clear();
- wait(2/cs);
+ wait(2/controlSensitivity);
//pad.init();
while ((pad.check_event(Gamepad::A_PRESSED) == false)&&(pad.check_event(Gamepad::START_PRESSED) == false)) { //Change this to if button pressed.
StartScreen::selectSpeedPage(pad);
@@ -373,22 +374,22 @@
else {
pad.tone(1000.0,0.1);
lcd.clear();
- wait(1/cs);
+ wait(1/controlSensitivity);
}
}
void StartScreen::selectSpeedPage(Gamepad &pad)
{
Direction d = pad.get_direction();
- wait(1/cs);
- if(((d==E)||(pad.check_event(Gamepad::R_PRESSED) == true))&&(gs==4)) {
- gs=1;
- } else if(((d==W)||(pad.check_event(Gamepad::L_PRESSED) == true))&&(gs==1)) {
- gs=4;
- } else if(((d==E)||(pad.check_event(Gamepad::R_PRESSED) == true))&&(1<=gs<=3)) {
- gs=gs+1;
- } else if(((d==W)||(pad.check_event(Gamepad::L_PRESSED) == true))&&(2<=gs<=4)) {
- gs=gs-1;
+ wait(1/controlSensitivity);
+ if(((d==E)||(pad.check_event(Gamepad::R_PRESSED) == true))&&(gameSpeedIndex==4)) {
+ gameSpeedIndex=1;
+ } else if(((d==W)||(pad.check_event(Gamepad::L_PRESSED) == true))&&(gameSpeedIndex==1)) {
+ gameSpeedIndex=4;
+ } else if(((d==E)||(pad.check_event(Gamepad::R_PRESSED) == true))&&(1<=gameSpeedIndex<=3)) {
+ gameSpeedIndex=gameSpeedIndex+1;
+ } else if(((d==W)||(pad.check_event(Gamepad::L_PRESSED) == true))&&(2<=gameSpeedIndex<=4)) {
+ gameSpeedIndex=gameSpeedIndex-1;
}
}
@@ -398,7 +399,7 @@
lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite.
lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite.
lcd.printString("Game Speed",10,1);
- switch (gs) {
+ switch (gameSpeedIndex) {
case 1:
lcd.printString("SNAKE",28,3);
fps = 12;
--- a/MenuClasses/StartScreen/StartScreen.h Thu May 02 11:30:04 2019 +0000
+++ b/MenuClasses/StartScreen/StartScreen.h Fri May 03 19:16:02 2019 +0000
@@ -14,8 +14,7 @@
public:
StartScreen();
- ~StartScreen()
- ;
+ ~StartScreen();
/** Initialise StartScreen
*
@@ -107,19 +106,27 @@
*/
void showSpeedOptions(N5110 &lcd);
+ //SETTING THE GAME SPEED AND GAME MODE.
+ int fps; // this sends over the game speed
+ int g_mode; //this helps to select between joystick and motion control.
+ int gameSpeedIndex;
- int fps; // this sends over the game speed
+ //MENU OPTIONS INDEX.
int i;
- int gs;
- int g_mode; //this helps to select between joystick and motion control.
- int st;
- int sc;
- float cs;
+
+ //VARIABLE USED TO DECIDE WEATHER TO SHOW CREDITS.
+ int showCredits;
+
+ //VARIABLE USED TO DECIDE THE WAIT TIME OF THE MENU PAGES.
+ float controlSensitivity;
+
+ //VARIABLES TO TOGGLE BACK AND FORTH BETWEEN MENU OPTIONS.
int back_pressed; //remembers if back is pressed.
int Start_Pressed; //remembers if start is pressed.
private:
- int _level;
+
+ //OBJECT DECLARATIONS
Stats _stats;
Settings _settings;
Tutorial _tutorial;