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