A retro gaming programme, designed for use on a portable embedded system. Incorporates power saving techniques.
Dependencies: ConfigFile N5110 PowerControl beep mbed
tower.h@78:e2fc547c6b99, 2015-05-11 (annotated)
- Committer:
- el13drt
- Date:
- Mon May 11 14:38:04 2015 +0000
- Revision:
- 78:e2fc547c6b99
- Parent:
- 76:c11cb774bd27
gduhg
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el13drt | 62:827cda7a2663 | 1 | /** |
el13drt | 62:827cda7a2663 | 2 | @file tower.h |
el13drt | 62:827cda7a2663 | 3 | @brief Revision 1.0. |
el13drt | 62:827cda7a2663 | 4 | @author Daniel R. Tomlinson |
el13drt | 62:827cda7a2663 | 5 | @date May 2015 |
el13drt | 13:a1b3a373c5a4 | 6 | |
el13drt | 62:827cda7a2663 | 7 | @brief Header file - Contains Global Variables, Inputs/Outputs and Function prototypes. |
el13drt | 62:827cda7a2663 | 8 | */ |
el13drt | 62:827cda7a2663 | 9 | |
el13drt | 62:827cda7a2663 | 10 | ///Alters tolerance of Joystick directions |
el13drt | 13:a1b3a373c5a4 | 11 | #define DIRECTION_TOLERANCE 0.05 |
el13drt | 54:8180eec1656d | 12 | #include "ConfigFile.h" |
el13drt | 12:eedda6554615 | 13 | |
el13drt | 62:827cda7a2663 | 14 | /** |
el13drt | 62:827cda7a2663 | 15 | @namespace lcd |
el13drt | 63:ff9b64b23d26 | 16 | @brief Object of the N5110 class, allocates pins to the LCD screen |
el13drt | 63:ff9b64b23d26 | 17 | (VCC, SCE, RST, D/C, MOSI, SCLK, LED). |
el13drt | 62:827cda7a2663 | 18 | */ |
el13drt | 62:827cda7a2663 | 19 | N5110 lcd(p7,p8,p9,p10,p11,p13,p22);//VCC, SCE, RST, D/C, MOSI, SCLK, LED - assign pins for LCD. |
el13drt | 55:bb4f6cc196c8 | 20 | |
el13drt | 78:e2fc547c6b99 | 21 | |
el13drt | 78:e2fc547c6b99 | 22 | /** |
el13drt | 78:e2fc547c6b99 | 23 | @namespace local |
el13drt | 78:e2fc547c6b99 | 24 | @brief Local file system, used to create read/write file path within the Mbeds flash memory. |
el13drt | 78:e2fc547c6b99 | 25 | */ |
el13drt | 64:715fb5a1e58b | 26 | LocalFileSystem local("local"); |
el13drt | 64:715fb5a1e58b | 27 | |
el13drt | 62:827cda7a2663 | 28 | /** |
el13drt | 63:ff9b64b23d26 | 29 | @namespace cfg |
el13drt | 63:ff9b64b23d26 | 30 | @brief Object of the ConfigFile, used to create read/write file path within the Mbeds flash memory. |
el13drt | 62:827cda7a2663 | 31 | */ |
el13drt | 54:8180eec1656d | 32 | ConfigFile cfg; |
el13drt | 24:eb80956e2e95 | 33 | |
el13drt | 62:827cda7a2663 | 34 | /** |
el13drt | 63:ff9b64b23d26 | 35 | @namespace serial |
el13drt | 63:ff9b64b23d26 | 36 | @brief Serial port out - Generic protocol used to send and receive data, used for debugging. |
el13drt | 62:827cda7a2663 | 37 | */ |
el13drt | 54:8180eec1656d | 38 | Serial serial(USBTX, USBRX); |
el13drt | 54:8180eec1656d | 39 | |
el13drt | 62:827cda7a2663 | 40 | /** |
el13drt | 78:e2fc547c6b99 | 41 | @namespace deBounce A |
el13drt | 78:e2fc547c6b99 | 42 | @brief Creates a minimum time span before buttonA is acknowledged; at intervals of 0.1 sec. |
el13drt | 76:c11cb774bd27 | 43 | */ |
el13drt | 76:c11cb774bd27 | 44 | Timer deBounce1;//for buttonA |
el13drt | 76:c11cb774bd27 | 45 | |
el13drt | 76:c11cb774bd27 | 46 | /** |
el13drt | 78:e2fc547c6b99 | 47 | @namespace deBounce B |
el13drt | 78:e2fc547c6b99 | 48 | @brief Creates a minimum time span before buttonB is acknowledged; at intervals of 0.1 sec. |
el13drt | 76:c11cb774bd27 | 49 | */ |
el13drt | 76:c11cb774bd27 | 50 | Timer deBounce2;//for buttonB |
el13drt | 76:c11cb774bd27 | 51 | |
el13drt | 76:c11cb774bd27 | 52 | /** |
el13drt | 76:c11cb774bd27 | 53 | @namespace timerGame |
el13drt | 78:e2fc547c6b99 | 54 | @brief Calls the function, gameLoop(); at intervals of 0.1 sec. |
el13drt | 76:c11cb774bd27 | 55 | */ |
el13drt | 76:c11cb774bd27 | 56 | Ticker timerGame;//for game |
el13drt | 76:c11cb774bd27 | 57 | |
el13drt | 76:c11cb774bd27 | 58 | /** |
el13drt | 63:ff9b64b23d26 | 59 | @namespace timerA |
el13drt | 63:ff9b64b23d26 | 60 | @brief Calls the function, timerExpiredA(); at intervals of 0.1 sec. |
el13drt | 62:827cda7a2663 | 61 | */ |
el13drt | 35:9f55326c1b0a | 62 | Ticker timerA;//for buttonA |
el13drt | 62:827cda7a2663 | 63 | |
el13drt | 62:827cda7a2663 | 64 | /** |
el13drt | 63:ff9b64b23d26 | 65 | @namespace timerB |
el13drt | 63:ff9b64b23d26 | 66 | @brief Calls the function, timerExpiredB(); at intervals of 0.1 sec. |
el13drt | 62:827cda7a2663 | 67 | */ |
el13drt | 35:9f55326c1b0a | 68 | Ticker timerB;//for buttonB |
el13drt | 15:ff3eb0091453 | 69 | |
el13drt | 62:827cda7a2663 | 70 | /** |
el13drt | 63:ff9b64b23d26 | 71 | @namespace pollJoystick |
el13drt | 63:ff9b64b23d26 | 72 | @brief Calls the function, updateJoystick(); at intervals of 1/10 seconds. |
el13drt | 62:827cda7a2663 | 73 | */ |
el13drt | 62:827cda7a2663 | 74 | Ticker pollJoystick; |
el13drt | 62:827cda7a2663 | 75 | |
el13drt | 62:827cda7a2663 | 76 | /** |
el13drt | 65:c5dad703f752 | 77 | @namespace standby |
el13drt | 66:d5174aa5839d | 78 | @brief Calls the function, screenOff(); at intervals of 60 seconds. |
el13drt | 65:c5dad703f752 | 79 | */ |
el13drt | 65:c5dad703f752 | 80 | Ticker standby; |
el13drt | 65:c5dad703f752 | 81 | |
el13drt | 65:c5dad703f752 | 82 | /** |
el13drt | 63:ff9b64b23d26 | 83 | @namespace buzzer |
el13drt | 63:ff9b64b23d26 | 84 | @brief Object of the beep class, allocates a pin to the Piezo buzzer. |
el13drt | 62:827cda7a2663 | 85 | */ |
el13drt | 13:a1b3a373c5a4 | 86 | Beep buzzer(p21); |
el13drt | 13:a1b3a373c5a4 | 87 | |
el13drt | 62:827cda7a2663 | 88 | /** |
el13drt | 62:827cda7a2663 | 89 | @namespace buttonA |
el13drt | 74:d76be537bafd | 90 | @brief DigitalIn, allocates a pin to push button A. |
el13drt | 62:827cda7a2663 | 91 | */ |
el13drt | 62:827cda7a2663 | 92 | DigitalIn buttonA(p20); |
el13drt | 13:a1b3a373c5a4 | 93 | |
el13drt | 62:827cda7a2663 | 94 | /** |
el13drt | 62:827cda7a2663 | 95 | @namespace buttonB |
el13drt | 74:d76be537bafd | 96 | @brief DigitalIn, allocates a pin to push button B. |
el13drt | 62:827cda7a2663 | 97 | */ |
el13drt | 62:827cda7a2663 | 98 | DigitalIn buttonB(p19); |
el13drt | 62:827cda7a2663 | 99 | |
el13drt | 62:827cda7a2663 | 100 | /** |
el13drt | 78:e2fc547c6b99 | 101 | @namespace ledA |
el13drt | 74:d76be537bafd | 102 | @brief AnalgOut,allocates a pin to the Action LED. |
el13drt | 62:827cda7a2663 | 103 | */ |
el13drt | 47:88e3e6c0452d | 104 | AnalogOut ledA(p18);//action LED |
el13drt | 62:827cda7a2663 | 105 | |
el13drt | 62:827cda7a2663 | 106 | /** |
el13drt | 78:e2fc547c6b99 | 107 | @namespace ledP |
el13drt | 78:e2fc547c6b99 | 108 | @brief DigitalOut, allocates a pin to the Power LED. |
el13drt | 62:827cda7a2663 | 109 | */ |
el13drt | 47:88e3e6c0452d | 110 | DigitalOut ledP(p24);//Power LED |
el13drt | 13:a1b3a373c5a4 | 111 | |
el13drt | 62:827cda7a2663 | 112 | /** |
el13drt | 78:e2fc547c6b99 | 113 | @namespace joyButton |
el13drt | 78:e2fc547c6b99 | 114 | @brief InterruptIn, allocates a pin to the Joy Stick button. |
el13drt | 62:827cda7a2663 | 115 | */ |
el13drt | 14:c2c969e1c6e8 | 116 | InterruptIn joyButton(p17);//Interrupt for ISR |
el13drt | 62:827cda7a2663 | 117 | |
el13drt | 62:827cda7a2663 | 118 | /** |
el13drt | 78:e2fc547c6b99 | 119 | @namespace xpot |
el13drt | 78:e2fc547c6b99 | 120 | @brief AnalogIn, allocates a pin to xPot. |
el13drt | 62:827cda7a2663 | 121 | */ |
el13drt | 35:9f55326c1b0a | 122 | AnalogIn xPot(p15);//left/right |
el13drt | 62:827cda7a2663 | 123 | |
el13drt | 62:827cda7a2663 | 124 | /** |
el13drt | 78:e2fc547c6b99 | 125 | @namespace ypot |
el13drt | 78:e2fc547c6b99 | 126 | @brief AnalogIn, allocates a pin to yPot. |
el13drt | 62:827cda7a2663 | 127 | */ |
el13drt | 35:9f55326c1b0a | 128 | AnalogIn yPot(p16);//up/down |
el13drt | 13:a1b3a373c5a4 | 129 | |
el13drt | 62:827cda7a2663 | 130 | //Globabl Variables |
el13drt | 12:eedda6554615 | 131 | |
el13drt | 35:9f55326c1b0a | 132 | //sound FX toggle |
el13drt | 62:827cda7a2663 | 133 | int FX = 0;/*!< Toggle for Sound FX. */ |
el13drt | 17:242ccf6a8442 | 134 | |
el13drt | 35:9f55326c1b0a | 135 | //previous Direction |
el13drt | 40:56ab6d368e9b | 136 | //stops continuous scrolling on some features |
el13drt | 62:827cda7a2663 | 137 | int preDirection;/*!< Used to stop continuous scrolling. */ |
el13drt | 34:9dc844bdc776 | 138 | |
el13drt | 35:9f55326c1b0a | 139 | //timer flags to check state of the buttons |
el13drt | 62:827cda7a2663 | 140 | int buttonFlagA = 0;/*!< Button flag set for ISR when state of buttonA changes. */ |
el13drt | 62:827cda7a2663 | 141 | int buttonFlagB = 0;/*!< Button flag set for ISR when state of buttonB changes. */ |
el13drt | 15:ff3eb0091453 | 142 | |
el13drt | 76:c11cb774bd27 | 143 | //flag for game loop |
el13drt | 78:e2fc547c6b99 | 144 | int gameFlag = 0;/*!< Button flag set for ISR when game has started. */ |
el13drt | 76:c11cb774bd27 | 145 | |
el13drt | 35:9f55326c1b0a | 146 | //flag for joystick reading |
el13drt | 62:827cda7a2663 | 147 | int printFlag = 0;/*!< Print flag set for ISR when Joystick is moved. */ |
el13drt | 14:c2c969e1c6e8 | 148 | |
el13drt | 35:9f55326c1b0a | 149 | //boundary conditions |
el13drt | 62:827cda7a2663 | 150 | int cells [84][48];/*!< Boundary conditions for cells.*/ |
el13drt | 12:eedda6554615 | 151 | |
el13drt | 35:9f55326c1b0a | 152 | //real time score |
el13drt | 62:827cda7a2663 | 153 | int score = 0;/*!< Integer to show and print Scores. */ |
el13drt | 12:eedda6554615 | 154 | |
el13drt | 35:9f55326c1b0a | 155 | //stored high score variables |
el13drt | 72:ade25d595dc9 | 156 | int highScore1;/*!< Integer to store Score 1. */ |
el13drt | 72:ade25d595dc9 | 157 | int highScore2;/*!< Integer to store Score 2. */ |
el13drt | 72:ade25d595dc9 | 158 | int highScore3;/*!< Integer to store Score 3. */ |
el13drt | 21:1fbbd8ebb3d9 | 159 | |
el13drt | 73:1b03202c987a | 160 | //global char buffers to store initials/score |
el13drt | 78:e2fc547c6b99 | 161 | char player1initials[14];/*!< Buffer for printing Initials and Top Score 1.*/ |
el13drt | 78:e2fc547c6b99 | 162 | char player2initials[14];/*!< Buffer for printing Initials and Top Score 2.*/ |
el13drt | 78:e2fc547c6b99 | 163 | char player3initials[14];/*!< Buffer for printing Initials and Top Score 3.*/ |
el13drt | 25:70048c7e02c7 | 164 | |
el13drt | 35:9f55326c1b0a | 165 | //difficulty variable - hazards fall at 2 pixels per refresh |
el13drt | 62:827cda7a2663 | 166 | int fall = 2;/*!< Increments hazards each Iteration by the Integer stored. */ |
el13drt | 12:eedda6554615 | 167 | |
el13drt | 35:9f55326c1b0a | 168 | //global variables for movement (pixelNinja) |
el13drt | 12:eedda6554615 | 169 | int a1 = 22; |
el13drt | 12:eedda6554615 | 170 | int a2 = 24; |
el13drt | 12:eedda6554615 | 171 | int a3 = 23; |
el13drt | 60:681bc941b94d | 172 | int a4 = 22; |
el13drt | 60:681bc941b94d | 173 | int a5 = 22; |
el13drt | 60:681bc941b94d | 174 | int a6 = 24; |
el13drt | 60:681bc941b94d | 175 | int a7 = 25; |
el13drt | 60:681bc941b94d | 176 | int a8 = 20; |
el13drt | 60:681bc941b94d | 177 | int a9 = 20; |
el13drt | 60:681bc941b94d | 178 | int a10 = 26; |
el13drt | 60:681bc941b94d | 179 | int a11 = 26; |
el13drt | 60:681bc941b94d | 180 | int a12 = 26; |
el13drt | 60:681bc941b94d | 181 | int a13 = 24; |
el13drt | 60:681bc941b94d | 182 | int a14 = 19; |
el13drt | 60:681bc941b94d | 183 | int a15 = 20; |
el13drt | 60:681bc941b94d | 184 | int a16 = 21; |
el13drt | 12:eedda6554615 | 185 | |
el13drt | 35:9f55326c1b0a | 186 | //global variable for hazard X co-ordinates |
el13drt | 62:827cda7a2663 | 187 | int randX1;/*!< X co-ordinate for Hazard 1. */ |
el13drt | 62:827cda7a2663 | 188 | int randX2;/*!< X co-ordinate for Hazard 2. */ |
el13drt | 62:827cda7a2663 | 189 | int randX3;/*!< X co-ordinate for Hazard 3. */ |
el13drt | 62:827cda7a2663 | 190 | int randX4;/*!< X co-ordinate for Hazard 4. */ |
el13drt | 62:827cda7a2663 | 191 | int randX5;/*!< X co-ordinate for Hazard 5. */ |
el13drt | 62:827cda7a2663 | 192 | int randX6;/*!< X co-ordinate for Hazard 6. */ |
el13drt | 12:eedda6554615 | 193 | |
el13drt | 35:9f55326c1b0a | 194 | //global variable for hazard Y co-ordinates |
el13drt | 62:827cda7a2663 | 195 | int randY1 = 1;/*!< Y co-ordinate for Hazard 1. */ |
el13drt | 62:827cda7a2663 | 196 | int randY2 = 1;/*!< Y co-ordinate for Hazard 2. */ |
el13drt | 62:827cda7a2663 | 197 | int randY3 = 1;/*!< Y co-ordinate for Hazard 3. */ |
el13drt | 62:827cda7a2663 | 198 | int randY4 = 1;/*!< Y co-ordinate for Hazard 4. */ |
el13drt | 62:827cda7a2663 | 199 | int randY5 = 1;/*!< Y co-ordinate for Hazard 5. */ |
el13drt | 62:827cda7a2663 | 200 | int randY6 = 1;/*!< Y co-ordinate for Hazard 6. */ |
el13drt | 12:eedda6554615 | 201 | |
el13drt | 35:9f55326c1b0a | 202 | //integers for changing struct ouput states |
el13drt | 62:827cda7a2663 | 203 | int state1 = 0;/*!< State number for Output 1.*/ |
el13drt | 62:827cda7a2663 | 204 | int state2 = 0;/*!< State number for output 2.*/ |
el13drt | 62:827cda7a2663 | 205 | int state3 = 0;/*!< State number for output 3.*/ |
el13drt | 35:9f55326c1b0a | 206 | |
el13drt | 72:ade25d595dc9 | 207 | /** |
el13drt | 72:ade25d595dc9 | 208 | */ |
el13drt | 78:e2fc547c6b99 | 209 | void write(); |
el13drt | 72:ade25d595dc9 | 210 | |
el13drt | 72:ade25d595dc9 | 211 | /** |
el13drt | 72:ade25d595dc9 | 212 | */ |
el13drt | 78:e2fc547c6b99 | 213 | void read(); |
el13drt | 72:ade25d595dc9 | 214 | |
el13drt | 72:ade25d595dc9 | 215 | /** |
el13drt | 72:ade25d595dc9 | 216 | */ |
el13drt | 35:9f55326c1b0a | 217 | void timerExpiredA(); |
el13drt | 72:ade25d595dc9 | 218 | |
el13drt | 72:ade25d595dc9 | 219 | /** |
el13drt | 72:ade25d595dc9 | 220 | */ |
el13drt | 35:9f55326c1b0a | 221 | void timerExpiredB(); |
el13drt | 72:ade25d595dc9 | 222 | |
el13drt | 72:ade25d595dc9 | 223 | /** |
el13drt | 72:ade25d595dc9 | 224 | */ |
el13drt | 35:9f55326c1b0a | 225 | void randomise(); |
el13drt | 72:ade25d595dc9 | 226 | |
el13drt | 72:ade25d595dc9 | 227 | /** |
el13drt | 72:ade25d595dc9 | 228 | */ |
el13drt | 78:e2fc547c6b99 | 229 | void drawBackground(); |
el13drt | 78:e2fc547c6b99 | 230 | |
el13drt | 78:e2fc547c6b99 | 231 | /** |
el13drt | 78:e2fc547c6b99 | 232 | */ |
el13drt | 78:e2fc547c6b99 | 233 | void drawWelcome(); |
el13drt | 78:e2fc547c6b99 | 234 | |
el13drt | 78:e2fc547c6b99 | 235 | /** |
el13drt | 78:e2fc547c6b99 | 236 | */ |
el13drt | 78:e2fc547c6b99 | 237 | void drawNinja(); |
el13drt | 78:e2fc547c6b99 | 238 | |
el13drt | 78:e2fc547c6b99 | 239 | /** |
el13drt | 78:e2fc547c6b99 | 240 | */ |
el13drt | 78:e2fc547c6b99 | 241 | void ninjaBoundaries(); |
el13drt | 78:e2fc547c6b99 | 242 | |
el13drt | 78:e2fc547c6b99 | 243 | /** |
el13drt | 78:e2fc547c6b99 | 244 | */ |
el13drt | 35:9f55326c1b0a | 245 | void resetGame(); |
el13drt | 72:ade25d595dc9 | 246 | |
el13drt | 72:ade25d595dc9 | 247 | /** |
el13drt | 72:ade25d595dc9 | 248 | */ |
el13drt | 78:e2fc547c6b99 | 249 | void drawHazards(); |
el13drt | 78:e2fc547c6b99 | 250 | |
el13drt | 78:e2fc547c6b99 | 251 | /** |
el13drt | 78:e2fc547c6b99 | 252 | */ |
el13drt | 78:e2fc547c6b99 | 253 | void hazardFall(); |
el13drt | 78:e2fc547c6b99 | 254 | |
el13drt | 78:e2fc547c6b99 | 255 | /** |
el13drt | 78:e2fc547c6b99 | 256 | */ |
el13drt | 35:9f55326c1b0a | 257 | void startrek(); |
el13drt | 72:ade25d595dc9 | 258 | |
el13drt | 72:ade25d595dc9 | 259 | /** |
el13drt | 72:ade25d595dc9 | 260 | */ |
el13drt | 35:9f55326c1b0a | 261 | void refreshCursor1(); |
el13drt | 72:ade25d595dc9 | 262 | |
el13drt | 72:ade25d595dc9 | 263 | /** |
el13drt | 72:ade25d595dc9 | 264 | */ |
el13drt | 35:9f55326c1b0a | 265 | void refreshCursor2(); |
el13drt | 72:ade25d595dc9 | 266 | |
el13drt | 72:ade25d595dc9 | 267 | /** |
el13drt | 72:ade25d595dc9 | 268 | */ |
el13drt | 35:9f55326c1b0a | 269 | void refreshCursor3(); |
el13drt | 78:e2fc547c6b99 | 270 | /** |
el13drt | 78:e2fc547c6b99 | 271 | */ |
el13drt | 78:e2fc547c6b99 | 272 | void actionbuttons(); |
el13drt | 78:e2fc547c6b99 | 273 | |
el13drt | 78:e2fc547c6b99 | 274 | /** |
el13drt | 78:e2fc547c6b99 | 275 | Uses a counter and Joystick directions for navigation |
el13drt | 78:e2fc547c6b99 | 276 | Presents user with options |
el13drt | 78:e2fc547c6b99 | 277 | @param mainOption - integer to increment / decrement |
el13drt | 78:e2fc547c6b99 | 278 | */ |
el13drt | 78:e2fc547c6b99 | 279 | void mainMenu(); |
el13drt | 72:ade25d595dc9 | 280 | |
el13drt | 72:ade25d595dc9 | 281 | /** |
el13drt | 72:ade25d595dc9 | 282 | */ |
el13drt | 78:e2fc547c6b99 | 283 | void drawMainMenu(); |
el13drt | 78:e2fc547c6b99 | 284 | |
el13drt | 78:e2fc547c6b99 | 285 | /** |
el13drt | 78:e2fc547c6b99 | 286 | Uses a counter and Joystick directions for navigation |
el13drt | 78:e2fc547c6b99 | 287 | Presents user with options |
el13drt | 78:e2fc547c6b99 | 288 | @param exitOption - integer to increment / decrement |
el13drt | 78:e2fc547c6b99 | 289 | */ |
el13drt | 78:e2fc547c6b99 | 290 | void exitMenu(); |
el13drt | 63:ff9b64b23d26 | 291 | |
el13drt | 63:ff9b64b23d26 | 292 | /** |
el13drt | 63:ff9b64b23d26 | 293 | */ |
el13drt | 60:681bc941b94d | 294 | void ninjaLeft(); |
el13drt | 63:ff9b64b23d26 | 295 | |
el13drt | 63:ff9b64b23d26 | 296 | /** |
el13drt | 63:ff9b64b23d26 | 297 | */ |
el13drt | 60:681bc941b94d | 298 | void ninjaRight(); |
el13drt | 63:ff9b64b23d26 | 299 | |
el13drt | 63:ff9b64b23d26 | 300 | /** |
el13drt | 63:ff9b64b23d26 | 301 | */ |
el13drt | 78:e2fc547c6b99 | 302 | void drawExitMenu(); |
el13drt | 63:ff9b64b23d26 | 303 | |
el13drt | 63:ff9b64b23d26 | 304 | /** |
el13drt | 78:e2fc547c6b99 | 305 | Uses a counter and Joystick directions for navigation |
el13drt | 78:e2fc547c6b99 | 306 | Presents user with options |
el13drt | 78:e2fc547c6b99 | 307 | @param option - integer to incremenet / decrement |
el13drt | 63:ff9b64b23d26 | 308 | */ |
el13drt | 35:9f55326c1b0a | 309 | void optionsMenu(); |
el13drt | 63:ff9b64b23d26 | 310 | |
el13drt | 63:ff9b64b23d26 | 311 | /** |
el13drt | 63:ff9b64b23d26 | 312 | */ |
el13drt | 78:e2fc547c6b99 | 313 | void drawOptionsMenu(); |
el13drt | 63:ff9b64b23d26 | 314 | |
el13drt | 63:ff9b64b23d26 | 315 | /** |
el13drt | 78:e2fc547c6b99 | 316 | Uses a counter and Joystick directions for navigation |
el13drt | 78:e2fc547c6b99 | 317 | Presents user the options |
el13drt | 78:e2fc547c6b99 | 318 | @param subOption - integer to increment / decrement |
el13drt | 63:ff9b64b23d26 | 319 | */ |
el13drt | 35:9f55326c1b0a | 320 | void difficultyMenu(); |
el13drt | 63:ff9b64b23d26 | 321 | |
el13drt | 63:ff9b64b23d26 | 322 | /** |
el13drt | 63:ff9b64b23d26 | 323 | */ |
el13drt | 78:e2fc547c6b99 | 324 | void drawDifficultyMenu(); |
el13drt | 78:e2fc547c6b99 | 325 | |
el13drt | 78:e2fc547c6b99 | 326 | /** |
el13drt | 78:e2fc547c6b99 | 327 | Uses a counter and Joystick directions for navigation |
el13drt | 78:e2fc547c6b99 | 328 | Presents user the options |
el13drt | 78:e2fc547c6b99 | 329 | @param fxOption - integer to increment / decrement |
el13drt | 78:e2fc547c6b99 | 330 | */ |
el13drt | 35:9f55326c1b0a | 331 | void soundFXMenu(); |
el13drt | 63:ff9b64b23d26 | 332 | |
el13drt | 63:ff9b64b23d26 | 333 | /** |
el13drt | 63:ff9b64b23d26 | 334 | */ |
el13drt | 78:e2fc547c6b99 | 335 | void drawSoundFXMenu(); |
el13drt | 78:e2fc547c6b99 | 336 | |
el13drt | 78:e2fc547c6b99 | 337 | /** |
el13drt | 78:e2fc547c6b99 | 338 | */ |
el13drt | 78:e2fc547c6b99 | 339 | void gameLoop(); |
el13drt | 78:e2fc547c6b99 | 340 | |
el13drt | 78:e2fc547c6b99 | 341 | /** |
el13drt | 78:e2fc547c6b99 | 342 | */ |
el13drt | 78:e2fc547c6b99 | 343 | void newScore(); |
el13drt | 78:e2fc547c6b99 | 344 | |
el13drt | 78:e2fc547c6b99 | 345 | /** |
el13drt | 78:e2fc547c6b99 | 346 | Uses a counter and Joystick directions to navigate the exitMenu |
el13drt | 78:e2fc547c6b99 | 347 | Presents user with options |
el13drt | 78:e2fc547c6b99 | 348 | @param exitFlag - integer set to break main loop and return to the main menu |
el13drt | 78:e2fc547c6b99 | 349 | @param exitOption - integer to increment / decrement |
el13drt | 78:e2fc547c6b99 | 350 | */ |
el13drt | 78:e2fc547c6b99 | 351 | void game(); |
el13drt | 78:e2fc547c6b99 | 352 | |
el13drt | 78:e2fc547c6b99 | 353 | |
el13drt | 78:e2fc547c6b99 | 354 | /** |
el13drt | 78:e2fc547c6b99 | 355 | */ |
el13drt | 35:9f55326c1b0a | 356 | void scores(); |
el13drt | 35:9f55326c1b0a | 357 | |
el13drt | 62:827cda7a2663 | 358 | /** |
el13drt | 62:827cda7a2663 | 359 | */ |
el13drt | 78:e2fc547c6b99 | 360 | void optionsMenu(); |
el13drt | 62:827cda7a2663 | 361 | |
el13drt | 62:827cda7a2663 | 362 | /** |
el13drt | 62:827cda7a2663 | 363 | */ |
el13drt | 78:e2fc547c6b99 | 364 | void calibrateJoystick(); |
el13drt | 62:827cda7a2663 | 365 | |
el13drt | 62:827cda7a2663 | 366 | /** |
el13drt | 62:827cda7a2663 | 367 | */ |
el13drt | 78:e2fc547c6b99 | 368 | void updateJoystick(); |
el13drt | 62:827cda7a2663 | 369 | |
el13drt | 62:827cda7a2663 | 370 | /** |
el13drt | 62:827cda7a2663 | 371 | */ |
el13drt | 78:e2fc547c6b99 | 372 | void screenOff(); |
el13drt | 62:827cda7a2663 | 373 | |
el13drt | 62:827cda7a2663 | 374 | /** |
el13drt | 62:827cda7a2663 | 375 | */ |
el13drt | 78:e2fc547c6b99 | 376 | void idleMode(); |