Dependents:
DCGame
el14m2l_Dungeon_Crawler_Game
« Back to documentation index
main.cpp File Reference
Member functions implementations.
More...
Go to the source code of this file.
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.
Detailed Description
Member functions implementations.
Definition in file main.cpp .
Function Documentation
Checks if the b_button has been held down.
Returns: false if the button has already been registered as presed but is being held down else true
Definition at line 121 of file main.cpp .
void calibrate_joystick
(
)
Calibrates the joystick from it's initial position.
Definition at line 60 of file main.cpp .
void check_collisions
(
)
Determines whether the player has collided with the spikes.
Definition at line 572 of file main.cpp .
Displays the details of the games creator.
Definition at line 2214 of file main.cpp .
Ends the game and shows the user their score when they run out of lives.
Definition at line 687 of file main.cpp .
Sets the health animations in the HEALTH sub-array.
Definition at line 545 of file main.cpp .
Displays the five highest scores and the name of the person who got the score.
Definition at line 708 of file main.cpp .
Initialises all variables used in the game and sets the initial screen.
Definition at line 484 of file main.cpp .
Initialises the settings of on-board components for the K64F.
Definition at line 134 of file main.cpp .
Initialises the settings of the N5110.
Definition at line 148 of file main.cpp .
Initialises the objects with bitmaps.
Definition at line 155 of file main.cpp .
Initialises the players position and speed.
Definition at line 534 of file main.cpp .
Checks if the js_button has been held down.
Returns: false if the button has already been registered as presed but is being held down else true
Definition at line 108 of file main.cpp .
Runs the menu screen and allows for progression to further game functions.
Definition at line 169 of file main.cpp .
Runs the function as declared by the variable option set in th menu.
Definition at line 336 of file main.cpp .
Determines whether the latest score after death is higher than any current highscores and sets it accordingly.
Definition at line 739 of file main.cpp .
Updates the lcd to show the new game state.
Definition at line 651 of file main.cpp .
Allows the user to resgister a name to accompany their new highscore.
Definition at line 889 of file main.cpp .
Displays an overview of the games concept.
Definition at line 2188 of file main.cpp .
Runs the game and calls all other functions relevant to the game.
Definition at line 351 of file main.cpp .
void update_flag_func
(
)
Sets to up_flag to true.
Definition at line 69 of file main.cpp .
Sets the new values for the joystick struct variables.
Definition at line 74 of file main.cpp .
void update_physics_engine
(
)
Updates the players position depending on the players current position, velocity and acceleration, all determined from SUVAT equations.
Definition at line 617 of file main.cpp .