Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Committer:
AhmedPlaymaker
Date:
Sun Mar 17 13:47:40 2019 +0000
Revision:
4:1fe015b66bb8
Parent:
3:fbb1fa853f09
Child:
5:e4df87957a5b
StartScreen Class Fully Designed, Link to other classes and settings still  remaining

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AhmedPlaymaker 3:fbb1fa853f09 1 #include "StartScreen.h"
AhmedPlaymaker 3:fbb1fa853f09 2
AhmedPlaymaker 3:fbb1fa853f09 3 int sprite[48][84] = {
AhmedPlaymaker 3:fbb1fa853f09 4 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 5 {0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 6 {0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 7 {0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,1,0,1,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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1,1,0,0,1,0,1,1,0,0,1,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 50 {0,0,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,0,0,0,0,1,1,1,1,0,1,1,0,0,1,1,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 51 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 52
AhmedPlaymaker 4:1fe015b66bb8 53 };
AhmedPlaymaker 3:fbb1fa853f09 54
AhmedPlaymaker 4:1fe015b66bb8 55 int arrow[7][9] = {
AhmedPlaymaker 3:fbb1fa853f09 56 {0,0,0,0,1,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 57 {0,0,0,1,1,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 58 {0,0,1,1,1,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 59 {0,1,1,1,1,1,1,1,1},
AhmedPlaymaker 3:fbb1fa853f09 60 {0,0,1,1,1,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 61 {0,0,0,1,1,0,0,0,0},
AhmedPlaymaker 3:fbb1fa853f09 62 {0,0,0,0,1,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 63 };
AhmedPlaymaker 4:1fe015b66bb8 64
AhmedPlaymaker 4:1fe015b66bb8 65 int bullet[13][5] = {
AhmedPlaymaker 4:1fe015b66bb8 66 {1,0,0,0,1},
AhmedPlaymaker 4:1fe015b66bb8 67 {1,0,0,0,1},
AhmedPlaymaker 4:1fe015b66bb8 68 {0,1,0,1,0},
AhmedPlaymaker 4:1fe015b66bb8 69 {0,0,1,0,0},
AhmedPlaymaker 4:1fe015b66bb8 70 {0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 71 {0,0,1,0,0},
AhmedPlaymaker 4:1fe015b66bb8 72 {0,0,1,0,0},
AhmedPlaymaker 4:1fe015b66bb8 73 {0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 74 {0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 75 {0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 76 {0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 77 {0,0,1,0,0},
AhmedPlaymaker 4:1fe015b66bb8 78 {0,0,1,0,0},
AhmedPlaymaker 4:1fe015b66bb8 79 };
AhmedPlaymaker 4:1fe015b66bb8 80 int navL[13][8] = {
AhmedPlaymaker 4:1fe015b66bb8 81 {0,0,0,0,0,0,1,1},
AhmedPlaymaker 4:1fe015b66bb8 82 {0,0,0,0,0,1,1,0},
AhmedPlaymaker 4:1fe015b66bb8 83 {0,0,0,0,1,1,0,0},
AhmedPlaymaker 4:1fe015b66bb8 84 {0,0,0,1,1,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 85 {0,0,1,1,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 86 {0,1,1,0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 87 {1,1,0,0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 88 {0,1,1,0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 89 {0,0,1,1,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 90 {0,0,0,1,1,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 91 {0,0,0,0,1,1,0,0},
AhmedPlaymaker 4:1fe015b66bb8 92 {0,0,0,0,0,1,1,0},
AhmedPlaymaker 4:1fe015b66bb8 93 {0,0,0,0,0,0,1,1},
AhmedPlaymaker 4:1fe015b66bb8 94 };
AhmedPlaymaker 3:fbb1fa853f09 95
AhmedPlaymaker 4:1fe015b66bb8 96 int navR[13][8] = {
AhmedPlaymaker 4:1fe015b66bb8 97 {1,1,0,0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 98 {0,1,1,0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 99 {0,0,1,1,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 100 {0,0,0,1,1,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 101 {0,0,0,0,1,1,0,0},
AhmedPlaymaker 4:1fe015b66bb8 102 {0,0,0,0,0,1,1,0},
AhmedPlaymaker 4:1fe015b66bb8 103 {0,0,0,0,0,0,1,1},
AhmedPlaymaker 4:1fe015b66bb8 104 {0,0,0,0,0,1,1,0},
AhmedPlaymaker 4:1fe015b66bb8 105 {0,0,0,0,1,1,0,0},
AhmedPlaymaker 4:1fe015b66bb8 106 {0,0,0,1,1,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 107 {0,0,1,1,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 108 {0,1,1,0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 109 {1,1,0,0,0,0,0,0},
AhmedPlaymaker 4:1fe015b66bb8 110 };
AhmedPlaymaker 4:1fe015b66bb8 111 int i=16;
AhmedPlaymaker 4:1fe015b66bb8 112 int lr=1;
AhmedPlaymaker 4:1fe015b66bb8 113 int gs=1;
AhmedPlaymaker 3:fbb1fa853f09 114 StartScreen::StartScreen()
AhmedPlaymaker 3:fbb1fa853f09 115 {
AhmedPlaymaker 3:fbb1fa853f09 116
AhmedPlaymaker 3:fbb1fa853f09 117 }
AhmedPlaymaker 3:fbb1fa853f09 118
AhmedPlaymaker 3:fbb1fa853f09 119 StartScreen::~StartScreen()
AhmedPlaymaker 3:fbb1fa853f09 120 {
AhmedPlaymaker 3:fbb1fa853f09 121
AhmedPlaymaker 3:fbb1fa853f09 122 }
AhmedPlaymaker 3:fbb1fa853f09 123
AhmedPlaymaker 3:fbb1fa853f09 124
AhmedPlaymaker 3:fbb1fa853f09 125
AhmedPlaymaker 3:fbb1fa853f09 126 void StartScreen::screen_saver(N5110 &lcd, Gamepad &pad)
AhmedPlaymaker 3:fbb1fa853f09 127 {
AhmedPlaymaker 3:fbb1fa853f09 128 lcd.clear();
AhmedPlaymaker 3:fbb1fa853f09 129 lcd.drawSprite(0,0,48,84,(int *)sprite); //Function used to draw the sprite
AhmedPlaymaker 3:fbb1fa853f09 130 lcd.refresh();
AhmedPlaymaker 3:fbb1fa853f09 131 pad.leds_on();
AhmedPlaymaker 3:fbb1fa853f09 132 wait(2);
AhmedPlaymaker 3:fbb1fa853f09 133 pad.leds_off();
AhmedPlaymaker 3:fbb1fa853f09 134 lcd.clear();
AhmedPlaymaker 3:fbb1fa853f09 135 }
AhmedPlaymaker 3:fbb1fa853f09 136
AhmedPlaymaker 3:fbb1fa853f09 137 void StartScreen::instruct(N5110 &lcd, Gamepad &pad)
AhmedPlaymaker 3:fbb1fa853f09 138 {
AhmedPlaymaker 3:fbb1fa853f09 139 lcd.printString("Please Press",5,1); //Function used to promt the user to start.
AhmedPlaymaker 3:fbb1fa853f09 140 lcd.printString("Start",25,3);
AhmedPlaymaker 3:fbb1fa853f09 141 lcd.printString("to Begin",15,5);
AhmedPlaymaker 3:fbb1fa853f09 142 lcd.refresh();
AhmedPlaymaker 3:fbb1fa853f09 143 while ( pad.check_event(Gamepad::START_PRESSED) == false) {
AhmedPlaymaker 3:fbb1fa853f09 144 pad.leds_on();
AhmedPlaymaker 3:fbb1fa853f09 145 wait(0.1);
AhmedPlaymaker 3:fbb1fa853f09 146 pad.leds_off();
AhmedPlaymaker 3:fbb1fa853f09 147 wait(0.1);
AhmedPlaymaker 3:fbb1fa853f09 148 }
AhmedPlaymaker 3:fbb1fa853f09 149 lcd.clear();
AhmedPlaymaker 3:fbb1fa853f09 150 pad.leds_off();
AhmedPlaymaker 3:fbb1fa853f09 151 }
AhmedPlaymaker 3:fbb1fa853f09 152
AhmedPlaymaker 3:fbb1fa853f09 153 void StartScreen::info(N5110 &lcd, Gamepad &pad)
AhmedPlaymaker 3:fbb1fa853f09 154 {
AhmedPlaymaker 3:fbb1fa853f09 155 lcd.printString("Created BY",8,1);
AhmedPlaymaker 3:fbb1fa853f09 156 lcd.printString("Ahmed",24,3);
AhmedPlaymaker 3:fbb1fa853f09 157 lcd.printString("Adamjee",20,4);
AhmedPlaymaker 3:fbb1fa853f09 158 lcd.printString("201161436",15,5);
AhmedPlaymaker 3:fbb1fa853f09 159 lcd.refresh();
AhmedPlaymaker 4:1fe015b66bb8 160 wait(2);
AhmedPlaymaker 3:fbb1fa853f09 161 lcd.clear();
AhmedPlaymaker 3:fbb1fa853f09 162 }
AhmedPlaymaker 3:fbb1fa853f09 163
AhmedPlaymaker 3:fbb1fa853f09 164 void StartScreen::menu_screen1(N5110 &lcd, Gamepad &pad)
AhmedPlaymaker 3:fbb1fa853f09 165 {
AhmedPlaymaker 3:fbb1fa853f09 166 lcd.drawSprite(50,i,7,9,(int *)arrow);
AhmedPlaymaker 4:1fe015b66bb8 167 while ((pad.check_event(Gamepad::JOY_PRESSED) == false)&&(pad.check_event(Gamepad::START_PRESSED) == false)) { //Change this to if button pressed.
AhmedPlaymaker 3:fbb1fa853f09 168 lcd.printString("SnakeVSBlock",5,0);
AhmedPlaymaker 3:fbb1fa853f09 169 lcd.printString("Play",0,2);
AhmedPlaymaker 3:fbb1fa853f09 170 lcd.printString("Settings",0,3);
AhmedPlaymaker 3:fbb1fa853f09 171 lcd.printString("Stats",0,4);
AhmedPlaymaker 3:fbb1fa853f09 172 lcd.printString("Tutorial",0,5);
AhmedPlaymaker 3:fbb1fa853f09 173 Direction d = pad.get_direction();
AhmedPlaymaker 3:fbb1fa853f09 174 if((d==N)&&(i>16)) {
AhmedPlaymaker 3:fbb1fa853f09 175 i=i-8;
AhmedPlaymaker 3:fbb1fa853f09 176 }
AhmedPlaymaker 3:fbb1fa853f09 177 if((d==S)&&(i<40)) {
AhmedPlaymaker 3:fbb1fa853f09 178 i=i+8;
AhmedPlaymaker 3:fbb1fa853f09 179 }
AhmedPlaymaker 3:fbb1fa853f09 180 lcd.drawSprite(50,i,7,9,(int *)arrow); //Function used to draw the sprite.
AhmedPlaymaker 3:fbb1fa853f09 181 lcd.refresh();
AhmedPlaymaker 4:1fe015b66bb8 182 wait(0.25);
AhmedPlaymaker 3:fbb1fa853f09 183 lcd.clear();
AhmedPlaymaker 3:fbb1fa853f09 184 }
AhmedPlaymaker 4:1fe015b66bb8 185
AhmedPlaymaker 4:1fe015b66bb8 186 if(i == 16)
AhmedPlaymaker 4:1fe015b66bb8 187 {
AhmedPlaymaker 4:1fe015b66bb8 188 menu_screen2(lcd, pad);
AhmedPlaymaker 4:1fe015b66bb8 189 }
AhmedPlaymaker 4:1fe015b66bb8 190 else
AhmedPlaymaker 4:1fe015b66bb8 191 {
AhmedPlaymaker 4:1fe015b66bb8 192 menu_screen1(lcd, pad);
AhmedPlaymaker 4:1fe015b66bb8 193 lr=1;
AhmedPlaymaker 4:1fe015b66bb8 194 }
AhmedPlaymaker 3:fbb1fa853f09 195 }
AhmedPlaymaker 4:1fe015b66bb8 196 void StartScreen::menu_screen2(N5110 &lcd, Gamepad &pad)
AhmedPlaymaker 4:1fe015b66bb8 197 {
AhmedPlaymaker 4:1fe015b66bb8 198 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 199 wait(0.2);
AhmedPlaymaker 4:1fe015b66bb8 200
AhmedPlaymaker 4:1fe015b66bb8 201 while ((pad.check_event(Gamepad::JOY_PRESSED) == false)&&(pad.check_event(Gamepad::START_PRESSED) == false)) { //Change this to if button pressed.
AhmedPlaymaker 4:1fe015b66bb8 202
AhmedPlaymaker 4:1fe015b66bb8 203 Direction d = pad.get_direction();
AhmedPlaymaker 4:1fe015b66bb8 204 wait(0.25);
AhmedPlaymaker 4:1fe015b66bb8 205
AhmedPlaymaker 4:1fe015b66bb8 206 if(((d==E)||(d==W))&&(lr==1)) {
AhmedPlaymaker 4:1fe015b66bb8 207 lr=2;
AhmedPlaymaker 4:1fe015b66bb8 208 }
AhmedPlaymaker 4:1fe015b66bb8 209
AhmedPlaymaker 4:1fe015b66bb8 210 else if(((d==E)||(d==W))&&(lr==2)) {
AhmedPlaymaker 4:1fe015b66bb8 211 lr=1;
AhmedPlaymaker 4:1fe015b66bb8 212 }
AhmedPlaymaker 4:1fe015b66bb8 213
AhmedPlaymaker 4:1fe015b66bb8 214 if(lr==1) {
AhmedPlaymaker 4:1fe015b66bb8 215 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 216 lcd.drawRect(27,18,30,20,FILL_TRANSPARENT);
AhmedPlaymaker 4:1fe015b66bb8 217 lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 218 lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 219 lcd.printString("Free Wave",14,1);
AhmedPlaymaker 4:1fe015b66bb8 220 lcd.refresh();
AhmedPlaymaker 4:1fe015b66bb8 221 }
AhmedPlaymaker 4:1fe015b66bb8 222 if(lr==2) {
AhmedPlaymaker 4:1fe015b66bb8 223 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 224 lcd.drawRect(27,18,30,20,FILL_TRANSPARENT);
AhmedPlaymaker 4:1fe015b66bb8 225 lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 226 lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 227 lcd.printString("Bullet Shower",4,1);
AhmedPlaymaker 4:1fe015b66bb8 228 lcd.drawSprite(29,19,13,5,(int *)bullet); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 229 lcd.refresh();
AhmedPlaymaker 4:1fe015b66bb8 230 }
AhmedPlaymaker 4:1fe015b66bb8 231 if (pad.check_event(Gamepad::BACK_PRESSED) == true) {
AhmedPlaymaker 4:1fe015b66bb8 232 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 233 menu_screen1(lcd, pad);
AhmedPlaymaker 4:1fe015b66bb8 234 }
AhmedPlaymaker 4:1fe015b66bb8 235 }
AhmedPlaymaker 4:1fe015b66bb8 236
AhmedPlaymaker 4:1fe015b66bb8 237 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 238 wait(0.25);
AhmedPlaymaker 4:1fe015b66bb8 239 menu_screen3(lcd, pad);
AhmedPlaymaker 4:1fe015b66bb8 240 }
AhmedPlaymaker 4:1fe015b66bb8 241 void StartScreen::menu_screen3(N5110 &lcd, Gamepad &pad)
AhmedPlaymaker 4:1fe015b66bb8 242 {
AhmedPlaymaker 4:1fe015b66bb8 243 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 244 wait(0.2);
AhmedPlaymaker 4:1fe015b66bb8 245
AhmedPlaymaker 4:1fe015b66bb8 246 while ((pad.check_event(Gamepad::JOY_PRESSED) == false)&&(pad.check_event(Gamepad::START_PRESSED) == false)) { //Change this to if button pressed.
AhmedPlaymaker 4:1fe015b66bb8 247
AhmedPlaymaker 4:1fe015b66bb8 248 Direction d = pad.get_direction();
AhmedPlaymaker 4:1fe015b66bb8 249 wait(0.25);
AhmedPlaymaker 4:1fe015b66bb8 250
AhmedPlaymaker 4:1fe015b66bb8 251 if((d==E)&&(gs==4)) {
AhmedPlaymaker 4:1fe015b66bb8 252 gs=1;
AhmedPlaymaker 4:1fe015b66bb8 253 }
AhmedPlaymaker 4:1fe015b66bb8 254
AhmedPlaymaker 4:1fe015b66bb8 255 else if((d==W)&&(gs==1)) {
AhmedPlaymaker 4:1fe015b66bb8 256 gs=4;
AhmedPlaymaker 4:1fe015b66bb8 257 }
AhmedPlaymaker 4:1fe015b66bb8 258
AhmedPlaymaker 4:1fe015b66bb8 259 else if((d==E)&&(1<=gs<=3)) {
AhmedPlaymaker 4:1fe015b66bb8 260 gs=gs+1;
AhmedPlaymaker 4:1fe015b66bb8 261 }
AhmedPlaymaker 4:1fe015b66bb8 262
AhmedPlaymaker 4:1fe015b66bb8 263 else if((d==W)&&(2<=gs<=4)) {
AhmedPlaymaker 4:1fe015b66bb8 264 gs=gs-1;
AhmedPlaymaker 4:1fe015b66bb8 265 }
AhmedPlaymaker 4:1fe015b66bb8 266
AhmedPlaymaker 4:1fe015b66bb8 267 if(gs==1) {
AhmedPlaymaker 4:1fe015b66bb8 268 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 269 lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 270 lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 271 lcd.printString("Game Speed",10,1);
AhmedPlaymaker 4:1fe015b66bb8 272 lcd.printString("SNAIL",26,3);
AhmedPlaymaker 4:1fe015b66bb8 273 lcd.refresh();
AhmedPlaymaker 4:1fe015b66bb8 274 }
AhmedPlaymaker 4:1fe015b66bb8 275 if(gs==2) {
AhmedPlaymaker 4:1fe015b66bb8 276 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 277 lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 278 lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 279 lcd.printString("Game Speed",10,1);
AhmedPlaymaker 4:1fe015b66bb8 280 lcd.printString("TURTLE",24,3);
AhmedPlaymaker 4:1fe015b66bb8 281 lcd.refresh();
AhmedPlaymaker 4:1fe015b66bb8 282 }
AhmedPlaymaker 4:1fe015b66bb8 283 if(gs==3) {
AhmedPlaymaker 4:1fe015b66bb8 284 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 285 lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 286 lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 287 lcd.printString("Game Speed",10,1);
AhmedPlaymaker 4:1fe015b66bb8 288 lcd.printString("RABBIT",24,3);
AhmedPlaymaker 4:1fe015b66bb8 289 lcd.refresh();
AhmedPlaymaker 4:1fe015b66bb8 290 }
AhmedPlaymaker 4:1fe015b66bb8 291 if(gs==4) {
AhmedPlaymaker 4:1fe015b66bb8 292 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 293 lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 294 lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite.
AhmedPlaymaker 4:1fe015b66bb8 295 lcd.printString("Game Speed",10,1);
AhmedPlaymaker 4:1fe015b66bb8 296 lcd.printString("CHEETHA",21,3);
AhmedPlaymaker 4:1fe015b66bb8 297 lcd.refresh();
AhmedPlaymaker 4:1fe015b66bb8 298 }
AhmedPlaymaker 4:1fe015b66bb8 299
AhmedPlaymaker 4:1fe015b66bb8 300 if (pad.check_event(Gamepad::BACK_PRESSED) == true) {
AhmedPlaymaker 4:1fe015b66bb8 301 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 302 wait(0.25);
AhmedPlaymaker 4:1fe015b66bb8 303 menu_screen2(lcd, pad);
AhmedPlaymaker 4:1fe015b66bb8 304 }
AhmedPlaymaker 4:1fe015b66bb8 305 }
AhmedPlaymaker 4:1fe015b66bb8 306
AhmedPlaymaker 4:1fe015b66bb8 307 lcd.clear();
AhmedPlaymaker 4:1fe015b66bb8 308 wait(0.25);
AhmedPlaymaker 4:1fe015b66bb8 309 menu_screen3(lcd, pad);
AhmedPlaymaker 4:1fe015b66bb8 310 }