Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
death.h File Reference

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.
 

Detailed Description

Manages the game's pause screen functionality and display.

Author
Darren
Date
2025-03-21

Function Documentation

◆ Death_Render()

void Death_Render ( )

Renders the death screen.

Displays the death screen with statistics

Renders the death screen.

Renders the death screen UI elements

◆ Death_Start()

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.

◆ Death_Update()

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

◆ EndScreen_CreateStatsPanel()

int EndScreen_CreateStatsPanel ( const char *  titleText,
int  startY,
int  bodyX,
int  valueX 
)

Creates the statistics panel UI elements.

Parameters
titleTextThe text to display in the statistics header (e.g., "Statistics")
startYThe Y position to start rendering the statistics panel
bodyXThe X position for labels
valueXThe X position for values (right-aligned)
Returns
The Y position after the last statistic row

◆ EndScreen_RenderStatsPanel()

void EndScreen_RenderStatsPanel ( SDL_Rect  headerRect)

Renders the statistics panel.

Parameters
headerRectThe rectangle for the statistics header background

◆ EndScreen_UpdateStats()

void EndScreen_UpdateStats ( int  floorValue,
int  timeValue,
int  robotsValue,
int  healingValue,
int  hitsValue,
int  ammoValue 
)

Updates the statistics values on the end screen.

Parameters
floorValueThe floor/level reached by the player
timeValueThe time in seconds the run lasted
robotsValueThe number of robots deactivated during the run
healingValueThe number of healing items used during the run
hitsValueThe number of hits taken by the player
ammoValueThe amount of ammunition spent during the run