![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.
Dependencies: mbed FXOS8700CQ mbed-rtos
main.cpp@15:a65444eb1194, 2019-04-20 (annotated)
- Committer:
- yfkwok
- Date:
- Sat Apr 20 11:53:09 2019 +0000
- Revision:
- 15:a65444eb1194
- Parent:
- 13:02002658e718
- Child:
- 21:704d938acf5d
20/04/2019 - Game_two main implementation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yfkwok | 0:1da4db5de653 | 1 | /* |
yfkwok | 0:1da4db5de653 | 2 | ELEC2645 Embedded Systems Project |
yfkwok | 0:1da4db5de653 | 3 | School of Electronic & Electrical Engineering |
yfkwok | 0:1da4db5de653 | 4 | University of Leeds |
yfkwok | 0:1da4db5de653 | 5 | Name: Yiu Fai Kwok |
yfkwok | 0:1da4db5de653 | 6 | Username: el17yfk |
yfkwok | 0:1da4db5de653 | 7 | Student ID Number: 201198802 |
yfkwok | 0:1da4db5de653 | 8 | Date: 11/03/2019 |
yfkwok | 0:1da4db5de653 | 9 | */ |
yfkwok | 0:1da4db5de653 | 10 | |
yfkwok | 1:61b67654ffb7 | 11 | #include "mbed.h" |
yfkwok | 1:61b67654ffb7 | 12 | #include "N5110.h" |
yfkwok | 1:61b67654ffb7 | 13 | #include "Gamepad.h" |
yfkwok | 2:464c7e62d97d | 14 | #include "Score.h" |
yfkwok | 2:464c7e62d97d | 15 | #include "Start.h" |
yfkwok | 2:464c7e62d97d | 16 | #include "Game_one.h" |
yfkwok | 15:a65444eb1194 | 17 | #include "Game_two.h" |
yfkwok | 5:bc0691d02fd5 | 18 | #include "Exam.h" |
yfkwok | 13:02002658e718 | 19 | #include "FXOS8700CQ.h" |
yfkwok | 1:61b67654ffb7 | 20 | |
yfkwok | 1:61b67654ffb7 | 21 | /////////////// objects /////////////// |
yfkwok | 1:61b67654ffb7 | 22 | N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); // K64F - pwr from 3V3 |
yfkwok | 1:61b67654ffb7 | 23 | Gamepad pad; |
yfkwok | 2:464c7e62d97d | 24 | Score music; |
yfkwok | 2:464c7e62d97d | 25 | Start start; |
yfkwok | 2:464c7e62d97d | 26 | Game_one game_1; |
yfkwok | 15:a65444eb1194 | 27 | Game_two game_2; |
yfkwok | 5:bc0691d02fd5 | 28 | Exam test; |
yfkwok | 13:02002658e718 | 29 | // I2C connection for FXOS8700CQ accelerometer/magnetometer |
yfkwok | 15:a65444eb1194 | 30 | FXOS8700CQ device(I2C_SDA,I2C_SCL); // PTE25/PTE24 |
yfkwok | 1:61b67654ffb7 | 31 | |
yfkwok | 1:61b67654ffb7 | 32 | ///////////// prototypes /////////////// |
yfkwok | 1:61b67654ffb7 | 33 | void init(); |
yfkwok | 1:61b67654ffb7 | 34 | void welcome(); |
yfkwok | 2:464c7e62d97d | 35 | int menu(); |
yfkwok | 2:464c7e62d97d | 36 | void year_one(); |
yfkwok | 2:464c7e62d97d | 37 | void year_one_set(); |
yfkwok | 2:464c7e62d97d | 38 | void year_two(); |
yfkwok | 2:464c7e62d97d | 39 | void year_two_set(); |
yfkwok | 2:464c7e62d97d | 40 | void year_three(); |
yfkwok | 2:464c7e62d97d | 41 | void year_three_set(); |
yfkwok | 2:464c7e62d97d | 42 | void instruction(); |
yfkwok | 5:bc0691d02fd5 | 43 | void term_one(); |
yfkwok | 5:bc0691d02fd5 | 44 | void term_two(); |
yfkwok | 5:bc0691d02fd5 | 45 | void term_three(); |
yfkwok | 5:bc0691d02fd5 | 46 | void win(); |
yfkwok | 5:bc0691d02fd5 | 47 | void lose(); |
yfkwok | 5:bc0691d02fd5 | 48 | void passed(); |
yfkwok | 5:bc0691d02fd5 | 49 | void failed(); |
yfkwok | 2:464c7e62d97d | 50 | |
yfkwok | 2:464c7e62d97d | 51 | //Starting states |
yfkwok | 2:464c7e62d97d | 52 | enum StartStates { |
yfkwok | 2:464c7e62d97d | 53 | TITLE, MENU, INSTRUCTION |
yfkwok | 2:464c7e62d97d | 54 | }; |
yfkwok | 2:464c7e62d97d | 55 | |
yfkwok | 2:464c7e62d97d | 56 | //Game states |
yfkwok | 2:464c7e62d97d | 57 | enum GameStates { |
yfkwok | 2:464c7e62d97d | 58 | YEAR_1, STARTER, BULBASAUR, SQUIRTLE, CHARMANDER, EXAM, YEAR_2, YEAR_3, GRADUATION |
yfkwok | 2:464c7e62d97d | 59 | }; |
yfkwok | 2:464c7e62d97d | 60 | |
yfkwok | 2:464c7e62d97d | 61 | //Enumerate instruction menu from page 1 - 3 |
yfkwok | 2:464c7e62d97d | 62 | enum Page { |
yfkwok | 2:464c7e62d97d | 63 | PAGE_1, PAGE_2, PAGE_3 |
yfkwok | 2:464c7e62d97d | 64 | }; |
yfkwok | 2:464c7e62d97d | 65 | |
yfkwok | 2:464c7e62d97d | 66 | //Global variables |
yfkwok | 2:464c7e62d97d | 67 | int score = 0; |
yfkwok | 2:464c7e62d97d | 68 | int game_1_speed = 0; |
yfkwok | 2:464c7e62d97d | 69 | int game_1_cha = 0; |
yfkwok | 2:464c7e62d97d | 70 | int game_1_r = 1; |
yfkwok | 15:a65444eb1194 | 71 | int game_2_speed = 0; |
yfkwok | 15:a65444eb1194 | 72 | int game_2_cha = 0; |
yfkwok | 15:a65444eb1194 | 73 | int game_2_r = 1; |
yfkwok | 2:464c7e62d97d | 74 | int select = 0; |
yfkwok | 2:464c7e62d97d | 75 | int year = 0; |
yfkwok | 5:bc0691d02fd5 | 76 | int pass = 0; |
yfkwok | 1:61b67654ffb7 | 77 | |
yfkwok | 1:61b67654ffb7 | 78 | ///////////// functions //////////////// |
yfkwok | 1:61b67654ffb7 | 79 | int main(){ |
yfkwok | 1:61b67654ffb7 | 80 | |
yfkwok | 2:464c7e62d97d | 81 | // Initialise parameters |
yfkwok | 1:61b67654ffb7 | 82 | int fps = 8; // frames per second |
yfkwok | 1:61b67654ffb7 | 83 | |
yfkwok | 1:61b67654ffb7 | 84 | init(); // initialise and then display welcome screen... |
yfkwok | 2:464c7e62d97d | 85 | StartStates currentState = TITLE; |
yfkwok | 2:464c7e62d97d | 86 | GameStates currentGame = YEAR_1; |
yfkwok | 1:61b67654ffb7 | 87 | |
yfkwok | 2:464c7e62d97d | 88 | while(1){ |
yfkwok | 2:464c7e62d97d | 89 | switch (currentState) { |
yfkwok | 2:464c7e62d97d | 90 | case TITLE: |
yfkwok | 2:464c7e62d97d | 91 | //1. Display title screen and play title music |
yfkwok | 2:464c7e62d97d | 92 | //2. Proceed to Start screen by pressing start |
yfkwok | 2:464c7e62d97d | 93 | welcome(); |
yfkwok | 2:464c7e62d97d | 94 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 95 | currentState = MENU; |
yfkwok | 2:464c7e62d97d | 96 | break; |
yfkwok | 1:61b67654ffb7 | 97 | |
yfkwok | 2:464c7e62d97d | 98 | case MENU: |
yfkwok | 2:464c7e62d97d | 99 | //1. Display starting menu |
yfkwok | 15:a65444eb1194 | 100 | //2. If Start is selected, initiate year 1 game state |
yfkwok | 2:464c7e62d97d | 101 | //3. If Instruction is selected, give instruction |
yfkwok | 2:464c7e62d97d | 102 | int op = menu(); |
yfkwok | 2:464c7e62d97d | 103 | if (op == 1){currentState = INSTRUCTION;} |
yfkwok | 2:464c7e62d97d | 104 | else { |
yfkwok | 2:464c7e62d97d | 105 | while(1){ |
yfkwok | 2:464c7e62d97d | 106 | // Game loop |
yfkwok | 2:464c7e62d97d | 107 | switch (currentGame) { |
yfkwok | 2:464c7e62d97d | 108 | case YEAR_1: |
yfkwok | 2:464c7e62d97d | 109 | // 1. Initiate year 1 screen |
yfkwok | 15:a65444eb1194 | 110 | // 2. Set up the parameters for year 1 |
yfkwok | 2:464c7e62d97d | 111 | year_one(); |
yfkwok | 2:464c7e62d97d | 112 | year_one_set(); |
yfkwok | 2:464c7e62d97d | 113 | currentGame = STARTER; |
yfkwok | 2:464c7e62d97d | 114 | break; |
yfkwok | 15:a65444eb1194 | 115 | |
yfkwok | 2:464c7e62d97d | 116 | case STARTER: |
yfkwok | 15:a65444eb1194 | 117 | // 1. Provide selection screen for starter pokemon to select which mini game to initiate |
yfkwok | 15:a65444eb1194 | 118 | // 2. Provide description for the mini game and pokemon |
yfkwok | 15:a65444eb1194 | 119 | // 3. Initiate the mini game according to the pokemon being selected |
yfkwok | 5:bc0691d02fd5 | 120 | select = 0; |
yfkwok | 5:bc0691d02fd5 | 121 | start.init(pad); |
yfkwok | 2:464c7e62d97d | 122 | start.starter_draw(lcd); |
yfkwok | 2:464c7e62d97d | 123 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 124 | while(pad.check_event(Gamepad::START_PRESSED) == false) |
yfkwok | 2:464c7e62d97d | 125 | { |
yfkwok | 2:464c7e62d97d | 126 | start.starter_update(pad); |
yfkwok | 2:464c7e62d97d | 127 | start.starter_draw(lcd); |
yfkwok | 2:464c7e62d97d | 128 | if(pad.check_event(Gamepad::A_PRESSED) == true){ |
yfkwok | 2:464c7e62d97d | 129 | select = start.get_select(start.update_select(pad)); |
yfkwok | 2:464c7e62d97d | 130 | start.intro(select, pad, lcd); |
yfkwok | 2:464c7e62d97d | 131 | } |
yfkwok | 2:464c7e62d97d | 132 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 133 | } |
yfkwok | 2:464c7e62d97d | 134 | select = start.get_select(start.update_select(pad)); |
yfkwok | 4:5bc9c4363d31 | 135 | if(select == 1){ |
yfkwok | 4:5bc9c4363d31 | 136 | music.congrats(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 137 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 138 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 139 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 140 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 141 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 142 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 143 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 144 | } |
yfkwok | 4:5bc9c4363d31 | 145 | game_1.intro(pad, lcd); |
yfkwok | 4:5bc9c4363d31 | 146 | currentGame = SQUIRTLE; |
yfkwok | 4:5bc9c4363d31 | 147 | } |
yfkwok | 4:5bc9c4363d31 | 148 | else if(select == 0){ |
yfkwok | 4:5bc9c4363d31 | 149 | music.congrats(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 150 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 151 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 152 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 153 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 154 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 155 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 156 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 157 | } |
yfkwok | 4:5bc9c4363d31 | 158 | currentGame = BULBASAUR;} |
yfkwok | 4:5bc9c4363d31 | 159 | else if(select == 2){ |
yfkwok | 4:5bc9c4363d31 | 160 | music.congrats(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 161 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 162 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 163 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 164 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 165 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 166 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 167 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 168 | } |
yfkwok | 4:5bc9c4363d31 | 169 | currentGame = CHARMANDER;} |
yfkwok | 2:464c7e62d97d | 170 | break; |
yfkwok | 15:a65444eb1194 | 171 | |
yfkwok | 15:a65444eb1194 | 172 | // Game loop for Bulbasaur's mini game |
yfkwok | 2:464c7e62d97d | 173 | case BULBASAUR: |
yfkwok | 10:adff3c804985 | 174 | score = 3; |
yfkwok | 5:bc0691d02fd5 | 175 | currentGame = EXAM; |
yfkwok | 2:464c7e62d97d | 176 | break; |
yfkwok | 15:a65444eb1194 | 177 | |
yfkwok | 15:a65444eb1194 | 178 | // Game loop for Squirtle's mini game |
yfkwok | 2:464c7e62d97d | 179 | case SQUIRTLE: |
yfkwok | 2:464c7e62d97d | 180 | int i = 0; |
yfkwok | 2:464c7e62d97d | 181 | score = 0; |
yfkwok | 2:464c7e62d97d | 182 | while(i < 3){ |
yfkwok | 15:a65444eb1194 | 183 | // Indicate for which term the current game is in |
yfkwok | 5:bc0691d02fd5 | 184 | if(i == 0) {term_one();} |
yfkwok | 5:bc0691d02fd5 | 185 | else if(i == 1) {term_two();} |
yfkwok | 5:bc0691d02fd5 | 186 | else{term_three();} |
yfkwok | 2:464c7e62d97d | 187 | game_1.init(game_1_speed, game_1_cha, game_1_r); |
yfkwok | 2:464c7e62d97d | 188 | int j = 0; |
yfkwok | 2:464c7e62d97d | 189 | while(j < 10){ |
yfkwok | 15:a65444eb1194 | 190 | // Game loop for 10 rounds |
yfkwok | 2:464c7e62d97d | 191 | game_1.read_input(pad); |
yfkwok | 2:464c7e62d97d | 192 | game_1.update(pad, lcd); |
yfkwok | 2:464c7e62d97d | 193 | game_1.render(lcd, game_1_cha); |
yfkwok | 2:464c7e62d97d | 194 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 195 | j = game_1.get_count(); |
yfkwok | 2:464c7e62d97d | 196 | } |
yfkwok | 2:464c7e62d97d | 197 | i = i++; |
yfkwok | 15:a65444eb1194 | 198 | // determine if win condition is met, return score to proceed to EXAM game loop |
yfkwok | 5:bc0691d02fd5 | 199 | if(game_1.print_scores(lcd) >= 8) { |
yfkwok | 5:bc0691d02fd5 | 200 | win(); |
yfkwok | 5:bc0691d02fd5 | 201 | music.win(pad); |
yfkwok | 5:bc0691d02fd5 | 202 | wait(0.5); |
yfkwok | 5:bc0691d02fd5 | 203 | score++; |
yfkwok | 5:bc0691d02fd5 | 204 | } |
yfkwok | 5:bc0691d02fd5 | 205 | else { |
yfkwok | 5:bc0691d02fd5 | 206 | lose(); |
yfkwok | 5:bc0691d02fd5 | 207 | pad.tone(750.0,0.2); |
yfkwok | 5:bc0691d02fd5 | 208 | wait(0.5); |
yfkwok | 5:bc0691d02fd5 | 209 | pad.tone(750.0,0.2); |
yfkwok | 5:bc0691d02fd5 | 210 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 211 | } |
yfkwok | 2:464c7e62d97d | 212 | } |
yfkwok | 2:464c7e62d97d | 213 | currentGame = EXAM; |
yfkwok | 2:464c7e62d97d | 214 | |
yfkwok | 2:464c7e62d97d | 215 | break; |
yfkwok | 15:a65444eb1194 | 216 | |
yfkwok | 15:a65444eb1194 | 217 | // Game loop for Charmander's mini game |
yfkwok | 2:464c7e62d97d | 218 | case CHARMANDER: |
yfkwok | 15:a65444eb1194 | 219 | i = 0; |
yfkwok | 15:a65444eb1194 | 220 | score = 0; |
yfkwok | 15:a65444eb1194 | 221 | while (i < 3) { |
yfkwok | 15:a65444eb1194 | 222 | if(i == 0) {term_one();} |
yfkwok | 15:a65444eb1194 | 223 | else if(i == 1) {term_two();} |
yfkwok | 15:a65444eb1194 | 224 | else{term_three();} |
yfkwok | 15:a65444eb1194 | 225 | game_2.init(game_2_speed, game_2_cha, game_2_r); |
yfkwok | 15:a65444eb1194 | 226 | int j = 0; |
yfkwok | 15:a65444eb1194 | 227 | while(j < 10){ |
yfkwok | 15:a65444eb1194 | 228 | game_2.read_input(device); |
yfkwok | 15:a65444eb1194 | 229 | game_2.update(pad, lcd, game_2_cha); |
yfkwok | 15:a65444eb1194 | 230 | game_2.render(lcd, game_2_cha); |
yfkwok | 15:a65444eb1194 | 231 | wait(1.0f/fps); |
yfkwok | 15:a65444eb1194 | 232 | j = game_2.get_count(); |
yfkwok | 15:a65444eb1194 | 233 | } |
yfkwok | 15:a65444eb1194 | 234 | i = i++; |
yfkwok | 15:a65444eb1194 | 235 | if(game_2.get_count() == 10) { |
yfkwok | 15:a65444eb1194 | 236 | win(); |
yfkwok | 15:a65444eb1194 | 237 | music.win(pad); |
yfkwok | 15:a65444eb1194 | 238 | wait(0.5); |
yfkwok | 15:a65444eb1194 | 239 | score++; |
yfkwok | 15:a65444eb1194 | 240 | } |
yfkwok | 15:a65444eb1194 | 241 | else { |
yfkwok | 15:a65444eb1194 | 242 | lose(); |
yfkwok | 15:a65444eb1194 | 243 | pad.tone(750.0,0.2); |
yfkwok | 15:a65444eb1194 | 244 | wait(0.5); |
yfkwok | 15:a65444eb1194 | 245 | pad.tone(750.0,0.2); |
yfkwok | 15:a65444eb1194 | 246 | wait(1.0); |
yfkwok | 15:a65444eb1194 | 247 | } |
yfkwok | 15:a65444eb1194 | 248 | } |
yfkwok | 5:bc0691d02fd5 | 249 | currentGame = EXAM; |
yfkwok | 2:464c7e62d97d | 250 | break; |
yfkwok | 15:a65444eb1194 | 251 | |
yfkwok | 15:a65444eb1194 | 252 | // Game loop for EXAM |
yfkwok | 2:464c7e62d97d | 253 | case EXAM: |
yfkwok | 5:bc0691d02fd5 | 254 | test.exam_title(pad, lcd); |
yfkwok | 5:bc0691d02fd5 | 255 | if(year == 0) {pass = test.exam_q_one(pad, lcd, score);} |
yfkwok | 5:bc0691d02fd5 | 256 | else if(year == 1) {pass = test.exam_q_two(pad, lcd, score);} |
yfkwok | 5:bc0691d02fd5 | 257 | else if(year == 2) {pass = test.exam_q_three(pad, lcd, score);} |
yfkwok | 5:bc0691d02fd5 | 258 | if(pass >= 2){ |
yfkwok | 5:bc0691d02fd5 | 259 | passed(); |
yfkwok | 5:bc0691d02fd5 | 260 | music.win(pad); |
yfkwok | 5:bc0691d02fd5 | 261 | wait(0.5); |
yfkwok | 12:71683453f66a | 262 | year++; |
yfkwok | 5:bc0691d02fd5 | 263 | if(year == 1){currentGame = YEAR_2;} |
yfkwok | 5:bc0691d02fd5 | 264 | else if(year == 2){currentGame = YEAR_3;} |
yfkwok | 5:bc0691d02fd5 | 265 | else if(year == 3){currentGame = GRADUATION;} |
yfkwok | 5:bc0691d02fd5 | 266 | } |
yfkwok | 5:bc0691d02fd5 | 267 | else { |
yfkwok | 5:bc0691d02fd5 | 268 | failed(); |
yfkwok | 5:bc0691d02fd5 | 269 | pad.tone(750.0,0.2); |
yfkwok | 5:bc0691d02fd5 | 270 | wait(0.5); |
yfkwok | 5:bc0691d02fd5 | 271 | pad.tone(750.0,0.2); |
yfkwok | 5:bc0691d02fd5 | 272 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 273 | if(year == 0){currentGame = YEAR_1;} |
yfkwok | 5:bc0691d02fd5 | 274 | else if(year == 1){ |
yfkwok | 5:bc0691d02fd5 | 275 | if(select == 1){currentGame = SQUIRTLE;} |
yfkwok | 5:bc0691d02fd5 | 276 | else if(select == 0){currentGame = BULBASAUR;} |
yfkwok | 5:bc0691d02fd5 | 277 | else if(select == 2){currentGame = CHARMANDER;} |
yfkwok | 5:bc0691d02fd5 | 278 | } |
yfkwok | 5:bc0691d02fd5 | 279 | else if(year == 2){ |
yfkwok | 5:bc0691d02fd5 | 280 | if(select == 1){currentGame = SQUIRTLE;} |
yfkwok | 5:bc0691d02fd5 | 281 | else if(select == 0){currentGame = BULBASAUR;} |
yfkwok | 5:bc0691d02fd5 | 282 | else if(select == 2){currentGame = CHARMANDER;} |
yfkwok | 5:bc0691d02fd5 | 283 | } |
yfkwok | 5:bc0691d02fd5 | 284 | } |
yfkwok | 2:464c7e62d97d | 285 | break; |
yfkwok | 2:464c7e62d97d | 286 | case YEAR_2: |
yfkwok | 2:464c7e62d97d | 287 | year_two(); |
yfkwok | 2:464c7e62d97d | 288 | year_two_set(); |
yfkwok | 4:5bc9c4363d31 | 289 | if(select == 1){ |
yfkwok | 4:5bc9c4363d31 | 290 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 291 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 292 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 293 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 294 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 295 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 296 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 297 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 298 | } |
yfkwok | 4:5bc9c4363d31 | 299 | currentGame = SQUIRTLE; |
yfkwok | 4:5bc9c4363d31 | 300 | } |
yfkwok | 4:5bc9c4363d31 | 301 | else if(select == 0){ |
yfkwok | 4:5bc9c4363d31 | 302 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 303 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 304 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 305 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 306 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 307 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 308 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 309 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 310 | } |
yfkwok | 15:a65444eb1194 | 311 | currentGame = BULBASAUR; |
yfkwok | 15:a65444eb1194 | 312 | } |
yfkwok | 4:5bc9c4363d31 | 313 | else if(select == 2){ |
yfkwok | 4:5bc9c4363d31 | 314 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 315 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 316 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 317 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 318 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 319 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 320 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 321 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 322 | } |
yfkwok | 15:a65444eb1194 | 323 | currentGame = CHARMANDER; |
yfkwok | 15:a65444eb1194 | 324 | } |
yfkwok | 2:464c7e62d97d | 325 | break; |
yfkwok | 2:464c7e62d97d | 326 | case YEAR_3: |
yfkwok | 2:464c7e62d97d | 327 | year_three(); |
yfkwok | 2:464c7e62d97d | 328 | year_three_set(); |
yfkwok | 4:5bc9c4363d31 | 329 | if(select == 1){ |
yfkwok | 4:5bc9c4363d31 | 330 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 331 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 332 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 333 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 334 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 335 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 336 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 337 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 338 | } |
yfkwok | 4:5bc9c4363d31 | 339 | currentGame = SQUIRTLE; |
yfkwok | 4:5bc9c4363d31 | 340 | } |
yfkwok | 4:5bc9c4363d31 | 341 | else if(select == 0){ |
yfkwok | 4:5bc9c4363d31 | 342 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 343 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 344 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 345 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 346 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 347 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 348 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 349 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 350 | } |
yfkwok | 15:a65444eb1194 | 351 | currentGame = BULBASAUR; |
yfkwok | 15:a65444eb1194 | 352 | } |
yfkwok | 4:5bc9c4363d31 | 353 | else if(select == 2){ |
yfkwok | 4:5bc9c4363d31 | 354 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 355 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 356 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 357 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 358 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 359 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 360 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 361 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 362 | } |
yfkwok | 15:a65444eb1194 | 363 | currentGame = CHARMANDER; |
yfkwok | 15:a65444eb1194 | 364 | } |
yfkwok | 2:464c7e62d97d | 365 | break; |
yfkwok | 2:464c7e62d97d | 366 | case GRADUATION: |
yfkwok | 2:464c7e62d97d | 367 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 368 | lcd.printString("GRADUATION!",0,0); |
yfkwok | 2:464c7e62d97d | 369 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 370 | wait(2.0); |
yfkwok | 2:464c7e62d97d | 371 | break; |
yfkwok | 2:464c7e62d97d | 372 | } |
yfkwok | 2:464c7e62d97d | 373 | } |
yfkwok | 2:464c7e62d97d | 374 | } |
yfkwok | 2:464c7e62d97d | 375 | break; |
yfkwok | 2:464c7e62d97d | 376 | |
yfkwok | 2:464c7e62d97d | 377 | case INSTRUCTION: |
yfkwok | 2:464c7e62d97d | 378 | instruction(); |
yfkwok | 2:464c7e62d97d | 379 | currentState = MENU; |
yfkwok | 2:464c7e62d97d | 380 | break; |
yfkwok | 2:464c7e62d97d | 381 | } |
yfkwok | 1:61b67654ffb7 | 382 | } |
yfkwok | 1:61b67654ffb7 | 383 | } |
yfkwok | 1:61b67654ffb7 | 384 | |
yfkwok | 1:61b67654ffb7 | 385 | // initialies all classes and libraries |
yfkwok | 1:61b67654ffb7 | 386 | void init() |
yfkwok | 1:61b67654ffb7 | 387 | { |
yfkwok | 1:61b67654ffb7 | 388 | lcd.init(); |
yfkwok | 2:464c7e62d97d | 389 | pad.init(); |
yfkwok | 1:61b67654ffb7 | 390 | // change set contrast in range 0.0 to 1.0 |
yfkwok | 1:61b67654ffb7 | 391 | // 0.4 appears to be a good starting point |
yfkwok | 12:71683453f66a | 392 | lcd.setContrast(0.5); |
yfkwok | 1:61b67654ffb7 | 393 | } |
yfkwok | 1:61b67654ffb7 | 394 | |
yfkwok | 1:61b67654ffb7 | 395 | // simple splash screen displayed on start-up |
yfkwok | 1:61b67654ffb7 | 396 | void welcome() |
yfkwok | 1:61b67654ffb7 | 397 | { |
yfkwok | 2:464c7e62d97d | 398 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 399 | int title_data[35][65] = { |
yfkwok | 11:5a6b9dffd78a | 400 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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}, |
yfkwok | 11:5a6b9dffd78a | 401 | {0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0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 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
yfkwok | 1:61b67654ffb7 | 435 | }; |
yfkwok | 1:61b67654ffb7 | 436 | |
yfkwok | 11:5a6b9dffd78a | 437 | lcd.drawSprite(10, 3, 35, 65, (int*)title_data); |
yfkwok | 1:61b67654ffb7 | 438 | |
yfkwok | 11:5a6b9dffd78a | 439 | int start_data[5][41] = { |
yfkwok | 11:5a6b9dffd78a | 440 | {1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1}, |
yfkwok | 11:5a6b9dffd78a | 441 | {1,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,1,0,1,0,1,0,0,1,0}, |
yfkwok | 11:5a6b9dffd78a | 442 | {1,1,1,0,1,1,1,0,1,1,1,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,1,0,0,1,0}, |
yfkwok | 11:5a6b9dffd78a | 443 | {1,0,0,0,1,1,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,1,0,1,0,1,1,0,0,0,1,0}, |
yfkwok | 11:5a6b9dffd78a | 444 | {1,0,0,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,1,0,0,1,0,1,0,1,0,1,0,0,1,0}, |
yfkwok | 1:61b67654ffb7 | 445 | }; |
yfkwok | 1:61b67654ffb7 | 446 | |
yfkwok | 11:5a6b9dffd78a | 447 | lcd.drawSprite(22, 41, 5, 41, (int*)start_data); |
yfkwok | 2:464c7e62d97d | 448 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 449 | music.title_music(pad); |
yfkwok | 2:464c7e62d97d | 450 | |
yfkwok | 2:464c7e62d97d | 451 | } |
yfkwok | 2:464c7e62d97d | 452 | |
yfkwok | 2:464c7e62d97d | 453 | int menu() |
yfkwok | 2:464c7e62d97d | 454 | { |
yfkwok | 2:464c7e62d97d | 455 | // clear screen, re-draw and refresh |
yfkwok | 2:464c7e62d97d | 456 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 457 | pad.init(); |
yfkwok | 2:464c7e62d97d | 458 | int pos_y = 5; |
yfkwok | 2:464c7e62d97d | 459 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 2:464c7e62d97d | 460 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 461 | if(pad.get_direction() == N){ |
yfkwok | 2:464c7e62d97d | 462 | pos_y = 5; |
yfkwok | 2:464c7e62d97d | 463 | }else if(pad.get_direction() == S){ |
yfkwok | 2:464c7e62d97d | 464 | pos_y = 16; |
yfkwok | 1:61b67654ffb7 | 465 | } |
yfkwok | 11:5a6b9dffd78a | 466 | int arrow_data[7][5] = { |
yfkwok | 11:5a6b9dffd78a | 467 | {1,1,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 468 | {0,1,1,0,0}, |
yfkwok | 11:5a6b9dffd78a | 469 | {0,0,1,1,0}, |
yfkwok | 11:5a6b9dffd78a | 470 | {0,0,0,1,1}, |
yfkwok | 11:5a6b9dffd78a | 471 | {0,0,1,1,0}, |
yfkwok | 11:5a6b9dffd78a | 472 | {0,1,1,0,0}, |
yfkwok | 11:5a6b9dffd78a | 473 | {1,1,0,0,0}, |
yfkwok | 2:464c7e62d97d | 474 | }; |
yfkwok | 11:5a6b9dffd78a | 475 | lcd.drawSprite(5, pos_y, 7, 5, (int *)arrow_data); |
yfkwok | 2:464c7e62d97d | 476 | |
yfkwok | 10:adff3c804985 | 477 | int op_one_data[7][26] = { |
yfkwok | 10:adff3c804985 | 478 | {1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1}, |
yfkwok | 10:adff3c804985 | 479 | {1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0}, |
yfkwok | 10:adff3c804985 | 480 | {1,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0}, |
yfkwok | 10:adff3c804985 | 481 | {1,1,1,1,0,0,0,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,0,0}, |
yfkwok | 10:adff3c804985 | 482 | {0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0}, |
yfkwok | 10:adff3c804985 | 483 | {0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0}, |
yfkwok | 10:adff3c804985 | 484 | {1,1,1,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0}, |
yfkwok | 2:464c7e62d97d | 485 | }; |
yfkwok | 10:adff3c804985 | 486 | lcd.drawSprite(18, 5, 7, 26, (int *)op_one_data); |
yfkwok | 2:464c7e62d97d | 487 | |
yfkwok | 10:adff3c804985 | 488 | int op_two_data[7][18] = { |
yfkwok | 10:adff3c804985 | 489 | {1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1}, |
yfkwok | 10:adff3c804985 | 490 | {0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 491 | {0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 492 | {0,1,0,0,1,0,0,1,0,1,1,1,0,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 493 | {0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 494 | {0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 495 | {1,1,1,0,1,0,0,1,0,1,0,0,0,0,1,1,1,1}, |
yfkwok | 2:464c7e62d97d | 496 | }; |
yfkwok | 10:adff3c804985 | 497 | lcd.drawSprite(18, 16, 7, 18, (int*) op_two_data); |
yfkwok | 2:464c7e62d97d | 498 | |
yfkwok | 11:5a6b9dffd78a | 499 | int instruct_data[7][75] = { |
yfkwok | 11:5a6b9dffd78a | 500 | {1,1,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,1,1,1,1,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 501 | {1,0,0,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,1,0,0,1,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 502 | {1,0,0,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,0,0,1,0,0,1,0,0,0,0,1,1,1,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,0}, |
yfkwok | 11:5a6b9dffd78a | 503 | {1,1,1,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 504 | {1,0,0,0,0,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,1,1,1,1,0,1,0,0,0,0,1,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 505 | {1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1,0,1,0,0,1}, |
yfkwok | 11:5a6b9dffd78a | 506 | {1,0,0,0,0,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,0,0,1,0,0,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1}, |
yfkwok | 2:464c7e62d97d | 507 | }; |
yfkwok | 11:5a6b9dffd78a | 508 | lcd.drawSprite(5, 38, 7, 75,(int *) instruct_data); |
yfkwok | 1:61b67654ffb7 | 509 | lcd.refresh(); |
yfkwok | 1:61b67654ffb7 | 510 | |
yfkwok | 2:464c7e62d97d | 511 | } |
yfkwok | 2:464c7e62d97d | 512 | |
yfkwok | 2:464c7e62d97d | 513 | //return value for which menu option is currently selected |
yfkwok | 2:464c7e62d97d | 514 | int op = 0; |
yfkwok | 2:464c7e62d97d | 515 | if(pos_y == 5){op = 0;} |
yfkwok | 2:464c7e62d97d | 516 | else if(pos_y == 16){op = 1;} |
yfkwok | 2:464c7e62d97d | 517 | |
yfkwok | 2:464c7e62d97d | 518 | //return value for which menu option is currently selected |
yfkwok | 2:464c7e62d97d | 519 | return op; |
yfkwok | 2:464c7e62d97d | 520 | |
yfkwok | 2:464c7e62d97d | 521 | } |
yfkwok | 2:464c7e62d97d | 522 | |
yfkwok | 2:464c7e62d97d | 523 | void year_one() |
yfkwok | 2:464c7e62d97d | 524 | { |
yfkwok | 2:464c7e62d97d | 525 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 526 | int instruct_data[30][78] = { |
yfkwok | 11:5a6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,0,0,0,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 555 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 556 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
yfkwok | 2:464c7e62d97d | 557 | }; |
yfkwok | 11:5a6b9dffd78a | 558 | lcd.drawSprite(4, 9, 30, 78,(int *) instruct_data); |
yfkwok | 2:464c7e62d97d | 559 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 560 | |
yfkwok | 2:464c7e62d97d | 561 | music.level_up(pad); |
yfkwok | 2:464c7e62d97d | 562 | |
yfkwok | 2:464c7e62d97d | 563 | wait(1.0); |
yfkwok | 2:464c7e62d97d | 564 | } |
yfkwok | 2:464c7e62d97d | 565 | |
yfkwok | 2:464c7e62d97d | 566 | void year_one_set() |
yfkwok | 2:464c7e62d97d | 567 | { |
yfkwok | 5:bc0691d02fd5 | 568 | game_1_speed = 9; |
yfkwok | 2:464c7e62d97d | 569 | game_1_cha = 1; |
yfkwok | 5:bc0691d02fd5 | 570 | game_1_r = 5; |
yfkwok | 15:a65444eb1194 | 571 | game_2_speed = 5; |
yfkwok | 15:a65444eb1194 | 572 | game_2_cha = 1; |
yfkwok | 15:a65444eb1194 | 573 | game_2_r = 6; |
yfkwok | 2:464c7e62d97d | 574 | } |
yfkwok | 2:464c7e62d97d | 575 | |
yfkwok | 2:464c7e62d97d | 576 | void year_two() |
yfkwok | 2:464c7e62d97d | 577 | { |
yfkwok | 2:464c7e62d97d | 578 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 579 | int year_two_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 580 | {1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
yfkwok | 11:5a6b9dffd78a | 581 | {1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
yfkwok | 11:5a6b9dffd78a | 582 | {1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,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,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, |
yfkwok | 11:5a6b9dffd78a | 583 | {1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,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,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, |
yfkwok | 11:5a6b9dffd78a | 584 | {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, |
yfkwok | 11:5a6b9dffd78a | 585 | {1,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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}, |
yfkwok | 11:5a6b9dffd78a | 608 | {0,0,0,0,0,0,0,0,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,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}, |
yfkwok | 11:5a6b9dffd78a | 609 | {0,0,0,0,0,0,0,0,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,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}, |
yfkwok | 2:464c7e62d97d | 610 | }; |
yfkwok | 11:5a6b9dffd78a | 611 | lcd.drawSprite(4, 9, 30, 78, (int *)year_two_data); |
yfkwok | 2:464c7e62d97d | 612 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 613 | |
yfkwok | 2:464c7e62d97d | 614 | music.level_up(pad); |
yfkwok | 2:464c7e62d97d | 615 | |
yfkwok | 2:464c7e62d97d | 616 | wait(1.0); |
yfkwok | 2:464c7e62d97d | 617 | } |
yfkwok | 2:464c7e62d97d | 618 | |
yfkwok | 2:464c7e62d97d | 619 | void year_two_set() |
yfkwok | 2:464c7e62d97d | 620 | { |
yfkwok | 5:bc0691d02fd5 | 621 | game_1_speed = 12; |
yfkwok | 2:464c7e62d97d | 622 | game_1_cha = 2; |
yfkwok | 5:bc0691d02fd5 | 623 | game_1_r = 3; |
yfkwok | 15:a65444eb1194 | 624 | game_2_speed = 6; |
yfkwok | 15:a65444eb1194 | 625 | game_2_cha = 2; |
yfkwok | 15:a65444eb1194 | 626 | game_2_r = 5; |
yfkwok | 2:464c7e62d97d | 627 | } |
yfkwok | 2:464c7e62d97d | 628 | |
yfkwok | 2:464c7e62d97d | 629 | void year_three() |
yfkwok | 2:464c7e62d97d | 630 | { |
yfkwok | 2:464c7e62d97d | 631 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 632 | int year_three_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 633 | {1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
yfkwok | 11:5a6b9dffd78a | 634 | {1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
yfkwok | 11:5a6b9dffd78a | 635 | {1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,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,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, |
yfkwok | 11:5a6b9dffd78a | 636 | {1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,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,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, |
yfkwok | 11:5a6b9dffd78a | 637 | {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0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,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 660 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 661 | {0,0,0,0,0,0,0,0,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,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}, |
yfkwok | 11:5a6b9dffd78a | 662 | {0,0,0,0,0,0,0,0,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,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}, |
yfkwok | 2:464c7e62d97d | 663 | }; |
yfkwok | 11:5a6b9dffd78a | 664 | lcd.drawSprite(4, 9, 30, 78,(int*) year_three_data); |
yfkwok | 2:464c7e62d97d | 665 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 666 | |
yfkwok | 2:464c7e62d97d | 667 | music.level_up(pad); |
yfkwok | 2:464c7e62d97d | 668 | |
yfkwok | 2:464c7e62d97d | 669 | wait(1.0); |
yfkwok | 2:464c7e62d97d | 670 | } |
yfkwok | 2:464c7e62d97d | 671 | |
yfkwok | 2:464c7e62d97d | 672 | void year_three_set() |
yfkwok | 2:464c7e62d97d | 673 | { |
yfkwok | 5:bc0691d02fd5 | 674 | game_1_speed = 14; |
yfkwok | 2:464c7e62d97d | 675 | game_1_cha = 3; |
yfkwok | 5:bc0691d02fd5 | 676 | game_1_r = 2; |
yfkwok | 15:a65444eb1194 | 677 | game_2_speed = 7; |
yfkwok | 15:a65444eb1194 | 678 | game_2_cha = 3; |
yfkwok | 15:a65444eb1194 | 679 | game_2_r = 3; |
yfkwok | 2:464c7e62d97d | 680 | } |
yfkwok | 2:464c7e62d97d | 681 | |
yfkwok | 2:464c7e62d97d | 682 | void instruction() |
yfkwok | 2:464c7e62d97d | 683 | { |
yfkwok | 2:464c7e62d97d | 684 | Page currentPage = PAGE_1; |
yfkwok | 2:464c7e62d97d | 685 | int fps = 8.0; |
yfkwok | 2:464c7e62d97d | 686 | static int instruct_data[] = { |
yfkwok | 2:464c7e62d97d | 687 | 1,1,1,1,1,1,1, |
yfkwok | 2:464c7e62d97d | 688 | 0,1,1,1,1,1,0, |
yfkwok | 2:464c7e62d97d | 689 | 0,0,1,1,1,0,0, |
yfkwok | 2:464c7e62d97d | 690 | 0,0,0,1,0,0,0 |
yfkwok | 2:464c7e62d97d | 691 | }; |
yfkwok | 2:464c7e62d97d | 692 | |
yfkwok | 2:464c7e62d97d | 693 | while(pad.check_event(Gamepad::BACK_PRESSED) == false){ |
yfkwok | 2:464c7e62d97d | 694 | switch (currentPage) { |
yfkwok | 2:464c7e62d97d | 695 | case PAGE_1: |
yfkwok | 2:464c7e62d97d | 696 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 697 | lcd.printString("PKM Academy",0,0); |
yfkwok | 2:464c7e62d97d | 698 | lcd.printString("is an RPG",0,1); |
yfkwok | 2:464c7e62d97d | 699 | lcd.printString("which simulates",0,2); |
yfkwok | 2:464c7e62d97d | 700 | lcd.printString("the mundane",0,3); |
yfkwok | 2:464c7e62d97d | 701 | lcd.printString("life of three",0,4); |
yfkwok | 2:464c7e62d97d | 702 | lcd.drawSprite(39, 44, 4, 7, instruct_data); |
yfkwok | 2:464c7e62d97d | 703 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 704 | if(pad.get_direction() == S){currentPage = PAGE_2;} |
yfkwok | 2:464c7e62d97d | 705 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 706 | break; |
yfkwok | 2:464c7e62d97d | 707 | case PAGE_2: |
yfkwok | 2:464c7e62d97d | 708 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 709 | lcd.printString("uni students.",0,0); |
yfkwok | 2:464c7e62d97d | 710 | lcd.printString("Explore and",0,1); |
yfkwok | 2:464c7e62d97d | 711 | lcd.printString("conquer all",0,2); |
yfkwok | 2:464c7e62d97d | 712 | lcd.printString("challenges uni",0,3); |
yfkwok | 2:464c7e62d97d | 713 | lcd.printString("brings forth.",0,4); |
yfkwok | 2:464c7e62d97d | 714 | lcd.drawSprite(39, 44, 4, 7, instruct_data); |
yfkwok | 2:464c7e62d97d | 715 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 716 | if(pad.get_direction() == S){currentPage = PAGE_3;} |
yfkwok | 2:464c7e62d97d | 717 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 718 | break; |
yfkwok | 2:464c7e62d97d | 719 | case PAGE_3: |
yfkwok | 2:464c7e62d97d | 720 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 721 | lcd.printString("Ride with them",0,0); |
yfkwok | 2:464c7e62d97d | 722 | lcd.printString("the life of",0,1); |
yfkwok | 2:464c7e62d97d | 723 | lcd.printString("frustration,",0,2); |
yfkwok | 2:464c7e62d97d | 724 | lcd.printString("anger and ",0,3); |
yfkwok | 2:464c7e62d97d | 725 | lcd.printString("despair! ",0,4); |
yfkwok | 2:464c7e62d97d | 726 | lcd.printString("Press BACK",12,5); |
yfkwok | 2:464c7e62d97d | 727 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 728 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 729 | break; |
yfkwok | 2:464c7e62d97d | 730 | } |
yfkwok | 2:464c7e62d97d | 731 | } |
yfkwok | 5:bc0691d02fd5 | 732 | } |
yfkwok | 5:bc0691d02fd5 | 733 | |
yfkwok | 5:bc0691d02fd5 | 734 | void term_one() |
yfkwok | 5:bc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0,0,0,0,0,0,0,0,0,0,0,0,0,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}, |
yfkwok | 11:5a6b9dffd78a | 766 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 767 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
yfkwok | 5:bc0691d02fd5 | 768 | |
yfkwok | 5:bc0691d02fd5 | 769 | }; |
yfkwok | 11:5a6b9dffd78a | 770 | lcd.drawSprite(4, 9, 30, 78, (int *) term_data); |
yfkwok | 5:bc0691d02fd5 | 771 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 772 | |
yfkwok | 5:bc0691d02fd5 | 773 | music.level_up(pad); |
yfkwok | 5:bc0691d02fd5 | 774 | |
yfkwok | 5:bc0691d02fd5 | 775 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 776 | } |
yfkwok | 5:bc0691d02fd5 | 777 | |
yfkwok | 5:bc0691d02fd5 | 778 | void term_two() |
yfkwok | 5:bc0691d02fd5 | 779 | { |
yfkwok | 5:bc0691d02fd5 | 780 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 781 | int term_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 782 | {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,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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,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}, |
yfkwok | 11:5a6b9dffd78a | 811 | {0,0,0,0,0,0,0,0,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,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}, |
yfkwok | 11:5a6b9dffd78a | 812 | |
yfkwok | 5:bc0691d02fd5 | 813 | }; |
yfkwok | 11:5a6b9dffd78a | 814 | lcd.drawSprite(4, 9, 30, 78,(int *) term_data); |
yfkwok | 5:bc0691d02fd5 | 815 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 816 | |
yfkwok | 5:bc0691d02fd5 | 817 | music.level_up(pad); |
yfkwok | 5:bc0691d02fd5 | 818 | |
yfkwok | 5:bc0691d02fd5 | 819 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 820 | } |
yfkwok | 5:bc0691d02fd5 | 821 | |
yfkwok | 5:bc0691d02fd5 | 822 | void term_three() |
yfkwok | 5:bc0691d02fd5 | 823 | { |
yfkwok | 5:bc0691d02fd5 | 824 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 825 | int term_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 826 | {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
yfkwok | 11:5a6b9dffd78a | 827 | {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,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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,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}, |
yfkwok | 11:5a6b9dffd78a | 856 | |
yfkwok | 5:bc0691d02fd5 | 857 | }; |
yfkwok | 11:5a6b9dffd78a | 858 | lcd.drawSprite(4, 9, 30, 78,(int *) term_data); |
yfkwok | 5:bc0691d02fd5 | 859 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 860 | |
yfkwok | 5:bc0691d02fd5 | 861 | music.level_up(pad); |
yfkwok | 5:bc0691d02fd5 | 862 | |
yfkwok | 5:bc0691d02fd5 | 863 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 864 | } |
yfkwok | 5:bc0691d02fd5 | 865 | |
yfkwok | 5:bc0691d02fd5 | 866 | void win() |
yfkwok | 5:bc0691d02fd5 | 867 | { |
yfkwok | 11:5a6b9dffd78a | 868 | int instruct_data[22][63] = { |
yfkwok | 11:5a6b9dffd78a | 869 | {1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 870 | {1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 871 | {1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a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0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1}, |
yfkwok | 11:5a6b9dffd78a | 886 | {1,1,1,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1}, |
yfkwok | 11:5a6b9dffd78a | 887 | {1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1}, |
yfkwok | 11:5a6b9dffd78a | 888 | {1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1}, |
yfkwok | 11:5a6b9dffd78a | 889 | {0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
yfkwok | 11:5a6b9dffd78a | 890 | {0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0}, |
yfkwok | 5:bc0691d02fd5 | 891 | }; |
yfkwok | 5:bc0691d02fd5 | 892 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 893 | lcd.drawSprite(10, 13, 22, 63, (int *)instruct_data); |
yfkwok | 5:bc0691d02fd5 | 894 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 895 | } |
yfkwok | 5:bc0691d02fd5 | 896 | |
yfkwok | 5:bc0691d02fd5 | 897 | void lose() |
yfkwok | 5:bc0691d02fd5 | 898 | { |
yfkwok | 11:5a6b9dffd78a | 899 | int instruct_data[22][58] = { |
yfkwok | 11:5a6b9dffd78a | 900 | {1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 901 | {1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,0,1,1,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 902 | {1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,0,1,1,0,0,1,1,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 903 | {1,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,0,0,1,0,0,1,1,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 904 | {1,0,0,1,0,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,0,0,0,0,1,1,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 905 | {1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,1,1,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 906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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
yfkwok | 11:5a6b9dffd78a | 921 | {0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
yfkwok | 5:bc0691d02fd5 | 922 | }; |
yfkwok | 5:bc0691d02fd5 | 923 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 924 | lcd.drawSprite(10, 13, 22, 58,(int *) instruct_data); |
yfkwok | 5:bc0691d02fd5 | 925 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 926 | } |
yfkwok | 5:bc0691d02fd5 | 927 | |
yfkwok | 5:bc0691d02fd5 | 928 | void passed() |
yfkwok | 5:bc0691d02fd5 | 929 | { |
yfkwok | 11:5a6b9dffd78a | 930 | int instruct_data[10][83] = { |
yfkwok | 11:5a6b9dffd78a | 931 | {1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 932 | {1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,0,1,0,0,1,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0}, |
yfkwok | 11:5a6b9dffd78a | 933 | {1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,0,0,1,0,0,1,1,1,0,0,1,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1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,0}, |
yfkwok | 11:5a6b9dffd78a | 939 | {0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0}, |
yfkwok | 11:5a6b9dffd78a | 940 | {0,0,0,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0}, |
yfkwok | 5:bc0691d02fd5 | 941 | }; |
yfkwok | 5:bc0691d02fd5 | 942 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 943 | lcd.drawSprite(0, 19, 10, 83, (int *) instruct_data); |
yfkwok | 5:bc0691d02fd5 | 944 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 945 | } |
yfkwok | 5:bc0691d02fd5 | 946 | |
yfkwok | 5:bc0691d02fd5 | 947 | void failed() |
yfkwok | 5:bc0691d02fd5 | 948 | { |
yfkwok | 11:5a6b9dffd78a | 949 | int instruct_data[10][77] = { |
yfkwok | 11:5a6b9dffd78a | 950 | {1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 951 | {1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0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,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,1,0,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,0}, |
yfkwok | 11:5a6b9dffd78a | 958 | {0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0}, |
yfkwok | 11:5a6b9dffd78a | 959 | {0,0,0,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0}, |
yfkwok | 5:bc0691d02fd5 | 960 | }; |
yfkwok | 5:bc0691d02fd5 | 961 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 962 | lcd.drawSprite(4, 19, 10, 77, (int *)instruct_data); |
yfkwok | 5:bc0691d02fd5 | 963 | lcd.refresh(); |
yfkwok | 1:61b67654ffb7 | 964 | } |