Manages the game's pause screen functionality and display. More...
#include <app.h>Go to the source code of this file.
Functions | |
| void | Death_Start () |
| Initializes the death screen. | |
| void | Death_Update () |
| Updates the death screen state. | |
| void | Death_Render () |
| Renders the death screen. | |
| void | EndScreen_UpdateStats (int floorValue, int timeValue, int robotsValue, int healingValue, int hitsValue, int ammoValue) |
| Updates the statistics values on the end screen. | |
| int | EndScreen_CreateStatsPanel (const char *titleText, int startY, int bodyX, int valueX) |
| Creates the statistics panel UI elements. | |
| void | EndScreen_RenderStatsPanel (SDL_Rect headerRect) |
| Renders the statistics panel. | |
Manages the game's pause screen functionality and display.
| void Death_Render | ( | ) |
Renders the death screen.
Displays the death screen with statistics
Renders the death screen.
Renders the death screen UI elements
| void Death_Start | ( | ) |
Initializes the death screen.
Loads textures and creates UI elements needed for the death screen
Initializes the death screen.
Creates the text elements that make up the death screen, positioning them appropriately on the screen.
| void Death_Update | ( | ) |
Updates the death screen state.
Handles input and interaction with the death screen
Updates the death screen state.
Checks for the ESC key press or button clicks to return to the main menu and updates the statistics display
| int EndScreen_CreateStatsPanel | ( | const char * | titleText, |
| int | startY, | ||
| int | bodyX, | ||
| int | valueX | ||
| ) |
Creates the statistics panel UI elements.
| titleText | The text to display in the statistics header (e.g., "Statistics") |
| startY | The Y position to start rendering the statistics panel |
| bodyX | The X position for labels |
| valueX | The X position for values (right-aligned) |
| void EndScreen_RenderStatsPanel | ( | SDL_Rect | headerRect | ) |
Renders the statistics panel.
| headerRect | The rectangle for the statistics header background |
| void EndScreen_UpdateStats | ( | int | floorValue, |
| int | timeValue, | ||
| int | robotsValue, | ||
| int | healingValue, | ||
| int | hitsValue, | ||
| int | ammoValue | ||
| ) |
Updates the statistics values on the end screen.
| floorValue | The floor/level reached by the player |
| timeValue | The time in seconds the run lasted |
| robotsValue | The number of robots deactivated during the run |
| healingValue | The number of healing items used during the run |
| hitsValue | The number of hits taken by the player |
| ammoValue | The amount of ammunition spent during the run |