Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
StartScreen/StartScreen.cpp@5:e4df87957a5b, 2019-03-20 (annotated)
- Committer:
- AhmedPlaymaker
- Date:
- Wed Mar 20 11:41:18 2019 +0000
- Revision:
- 5:e4df87957a5b
- Parent:
- 4:1fe015b66bb8
- Child:
- 6:3ffab44ed49c
Settings menu and class created, Show Credits configuration has a problem, should try to fix soon.; Tutorials Menu and volume configuration remaining, next is game architecture.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AhmedPlaymaker | 3:fbb1fa853f09 | 1 | #include "StartScreen.h" |
AhmedPlaymaker | 5:e4df87957a5b | 2 | Settings settings; |
AhmedPlaymaker | 3:fbb1fa853f09 | 3 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 4 | int sprite[48][84] = { |
AhmedPlaymaker | 3:fbb1fa853f09 | 5 | {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 | 6 | {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 | 7 | {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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hmedPlaymaker | 3:fbb1fa853f09 | 49 | {0,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,1,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,1,1,0,0,1,0,1,1,0,0,1,0,0,0,1,0,1,1,0,0,0,0,1,1,0,1,1,0,0,0,0}, |
AhmedPlaymaker | 3:fbb1fa853f09 | 50 | {0,1,1,1,1,1,0,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,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,1,1,0,1,1,0,1,1,0,0,0,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,0,0,0,0}, |
AhmedPlaymaker | 3:fbb1fa853f09 | 51 | {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 | 52 | {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 | 53 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 54 | }; |
AhmedPlaymaker | 3:fbb1fa853f09 | 55 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 56 | int arrow[7][9] = { |
AhmedPlaymaker | 3:fbb1fa853f09 | 57 | {0,0,0,0,1,0,0,0,0}, |
AhmedPlaymaker | 3:fbb1fa853f09 | 58 | {0,0,0,1,1,0,0,0,0}, |
AhmedPlaymaker | 3:fbb1fa853f09 | 59 | {0,0,1,1,1,0,0,0,0}, |
AhmedPlaymaker | 3:fbb1fa853f09 | 60 | {0,1,1,1,1,1,1,1,1}, |
AhmedPlaymaker | 3:fbb1fa853f09 | 61 | {0,0,1,1,1,0,0,0,0}, |
AhmedPlaymaker | 3:fbb1fa853f09 | 62 | {0,0,0,1,1,0,0,0,0}, |
AhmedPlaymaker | 3:fbb1fa853f09 | 63 | {0,0,0,0,1,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 64 | }; |
AhmedPlaymaker | 4:1fe015b66bb8 | 65 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 66 | int bullet[13][5] = { |
AhmedPlaymaker | 4:1fe015b66bb8 | 67 | {1,0,0,0,1}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 68 | {1,0,0,0,1}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 69 | {0,1,0,1,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 70 | {0,0,1,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 71 | {0,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 72 | {0,0,1,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 73 | {0,0,1,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,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 78 | {0,0,1,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 79 | {0,0,1,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 80 | }; |
AhmedPlaymaker | 4:1fe015b66bb8 | 81 | int navL[13][8] = { |
AhmedPlaymaker | 4:1fe015b66bb8 | 82 | {0,0,0,0,0,0,1,1}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 83 | {0,0,0,0,0,1,1,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 84 | {0,0,0,0,1,1,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 85 | {0,0,0,1,1,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 86 | {0,0,1,1,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 87 | {0,1,1,0,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 88 | {1,1,0,0,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 89 | {0,1,1,0,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 90 | {0,0,1,1,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 91 | {0,0,0,1,1,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 92 | {0,0,0,0,1,1,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 93 | {0,0,0,0,0,1,1,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 94 | {0,0,0,0,0,0,1,1}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 95 | }; |
AhmedPlaymaker | 3:fbb1fa853f09 | 96 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 97 | int navR[13][8] = { |
AhmedPlaymaker | 4:1fe015b66bb8 | 98 | {1,1,0,0,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 99 | {0,1,1,0,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 100 | {0,0,1,1,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 101 | {0,0,0,1,1,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 102 | {0,0,0,0,1,1,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 103 | {0,0,0,0,0,1,1,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 104 | {0,0,0,0,0,0,1,1}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 105 | {0,0,0,0,0,1,1,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 106 | {0,0,0,0,1,1,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 107 | {0,0,0,1,1,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 108 | {0,0,1,1,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 109 | {0,1,1,0,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 110 | {1,1,0,0,0,0,0,0}, |
AhmedPlaymaker | 4:1fe015b66bb8 | 111 | }; |
AhmedPlaymaker | 4:1fe015b66bb8 | 112 | int i=16; |
AhmedPlaymaker | 4:1fe015b66bb8 | 113 | int lr=1; |
AhmedPlaymaker | 4:1fe015b66bb8 | 114 | int gs=1; |
AhmedPlaymaker | 5:e4df87957a5b | 115 | int st=1; |
AhmedPlaymaker | 5:e4df87957a5b | 116 | int sc=1; |
AhmedPlaymaker | 5:e4df87957a5b | 117 | float cs = 4; |
AhmedPlaymaker | 3:fbb1fa853f09 | 118 | StartScreen::StartScreen() |
AhmedPlaymaker | 3:fbb1fa853f09 | 119 | { |
AhmedPlaymaker | 3:fbb1fa853f09 | 120 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 121 | } |
AhmedPlaymaker | 3:fbb1fa853f09 | 122 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 123 | StartScreen::~StartScreen() |
AhmedPlaymaker | 3:fbb1fa853f09 | 124 | { |
AhmedPlaymaker | 3:fbb1fa853f09 | 125 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 126 | } |
AhmedPlaymaker | 3:fbb1fa853f09 | 127 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 128 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 129 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 130 | void StartScreen::screen_saver(N5110 &lcd, Gamepad &pad) |
AhmedPlaymaker | 3:fbb1fa853f09 | 131 | { |
AhmedPlaymaker | 3:fbb1fa853f09 | 132 | lcd.clear(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 133 | lcd.drawSprite(0,0,48,84,(int *)sprite); //Function used to draw the sprite |
AhmedPlaymaker | 3:fbb1fa853f09 | 134 | lcd.refresh(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 135 | pad.leds_on(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 136 | wait(2); |
AhmedPlaymaker | 3:fbb1fa853f09 | 137 | pad.leds_off(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 138 | lcd.clear(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 139 | } |
AhmedPlaymaker | 3:fbb1fa853f09 | 140 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 141 | void StartScreen::instruct(N5110 &lcd, Gamepad &pad) |
AhmedPlaymaker | 3:fbb1fa853f09 | 142 | { |
AhmedPlaymaker | 3:fbb1fa853f09 | 143 | lcd.printString("Please Press",5,1); //Function used to promt the user to start. |
AhmedPlaymaker | 3:fbb1fa853f09 | 144 | lcd.printString("Start",25,3); |
AhmedPlaymaker | 3:fbb1fa853f09 | 145 | lcd.printString("to Begin",15,5); |
AhmedPlaymaker | 3:fbb1fa853f09 | 146 | lcd.refresh(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 147 | while ( pad.check_event(Gamepad::START_PRESSED) == false) { |
AhmedPlaymaker | 3:fbb1fa853f09 | 148 | pad.leds_on(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 149 | wait(0.1); |
AhmedPlaymaker | 3:fbb1fa853f09 | 150 | pad.leds_off(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 151 | wait(0.1); |
AhmedPlaymaker | 3:fbb1fa853f09 | 152 | } |
AhmedPlaymaker | 3:fbb1fa853f09 | 153 | lcd.clear(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 154 | pad.leds_off(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 155 | } |
AhmedPlaymaker | 3:fbb1fa853f09 | 156 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 157 | void StartScreen::info(N5110 &lcd, Gamepad &pad) |
AhmedPlaymaker | 3:fbb1fa853f09 | 158 | { |
AhmedPlaymaker | 5:e4df87957a5b | 159 | if(sc ==1) { |
AhmedPlaymaker | 5:e4df87957a5b | 160 | lcd.printString("Created BY",8,1); |
AhmedPlaymaker | 5:e4df87957a5b | 161 | lcd.printString("Ahmed",24,3); |
AhmedPlaymaker | 5:e4df87957a5b | 162 | lcd.printString("Adamjee",20,4); |
AhmedPlaymaker | 5:e4df87957a5b | 163 | lcd.printString("201161436",15,5); |
AhmedPlaymaker | 5:e4df87957a5b | 164 | lcd.refresh(); |
AhmedPlaymaker | 5:e4df87957a5b | 165 | wait(2); |
AhmedPlaymaker | 5:e4df87957a5b | 166 | } |
AhmedPlaymaker | 3:fbb1fa853f09 | 167 | lcd.clear(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 168 | } |
AhmedPlaymaker | 3:fbb1fa853f09 | 169 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 170 | void StartScreen::menu_screen1(N5110 &lcd, Gamepad &pad) |
AhmedPlaymaker | 3:fbb1fa853f09 | 171 | { |
AhmedPlaymaker | 3:fbb1fa853f09 | 172 | lcd.drawSprite(50,i,7,9,(int *)arrow); |
AhmedPlaymaker | 4:1fe015b66bb8 | 173 | while ((pad.check_event(Gamepad::JOY_PRESSED) == false)&&(pad.check_event(Gamepad::START_PRESSED) == false)) { //Change this to if button pressed. |
AhmedPlaymaker | 3:fbb1fa853f09 | 174 | lcd.printString("SnakeVSBlock",5,0); |
AhmedPlaymaker | 3:fbb1fa853f09 | 175 | lcd.printString("Play",0,2); |
AhmedPlaymaker | 3:fbb1fa853f09 | 176 | lcd.printString("Settings",0,3); |
AhmedPlaymaker | 3:fbb1fa853f09 | 177 | lcd.printString("Stats",0,4); |
AhmedPlaymaker | 3:fbb1fa853f09 | 178 | lcd.printString("Tutorial",0,5); |
AhmedPlaymaker | 3:fbb1fa853f09 | 179 | Direction d = pad.get_direction(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 180 | if((d==N)&&(i>16)) { |
AhmedPlaymaker | 3:fbb1fa853f09 | 181 | i=i-8; |
AhmedPlaymaker | 3:fbb1fa853f09 | 182 | } |
AhmedPlaymaker | 3:fbb1fa853f09 | 183 | if((d==S)&&(i<40)) { |
AhmedPlaymaker | 3:fbb1fa853f09 | 184 | i=i+8; |
AhmedPlaymaker | 3:fbb1fa853f09 | 185 | } |
AhmedPlaymaker | 3:fbb1fa853f09 | 186 | lcd.drawSprite(50,i,7,9,(int *)arrow); //Function used to draw the sprite. |
AhmedPlaymaker | 3:fbb1fa853f09 | 187 | lcd.refresh(); |
AhmedPlaymaker | 5:e4df87957a5b | 188 | wait(1/cs); |
AhmedPlaymaker | 3:fbb1fa853f09 | 189 | lcd.clear(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 190 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 191 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 192 | if(i == 16) |
AhmedPlaymaker | 4:1fe015b66bb8 | 193 | { |
AhmedPlaymaker | 4:1fe015b66bb8 | 194 | menu_screen2(lcd, pad); |
AhmedPlaymaker | 4:1fe015b66bb8 | 195 | } |
AhmedPlaymaker | 5:e4df87957a5b | 196 | else if(i == 24) |
AhmedPlaymaker | 5:e4df87957a5b | 197 | { |
AhmedPlaymaker | 5:e4df87957a5b | 198 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 199 | settings.info(lcd, pad); |
AhmedPlaymaker | 5:e4df87957a5b | 200 | |
AhmedPlaymaker | 5:e4df87957a5b | 201 | while (pad.check_event(Gamepad::BACK_PRESSED) == false) { //if button pressed. |
AhmedPlaymaker | 5:e4df87957a5b | 202 | |
AhmedPlaymaker | 5:e4df87957a5b | 203 | Direction d = pad.get_direction(); |
AhmedPlaymaker | 5:e4df87957a5b | 204 | wait(1/cs); |
AhmedPlaymaker | 5:e4df87957a5b | 205 | |
AhmedPlaymaker | 5:e4df87957a5b | 206 | if((d==E)&&(st==5)) { |
AhmedPlaymaker | 5:e4df87957a5b | 207 | st=1; |
AhmedPlaymaker | 5:e4df87957a5b | 208 | } |
AhmedPlaymaker | 5:e4df87957a5b | 209 | |
AhmedPlaymaker | 5:e4df87957a5b | 210 | else if((d==W)&&(st==1)) { |
AhmedPlaymaker | 5:e4df87957a5b | 211 | st=5; |
AhmedPlaymaker | 5:e4df87957a5b | 212 | } |
AhmedPlaymaker | 5:e4df87957a5b | 213 | |
AhmedPlaymaker | 5:e4df87957a5b | 214 | else if((d==E)&&(1<=st<=4)) { |
AhmedPlaymaker | 5:e4df87957a5b | 215 | st=st+1; |
AhmedPlaymaker | 5:e4df87957a5b | 216 | } |
AhmedPlaymaker | 5:e4df87957a5b | 217 | |
AhmedPlaymaker | 5:e4df87957a5b | 218 | else if((d==W)&&(2<=st<=5)) { |
AhmedPlaymaker | 5:e4df87957a5b | 219 | st=st-1; |
AhmedPlaymaker | 5:e4df87957a5b | 220 | } |
AhmedPlaymaker | 5:e4df87957a5b | 221 | |
AhmedPlaymaker | 5:e4df87957a5b | 222 | if(st==1) { |
AhmedPlaymaker | 5:e4df87957a5b | 223 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 224 | lcd.drawSprite(5,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 225 | lcd.drawSprite(71,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 226 | cs = settings.controlSensitivity(lcd, pad); |
AhmedPlaymaker | 5:e4df87957a5b | 227 | lcd.refresh(); |
AhmedPlaymaker | 5:e4df87957a5b | 228 | } |
AhmedPlaymaker | 5:e4df87957a5b | 229 | if(st==2) { |
AhmedPlaymaker | 5:e4df87957a5b | 230 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 231 | lcd.drawSprite(5,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 232 | lcd.drawSprite(71,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 233 | settings.brigntness(lcd, pad); |
AhmedPlaymaker | 5:e4df87957a5b | 234 | lcd.refresh(); |
AhmedPlaymaker | 5:e4df87957a5b | 235 | } |
AhmedPlaymaker | 5:e4df87957a5b | 236 | if(st==3) { |
AhmedPlaymaker | 5:e4df87957a5b | 237 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 238 | lcd.drawSprite(5,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 239 | lcd.drawSprite(71,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 240 | settings.contrast(lcd, pad); |
AhmedPlaymaker | 5:e4df87957a5b | 241 | lcd.refresh(); |
AhmedPlaymaker | 5:e4df87957a5b | 242 | } |
AhmedPlaymaker | 5:e4df87957a5b | 243 | if(st==4) { |
AhmedPlaymaker | 5:e4df87957a5b | 244 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 245 | lcd.drawSprite(5,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 246 | lcd.drawSprite(71,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 247 | settings.volume(lcd, pad); |
AhmedPlaymaker | 5:e4df87957a5b | 248 | lcd.refresh(); |
AhmedPlaymaker | 5:e4df87957a5b | 249 | } |
AhmedPlaymaker | 5:e4df87957a5b | 250 | if(st==5) { |
AhmedPlaymaker | 5:e4df87957a5b | 251 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 252 | lcd.drawSprite(5,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 253 | lcd.drawSprite(71,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 5:e4df87957a5b | 254 | sc = settings.showCredits(lcd, pad); |
AhmedPlaymaker | 5:e4df87957a5b | 255 | lcd.refresh(); |
AhmedPlaymaker | 5:e4df87957a5b | 256 | } |
AhmedPlaymaker | 5:e4df87957a5b | 257 | } |
AhmedPlaymaker | 5:e4df87957a5b | 258 | menu_screen1(lcd, pad); |
AhmedPlaymaker | 5:e4df87957a5b | 259 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 260 | else |
AhmedPlaymaker | 4:1fe015b66bb8 | 261 | { |
AhmedPlaymaker | 4:1fe015b66bb8 | 262 | menu_screen1(lcd, pad); |
AhmedPlaymaker | 4:1fe015b66bb8 | 263 | lr=1; |
AhmedPlaymaker | 4:1fe015b66bb8 | 264 | } |
AhmedPlaymaker | 5:e4df87957a5b | 265 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 266 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 267 | void StartScreen::menu_screen2(N5110 &lcd, Gamepad &pad) |
AhmedPlaymaker | 4:1fe015b66bb8 | 268 | { |
AhmedPlaymaker | 4:1fe015b66bb8 | 269 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 270 | wait(1/cs); |
AhmedPlaymaker | 4:1fe015b66bb8 | 271 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 272 | while ((pad.check_event(Gamepad::JOY_PRESSED) == false)&&(pad.check_event(Gamepad::START_PRESSED) == false)) { //Change this to if button pressed. |
AhmedPlaymaker | 4:1fe015b66bb8 | 273 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 274 | Direction d = pad.get_direction(); |
AhmedPlaymaker | 5:e4df87957a5b | 275 | wait(1/cs); |
AhmedPlaymaker | 4:1fe015b66bb8 | 276 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 277 | if(((d==E)||(d==W))&&(lr==1)) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 278 | lr=2; |
AhmedPlaymaker | 4:1fe015b66bb8 | 279 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 280 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 281 | else if(((d==E)||(d==W))&&(lr==2)) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 282 | lr=1; |
AhmedPlaymaker | 4:1fe015b66bb8 | 283 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 284 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 285 | if(lr==1) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 286 | lcd.clear(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 287 | lcd.drawRect(27,18,30,20,FILL_TRANSPARENT); |
AhmedPlaymaker | 4:1fe015b66bb8 | 288 | lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 289 | lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 290 | lcd.printString("Free Wave",14,1); |
AhmedPlaymaker | 4:1fe015b66bb8 | 291 | lcd.refresh(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 292 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 293 | if(lr==2) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 294 | lcd.clear(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 295 | lcd.drawRect(27,18,30,20,FILL_TRANSPARENT); |
AhmedPlaymaker | 4:1fe015b66bb8 | 296 | lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 297 | lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 298 | lcd.printString("Bullet Shower",4,1); |
AhmedPlaymaker | 4:1fe015b66bb8 | 299 | lcd.drawSprite(29,19,13,5,(int *)bullet); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 300 | lcd.refresh(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 301 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 302 | if (pad.check_event(Gamepad::BACK_PRESSED) == true) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 303 | lcd.clear(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 304 | menu_screen1(lcd, pad); |
AhmedPlaymaker | 4:1fe015b66bb8 | 305 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 306 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 307 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 308 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 309 | wait(1/cs); |
AhmedPlaymaker | 4:1fe015b66bb8 | 310 | menu_screen3(lcd, pad); |
AhmedPlaymaker | 4:1fe015b66bb8 | 311 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 312 | void StartScreen::menu_screen3(N5110 &lcd, Gamepad &pad) |
AhmedPlaymaker | 4:1fe015b66bb8 | 313 | { |
AhmedPlaymaker | 4:1fe015b66bb8 | 314 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 315 | wait(1/cs); |
AhmedPlaymaker | 4:1fe015b66bb8 | 316 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 317 | while ((pad.check_event(Gamepad::JOY_PRESSED) == false)&&(pad.check_event(Gamepad::START_PRESSED) == false)) { //Change this to if button pressed. |
AhmedPlaymaker | 4:1fe015b66bb8 | 318 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 319 | Direction d = pad.get_direction(); |
AhmedPlaymaker | 5:e4df87957a5b | 320 | wait(1/cs); |
AhmedPlaymaker | 4:1fe015b66bb8 | 321 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 322 | if((d==E)&&(gs==4)) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 323 | gs=1; |
AhmedPlaymaker | 4:1fe015b66bb8 | 324 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 325 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 326 | else if((d==W)&&(gs==1)) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 327 | gs=4; |
AhmedPlaymaker | 4:1fe015b66bb8 | 328 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 329 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 330 | else if((d==E)&&(1<=gs<=3)) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 331 | gs=gs+1; |
AhmedPlaymaker | 4:1fe015b66bb8 | 332 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 333 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 334 | else if((d==W)&&(2<=gs<=4)) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 335 | gs=gs-1; |
AhmedPlaymaker | 4:1fe015b66bb8 | 336 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 337 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 338 | if(gs==1) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 339 | lcd.clear(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 340 | lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 341 | lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 342 | lcd.printString("Game Speed",10,1); |
AhmedPlaymaker | 4:1fe015b66bb8 | 343 | lcd.printString("SNAIL",26,3); |
AhmedPlaymaker | 4:1fe015b66bb8 | 344 | lcd.refresh(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 345 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 346 | if(gs==2) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 347 | lcd.clear(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 348 | lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 349 | lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 350 | lcd.printString("Game Speed",10,1); |
AhmedPlaymaker | 4:1fe015b66bb8 | 351 | lcd.printString("TURTLE",24,3); |
AhmedPlaymaker | 4:1fe015b66bb8 | 352 | lcd.refresh(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 353 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 354 | if(gs==3) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 355 | lcd.clear(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 356 | lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 357 | lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 358 | lcd.printString("Game Speed",10,1); |
AhmedPlaymaker | 4:1fe015b66bb8 | 359 | lcd.printString("RABBIT",24,3); |
AhmedPlaymaker | 4:1fe015b66bb8 | 360 | lcd.refresh(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 361 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 362 | if(gs==4) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 363 | lcd.clear(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 364 | lcd.drawSprite(10,22,13,8,(int *)navL); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 365 | lcd.drawSprite(65,22,13,8,(int *)navR); //Function used to draw the sprite. |
AhmedPlaymaker | 4:1fe015b66bb8 | 366 | lcd.printString("Game Speed",10,1); |
AhmedPlaymaker | 4:1fe015b66bb8 | 367 | lcd.printString("CHEETHA",21,3); |
AhmedPlaymaker | 4:1fe015b66bb8 | 368 | lcd.refresh(); |
AhmedPlaymaker | 4:1fe015b66bb8 | 369 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 370 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 371 | if (pad.check_event(Gamepad::BACK_PRESSED) == true) { |
AhmedPlaymaker | 4:1fe015b66bb8 | 372 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 373 | wait(1/cs); |
AhmedPlaymaker | 4:1fe015b66bb8 | 374 | menu_screen2(lcd, pad); |
AhmedPlaymaker | 4:1fe015b66bb8 | 375 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 376 | } |
AhmedPlaymaker | 4:1fe015b66bb8 | 377 | |
AhmedPlaymaker | 4:1fe015b66bb8 | 378 | lcd.clear(); |
AhmedPlaymaker | 5:e4df87957a5b | 379 | wait(1/cs); |
AhmedPlaymaker | 4:1fe015b66bb8 | 380 | menu_screen3(lcd, pad); |
AhmedPlaymaker | 4:1fe015b66bb8 | 381 | } |