Functions |
| void | initialize_values () |
| | Initializes all game values so that when the game ends everything returns to it's normal state.
|
| void | ticker_wait (int t) |
| | Waits for t/10 seconds, a more energy efficient but same funtionality as wait()
|
| void | readSD_progress () |
| | Reads the Pregress file on the SD card.
|
| void | writeSD_progress () |
| | Writes the current game progress onto the Progress file on the SD card.
|
| void | readSD_and_print_top_score () |
| | Reads the Highscores file on the SD card and prints the 5 highest numbers in the Highscores array on the lcd screen.
|
| void | writeSD () |
| | Writes the topscore on the 6th position in the Highscores array (so it doesn't overwrite any values that are already stored)
|
| void | delete_file (char filename[]) |
| | Funtion to delete a file.
|
| void | Delete_Highscores () |
| | Delete the Highscores file.
|
| void | sort_top_scores () |
| | Sorts the values and orders them in descending order.
|
| void | play_music () |
| | Plays the next note form song1 array on the piezo buzzer.
|
| void | generate_random_number () |
| | Generates a random munber between 0 and 9999 using the clock on the mbed as a source for the srand() funtion.
|
| void | led_bar () |
| | Displayes the current number of lives on the led bar.
|
| void | ground () |
| | Prints the floor on the LCD.
|
| void | print_heart () |
| | Prints the g_heart array on the LCD.
|
| void | print_ammo_pickUp () |
| | Prints the g_ammo_pickUP on the LCD.
|
| void | print_speed_boost () |
| | Prints the g_speed_boost on the LCD.
|
| void | print_recks_still_gun () |
| | Prints Recks (main character), the g_recks_still_gun array on the LCD.
|
| void | print_recks_moving_gun () |
| | Prints the g_recks_moving_gun array on the LCD.
|
| void | print_recks_crouch_gun () |
| | Prints the g_recks_crouch_gun array on the LCD.
|
| void | print_recks_shield () |
| | Prints the g_recks_shield array on the LCD.
|
| void | print_recks_jump_gun () |
| | Prints the g_recks_jump_gun array on the LCD.
|
| void | print_recks_falling () |
| | Prints the g_recks_falling array on the LCD.
|
| void | print_mob_rat_p1 () |
| | Prints the g_mob_rat_p1 (position 1) array on the LCD.
|
| void | print_mob_rat_p2 () |
| | Prints the g_mob_rat_p2 (position 2) array on the LCD.
|
| void | print_mob_hound_p1 () |
| | Prints the g_mob_hound_p1 (position 1) array on the LCD.
|
| void | print_mob_hound_p2 () |
| | Prints the g_mob_hound_p2 (position 2) array on the LCD.
|
| void | print_mob_hound_dead () |
| | Prints the g_mob_hound_dead array on the LCD.
|
| void | print_mob_bear_p1 () |
| | Prints the g_mob_bear_p1 (position 1) array on the LCD.
|
| void | print_mob_bear_p2 () |
| | Prints the g_mob_bear_p2 (position 2) array on the LCD.
|
| void | print_mob_bear_dead () |
| | Prints the g_mob_bear_dead array on the LCD.
|
| void | print_mob_bird_p1 () |
| | Prints the g_mob_bird_p1 (position 1) array on the LCD.
|
| void | print_mob_bird_p2 () |
| | Prints the g_mob_bird_p2 (position 2) array on the LCD.
|
| void | print_mob_bird_dead () |
| | Prints the g_mob_bear_dead array on the LCD.
|
| void | print_cactus () |
| | Prints the cactus array on the LCD.
|
| void | print_quick_sand () |
| | Prints a line of lengh 16 one pixel above the ground.
|
| void | print_t_rex () |
| | Prints the g_t_rex array on the LCD.
|
| void | print_t_rex_moving () |
| | Prints the g_t_rex_moving array on the LCD.
|
| void | print_t_rex_attack () |
| | Prints the g_t_rex_attack array on the LCD.
|
| void | print_fire_ball_p1 () |
| | Prints the g_fire_ball_p1 (position 1) array on the LCD.
|
| void | print_fire_ball_p2 () |
| | Prints the g_fire_ball_p2 (position 2) array on the LCD.
|
| void | print_clouds () |
| | Prints the g_clouds array on the LCD.
|
| void | print_locks () |
| | Prints the g_clouds array on the LCD.
|
| void | falling_animation () |
| | Prints animation of Recks sinking in quick sand.
|
| void | intro () |
| | Prints the name of the game for 3 seconds when it's turned on.
|
| void | Ticker_Menu_isr () |
| | Funtion that sets g_Ticker_Menu_flag=1.
|
| void | Ticker_Game_isr () |
| | Funtion that sets g_Ticker_Game_flag=1.
|
| void | Ticker_ds_isr () |
| | Funtion that sets g_Ticker_ds_flag=1.
|
| void | music_tOut () |
| | Funtion that sets PWM.period=0.0, so that the tune stops when it times-out.
|
| void | press_b_A_isr () |
| | Funtion that sets g_press_b_A_flag=1.
|
| void | press_b_B_isr () |
| | Funtion that sets g_press_b_B_flag=1.
|
| void | calibrateJoystick () |
| | Funtion that reads the joystick position when it is still and form those readings it allocates values of xPot and yPot that are equicalent to the directions UP, DOWN, LEFT, RIGHT, CENTRE.
|
| void | updateJoystick () |
| | Reads the current values of xPot and yPot and detemins the position of the joysick.
|
| void | main_menu () |
| | Funtion that pritns the main menu options and allows the user to select one of the options by pressing the button A.
|
| void | Minigame () |
| | Funtion that runs the game without the sory mode.
|
| void | Story_Mode () |
| | Funtion that pritns the story mode menu options and allows the user to select one of the chapters by pressing the button A or returning to the main menu by pressing the button B.
|
| void | Tutorial () |
| | Funtion that prints sequential text introducing the game, and the game funtions.
|
| void | Chapter1 () |
| | Funtion that prints sequential text introducing the story and then runs the game on a easy difficulty setting.
|
| void | Chapter2 () |
| | Funtion that prints sequential text expanding the story and then runs the game on a increased difficulty setting.
|
| void | Chapter3 () |
| | Funtion that prints sequential text expanding the story and then runs the game on a increased difficulty setting.
|
| void | Chapter4 () |
| | Funtion that prints sequential text expanding the story and then runs the game with a final boss fight.
|
| void | Settings () |
| | Funtion that pritns the settings menu options and allows the user to select one of the options by pressing the button A or returning to the main menu by pressing the button B.
|
| void | Difficulty () |
| | Funtion that pritns the difficulty menu options and allows the user to select one of the different difficulties by pressing the button A or returning to the main menu by pressing the button B.
|
| void | Brightness () |
| | Funtion that pritns the brightness menu options and allows the user to select one of the different brightnesses by pressing the button A or returning to the main menu by pressing the button B.
|
| void | Leaderboard () |
| | Funtion that allows the user to view the highscores and returning to the main menu by pressing the button B.
|
| void | guns () |
| | Funtion that pritns the guns options and allows the user to select one of the different guns by pressing the button A or returning to the main menu by pressing the button B.
|
| void | Credits () |
| | Prints the credits on the LCD.
|
| void | Recks () |
| | Funtion that contols the motion, physics and interations of Recks with the other interactive elements.
|
| void | rat () |
| | Funtion that contols the motion, physics and interations of the rat with Recks.
|
| void | hound () |
| | Funtion that contols the motion, physics and interations of the hound with Recks.
|
| void | bear () |
| | Funtion that contols the motion, physics and interations of the bear with Recks.
|
| void | bird () |
| | Funtion that contols the motion, physics and interations of the bird with Recks.
|
| void | cactus () |
| | Funtion that contols the motion, physics and interations of the cactus with Recks.
|
| void | t_rex () |
| | Funtion that contols the motion, physics and interations of the T Rex with Recks.
|
| void | fire_ball () |
| | Funtion that contols the motion, physics and interations of the fire ball with Recks.
|
| void | quick_sand () |
| | Funtion that contols the motion, physics and interations of the quick sand with Recks.
|
| void | heart () |
| | Funtion that contols the motion, physics and interations of the heart pickup with Recks.
|
| void | pickUp_ammo () |
| | Funtion that contols the motion, physics and interations of the ammo pickup with Recks.
|
| void | speed_boost () |
| | Funtion that contols the motion, physics and interations of the speed boost with Recks.
|
| void | shield () |
| | Funtion that turns on the shield.
|
| void | Game () |
| | Funtion that runs the game.
|
| void | Pause () |
| | Funtion that stops the game and powers down the LED's until the joystick button is pressed.
|
| void | set_difficulty () |
| | This funtion sets flags for printing interactive elements, depending on the difficulty leavel selected.
|
| int | Game_over () |
| | Funtion that runs when the lives global variable is 0.
|
| void | print_ammo () |
| | Pritns "AMMO" and the remaining ammo on the top right of the LCD screen.
|
| void | print_score () |
| | Prints "SCORE" and the current score value on the top left of the LCD screen.
|