naev 0.11.5
pause.c File Reference

Handles pausing and resuming the game. More...

#include "pause.h"
#include "player.h"
#include "sound.h"

Go to the source code of this file.

Functions

void pause_game (void)
 Pauses the game.
 
void unpause_game (void)
 Unpauses the game.
 
void pause_setSpeed (double mod)
 Adjusts the game's dt modifier.
 
void pause_player (void)
 Pauses the game and marks the pause as player-initiated.
 

Variables

int paused = 0
 
int player_paused = 0
 
double dt_mod = 1.
 

Detailed Description

Handles pausing and resuming the game.

Main trick to pausing/unpausing is to allow things based on time to behavie properly when the toolkit opens a window.

Definition in file pause.c.

Function Documentation

◆ pause_game()

void pause_game ( void )

Pauses the game.

Definition at line 28 of file pause.c.

◆ pause_player()

void pause_player ( void )

Pauses the game and marks the pause as player-initiated.

Definition at line 72 of file pause.c.

◆ pause_setSpeed()

void pause_setSpeed ( double mod)

Adjusts the game's dt modifier.

Definition at line 64 of file pause.c.

◆ unpause_game()

void unpause_game ( void )

Unpauses the game.

Definition at line 46 of file pause.c.

Variable Documentation

◆ dt_mod

double dt_mod = 1.

dt modifier.

Definition at line 23 of file pause.c.

◆ paused

int paused = 0

is paused?

Definition at line 21 of file pause.c.

◆ player_paused

int player_paused = 0

Whether the player initiated the pause.

Definition at line 22 of file pause.c.