![](/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@28:a6726a3f8e6d, 2019-05-06 (annotated)
- Committer:
- yfkwok
- Date:
- Mon May 06 02:42:34 2019 +0000
- Revision:
- 28:a6726a3f8e6d
- Parent:
- 27:4bcdfb212467
- Child:
- 29:75a05e9f0e8d
06/05/2019 - Game 3 completed, game and exam difficulty adjusted
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 | 27:4bcdfb212467 | 18 | #include "Game_three.h" |
yfkwok | 5:bc0691d02fd5 | 19 | #include "Exam.h" |
yfkwok | 13:02002658e718 | 20 | #include "FXOS8700CQ.h" |
yfkwok | 23:4a070960817a | 21 | #include "rtos.h" |
yfkwok | 1:61b67654ffb7 | 22 | |
yfkwok | 1:61b67654ffb7 | 23 | /////////////// objects /////////////// |
yfkwok | 1:61b67654ffb7 | 24 | N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); // K64F - pwr from 3V3 |
yfkwok | 1:61b67654ffb7 | 25 | Gamepad pad; |
yfkwok | 2:464c7e62d97d | 26 | Score music; |
yfkwok | 2:464c7e62d97d | 27 | Start start; |
yfkwok | 2:464c7e62d97d | 28 | Game_one game_1; |
yfkwok | 15:a65444eb1194 | 29 | Game_two game_2; |
yfkwok | 27:4bcdfb212467 | 30 | Game_three game_3; |
yfkwok | 5:bc0691d02fd5 | 31 | Exam test; |
yfkwok | 23:4a070960817a | 32 | Thread thread; |
yfkwok | 13:02002658e718 | 33 | // I2C connection for FXOS8700CQ accelerometer/magnetometer |
yfkwok | 15:a65444eb1194 | 34 | FXOS8700CQ device(I2C_SDA,I2C_SCL); // PTE25/PTE24 |
yfkwok | 1:61b67654ffb7 | 35 | |
yfkwok | 1:61b67654ffb7 | 36 | ///////////// prototypes /////////////// |
yfkwok | 1:61b67654ffb7 | 37 | void init(); |
yfkwok | 1:61b67654ffb7 | 38 | void welcome(); |
yfkwok | 2:464c7e62d97d | 39 | int menu(); |
yfkwok | 2:464c7e62d97d | 40 | void year_one(); |
yfkwok | 2:464c7e62d97d | 41 | void year_one_set(); |
yfkwok | 2:464c7e62d97d | 42 | void year_two(); |
yfkwok | 2:464c7e62d97d | 43 | void year_two_set(); |
yfkwok | 2:464c7e62d97d | 44 | void year_three(); |
yfkwok | 2:464c7e62d97d | 45 | void year_three_set(); |
yfkwok | 2:464c7e62d97d | 46 | void instruction(); |
yfkwok | 5:bc0691d02fd5 | 47 | void term_one(); |
yfkwok | 5:bc0691d02fd5 | 48 | void term_two(); |
yfkwok | 5:bc0691d02fd5 | 49 | void term_three(); |
yfkwok | 5:bc0691d02fd5 | 50 | void win(); |
yfkwok | 5:bc0691d02fd5 | 51 | void lose(); |
yfkwok | 5:bc0691d02fd5 | 52 | void passed(); |
yfkwok | 5:bc0691d02fd5 | 53 | void failed(); |
yfkwok | 23:4a070960817a | 54 | void gym(); |
yfkwok | 2:464c7e62d97d | 55 | |
yfkwok | 2:464c7e62d97d | 56 | //Starting states |
yfkwok | 2:464c7e62d97d | 57 | enum StartStates { |
yfkwok | 2:464c7e62d97d | 58 | TITLE, MENU, INSTRUCTION |
yfkwok | 2:464c7e62d97d | 59 | }; |
yfkwok | 2:464c7e62d97d | 60 | |
yfkwok | 2:464c7e62d97d | 61 | //Game states |
yfkwok | 2:464c7e62d97d | 62 | enum GameStates { |
yfkwok | 2:464c7e62d97d | 63 | YEAR_1, STARTER, BULBASAUR, SQUIRTLE, CHARMANDER, EXAM, YEAR_2, YEAR_3, GRADUATION |
yfkwok | 2:464c7e62d97d | 64 | }; |
yfkwok | 2:464c7e62d97d | 65 | |
yfkwok | 2:464c7e62d97d | 66 | //Enumerate instruction menu from page 1 - 3 |
yfkwok | 2:464c7e62d97d | 67 | enum Page { |
yfkwok | 2:464c7e62d97d | 68 | PAGE_1, PAGE_2, PAGE_3 |
yfkwok | 2:464c7e62d97d | 69 | }; |
yfkwok | 2:464c7e62d97d | 70 | |
yfkwok | 2:464c7e62d97d | 71 | //Global variables |
yfkwok | 2:464c7e62d97d | 72 | int score = 0; |
yfkwok | 2:464c7e62d97d | 73 | int game_1_speed = 0; |
yfkwok | 2:464c7e62d97d | 74 | int game_1_cha = 0; |
yfkwok | 2:464c7e62d97d | 75 | int game_1_r = 1; |
yfkwok | 15:a65444eb1194 | 76 | int game_2_speed = 0; |
yfkwok | 15:a65444eb1194 | 77 | int game_2_cha = 0; |
yfkwok | 15:a65444eb1194 | 78 | int game_2_r = 1; |
yfkwok | 27:4bcdfb212467 | 79 | int game_3_set = 1; |
yfkwok | 27:4bcdfb212467 | 80 | float game_3_time = 1.0; |
yfkwok | 2:464c7e62d97d | 81 | int select = 0; |
yfkwok | 2:464c7e62d97d | 82 | int year = 0; |
yfkwok | 5:bc0691d02fd5 | 83 | int pass = 0; |
yfkwok | 23:4a070960817a | 84 | volatile bool finished = false; |
yfkwok | 1:61b67654ffb7 | 85 | |
yfkwok | 1:61b67654ffb7 | 86 | ///////////// functions //////////////// |
yfkwok | 1:61b67654ffb7 | 87 | int main(){ |
yfkwok | 1:61b67654ffb7 | 88 | |
yfkwok | 2:464c7e62d97d | 89 | // Initialise parameters |
yfkwok | 1:61b67654ffb7 | 90 | int fps = 8; // frames per second |
yfkwok | 1:61b67654ffb7 | 91 | |
yfkwok | 1:61b67654ffb7 | 92 | init(); // initialise and then display welcome screen... |
yfkwok | 2:464c7e62d97d | 93 | StartStates currentState = TITLE; |
yfkwok | 2:464c7e62d97d | 94 | GameStates currentGame = YEAR_1; |
yfkwok | 1:61b67654ffb7 | 95 | |
yfkwok | 2:464c7e62d97d | 96 | while(1){ |
yfkwok | 2:464c7e62d97d | 97 | switch (currentState) { |
yfkwok | 2:464c7e62d97d | 98 | case TITLE: |
yfkwok | 26:c60becf3f840 | 99 | // 1. Display title screen and play title music |
yfkwok | 26:c60becf3f840 | 100 | // 2. Proceed to Start screen by pressing start |
yfkwok | 26:c60becf3f840 | 101 | |
yfkwok | 2:464c7e62d97d | 102 | welcome(); |
yfkwok | 2:464c7e62d97d | 103 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 104 | currentState = MENU; |
yfkwok | 2:464c7e62d97d | 105 | break; |
yfkwok | 1:61b67654ffb7 | 106 | |
yfkwok | 2:464c7e62d97d | 107 | case MENU: |
yfkwok | 26:c60becf3f840 | 108 | // 1. Display starting menu |
yfkwok | 26:c60becf3f840 | 109 | // 2. If Start is selected, initiate year 1 game state |
yfkwok | 26:c60becf3f840 | 110 | // 3. If Instruction is selected, give instruction |
yfkwok | 26:c60becf3f840 | 111 | |
yfkwok | 2:464c7e62d97d | 112 | int op = menu(); |
yfkwok | 2:464c7e62d97d | 113 | if (op == 1){currentState = INSTRUCTION;} |
yfkwok | 2:464c7e62d97d | 114 | else { |
yfkwok | 2:464c7e62d97d | 115 | while(1){ |
yfkwok | 2:464c7e62d97d | 116 | // Game loop |
yfkwok | 2:464c7e62d97d | 117 | switch (currentGame) { |
yfkwok | 2:464c7e62d97d | 118 | case YEAR_1: |
yfkwok | 2:464c7e62d97d | 119 | // 1. Initiate year 1 screen |
yfkwok | 15:a65444eb1194 | 120 | // 2. Set up the parameters for year 1 |
yfkwok | 26:c60becf3f840 | 121 | |
yfkwok | 2:464c7e62d97d | 122 | year_one(); |
yfkwok | 2:464c7e62d97d | 123 | year_one_set(); |
yfkwok | 2:464c7e62d97d | 124 | currentGame = STARTER; |
yfkwok | 2:464c7e62d97d | 125 | break; |
yfkwok | 15:a65444eb1194 | 126 | |
yfkwok | 2:464c7e62d97d | 127 | case STARTER: |
yfkwok | 15:a65444eb1194 | 128 | // 1. Provide selection screen for starter pokemon to select which mini game to initiate |
yfkwok | 15:a65444eb1194 | 129 | // 2. Provide description for the mini game and pokemon |
yfkwok | 15:a65444eb1194 | 130 | // 3. Initiate the mini game according to the pokemon being selected |
yfkwok | 26:c60becf3f840 | 131 | |
yfkwok | 5:bc0691d02fd5 | 132 | select = 0; |
yfkwok | 5:bc0691d02fd5 | 133 | start.init(pad); |
yfkwok | 2:464c7e62d97d | 134 | start.starter_draw(lcd); |
yfkwok | 2:464c7e62d97d | 135 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 136 | while(pad.check_event(Gamepad::START_PRESSED) == false) |
yfkwok | 2:464c7e62d97d | 137 | { |
yfkwok | 2:464c7e62d97d | 138 | start.starter_update(pad); |
yfkwok | 2:464c7e62d97d | 139 | start.starter_draw(lcd); |
yfkwok | 2:464c7e62d97d | 140 | if(pad.check_event(Gamepad::A_PRESSED) == true){ |
yfkwok | 2:464c7e62d97d | 141 | select = start.get_select(start.update_select(pad)); |
yfkwok | 2:464c7e62d97d | 142 | start.intro(select, pad, lcd); |
yfkwok | 22:f8f36e88b2ca | 143 | pad.init_input(); |
yfkwok | 2:464c7e62d97d | 144 | } |
yfkwok | 2:464c7e62d97d | 145 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 146 | } |
yfkwok | 2:464c7e62d97d | 147 | select = start.get_select(start.update_select(pad)); |
yfkwok | 4:5bc9c4363d31 | 148 | if(select == 1){ |
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 | game_1.intro(pad, lcd); |
yfkwok | 4:5bc9c4363d31 | 159 | currentGame = SQUIRTLE; |
yfkwok | 22:f8f36e88b2ca | 160 | pad.init_input(); |
yfkwok | 4:5bc9c4363d31 | 161 | } |
yfkwok | 4:5bc9c4363d31 | 162 | else if(select == 0){ |
yfkwok | 4:5bc9c4363d31 | 163 | music.congrats(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 164 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 165 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 166 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 167 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 168 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 169 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 170 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 171 | } |
yfkwok | 22:f8f36e88b2ca | 172 | currentGame = BULBASAUR; |
yfkwok | 22:f8f36e88b2ca | 173 | pad.init_input(); |
yfkwok | 22:f8f36e88b2ca | 174 | } |
yfkwok | 4:5bc9c4363d31 | 175 | else if(select == 2){ |
yfkwok | 4:5bc9c4363d31 | 176 | music.congrats(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 177 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 178 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 179 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 180 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 181 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 182 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 183 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 184 | } |
yfkwok | 26:c60becf3f840 | 185 | game_2.intro(pad, lcd); |
yfkwok | 22:f8f36e88b2ca | 186 | currentGame = CHARMANDER; |
yfkwok | 22:f8f36e88b2ca | 187 | pad.init_input(); |
yfkwok | 22:f8f36e88b2ca | 188 | } |
yfkwok | 2:464c7e62d97d | 189 | break; |
yfkwok | 15:a65444eb1194 | 190 | |
yfkwok | 15:a65444eb1194 | 191 | // Game loop for Bulbasaur's mini game |
yfkwok | 2:464c7e62d97d | 192 | case BULBASAUR: |
yfkwok | 27:4bcdfb212467 | 193 | int i = 0; |
yfkwok | 27:4bcdfb212467 | 194 | score = 0; |
yfkwok | 27:4bcdfb212467 | 195 | while(i < 3){ |
yfkwok | 27:4bcdfb212467 | 196 | // Indicate for which term the current game is in |
yfkwok | 27:4bcdfb212467 | 197 | if(i == 0) {term_one();} |
yfkwok | 27:4bcdfb212467 | 198 | else if(i == 1) {term_two();} |
yfkwok | 27:4bcdfb212467 | 199 | else{term_three();} |
yfkwok | 27:4bcdfb212467 | 200 | int j = 0; |
yfkwok | 28:a6726a3f8e6d | 201 | game_3.init_para(); |
yfkwok | 27:4bcdfb212467 | 202 | while(j < 5){ |
yfkwok | 27:4bcdfb212467 | 203 | // Game loop for 5 rounds |
yfkwok | 28:a6726a3f8e6d | 204 | // Set the ratio between messages vs books |
yfkwok | 27:4bcdfb212467 | 205 | game_3.init(pad, game_3_set); |
yfkwok | 27:4bcdfb212467 | 206 | game_3.render(lcd, game_3_set); |
yfkwok | 28:a6726a3f8e6d | 207 | // Parameter to set the reaction time frame for varying difficulty |
yfkwok | 28:a6726a3f8e6d | 208 | wait(game_3_time); |
yfkwok | 27:4bcdfb212467 | 209 | game_3.read_input(pad); |
yfkwok | 27:4bcdfb212467 | 210 | game_3.update(pad, game_3_set); |
yfkwok | 27:4bcdfb212467 | 211 | j = game_3.get_count(); |
yfkwok | 27:4bcdfb212467 | 212 | } |
yfkwok | 27:4bcdfb212467 | 213 | i = i++; |
yfkwok | 27:4bcdfb212467 | 214 | // determine if win condition is met, return score to proceed to EXAM game loop |
yfkwok | 27:4bcdfb212467 | 215 | if(game_3.get_score() >= 4) { |
yfkwok | 27:4bcdfb212467 | 216 | win(); |
yfkwok | 27:4bcdfb212467 | 217 | music.win(pad); |
yfkwok | 27:4bcdfb212467 | 218 | wait(0.5); |
yfkwok | 27:4bcdfb212467 | 219 | score++; |
yfkwok | 27:4bcdfb212467 | 220 | } |
yfkwok | 27:4bcdfb212467 | 221 | else { |
yfkwok | 27:4bcdfb212467 | 222 | lose(); |
yfkwok | 27:4bcdfb212467 | 223 | pad.tone(750.0,0.2); |
yfkwok | 27:4bcdfb212467 | 224 | wait(0.5); |
yfkwok | 27:4bcdfb212467 | 225 | pad.tone(750.0,0.2); |
yfkwok | 27:4bcdfb212467 | 226 | wait(1.0); |
yfkwok | 27:4bcdfb212467 | 227 | } |
yfkwok | 27:4bcdfb212467 | 228 | } |
yfkwok | 5:bc0691d02fd5 | 229 | currentGame = EXAM; |
yfkwok | 2:464c7e62d97d | 230 | break; |
yfkwok | 15:a65444eb1194 | 231 | |
yfkwok | 15:a65444eb1194 | 232 | // Game loop for Squirtle's mini game |
yfkwok | 2:464c7e62d97d | 233 | case SQUIRTLE: |
yfkwok | 27:4bcdfb212467 | 234 | i = 0; |
yfkwok | 2:464c7e62d97d | 235 | score = 0; |
yfkwok | 2:464c7e62d97d | 236 | while(i < 3){ |
yfkwok | 15:a65444eb1194 | 237 | // Indicate for which term the current game is in |
yfkwok | 5:bc0691d02fd5 | 238 | if(i == 0) {term_one();} |
yfkwok | 5:bc0691d02fd5 | 239 | else if(i == 1) {term_two();} |
yfkwok | 5:bc0691d02fd5 | 240 | else{term_three();} |
yfkwok | 2:464c7e62d97d | 241 | game_1.init(game_1_speed, game_1_cha, game_1_r); |
yfkwok | 2:464c7e62d97d | 242 | int j = 0; |
yfkwok | 2:464c7e62d97d | 243 | while(j < 10){ |
yfkwok | 15:a65444eb1194 | 244 | // Game loop for 10 rounds |
yfkwok | 2:464c7e62d97d | 245 | game_1.read_input(pad); |
yfkwok | 2:464c7e62d97d | 246 | game_1.update(pad, lcd); |
yfkwok | 2:464c7e62d97d | 247 | game_1.render(lcd, game_1_cha); |
yfkwok | 2:464c7e62d97d | 248 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 249 | j = game_1.get_count(); |
yfkwok | 2:464c7e62d97d | 250 | } |
yfkwok | 2:464c7e62d97d | 251 | i = i++; |
yfkwok | 15:a65444eb1194 | 252 | // determine if win condition is met, return score to proceed to EXAM game loop |
yfkwok | 5:bc0691d02fd5 | 253 | if(game_1.print_scores(lcd) >= 8) { |
yfkwok | 5:bc0691d02fd5 | 254 | win(); |
yfkwok | 5:bc0691d02fd5 | 255 | music.win(pad); |
yfkwok | 5:bc0691d02fd5 | 256 | wait(0.5); |
yfkwok | 5:bc0691d02fd5 | 257 | score++; |
yfkwok | 5:bc0691d02fd5 | 258 | } |
yfkwok | 5:bc0691d02fd5 | 259 | else { |
yfkwok | 5:bc0691d02fd5 | 260 | lose(); |
yfkwok | 5:bc0691d02fd5 | 261 | pad.tone(750.0,0.2); |
yfkwok | 5:bc0691d02fd5 | 262 | wait(0.5); |
yfkwok | 5:bc0691d02fd5 | 263 | pad.tone(750.0,0.2); |
yfkwok | 5:bc0691d02fd5 | 264 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 265 | } |
yfkwok | 2:464c7e62d97d | 266 | } |
yfkwok | 2:464c7e62d97d | 267 | currentGame = EXAM; |
yfkwok | 2:464c7e62d97d | 268 | |
yfkwok | 2:464c7e62d97d | 269 | break; |
yfkwok | 15:a65444eb1194 | 270 | |
yfkwok | 15:a65444eb1194 | 271 | // Game loop for Charmander's mini game |
yfkwok | 2:464c7e62d97d | 272 | case CHARMANDER: |
yfkwok | 15:a65444eb1194 | 273 | i = 0; |
yfkwok | 15:a65444eb1194 | 274 | score = 0; |
yfkwok | 15:a65444eb1194 | 275 | while (i < 3) { |
yfkwok | 26:c60becf3f840 | 276 | // Indicate for which term the current game is in |
yfkwok | 15:a65444eb1194 | 277 | if(i == 0) {term_one();} |
yfkwok | 15:a65444eb1194 | 278 | else if(i == 1) {term_two();} |
yfkwok | 15:a65444eb1194 | 279 | else{term_three();} |
yfkwok | 15:a65444eb1194 | 280 | game_2.init(game_2_speed, game_2_cha, game_2_r); |
yfkwok | 15:a65444eb1194 | 281 | int j = 0; |
yfkwok | 21:704d938acf5d | 282 | while(j < 6){ |
yfkwok | 15:a65444eb1194 | 283 | game_2.read_input(device); |
yfkwok | 15:a65444eb1194 | 284 | game_2.update(pad, lcd, game_2_cha); |
yfkwok | 15:a65444eb1194 | 285 | game_2.render(lcd, game_2_cha); |
yfkwok | 15:a65444eb1194 | 286 | wait(1.0f/fps); |
yfkwok | 15:a65444eb1194 | 287 | j = game_2.get_count(); |
yfkwok | 15:a65444eb1194 | 288 | } |
yfkwok | 15:a65444eb1194 | 289 | i = i++; |
yfkwok | 26:c60becf3f840 | 290 | // determine if win condition is met, return score to proceed to EXAM game loop |
yfkwok | 21:704d938acf5d | 291 | if(game_2.get_count() == 6) { |
yfkwok | 15:a65444eb1194 | 292 | win(); |
yfkwok | 15:a65444eb1194 | 293 | music.win(pad); |
yfkwok | 15:a65444eb1194 | 294 | wait(0.5); |
yfkwok | 15:a65444eb1194 | 295 | score++; |
yfkwok | 15:a65444eb1194 | 296 | } |
yfkwok | 15:a65444eb1194 | 297 | else { |
yfkwok | 15:a65444eb1194 | 298 | lose(); |
yfkwok | 15:a65444eb1194 | 299 | pad.tone(750.0,0.2); |
yfkwok | 15:a65444eb1194 | 300 | wait(0.5); |
yfkwok | 15:a65444eb1194 | 301 | pad.tone(750.0,0.2); |
yfkwok | 15:a65444eb1194 | 302 | wait(1.0); |
yfkwok | 15:a65444eb1194 | 303 | } |
yfkwok | 15:a65444eb1194 | 304 | } |
yfkwok | 5:bc0691d02fd5 | 305 | currentGame = EXAM; |
yfkwok | 2:464c7e62d97d | 306 | break; |
yfkwok | 15:a65444eb1194 | 307 | |
yfkwok | 15:a65444eb1194 | 308 | // Game loop for EXAM |
yfkwok | 2:464c7e62d97d | 309 | case EXAM: |
yfkwok | 26:c60becf3f840 | 310 | // 1. Display the exam questions according to year. |
yfkwok | 26:c60becf3f840 | 311 | // 2. Display the answers according to how many mini games the player passed. |
yfkwok | 26:c60becf3f840 | 312 | // 3. If player manages to answer 2 or 3 questions correctly, enter to next year/GRADUATION. |
yfkwok | 26:c60becf3f840 | 313 | // 4. If player fails, repeat the year. |
yfkwok | 26:c60becf3f840 | 314 | |
yfkwok | 26:c60becf3f840 | 315 | // Reset background music control parameter |
yfkwok | 23:4a070960817a | 316 | finished = false; |
yfkwok | 26:c60becf3f840 | 317 | |
yfkwok | 26:c60becf3f840 | 318 | // Draw exam title screen |
yfkwok | 5:bc0691d02fd5 | 319 | test.exam_title(pad, lcd); |
yfkwok | 26:c60becf3f840 | 320 | |
yfkwok | 26:c60becf3f840 | 321 | // Using thread to run music and exam functions in parallel |
yfkwok | 23:4a070960817a | 322 | thread.start(gym); |
yfkwok | 26:c60becf3f840 | 323 | |
yfkwok | 26:c60becf3f840 | 324 | // Check for which year's exam questions need to be fetched |
yfkwok | 23:4a070960817a | 325 | if(year == 0) {pass = test.exam_q_one(pad, lcd, score); finished = true;} |
yfkwok | 23:4a070960817a | 326 | else if(year == 1) {pass = test.exam_q_two(pad, lcd, score); finished = true;} |
yfkwok | 23:4a070960817a | 327 | else if(year == 2) {pass = test.exam_q_three(pad, lcd, score); finished = true;} |
yfkwok | 23:4a070960817a | 328 | Thread::wait(1000); |
yfkwok | 23:4a070960817a | 329 | thread.join(); |
yfkwok | 26:c60becf3f840 | 330 | // End the thread |
yfkwok | 26:c60becf3f840 | 331 | |
yfkwok | 26:c60becf3f840 | 332 | // Check for number of correct answerws to determine if proceed to next year or not |
yfkwok | 28:a6726a3f8e6d | 333 | if(pass > 2){ |
yfkwok | 5:bc0691d02fd5 | 334 | passed(); |
yfkwok | 5:bc0691d02fd5 | 335 | music.win(pad); |
yfkwok | 5:bc0691d02fd5 | 336 | wait(0.5); |
yfkwok | 12:71683453f66a | 337 | year++; |
yfkwok | 5:bc0691d02fd5 | 338 | if(year == 1){currentGame = YEAR_2;} |
yfkwok | 5:bc0691d02fd5 | 339 | else if(year == 2){currentGame = YEAR_3;} |
yfkwok | 5:bc0691d02fd5 | 340 | else if(year == 3){currentGame = GRADUATION;} |
yfkwok | 5:bc0691d02fd5 | 341 | } |
yfkwok | 5:bc0691d02fd5 | 342 | else { |
yfkwok | 5:bc0691d02fd5 | 343 | failed(); |
yfkwok | 5:bc0691d02fd5 | 344 | pad.tone(750.0,0.2); |
yfkwok | 5:bc0691d02fd5 | 345 | wait(0.5); |
yfkwok | 5:bc0691d02fd5 | 346 | pad.tone(750.0,0.2); |
yfkwok | 5:bc0691d02fd5 | 347 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 348 | if(year == 0){currentGame = YEAR_1;} |
yfkwok | 5:bc0691d02fd5 | 349 | else if(year == 1){ |
yfkwok | 5:bc0691d02fd5 | 350 | if(select == 1){currentGame = SQUIRTLE;} |
yfkwok | 5:bc0691d02fd5 | 351 | else if(select == 0){currentGame = BULBASAUR;} |
yfkwok | 5:bc0691d02fd5 | 352 | else if(select == 2){currentGame = CHARMANDER;} |
yfkwok | 5:bc0691d02fd5 | 353 | } |
yfkwok | 5:bc0691d02fd5 | 354 | else if(year == 2){ |
yfkwok | 5:bc0691d02fd5 | 355 | if(select == 1){currentGame = SQUIRTLE;} |
yfkwok | 5:bc0691d02fd5 | 356 | else if(select == 0){currentGame = BULBASAUR;} |
yfkwok | 5:bc0691d02fd5 | 357 | else if(select == 2){currentGame = CHARMANDER;} |
yfkwok | 5:bc0691d02fd5 | 358 | } |
yfkwok | 5:bc0691d02fd5 | 359 | } |
yfkwok | 2:464c7e62d97d | 360 | break; |
yfkwok | 2:464c7e62d97d | 361 | case YEAR_2: |
yfkwok | 26:c60becf3f840 | 362 | // 1. Initiate year 2 screen |
yfkwok | 26:c60becf3f840 | 363 | // 2. Set up the parameters for year 2 |
yfkwok | 26:c60becf3f840 | 364 | // 3. Initiate evolution animation for chosen character |
yfkwok | 26:c60becf3f840 | 365 | // 4. Enter to game loop for chosen character |
yfkwok | 26:c60becf3f840 | 366 | |
yfkwok | 2:464c7e62d97d | 367 | year_two(); |
yfkwok | 2:464c7e62d97d | 368 | year_two_set(); |
yfkwok | 4:5bc9c4363d31 | 369 | if(select == 1){ |
yfkwok | 4:5bc9c4363d31 | 370 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 371 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 372 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 373 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 374 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 375 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 376 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 377 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 378 | } |
yfkwok | 4:5bc9c4363d31 | 379 | currentGame = SQUIRTLE; |
yfkwok | 4:5bc9c4363d31 | 380 | } |
yfkwok | 4:5bc9c4363d31 | 381 | else if(select == 0){ |
yfkwok | 4:5bc9c4363d31 | 382 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 383 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 384 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 385 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 386 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 387 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 388 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 389 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 390 | } |
yfkwok | 15:a65444eb1194 | 391 | currentGame = BULBASAUR; |
yfkwok | 15:a65444eb1194 | 392 | } |
yfkwok | 4:5bc9c4363d31 | 393 | else if(select == 2){ |
yfkwok | 4:5bc9c4363d31 | 394 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 395 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 396 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 397 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 398 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 399 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 400 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 401 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 402 | } |
yfkwok | 15:a65444eb1194 | 403 | currentGame = CHARMANDER; |
yfkwok | 15:a65444eb1194 | 404 | } |
yfkwok | 2:464c7e62d97d | 405 | break; |
yfkwok | 2:464c7e62d97d | 406 | case YEAR_3: |
yfkwok | 26:c60becf3f840 | 407 | // 1. Initiate year 3 screen |
yfkwok | 26:c60becf3f840 | 408 | // 2. Set up the parameters for year 3 |
yfkwok | 26:c60becf3f840 | 409 | // 3. Initiate evolution animation for chosen character |
yfkwok | 26:c60becf3f840 | 410 | // 4. Enter to game loop for chosen character |
yfkwok | 26:c60becf3f840 | 411 | |
yfkwok | 2:464c7e62d97d | 412 | year_three(); |
yfkwok | 2:464c7e62d97d | 413 | year_three_set(); |
yfkwok | 4:5bc9c4363d31 | 414 | if(select == 1){ |
yfkwok | 4:5bc9c4363d31 | 415 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 416 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 417 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 418 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 419 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 420 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 421 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 422 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 423 | } |
yfkwok | 4:5bc9c4363d31 | 424 | currentGame = SQUIRTLE; |
yfkwok | 4:5bc9c4363d31 | 425 | } |
yfkwok | 4:5bc9c4363d31 | 426 | else if(select == 0){ |
yfkwok | 4:5bc9c4363d31 | 427 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 428 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 429 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 430 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 431 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 432 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 433 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 434 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 435 | } |
yfkwok | 15:a65444eb1194 | 436 | currentGame = BULBASAUR; |
yfkwok | 15:a65444eb1194 | 437 | } |
yfkwok | 4:5bc9c4363d31 | 438 | else if(select == 2){ |
yfkwok | 4:5bc9c4363d31 | 439 | music.evolution_music(pad, lcd, select, year); |
yfkwok | 4:5bc9c4363d31 | 440 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 4:5bc9c4363d31 | 441 | lcd.printString("PRESS A",0,5); |
yfkwok | 4:5bc9c4363d31 | 442 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 443 | wait(0.3); |
yfkwok | 5:bc0691d02fd5 | 444 | lcd.printString(" ",0,5); |
yfkwok | 5:bc0691d02fd5 | 445 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 446 | wait(0.3); |
yfkwok | 4:5bc9c4363d31 | 447 | } |
yfkwok | 15:a65444eb1194 | 448 | currentGame = CHARMANDER; |
yfkwok | 15:a65444eb1194 | 449 | } |
yfkwok | 2:464c7e62d97d | 450 | break; |
yfkwok | 2:464c7e62d97d | 451 | case GRADUATION: |
yfkwok | 26:c60becf3f840 | 452 | // 1. Display congratulation theme for player! |
yfkwok | 26:c60becf3f840 | 453 | // 2. Return to the title screen |
yfkwok | 26:c60becf3f840 | 454 | |
yfkwok | 2:464c7e62d97d | 455 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 456 | lcd.printString("GRADUATION!",0,0); |
yfkwok | 2:464c7e62d97d | 457 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 458 | wait(2.0); |
yfkwok | 2:464c7e62d97d | 459 | break; |
yfkwok | 2:464c7e62d97d | 460 | } |
yfkwok | 2:464c7e62d97d | 461 | } |
yfkwok | 2:464c7e62d97d | 462 | } |
yfkwok | 2:464c7e62d97d | 463 | break; |
yfkwok | 2:464c7e62d97d | 464 | |
yfkwok | 2:464c7e62d97d | 465 | case INSTRUCTION: |
yfkwok | 26:c60becf3f840 | 466 | // 1. Display instruction |
yfkwok | 26:c60becf3f840 | 467 | // 2. Return to MENU screen |
yfkwok | 26:c60becf3f840 | 468 | |
yfkwok | 2:464c7e62d97d | 469 | instruction(); |
yfkwok | 2:464c7e62d97d | 470 | currentState = MENU; |
yfkwok | 2:464c7e62d97d | 471 | break; |
yfkwok | 2:464c7e62d97d | 472 | } |
yfkwok | 1:61b67654ffb7 | 473 | } |
yfkwok | 1:61b67654ffb7 | 474 | } |
yfkwok | 1:61b67654ffb7 | 475 | |
yfkwok | 1:61b67654ffb7 | 476 | // initialies all classes and libraries |
yfkwok | 1:61b67654ffb7 | 477 | void init() |
yfkwok | 1:61b67654ffb7 | 478 | { |
yfkwok | 1:61b67654ffb7 | 479 | lcd.init(); |
yfkwok | 2:464c7e62d97d | 480 | pad.init(); |
yfkwok | 21:704d938acf5d | 481 | device.init(); |
yfkwok | 1:61b67654ffb7 | 482 | // change set contrast in range 0.0 to 1.0 |
yfkwok | 1:61b67654ffb7 | 483 | // 0.4 appears to be a good starting point |
yfkwok | 21:704d938acf5d | 484 | lcd.setContrast(0.4); |
yfkwok | 1:61b67654ffb7 | 485 | } |
yfkwok | 1:61b67654ffb7 | 486 | |
yfkwok | 1:61b67654ffb7 | 487 | // simple splash screen displayed on start-up |
yfkwok | 1:61b67654ffb7 | 488 | void welcome() |
yfkwok | 1:61b67654ffb7 | 489 | { |
yfkwok | 2:464c7e62d97d | 490 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 491 | int title_data[35][65] = { |
yfkwok | 11:5a6b9dffd78a | 492 | {0,0,0,0,0,0,0,0,0,0,0,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 | 493 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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1,1,1,0,1,1,1,1,0,0,1,1,1,1,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 526 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 | 527 | }; |
yfkwok | 1:61b67654ffb7 | 528 | |
yfkwok | 11:5a6b9dffd78a | 529 | lcd.drawSprite(10, 3, 35, 65, (int*)title_data); |
yfkwok | 1:61b67654ffb7 | 530 | |
yfkwok | 11:5a6b9dffd78a | 531 | int start_data[5][41] = { |
yfkwok | 11:5a6b9dffd78a | 532 | {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 | 533 | {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 | 534 | {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 | 535 | {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 | 536 | {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 | 537 | }; |
yfkwok | 1:61b67654ffb7 | 538 | |
yfkwok | 11:5a6b9dffd78a | 539 | lcd.drawSprite(22, 41, 5, 41, (int*)start_data); |
yfkwok | 2:464c7e62d97d | 540 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 541 | music.title_music(pad); |
yfkwok | 2:464c7e62d97d | 542 | |
yfkwok | 2:464c7e62d97d | 543 | } |
yfkwok | 2:464c7e62d97d | 544 | |
yfkwok | 26:c60becf3f840 | 545 | // function for displaying the menu screen |
yfkwok | 2:464c7e62d97d | 546 | int menu() |
yfkwok | 2:464c7e62d97d | 547 | { |
yfkwok | 2:464c7e62d97d | 548 | // clear screen, re-draw and refresh |
yfkwok | 2:464c7e62d97d | 549 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 550 | int pos_y = 5; |
yfkwok | 2:464c7e62d97d | 551 | while(pad.check_event(Gamepad::A_PRESSED) == false){ |
yfkwok | 2:464c7e62d97d | 552 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 553 | if(pad.get_direction() == N){ |
yfkwok | 2:464c7e62d97d | 554 | pos_y = 5; |
yfkwok | 2:464c7e62d97d | 555 | }else if(pad.get_direction() == S){ |
yfkwok | 2:464c7e62d97d | 556 | pos_y = 16; |
yfkwok | 1:61b67654ffb7 | 557 | } |
yfkwok | 11:5a6b9dffd78a | 558 | int arrow_data[7][5] = { |
yfkwok | 11:5a6b9dffd78a | 559 | {1,1,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 560 | {0,1,1,0,0}, |
yfkwok | 11:5a6b9dffd78a | 561 | {0,0,1,1,0}, |
yfkwok | 11:5a6b9dffd78a | 562 | {0,0,0,1,1}, |
yfkwok | 11:5a6b9dffd78a | 563 | {0,0,1,1,0}, |
yfkwok | 11:5a6b9dffd78a | 564 | {0,1,1,0,0}, |
yfkwok | 11:5a6b9dffd78a | 565 | {1,1,0,0,0}, |
yfkwok | 2:464c7e62d97d | 566 | }; |
yfkwok | 26:c60becf3f840 | 567 | // draw pointer for selection |
yfkwok | 11:5a6b9dffd78a | 568 | lcd.drawSprite(5, pos_y, 7, 5, (int *)arrow_data); |
yfkwok | 2:464c7e62d97d | 569 | |
yfkwok | 10:adff3c804985 | 570 | int op_one_data[7][26] = { |
yfkwok | 10:adff3c804985 | 571 | {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 | 572 | {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 | 573 | {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 | 574 | {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 | 575 | {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 | 576 | {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 | 577 | {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 | 578 | }; |
yfkwok | 26:c60becf3f840 | 579 | // draw "START" |
yfkwok | 10:adff3c804985 | 580 | lcd.drawSprite(18, 5, 7, 26, (int *)op_one_data); |
yfkwok | 2:464c7e62d97d | 581 | |
yfkwok | 10:adff3c804985 | 582 | int op_two_data[7][18] = { |
yfkwok | 10:adff3c804985 | 583 | {1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1}, |
yfkwok | 10:adff3c804985 | 584 | {0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 585 | {0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 586 | {0,1,0,0,1,0,0,1,0,1,1,1,0,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 587 | {0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 588 | {0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1}, |
yfkwok | 10:adff3c804985 | 589 | {1,1,1,0,1,0,0,1,0,1,0,0,0,0,1,1,1,1}, |
yfkwok | 2:464c7e62d97d | 590 | }; |
yfkwok | 26:c60becf3f840 | 591 | // draw "INFO" |
yfkwok | 10:adff3c804985 | 592 | lcd.drawSprite(18, 16, 7, 18, (int*) op_two_data); |
yfkwok | 2:464c7e62d97d | 593 | |
yfkwok | 11:5a6b9dffd78a | 594 | int instruct_data[7][75] = { |
yfkwok | 11:5a6b9dffd78a | 595 | {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 | 596 | {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 | 597 | {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 | 598 | {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 | 599 | {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 | 600 | {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 | 601 | {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 | 602 | }; |
yfkwok | 26:c60becf3f840 | 603 | // draw instruction |
yfkwok | 11:5a6b9dffd78a | 604 | lcd.drawSprite(5, 38, 7, 75,(int *) instruct_data); |
yfkwok | 1:61b67654ffb7 | 605 | lcd.refresh(); |
yfkwok | 1:61b67654ffb7 | 606 | |
yfkwok | 2:464c7e62d97d | 607 | } |
yfkwok | 2:464c7e62d97d | 608 | |
yfkwok | 2:464c7e62d97d | 609 | //return value for which menu option is currently selected |
yfkwok | 2:464c7e62d97d | 610 | int op = 0; |
yfkwok | 2:464c7e62d97d | 611 | if(pos_y == 5){op = 0;} |
yfkwok | 2:464c7e62d97d | 612 | else if(pos_y == 16){op = 1;} |
yfkwok | 2:464c7e62d97d | 613 | |
yfkwok | 2:464c7e62d97d | 614 | //return value for which menu option is currently selected |
yfkwok | 2:464c7e62d97d | 615 | return op; |
yfkwok | 2:464c7e62d97d | 616 | |
yfkwok | 2:464c7e62d97d | 617 | } |
yfkwok | 2:464c7e62d97d | 618 | |
yfkwok | 26:c60becf3f840 | 619 | // function for drawing year one title screen |
yfkwok | 2:464c7e62d97d | 620 | void year_one() |
yfkwok | 2:464c7e62d97d | 621 | { |
yfkwok | 2:464c7e62d97d | 622 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 623 | int instruct_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 624 | {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 | 625 | {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 | 626 | {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 | 627 | {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 | 628 | {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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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}, |
yfkwok | 11:5a6b9dffd78a | 651 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 | 652 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 | 653 | {0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 | 654 | }; |
yfkwok | 11:5a6b9dffd78a | 655 | lcd.drawSprite(4, 9, 30, 78,(int *) instruct_data); |
yfkwok | 2:464c7e62d97d | 656 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 657 | |
yfkwok | 2:464c7e62d97d | 658 | music.level_up(pad); |
yfkwok | 2:464c7e62d97d | 659 | |
yfkwok | 2:464c7e62d97d | 660 | wait(1.0); |
yfkwok | 2:464c7e62d97d | 661 | } |
yfkwok | 2:464c7e62d97d | 662 | |
yfkwok | 26:c60becf3f840 | 663 | // function for setting year one game parameters |
yfkwok | 2:464c7e62d97d | 664 | void year_one_set() |
yfkwok | 2:464c7e62d97d | 665 | { |
yfkwok | 28:a6726a3f8e6d | 666 | game_1_speed = 12; |
yfkwok | 2:464c7e62d97d | 667 | game_1_cha = 1; |
yfkwok | 5:bc0691d02fd5 | 668 | game_1_r = 5; |
yfkwok | 21:704d938acf5d | 669 | game_2_speed = 1; |
yfkwok | 15:a65444eb1194 | 670 | game_2_cha = 1; |
yfkwok | 15:a65444eb1194 | 671 | game_2_r = 6; |
yfkwok | 27:4bcdfb212467 | 672 | game_3_set = 1; |
yfkwok | 28:a6726a3f8e6d | 673 | game_3_time = 0.5; |
yfkwok | 2:464c7e62d97d | 674 | } |
yfkwok | 2:464c7e62d97d | 675 | |
yfkwok | 26:c60becf3f840 | 676 | // function for drawing year two title screen |
yfkwok | 2:464c7e62d97d | 677 | void year_two() |
yfkwok | 2:464c7e62d97d | 678 | { |
yfkwok | 2:464c7e62d97d | 679 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 680 | int year_two_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 681 | {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 | 682 | {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 | 683 | {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 | 684 | {1,1,0,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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 | 707 | {0,0,0,0,0,0,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,0,0,0,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 708 | {0,0,0,0,0,0,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,0,0,0,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 709 | {0,0,0,0,0,0,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 | 710 | {0,0,0,0,0,0,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 | 711 | }; |
yfkwok | 11:5a6b9dffd78a | 712 | lcd.drawSprite(4, 9, 30, 78, (int *)year_two_data); |
yfkwok | 2:464c7e62d97d | 713 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 714 | |
yfkwok | 2:464c7e62d97d | 715 | music.level_up(pad); |
yfkwok | 2:464c7e62d97d | 716 | |
yfkwok | 2:464c7e62d97d | 717 | wait(1.0); |
yfkwok | 2:464c7e62d97d | 718 | } |
yfkwok | 2:464c7e62d97d | 719 | |
yfkwok | 26:c60becf3f840 | 720 | // function for setting year two game parameters |
yfkwok | 2:464c7e62d97d | 721 | void year_two_set() |
yfkwok | 2:464c7e62d97d | 722 | { |
yfkwok | 28:a6726a3f8e6d | 723 | game_1_speed = 14; |
yfkwok | 2:464c7e62d97d | 724 | game_1_cha = 2; |
yfkwok | 5:bc0691d02fd5 | 725 | game_1_r = 3; |
yfkwok | 21:704d938acf5d | 726 | game_2_speed = 2; |
yfkwok | 15:a65444eb1194 | 727 | game_2_cha = 2; |
yfkwok | 15:a65444eb1194 | 728 | game_2_r = 5; |
yfkwok | 27:4bcdfb212467 | 729 | game_3_set = 2; |
yfkwok | 28:a6726a3f8e6d | 730 | game_3_time = 0.4; |
yfkwok | 2:464c7e62d97d | 731 | } |
yfkwok | 2:464c7e62d97d | 732 | |
yfkwok | 26:c60becf3f840 | 733 | // function for drawing year three title screen |
yfkwok | 2:464c7e62d97d | 734 | void year_three() |
yfkwok | 2:464c7e62d97d | 735 | { |
yfkwok | 2:464c7e62d97d | 736 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 737 | int year_three_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 738 | {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 | 739 | {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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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}, |
yfkwok | 2:464c7e62d97d | 768 | }; |
yfkwok | 11:5a6b9dffd78a | 769 | lcd.drawSprite(4, 9, 30, 78,(int*) year_three_data); |
yfkwok | 2:464c7e62d97d | 770 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 771 | |
yfkwok | 2:464c7e62d97d | 772 | music.level_up(pad); |
yfkwok | 2:464c7e62d97d | 773 | |
yfkwok | 2:464c7e62d97d | 774 | wait(1.0); |
yfkwok | 2:464c7e62d97d | 775 | } |
yfkwok | 2:464c7e62d97d | 776 | |
yfkwok | 26:c60becf3f840 | 777 | // function for setting year three game parameters |
yfkwok | 2:464c7e62d97d | 778 | void year_three_set() |
yfkwok | 2:464c7e62d97d | 779 | { |
yfkwok | 5:bc0691d02fd5 | 780 | game_1_speed = 14; |
yfkwok | 2:464c7e62d97d | 781 | game_1_cha = 3; |
yfkwok | 5:bc0691d02fd5 | 782 | game_1_r = 2; |
yfkwok | 22:f8f36e88b2ca | 783 | game_2_speed = 2; |
yfkwok | 15:a65444eb1194 | 784 | game_2_cha = 3; |
yfkwok | 15:a65444eb1194 | 785 | game_2_r = 3; |
yfkwok | 27:4bcdfb212467 | 786 | game_3_set = 3; |
yfkwok | 28:a6726a3f8e6d | 787 | game_3_time = 0.3; |
yfkwok | 2:464c7e62d97d | 788 | } |
yfkwok | 2:464c7e62d97d | 789 | |
yfkwok | 26:c60becf3f840 | 790 | // function for displaying the game information |
yfkwok | 2:464c7e62d97d | 791 | void instruction() |
yfkwok | 2:464c7e62d97d | 792 | { |
yfkwok | 2:464c7e62d97d | 793 | Page currentPage = PAGE_1; |
yfkwok | 2:464c7e62d97d | 794 | int fps = 8.0; |
yfkwok | 2:464c7e62d97d | 795 | static int instruct_data[] = { |
yfkwok | 2:464c7e62d97d | 796 | 1,1,1,1,1,1,1, |
yfkwok | 2:464c7e62d97d | 797 | 0,1,1,1,1,1,0, |
yfkwok | 2:464c7e62d97d | 798 | 0,0,1,1,1,0,0, |
yfkwok | 2:464c7e62d97d | 799 | 0,0,0,1,0,0,0 |
yfkwok | 2:464c7e62d97d | 800 | }; |
yfkwok | 2:464c7e62d97d | 801 | |
yfkwok | 2:464c7e62d97d | 802 | while(pad.check_event(Gamepad::BACK_PRESSED) == false){ |
yfkwok | 2:464c7e62d97d | 803 | switch (currentPage) { |
yfkwok | 2:464c7e62d97d | 804 | case PAGE_1: |
yfkwok | 2:464c7e62d97d | 805 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 806 | lcd.printString("PKM Academy",0,0); |
yfkwok | 2:464c7e62d97d | 807 | lcd.printString("is an RPG",0,1); |
yfkwok | 2:464c7e62d97d | 808 | lcd.printString("which simulates",0,2); |
yfkwok | 2:464c7e62d97d | 809 | lcd.printString("the mundane",0,3); |
yfkwok | 2:464c7e62d97d | 810 | lcd.printString("life of three",0,4); |
yfkwok | 2:464c7e62d97d | 811 | lcd.drawSprite(39, 44, 4, 7, instruct_data); |
yfkwok | 2:464c7e62d97d | 812 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 813 | if(pad.get_direction() == S){currentPage = PAGE_2;} |
yfkwok | 2:464c7e62d97d | 814 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 815 | break; |
yfkwok | 2:464c7e62d97d | 816 | case PAGE_2: |
yfkwok | 2:464c7e62d97d | 817 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 818 | lcd.printString("uni students.",0,0); |
yfkwok | 2:464c7e62d97d | 819 | lcd.printString("Explore and",0,1); |
yfkwok | 2:464c7e62d97d | 820 | lcd.printString("conquer all",0,2); |
yfkwok | 2:464c7e62d97d | 821 | lcd.printString("challenges uni",0,3); |
yfkwok | 2:464c7e62d97d | 822 | lcd.printString("brings forth.",0,4); |
yfkwok | 2:464c7e62d97d | 823 | lcd.drawSprite(39, 44, 4, 7, instruct_data); |
yfkwok | 2:464c7e62d97d | 824 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 825 | if(pad.get_direction() == S){currentPage = PAGE_3;} |
yfkwok | 2:464c7e62d97d | 826 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 827 | break; |
yfkwok | 2:464c7e62d97d | 828 | case PAGE_3: |
yfkwok | 2:464c7e62d97d | 829 | lcd.clear(); |
yfkwok | 2:464c7e62d97d | 830 | lcd.printString("Ride with them",0,0); |
yfkwok | 2:464c7e62d97d | 831 | lcd.printString("the life of",0,1); |
yfkwok | 2:464c7e62d97d | 832 | lcd.printString("frustration,",0,2); |
yfkwok | 2:464c7e62d97d | 833 | lcd.printString("anger and ",0,3); |
yfkwok | 2:464c7e62d97d | 834 | lcd.printString("despair! ",0,4); |
yfkwok | 2:464c7e62d97d | 835 | lcd.printString("Press BACK",12,5); |
yfkwok | 2:464c7e62d97d | 836 | lcd.refresh(); |
yfkwok | 2:464c7e62d97d | 837 | wait(1.0f/fps); |
yfkwok | 2:464c7e62d97d | 838 | break; |
yfkwok | 2:464c7e62d97d | 839 | } |
yfkwok | 2:464c7e62d97d | 840 | } |
yfkwok | 5:bc0691d02fd5 | 841 | } |
yfkwok | 5:bc0691d02fd5 | 842 | |
yfkwok | 26:c60becf3f840 | 843 | // function for drawing term one title screen |
yfkwok | 5:bc0691d02fd5 | 844 | void term_one() |
yfkwok | 5:bc0691d02fd5 | 845 | { |
yfkwok | 5:bc0691d02fd5 | 846 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 847 | int term_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 848 | {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 | 849 | {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,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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,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 | 878 | |
yfkwok | 5:bc0691d02fd5 | 879 | }; |
yfkwok | 11:5a6b9dffd78a | 880 | lcd.drawSprite(4, 9, 30, 78, (int *) term_data); |
yfkwok | 5:bc0691d02fd5 | 881 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 882 | |
yfkwok | 5:bc0691d02fd5 | 883 | music.level_up(pad); |
yfkwok | 5:bc0691d02fd5 | 884 | |
yfkwok | 5:bc0691d02fd5 | 885 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 886 | } |
yfkwok | 5:bc0691d02fd5 | 887 | |
yfkwok | 26:c60becf3f840 | 888 | // function for drawing term two title screen |
yfkwok | 5:bc0691d02fd5 | 889 | void term_two() |
yfkwok | 5:bc0691d02fd5 | 890 | { |
yfkwok | 5:bc0691d02fd5 | 891 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 892 | int term_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 893 | {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 | 894 | {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 | 895 | {0,0,0,0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yfkwok | 11:5a6b9dffd78a | 923 | |
yfkwok | 5:bc0691d02fd5 | 924 | }; |
yfkwok | 11:5a6b9dffd78a | 925 | lcd.drawSprite(4, 9, 30, 78,(int *) term_data); |
yfkwok | 5:bc0691d02fd5 | 926 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 927 | |
yfkwok | 5:bc0691d02fd5 | 928 | music.level_up(pad); |
yfkwok | 5:bc0691d02fd5 | 929 | |
yfkwok | 5:bc0691d02fd5 | 930 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 931 | } |
yfkwok | 5:bc0691d02fd5 | 932 | |
yfkwok | 26:c60becf3f840 | 933 | // function for drawing term three title screen |
yfkwok | 5:bc0691d02fd5 | 934 | void term_three() |
yfkwok | 5:bc0691d02fd5 | 935 | { |
yfkwok | 5:bc0691d02fd5 | 936 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 937 | int term_data[30][78] = { |
yfkwok | 11:5a6b9dffd78a | 938 | {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 | 939 | {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 | 940 | {0,0,0,0,0,0,0,0,1,1,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,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,1,1,0,0,0,0,0,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
yfkwok | 5:bc0691d02fd5 | 972 | |
yfkwok | 5:bc0691d02fd5 | 973 | music.level_up(pad); |
yfkwok | 5:bc0691d02fd5 | 974 | |
yfkwok | 5:bc0691d02fd5 | 975 | wait(1.0); |
yfkwok | 5:bc0691d02fd5 | 976 | } |
yfkwok | 5:bc0691d02fd5 | 977 | |
yfkwok | 26:c60becf3f840 | 978 | // function for drawing mission success screen |
yfkwok | 5:bc0691d02fd5 | 979 | void win() |
yfkwok | 5:bc0691d02fd5 | 980 | { |
yfkwok | 11:5a6b9dffd78a | 981 | int instruct_data[22][63] = { |
yfkwok | 11:5a6b9dffd78a | 982 | {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 | 983 | {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 | 984 | {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 | 985 | {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,0,0,0,0,0}, |
yfkwok | 11:5a6b9dffd78a | 986 | {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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}, |
yfkwok | 11:5a6b9dffd78a | 1000 | {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 | 1001 | {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 | 1002 | {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 | 1003 | {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 | 1004 | }; |
yfkwok | 5:bc0691d02fd5 | 1005 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 1006 | lcd.drawSprite(10, 13, 22, 63, (int *)instruct_data); |
yfkwok | 5:bc0691d02fd5 | 1007 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 1008 | } |
yfkwok | 5:bc0691d02fd5 | 1009 | |
yfkwok | 26:c60becf3f840 | 1010 | // function for drawing mission failure screen |
yfkwok | 5:bc0691d02fd5 | 1011 | void lose() |
yfkwok | 5:bc0691d02fd5 | 1012 | { |
yfkwok | 11:5a6b9dffd78a | 1013 | int instruct_data[22][58] = { |
yfkwok | 11:5a6b9dffd78a | 1014 | {1,1,1,1,0,1,1,1,1,1,1,1,1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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 | 1036 | }; |
yfkwok | 5:bc0691d02fd5 | 1037 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 1038 | lcd.drawSprite(10, 13, 22, 58,(int *) instruct_data); |
yfkwok | 5:bc0691d02fd5 | 1039 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 1040 | } |
yfkwok | 5:bc0691d02fd5 | 1041 | |
yfkwok | 26:c60becf3f840 | 1042 | // function for drawing you passed screen |
yfkwok | 5:bc0691d02fd5 | 1043 | void passed() |
yfkwok | 5:bc0691d02fd5 | 1044 | { |
yfkwok | 11:5a6b9dffd78a | 1045 | int instruct_data[10][83] = { |
yfkwok | 11:5a6b9dffd78a | 1046 | {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 | 1047 | {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 | 1048 | {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,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,0,0,1,1,0}, |
yfkwok | 11:5a6b9dffd78a | 1049 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,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 | 1055 | {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 | 1056 | }; |
yfkwok | 5:bc0691d02fd5 | 1057 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 1058 | lcd.drawSprite(0, 19, 10, 83, (int *) instruct_data); |
yfkwok | 5:bc0691d02fd5 | 1059 | lcd.refresh(); |
yfkwok | 5:bc0691d02fd5 | 1060 | } |
yfkwok | 5:bc0691d02fd5 | 1061 | |
yfkwok | 26:c60becf3f840 | 1062 | // function for drawing you failed screen |
yfkwok | 5:bc0691d02fd5 | 1063 | void failed() |
yfkwok | 5:bc0691d02fd5 | 1064 | { |
yfkwok | 11:5a6b9dffd78a | 1065 | int instruct_data[10][77] = { |
yfkwok | 11:5a6b9dffd78a | 1066 | {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 | 1067 | {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,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,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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 | 1074 | {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 | 1075 | {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 | 1076 | }; |
yfkwok | 5:bc0691d02fd5 | 1077 | lcd.clear(); |
yfkwok | 11:5a6b9dffd78a | 1078 | lcd.drawSprite(4, 19, 10, 77, (int *)instruct_data); |
yfkwok | 5:bc0691d02fd5 | 1079 | lcd.refresh(); |
yfkwok | 23:4a070960817a | 1080 | } |
yfkwok | 23:4a070960817a | 1081 | |
yfkwok | 26:c60becf3f840 | 1082 | // INTENSE music played in background during exams |
yfkwok | 23:4a070960817a | 1083 | void gym() |
yfkwok | 23:4a070960817a | 1084 | { |
yfkwok | 23:4a070960817a | 1085 | // bar 1 |
yfkwok | 23:4a070960817a | 1086 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1087 | Thread::wait(330/2); |
yfkwok | 26:c60becf3f840 | 1088 | // to break out of the function |
yfkwok | 23:4a070960817a | 1089 | if (finished == true) {return;} |
yfkwok | 23:4a070960817a | 1090 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1091 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1092 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1093 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1094 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1095 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1096 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1097 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1098 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1099 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1100 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1101 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1102 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1103 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1104 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1105 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1106 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1107 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1108 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1109 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1110 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1111 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1112 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1113 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1114 | pad.tone(NOTE_C5,0.33*1.5); |
yfkwok | 23:4a070960817a | 1115 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1116 | // bar 3 |
yfkwok | 23:4a070960817a | 1117 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1118 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1119 | if (finished == true) {return;} |
yfkwok | 23:4a070960817a | 1120 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1121 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1122 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1123 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1124 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1125 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1126 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1127 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1128 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1129 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1130 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1131 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1132 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1133 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1134 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1135 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1136 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1137 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1138 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1139 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1140 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1141 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1142 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1143 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1144 | pad.tone(NOTE_AS4,0.33*1.5); |
yfkwok | 23:4a070960817a | 1145 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1146 | // bar 5 |
yfkwok | 23:4a070960817a | 1147 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1148 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1149 | if (finished == true) {return;} |
yfkwok | 23:4a070960817a | 1150 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1151 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1152 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1153 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1154 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1155 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1156 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1157 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1158 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1159 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1160 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1161 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1162 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1163 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1164 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1165 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1166 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1167 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1168 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1169 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1170 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1171 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1172 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1173 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1174 | pad.tone(NOTE_C5,0.33*1.5); |
yfkwok | 23:4a070960817a | 1175 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1176 | // bar 7 |
yfkwok | 23:4a070960817a | 1177 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1178 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1179 | if (finished == true) {return;} |
yfkwok | 23:4a070960817a | 1180 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1181 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1182 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1183 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1184 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1185 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1186 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1187 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1188 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1189 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1190 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1191 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1192 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1193 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1194 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1195 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1196 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1197 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1198 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1199 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1200 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1201 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1202 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1203 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1204 | if (finished == true) {return;} |
yfkwok | 23:4a070960817a | 1205 | pad.tone(NOTE_CS5,0.33*1.5); |
yfkwok | 23:4a070960817a | 1206 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1207 | |
yfkwok | 23:4a070960817a | 1208 | // Loop while state is true |
yfkwok | 23:4a070960817a | 1209 | while(!finished){ |
yfkwok | 23:4a070960817a | 1210 | // bar 8 |
yfkwok | 23:4a070960817a | 1211 | pad.tone(NOTE_DS5,0.33); |
yfkwok | 23:4a070960817a | 1212 | wait(0.33); |
yfkwok | 23:4a070960817a | 1213 | pad.tone(NOTE_CS5,0.33); |
yfkwok | 23:4a070960817a | 1214 | wait(0.33); |
yfkwok | 23:4a070960817a | 1215 | pad.tone(NOTE_DS5,0.33); |
yfkwok | 23:4a070960817a | 1216 | wait(0.33); |
yfkwok | 23:4a070960817a | 1217 | pad.tone(NOTE_E5,0.33/2); |
yfkwok | 23:4a070960817a | 1218 | Thread::wait(330/2); |
yfkwok | 26:c60becf3f840 | 1219 | // to break out of the function |
yfkwok | 23:4a070960817a | 1220 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1221 | pad.tone(NOTE_FS5,0.33); |
yfkwok | 23:4a070960817a | 1222 | wait(0.33); |
yfkwok | 23:4a070960817a | 1223 | pad.tone(NOTE_E5,0.33); |
yfkwok | 23:4a070960817a | 1224 | wait(0.33); |
yfkwok | 23:4a070960817a | 1225 | pad.tone(NOTE_DS5,0.33/2); |
yfkwok | 23:4a070960817a | 1226 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1227 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1228 | pad.tone(NOTE_CS5,0.33/2); |
yfkwok | 23:4a070960817a | 1229 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1230 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1231 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1232 | pad.tone(NOTE_CS5,0.33/2); |
yfkwok | 23:4a070960817a | 1233 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1234 | pad.tone(NOTE_DS5,0.33/2); |
yfkwok | 23:4a070960817a | 1235 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1236 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1237 | // bar 10 |
yfkwok | 23:4a070960817a | 1238 | pad.tone(NOTE_A4,0.33*2); |
yfkwok | 23:4a070960817a | 1239 | wait(0.33*2); |
yfkwok | 23:4a070960817a | 1240 | pad.tone(NOTE_CS5,0.33*2); |
yfkwok | 23:4a070960817a | 1241 | Thread::wait(330*2); |
yfkwok | 23:4a070960817a | 1242 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1243 | pad.tone(NOTE_E5,0.33*2); |
yfkwok | 23:4a070960817a | 1244 | wait(0.33*2); |
yfkwok | 23:4a070960817a | 1245 | pad.tone(NOTE_CS5,0.33*2); |
yfkwok | 23:4a070960817a | 1246 | Thread::wait(330*2); |
yfkwok | 23:4a070960817a | 1247 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1248 | // bar 8 |
yfkwok | 23:4a070960817a | 1249 | pad.tone(NOTE_DS5,0.33); |
yfkwok | 23:4a070960817a | 1250 | wait(0.33); |
yfkwok | 23:4a070960817a | 1251 | pad.tone(NOTE_CS5,0.33); |
yfkwok | 23:4a070960817a | 1252 | wait(0.33); |
yfkwok | 23:4a070960817a | 1253 | pad.tone(NOTE_DS5,0.33); |
yfkwok | 23:4a070960817a | 1254 | wait(0.33); |
yfkwok | 23:4a070960817a | 1255 | pad.tone(NOTE_E5,0.33/2); |
yfkwok | 23:4a070960817a | 1256 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1257 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1258 | pad.tone(NOTE_FS5,0.33); |
yfkwok | 23:4a070960817a | 1259 | wait(0.33); |
yfkwok | 23:4a070960817a | 1260 | pad.tone(NOTE_E5,0.33); |
yfkwok | 23:4a070960817a | 1261 | wait(0.33); |
yfkwok | 23:4a070960817a | 1262 | pad.tone(NOTE_DS5,0.33/2); |
yfkwok | 23:4a070960817a | 1263 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1264 | pad.tone(NOTE_CS5,0.33/2); |
yfkwok | 23:4a070960817a | 1265 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1266 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1267 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1268 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1269 | pad.tone(NOTE_CS5,0.33/2); |
yfkwok | 23:4a070960817a | 1270 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1271 | pad.tone(NOTE_DS5,0.33/2); |
yfkwok | 23:4a070960817a | 1272 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1273 | // bar 12 |
yfkwok | 23:4a070960817a | 1274 | pad.tone(NOTE_CS5,0.33*2); |
yfkwok | 23:4a070960817a | 1275 | wait(0.33*2); |
yfkwok | 23:4a070960817a | 1276 | pad.tone(NOTE_B4,0.33*2); |
yfkwok | 23:4a070960817a | 1277 | Thread::wait(330*2); |
yfkwok | 23:4a070960817a | 1278 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1279 | pad.tone(NOTE_A4,0.33*2); |
yfkwok | 23:4a070960817a | 1280 | wait(0.33*2); |
yfkwok | 23:4a070960817a | 1281 | pad.tone(NOTE_E5,0.33); |
yfkwok | 23:4a070960817a | 1282 | wait(0.33); |
yfkwok | 23:4a070960817a | 1283 | pad.tone(NOTE_E5,0.33/2); |
yfkwok | 23:4a070960817a | 1284 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1285 | pad.tone(NOTE_CS5,0.33/2); |
yfkwok | 23:4a070960817a | 1286 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1287 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1288 | // bar 14 |
yfkwok | 23:4a070960817a | 1289 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1290 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1291 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1292 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1293 | pad.tone(NOTE_D4,0.33/4); |
yfkwok | 23:4a070960817a | 1294 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1295 | pad.tone(NOTE_CS4,0.33/4); |
yfkwok | 23:4a070960817a | 1296 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1297 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1298 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1299 | pad.tone(NOTE_D4,0.33/4); |
yfkwok | 23:4a070960817a | 1300 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1301 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1302 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1303 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1304 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1305 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1306 | pad.tone(NOTE_E4,0.33/4); |
yfkwok | 23:4a070960817a | 1307 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1308 | pad.tone(NOTE_D4,0.33/4); |
yfkwok | 23:4a070960817a | 1309 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1310 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1311 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1312 | pad.tone(NOTE_E4,0.33/4); |
yfkwok | 23:4a070960817a | 1313 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1314 | // bar 15 |
yfkwok | 23:4a070960817a | 1315 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1316 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1317 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1318 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1319 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1320 | pad.tone(NOTE_FS4,0.33/4); |
yfkwok | 23:4a070960817a | 1321 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1322 | pad.tone(NOTE_E4,0.33/4); |
yfkwok | 23:4a070960817a | 1323 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1324 | pad.tone(NOTE_CS4,0.33/4); |
yfkwok | 23:4a070960817a | 1325 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1326 | pad.tone(NOTE_FS4,0.33/4); |
yfkwok | 23:4a070960817a | 1327 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1328 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1329 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1330 | pad.tone(NOTE_E4,0.33/4); |
yfkwok | 23:4a070960817a | 1331 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1332 | pad.tone(NOTE_CS4,0.33/4); |
yfkwok | 23:4a070960817a | 1333 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1334 | pad.tone(NOTE_E4,0.25/2); |
yfkwok | 23:4a070960817a | 1335 | Thread::wait(250/2); |
yfkwok | 23:4a070960817a | 1336 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1337 | pad.tone(NOTE_F4,0.25/2); |
yfkwok | 23:4a070960817a | 1338 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1339 | // bar 16 |
yfkwok | 23:4a070960817a | 1340 | pad.tone(NOTE_D4,0.33/4); |
yfkwok | 23:4a070960817a | 1341 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1342 | pad.tone(NOTE_CS4,0.33/4); |
yfkwok | 23:4a070960817a | 1343 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1344 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1345 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1346 | pad.tone(NOTE_D4,0.33/4); |
yfkwok | 23:4a070960817a | 1347 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1348 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1349 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1350 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1351 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1352 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1353 | pad.tone(NOTE_E4,0.33/4); |
yfkwok | 23:4a070960817a | 1354 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1355 | pad.tone(NOTE_D4,0.33/4); |
yfkwok | 23:4a070960817a | 1356 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1357 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1358 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1359 | pad.tone(NOTE_E4,0.33/4); |
yfkwok | 23:4a070960817a | 1360 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1361 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1362 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1363 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1364 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1365 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1366 | // bar 17 |
yfkwok | 23:4a070960817a | 1367 | pad.tone(NOTE_FS4,0.33/4); |
yfkwok | 23:4a070960817a | 1368 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1369 | pad.tone(NOTE_E4,0.33/4); |
yfkwok | 23:4a070960817a | 1370 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1371 | pad.tone(NOTE_CS4,0.33/4); |
yfkwok | 23:4a070960817a | 1372 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1373 | pad.tone(NOTE_FS4,0.33/4); |
yfkwok | 23:4a070960817a | 1374 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1375 | pad.tone(NOTE_E4,0.33/2); |
yfkwok | 23:4a070960817a | 1376 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1377 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1378 | pad.tone(NOTE_CS4,0.33/2); |
yfkwok | 23:4a070960817a | 1379 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1380 | pad.tone(NOTE_D4,0.33/2); |
yfkwok | 23:4a070960817a | 1381 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1382 | pad.tone(NOTE_CS4,0.33/2); |
yfkwok | 23:4a070960817a | 1383 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1384 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1385 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1386 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1387 | pad.tone(NOTE_E4,0.33/2); |
yfkwok | 23:4a070960817a | 1388 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1389 | // bar 18 |
yfkwok | 23:4a070960817a | 1390 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1391 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1392 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1393 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1394 | pad.tone(NOTE_B4,0.33); |
yfkwok | 23:4a070960817a | 1395 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1396 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1397 | pad.tone(NOTE_C5,0.33); |
yfkwok | 23:4a070960817a | 1398 | wait(0.33); |
yfkwok | 23:4a070960817a | 1399 | pad.tone(NOTE_A4,0.33); |
yfkwok | 23:4a070960817a | 1400 | wait(0.33); |
yfkwok | 23:4a070960817a | 1401 | pad.tone(NOTE_B4,0.33); |
yfkwok | 23:4a070960817a | 1402 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1403 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1404 | pad.tone(NOTE_C5,0.33); |
yfkwok | 23:4a070960817a | 1405 | wait(0.33); |
yfkwok | 23:4a070960817a | 1406 | pad.tone(NOTE_A4,0.33); |
yfkwok | 23:4a070960817a | 1407 | wait(0.33); |
yfkwok | 23:4a070960817a | 1408 | pad.tone(NOTE_G4,0.33); |
yfkwok | 23:4a070960817a | 1409 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1410 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1411 | // bar 19 |
yfkwok | 23:4a070960817a | 1412 | pad.tone(NOTE_FS4,0.33*4); |
yfkwok | 23:4a070960817a | 1413 | wait(0.33); |
yfkwok | 23:4a070960817a | 1414 | pad.tone(NOTE_C4,0.33/4); |
yfkwok | 23:4a070960817a | 1415 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1416 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1417 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1418 | pad.tone(NOTE_A3,0.33/4); |
yfkwok | 23:4a070960817a | 1419 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1420 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1421 | Thread::wait(330/4); |
yfkwok | 23:4a070960817a | 1422 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1423 | pad.tone(NOTE_C4,0.33/4); |
yfkwok | 23:4a070960817a | 1424 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1425 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1426 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1427 | pad.tone(NOTE_A3,0.33/4); |
yfkwok | 23:4a070960817a | 1428 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1429 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1430 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1431 | pad.tone(NOTE_C4,0.33/4); |
yfkwok | 23:4a070960817a | 1432 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1433 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1434 | Thread::wait(330/4); |
yfkwok | 23:4a070960817a | 1435 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1436 | pad.tone(NOTE_A3,0.33/4); |
yfkwok | 23:4a070960817a | 1437 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1438 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1439 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1440 | // bar 20 |
yfkwok | 23:4a070960817a | 1441 | pad.tone(NOTE_C4,0.33/4); |
yfkwok | 23:4a070960817a | 1442 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1443 | pad.tone(NOTE_CS4,0.33/4); |
yfkwok | 23:4a070960817a | 1444 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1445 | pad.tone(NOTE_D4,0.33/4); |
yfkwok | 23:4a070960817a | 1446 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1447 | pad.tone(NOTE_DS4,0.33/4); |
yfkwok | 23:4a070960817a | 1448 | Thread::wait(330/4); |
yfkwok | 23:4a070960817a | 1449 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1450 | pad.tone(NOTE_E4,0.33/4); |
yfkwok | 23:4a070960817a | 1451 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1452 | pad.tone(NOTE_DS4,0.33/4); |
yfkwok | 23:4a070960817a | 1453 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1454 | pad.tone(NOTE_D4,0.33/4); |
yfkwok | 23:4a070960817a | 1455 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1456 | pad.tone(NOTE_CS4,0.33/4); |
yfkwok | 23:4a070960817a | 1457 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1458 | pad.tone(NOTE_C4,0.33/4); |
yfkwok | 23:4a070960817a | 1459 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1460 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1461 | Thread::wait(330/4); |
yfkwok | 23:4a070960817a | 1462 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1463 | pad.tone(NOTE_AS3,0.33/4); |
yfkwok | 23:4a070960817a | 1464 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1465 | pad.tone(NOTE_A3,0.33/4); |
yfkwok | 23:4a070960817a | 1466 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1467 | pad.tone(NOTE_GS3,0.33/4); |
yfkwok | 23:4a070960817a | 1468 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1469 | pad.tone(NOTE_G3,0.33/4); |
yfkwok | 23:4a070960817a | 1470 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1471 | pad.tone(NOTE_FS3,0.33/4); |
yfkwok | 23:4a070960817a | 1472 | Thread::wait(330/4); |
yfkwok | 23:4a070960817a | 1473 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1474 | pad.tone(NOTE_G3,0.33/4); |
yfkwok | 23:4a070960817a | 1475 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1476 | // bar 22 |
yfkwok | 23:4a070960817a | 1477 | pad.tone(NOTE_GS3,0.33/4); |
yfkwok | 23:4a070960817a | 1478 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1479 | pad.tone(NOTE_A3,0.33/4); |
yfkwok | 23:4a070960817a | 1480 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1481 | pad.tone(NOTE_AS3,0.33/4); |
yfkwok | 23:4a070960817a | 1482 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1483 | pad.tone(NOTE_B3,0.33/4); |
yfkwok | 23:4a070960817a | 1484 | Thread::wait(330/4); |
yfkwok | 23:4a070960817a | 1485 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1486 | pad.tone(NOTE_B4,0.33); |
yfkwok | 23:4a070960817a | 1487 | wait(0.33); |
yfkwok | 23:4a070960817a | 1488 | pad.tone(NOTE_C5,0.33); |
yfkwok | 23:4a070960817a | 1489 | wait(0.33); |
yfkwok | 23:4a070960817a | 1490 | pad.tone(NOTE_A4,0.33); |
yfkwok | 23:4a070960817a | 1491 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1492 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1493 | pad.tone(NOTE_B4,0.33); |
yfkwok | 23:4a070960817a | 1494 | wait(0.33); |
yfkwok | 23:4a070960817a | 1495 | pad.tone(NOTE_C5,0.33); |
yfkwok | 23:4a070960817a | 1496 | wait(0.33); |
yfkwok | 23:4a070960817a | 1497 | pad.tone(NOTE_A4,0.33); |
yfkwok | 23:4a070960817a | 1498 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1499 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1500 | pad.tone(NOTE_C5,0.33); |
yfkwok | 23:4a070960817a | 1501 | wait(0.33); |
yfkwok | 23:4a070960817a | 1502 | pad.tone(NOTE_B4,0.33*4); |
yfkwok | 23:4a070960817a | 1503 | wait(0.33*4); |
yfkwok | 23:4a070960817a | 1504 | pad.tone(NOTE_FS5,0.33*4); |
yfkwok | 23:4a070960817a | 1505 | Thread::wait(330*4); |
yfkwok | 23:4a070960817a | 1506 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1507 | // bar 26 |
yfkwok | 23:4a070960817a | 1508 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1509 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1510 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1511 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1512 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1513 | pad.tone(NOTE_A4,0.33*3); |
yfkwok | 23:4a070960817a | 1514 | wait(0.33*3); |
yfkwok | 23:4a070960817a | 1515 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1516 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1517 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1518 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1519 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1520 | pad.tone(NOTE_CS5,0.33*3); |
yfkwok | 23:4a070960817a | 1521 | wait(0.33*3); |
yfkwok | 23:4a070960817a | 1522 | pad.tone(NOTE_DS4,0.33); |
yfkwok | 23:4a070960817a | 1523 | wait(0.33); |
yfkwok | 23:4a070960817a | 1524 | pad.tone(NOTE_CS4,0.33); |
yfkwok | 23:4a070960817a | 1525 | wait(0.33); |
yfkwok | 23:4a070960817a | 1526 | pad.tone(NOTE_DS4,0.33); |
yfkwok | 23:4a070960817a | 1527 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1528 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1529 | pad.tone(NOTE_E4,0.33/2); |
yfkwok | 23:4a070960817a | 1530 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1531 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1532 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1533 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1534 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1535 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1536 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1537 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1538 | pad.tone(NOTE_CS4,0.33/2); |
yfkwok | 23:4a070960817a | 1539 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1540 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1541 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1542 | pad.tone(NOTE_B4,0.33/2); |
yfkwok | 23:4a070960817a | 1543 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1544 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1545 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1546 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1547 | pad.tone(NOTE_DS4,0.33/2); |
yfkwok | 23:4a070960817a | 1548 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1549 | pad.tone(NOTE_FS4,0.33/2); |
yfkwok | 23:4a070960817a | 1550 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1551 | // bar 30 |
yfkwok | 23:4a070960817a | 1552 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1553 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1554 | pad.tone(NOTE_B3,0.33/2); |
yfkwok | 23:4a070960817a | 1555 | Thread::wait(330/2); |
yfkwok | 23:4a070960817a | 1556 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1557 | pad.tone(NOTE_CS5,0.33*3); |
yfkwok | 23:4a070960817a | 1558 | wait(0.33*3); |
yfkwok | 23:4a070960817a | 1559 | pad.tone(NOTE_A5,0.33*2); |
yfkwok | 23:4a070960817a | 1560 | Thread::wait(330*2); |
yfkwok | 23:4a070960817a | 1561 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1562 | pad.tone(NOTE_E5,0.33*2); |
yfkwok | 23:4a070960817a | 1563 | wait(0.33*2); |
yfkwok | 23:4a070960817a | 1564 | // bar 32 |
yfkwok | 23:4a070960817a | 1565 | pad.tone(NOTE_B5,0.33*4); |
yfkwok | 23:4a070960817a | 1566 | wait(0.33); |
yfkwok | 23:4a070960817a | 1567 | pad.tone(NOTE_E4,0.33); |
yfkwok | 23:4a070960817a | 1568 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1569 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1570 | pad.tone(NOTE_CS4,0.33/2); |
yfkwok | 23:4a070960817a | 1571 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1572 | pad.tone(NOTE_DS4,0.33*1.5); |
yfkwok | 23:4a070960817a | 1573 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1574 | pad.tone(NOTE_FS4,0.33); |
yfkwok | 23:4a070960817a | 1575 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1576 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1577 | pad.tone(NOTE_E4,0.33/2); |
yfkwok | 23:4a070960817a | 1578 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1579 | pad.tone(NOTE_DS4,0.33); |
yfkwok | 23:4a070960817a | 1580 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1581 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1582 | pad.tone(NOTE_E4,0.33*1.5); |
yfkwok | 23:4a070960817a | 1583 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1584 | // bar 34 |
yfkwok | 23:4a070960817a | 1585 | pad.tone(NOTE_DS4,0.33); |
yfkwok | 23:4a070960817a | 1586 | wait(0.33); |
yfkwok | 23:4a070960817a | 1587 | pad.tone(NOTE_E4,0.33); |
yfkwok | 23:4a070960817a | 1588 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1589 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1590 | pad.tone(NOTE_CS4,0.33/2); |
yfkwok | 23:4a070960817a | 1591 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1592 | pad.tone(NOTE_DS4,0.33*1.5); |
yfkwok | 23:4a070960817a | 1593 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1594 | pad.tone(NOTE_FS4,0.33); |
yfkwok | 23:4a070960817a | 1595 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1596 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1597 | pad.tone(NOTE_A4,0.33/2); |
yfkwok | 23:4a070960817a | 1598 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1599 | pad.tone(NOTE_GS4,0.33); |
yfkwok | 23:4a070960817a | 1600 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1601 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1602 | pad.tone(NOTE_G4,0.33*1.5); |
yfkwok | 23:4a070960817a | 1603 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1604 | pad.tone(NOTE_B4,0.33/4); |
yfkwok | 23:4a070960817a | 1605 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1606 | pad.tone(NOTE_DS5,0.33/4); |
yfkwok | 23:4a070960817a | 1607 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1608 | pad.tone(NOTE_FS5,0.33/4); |
yfkwok | 23:4a070960817a | 1609 | wait(0.33/4); |
yfkwok | 23:4a070960817a | 1610 | pad.tone(NOTE_AS5,0.33/4); |
yfkwok | 23:4a070960817a | 1611 | Thread::wait(330/4); |
yfkwok | 23:4a070960817a | 1612 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1613 | // bar 36 |
yfkwok | 23:4a070960817a | 1614 | pad.tone(NOTE_B5,0.33*4); |
yfkwok | 23:4a070960817a | 1615 | wait(0.33); |
yfkwok | 23:4a070960817a | 1616 | pad.tone(NOTE_E4,0.33); |
yfkwok | 23:4a070960817a | 1617 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1618 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1619 | pad.tone(NOTE_CS4,0.33/2); |
yfkwok | 23:4a070960817a | 1620 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1621 | pad.tone(NOTE_DS4,0.33*1.5); |
yfkwok | 23:4a070960817a | 1622 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1623 | pad.tone(NOTE_FS5,0.33); |
yfkwok | 23:4a070960817a | 1624 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1625 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1626 | pad.tone(NOTE_DS4,0.33/2); |
yfkwok | 23:4a070960817a | 1627 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1628 | pad.tone(NOTE_CS4,0.33); |
yfkwok | 23:4a070960817a | 1629 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1630 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1631 | pad.tone(NOTE_C4,0.33*1.5); |
yfkwok | 23:4a070960817a | 1632 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1633 | // bar 38 |
yfkwok | 23:4a070960817a | 1634 | pad.tone(NOTE_A5,0.33*4); |
yfkwok | 23:4a070960817a | 1635 | wait(0.33); |
yfkwok | 23:4a070960817a | 1636 | pad.tone(NOTE_E4,0.33); |
yfkwok | 23:4a070960817a | 1637 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1638 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1639 | pad.tone(NOTE_CS4,0.33/2); |
yfkwok | 23:4a070960817a | 1640 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1641 | pad.tone(NOTE_DS4,0.33*1.5); |
yfkwok | 23:4a070960817a | 1642 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1643 | pad.tone(NOTE_CS6,0.33); |
yfkwok | 23:4a070960817a | 1644 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1645 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1646 | pad.tone(NOTE_A4,0.33/2); |
yfkwok | 23:4a070960817a | 1647 | wait(0.33/2); |
yfkwok | 23:4a070960817a | 1648 | pad.tone(NOTE_GS4,0.33); |
yfkwok | 23:4a070960817a | 1649 | Thread::wait(330); |
yfkwok | 23:4a070960817a | 1650 | if(finished == true) {break;} |
yfkwok | 23:4a070960817a | 1651 | pad.tone(NOTE_A5,0.33*1.5); |
yfkwok | 23:4a070960817a | 1652 | wait(0.33*1.5); |
yfkwok | 23:4a070960817a | 1653 | } |
yfkwok | 1:61b67654ffb7 | 1654 | } |