Namespaces |
| namespace | r_led |
| | GPIO output for the on-board red LED.
|
| namespace | g_led |
| | GPIO output for the on-board green LED.
|
| namespace | b_led |
| | GPIO output for the on-board blue LED.
|
| namespace | sw2 |
| | GPIO input for the on-board switch.
|
| namespace | sw3 |
| | GPIO input for the on-board switch.
|
| namespace | js_pot_x |
| | GPIO input for the x-axis potentiometer on the joystick.
|
| namespace | js_pot_y |
| | GPIO input for the y-axis potentiometer on the joystick.
|
| namespace | js_button |
| | GPIO input for the button on the joystick.
|
| namespace | b_button |
| | GPIO input for the button on the PCB.
|
| namespace | lcd |
| | GPIO inputs and outputs for the visual display.
|
| namespace | sd |
| | GPIO inputs and outputs for the SD card.
|
| namespace | update_flag |
| | Ticker to execute the flag update.
|
| namespace | fp |
| | FILE pointer to allow file access from the SD card.
|
| namespace | buzzer |
| | GPIO output for music.
|
| namespace | screen |
| | A three dimensional array for allowing seperate sections of the two dimensional lcd.
|
| namespace | pointer_obj |
| | Object for the pointer array.
|
| namespace | player_still_obj |
| | Object for the player_still array.
|
| namespace | player_moving1_obj |
| | Object for the player_moving1 array.
|
| namespace | player_moving2_obj |
| | Object for the player_moving2 array.
|
| namespace | player_jumping_obj |
| | Object for the player_jumping array.
|
| namespace | spike_small_obj1 |
| | Object for the spike_small array.
|
| namespace | spike_small_obj2 |
| | Object for the spike_small array.
|
| namespace | spike_small_obj3 |
| | Object for the spike_small array.
|
| namespace | spike_large_obj1 |
| | Object for the spike_large array.
|
| namespace | spike_large_obj2 |
| | Object for the spike_large array.
|
| namespace | player |
| | Animation for the player_still array, player_moving1 array and player_moving2 array.
|
| namespace | bat1 |
| | Animation for the bat_middle array, bat_open array and bat_close array.
|
| namespace | bat2 |
| | Animation for the bat_middle array, bat_open array and bat_close array.
|
| namespace | bat3 |
| | Animation for the bat_middle array, bat_open array and bat_close array.
|
| namespace | bat4 |
| | Animation for the bat_middle array, bat_open array and bat_close array.
|
| namespace | bat5 |
| | Animation for the bat_middle array, bat_open array and bat_close array.
|
| namespace | background |
| | Background to add scenery to the BG sub-array.
|
Functions |
| void | calibrate_joystick () |
| | Calibrates the joystick from it's initial position.
|
| void | update_flag_func () |
| | Sets to up_flag to true.
|
| void | update_joystick () |
| | Sets the new values for the joystick struct variables.
|
| bool | js_button_check () |
| | Checks if the js_button has been held down.
|
| bool | b_button_check () |
| | Checks if the b_button has been held down.
|
| void | init_K64F () |
| | Initialises the settings of on-board components for the K64F.
|
| void | init_N5110 () |
| | Initialises the settings of the N5110.
|
| void | init_obj () |
| | Initialises the objects with bitmaps.
|
| void | menu () |
| | Runs the menu screen and allows for progression to further game functions.
|
| void | menu_select () |
| | Runs the function as declared by the variable option set in th menu.
|
| void | start_game () |
| | Runs the game and calls all other functions relevant to the game.
|
| void | init_game () |
| | Initialises all variables used in the game and sets the initial screen.
|
| void | init_player () |
| | Initialises the players position and speed.
|
| void | draw_health () |
| | Sets the health animations in the HEALTH sub-array.
|
| void | check_collisions () |
| | Determines whether the player has collided with the spikes.
|
| void | update_physics_engine () |
| | Updates the players position depending on the players current position, velocity and acceleration, all determined from SUVAT equations.
|
| void | redraw () |
| | Updates the lcd to show the new game state.
|
| void | death () |
| | Ends the game and shows the user their score when they run out of lives.
|
| void | highscores () |
| | Displays the five highest scores and the name of the person who got the score.
|
| void | new_highscore () |
| | Determines whether the latest score after death is higher than any current highscores and sets it accordingly.
|
| void | register_name () |
| | Allows the user to resgister a name to accompany their new highscore.
|
| void | rules () |
| | Displays an overview of the games concept.
|
| void | credits () |
| | Displays the details of the games creator.
|
Variables |
| float | refresh_rate |
| float | g_dt |
| bool | up_flag |
| bool | js_button_previous |
| bool | b_button_previous |
| bool | menu_viewed |
| bool | jumping |
| bool | spike1_there |
| bool | spike2_there |
| bool | spike3_there |
| bool | spike4_there |
| bool | spike5_there |
| bool | dead |
| int | selector |
| int | option |
| int | health |
| int | spike_x1 |
| int | spike_x2 |
| int | spike_x3 |
| int | spike_x4 |
| int | spike_x5 |
| int | spike1_counter |
| int | spike2_counter |
| int | spike3_counter |
| int | spike4_counter |
| int | spike5_counter |
| int | jump_counter |
| int | score_counter |
| int | highscore1 |
| int | highscore2 |
| int | highscore3 |
| int | highscore4 |
| int | highscore5 |
| int | letter |
| int | letter1 |
| int | letter2 |
| int | letter3 |
| int | letter_counter |
| char | score [10] |
| char | score1 [10] |
| char | score2 [10] |
| char | score3 [10] |
| char | score4 [10] |
| char | score5 [10] |
| char | name [3] |
| char | name1 [4] |
| char | name2 [4] |
| char | name3 [4] |
| char | name4 [4] |
| char | name5 [4] |