naev 0.12.6
pause.c File Reference

Handles pausing and resuming the game. More...

#include "pause.h"
#include "ntracing.h"
#include "player.h"
#include "sound.h"
Include dependency graph for pause.c:

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 25 of file pause.c.

◆ pause_player()

void pause_player ( void )

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

Definition at line 70 of file pause.c.

◆ pause_setSpeed()

void pause_setSpeed ( double mod)

Adjusts the game's dt modifier.

Definition at line 61 of file pause.c.

◆ unpause_game()

void unpause_game ( void )

Unpauses the game.

Definition at line 43 of file pause.c.

Variable Documentation

◆ dt_mod

double dt_mod = 1.

dt modifier.

Definition at line 20 of file pause.c.

◆ paused

int paused = 0

is paused?

Definition at line 18 of file pause.c.

◆ player_paused

int player_paused = 0

Whether the player initiated the pause.

Definition at line 19 of file pause.c.