Pyrogenesis trunk
Functions | Variables
Globals.h File Reference
#include "lib/input.h"
#include "lib/frequency_filter.h"
#include "ps/KeyName.h"
#include <unordered_map>
Include dependency graph for Globals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

InReaction GlobalsInputHandler (const SDL_Event_ *ev)
 

Variables

bool g_app_minimized
 
bool g_app_has_focus
 
int g_mouse_x
 
int g_mouse_y
 
bool g_mouse_active
 Indicates whether the mouse is focused on the game window (mouse positions should usually be considered inaccurate if this is false) More...
 
std::unordered_map< int32_t, bool > g_scancodes
 g_scancodes: Key states, indexed by SDL_Scancode constants. More...
 
bool g_mouse_buttons [MOUSE_LAST - MOUSE_BASE]
 g_mouse_buttons: Mouse buttons states, indexed by SDL_BUTTON_* constants. More...
 
PIFrequencyFilter g_frequencyFilter
 

Function Documentation

◆ GlobalsInputHandler()

InReaction GlobalsInputHandler ( const SDL_Event_ ev)

Variable Documentation

◆ g_app_has_focus

bool g_app_has_focus
extern

◆ g_app_minimized

bool g_app_minimized
extern

◆ g_frequencyFilter

PIFrequencyFilter g_frequencyFilter
extern

◆ g_mouse_active

bool g_mouse_active
extern

Indicates whether the mouse is focused on the game window (mouse positions should usually be considered inaccurate if this is false)

◆ g_mouse_buttons

bool g_mouse_buttons[MOUSE_LAST - MOUSE_BASE]
extern

g_mouse_buttons: Mouse buttons states, indexed by SDL_BUTTON_* constants.

If an entry is true, it represents a pressed button. Updated by GlobalsInputHandler in response to mouse button up/down events.

Be aware that SDL_BUTTON_* constants start at 1. Therefore, g_mouse_buttons[0] is unused. The order of entries is as in KeyName.h for MOUSE_*

◆ g_mouse_x

int g_mouse_x
extern

◆ g_mouse_y

int g_mouse_y

◆ g_scancodes

std::unordered_map<int32_t, bool> g_scancodes
extern

g_scancodes: Key states, indexed by SDL_Scancode constants.

If an entry is true, it represents a pressed key. Updated by GlobalsInputHandler in response to key press/release events.